How to Protect Game From Exploiters?

:woot: Hi

:123: Goal : I’m currently making a roblox game. and I want to protect my game from any exploit, hacking.

:blush: My questions :
– what is the best way to protect my game from server-side/client-side ?
– are client-side scripts visible to players ?
– can I disable the /console for all players by using this script ? :

game.Players.PlayerAdded:Connect(function(player)
  player.Chatted:Connect(function(msg)
    if msg == "/console" then
      player:Kick("")
    end
  end)
end)
2 Likes

done, Sorry it was a mistake :heart:

1 Like

This doesn’t make too much sense

The bytecode is, so they can decompile it to get the rough equivalent of Luau source.

That will kick you too and it prevents players from finding potential errors produced by your code. Opening the console doesn’t equate to you being an exploiter.

1 Like

There is already lots of posts about this sort of thing and make sure you put this in the right category, but if someone is exploiting your game and there is no backdoors or leaks they will only be able to control the client side, therefore if they deleted the whole workspace it would only effect them. They can manipulate certain features though, such as firing remote events, if you are using remote events make sure you have them secured on the server end as well as the client. Roblox games are fine unless you make certain features for them to manipulate.

If you have backdoors in your game then exploiters could make server sided changes, backdoors are usually from free models, botted plugins and such. Usually you can get rid of these by making sure you understand all of your scripts and there is no ‘hiden’ scripts in random parts.

For the script you posted, I’m guessing you want to disable the developer console. You can just make it false via the core gui settings

StarterGui:SetCore( "DeveloperConsoleVisible" , false )

Hope this helped.

4 Likes

can I use

StarterGui:SetCore( "DeveloperConsoleVisible" , false )

to enable/disable DeveloperConsole with StarterGui > AdminGui > Frame > ToggleConsole (TextButton) ?

You can put that in a script to enable or disable it for example

button.MouseButton1Down:Connect(function()
StarterGui:SetCore( "DeveloperConsoleVisible" , true)
end)

and the same for disabling it just change true to false.

1 Like

You really shouldn’t be disabling the developer console, it can prove to be extremely useful for debugging issues users might be facing on the client. Exploiters can just as easily re-enable the developer console if you choose to disable it.

3 Likes

I don’t think you should disable /console. Exploiters can already look through your local scripts with a custom /console or other things.

I also like looking through the /console of games and just seeing what’s going on, in my friend’s games it’s just “Hello World!” 10x over.

1 Like

are exploiters have access to send codes from custom console ?

as example :

game.Players.E3saR33.leaderstats.MONEY.Value = 100
1 Like

Most hacking consoles work based on a Exploit API, you would need to find the API and find some methods to prevent it but most of it its really encoded, the api’s code.

3 Likes

Exploiters can modify anything on the client, but the changes will not replicate to the server.

3 Likes

@DaffyDavinko @COUNTYL1MITS
-
can I try hacks in my game to know how it build and then make a system that ban hackers ?
or I will be banned from Roblox ?

Do not be concerned about exploiters; instead, you should protect your remotes by checking if requests are valid.

thanks :heart:
I will search about that .

That won’t help. An exploiter can still enable the console via their script injector by just doing StarterGui:SetCore( "DeveloperConsoleVisible", true) and they won’t even need the developer console in the first place to execute their scripts.

– what is the best way to protect my game from server-side/client-side ?
– is client-side scripts are visible to player ?
– can I disable /console for all players by using this script ? :

  • There isn’t no “best way”, exploiters can’t access the server and if they can, it’s through a backdoor in your game. Exploiters have full control on the client, so you can’t really protect the client side. If the exploiter does funny stuff on the client, their actions obviously will not replicate to the server through FilteringEnabled and will just be ruining the game for themselves. If your game uses remotes, validate them on the server. Additionally, do as little as possible on the client (exceptions include UI handling and etc). You may also check for teleporting and other exploits via the server.

  • Yes, the source and byte code of a local script is replicated to the client (if they are placed in a container a client can access it)

  • No. An exploiter can either press F9 to view the developer console or just type it in the chat. You cannot prevent an exploiter from viewing the developer console. There is also no point in checking if a client has pressed the F9 key, since you can only check for input on the client, an exploiter can simply delete the script or make changes to it.

5 Likes