Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone give me some info about Anti-Cheat?

Asked by
Gigaset39 111
1 year ago
Edited 1 year ago

Hello world! Recently i saw this: https://www.youtube.com/watchv=UAsGI2efubo&ab_channel=Babyhamsta

and now im worried about my game, soo, what methods do you guys use to get rid of this stupid people that ruins evry game and we call hackers? (hackers or exploiters,idk) any way, i got the MainScript in workspace , that means they can copy it, is there something i can do about it? i just created a local script in StarterCharacterScript :

        local player = game.Players.LocalPlayer

repeat wait() until player.Character
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
local KickMessage = "HEHEHE!"

while true do
wait()
if humanoid.WalkSpeed > 18 or humanoid.JumpPower > 51 or humanoid.MaxHealt > 100 
or humanoid.Healt > 101 then
player:Kick(KickMessage)
end 
end

Maybe it helps, but i know they can delete it, IM NOT REQUESTING A SCRIPT, soo, what desavantages you get if you put ur MainGame script in workspace? but if i put it in ServerScriptService: it still works? hackers can get it too?

is there any reason why i should ”keep going”? i mean.. anyone, can copy my game, and i spent months on it, cause im kinda a noob, anyway... this world sucks... :(

Edit: Does this help?

 if Player.PlayerGui.ChildAdded:Connect:function(plr)
            plr:Kick("Simon got mad!")
    end  

1 answer

Log in to vote
0
Answered by 1 year ago
Edited 1 year ago

There are certainly a lot of ways to create anti-cheat for you game, I’ll try to talk about the general concept and ways to make a game safe from people exploiting.

First, no players can see the content inside your server scripts, it is only visible to you when you are in Studio. So it doesn’t matter where you put a server script, though ServerScriptService exists so you should probably put it there.

Local scripts can be visible to an exploiter, and always will if you want the local script to actually function. For example, in PlayerScripts inside the Player object.

Module scripts depends on where you put it. Placing it in a place where clients can see (ReplicatedStorage), means an exploiter can see its content. Placing it in a place where clients cannot see it (ServerScriptService, ServerStorage), means an exploiter… well, cannot see it.

You pointed out that you created two local scripts in an attempt to stop exploiters, which in some case, might work, but is no where near perfect. They can be easily evaded, which is why people always mention that no client sided anti exploit is useful. Instead, you should do most if not all the anti exploit on the server. For example, checking if a player is using speed hacks, you can check the velocity of the player on the server, I won’t go into much detail here, you can search for detailed explanations here or on the DevFourm.

Lastly, there is a reason where you should “keep going”. Exploiters can technically steal your whole map and local scripts, but all the important game logics and essential code should be on the server scripts, which is impossible to steal without direct access to your Studio file.

Good luck, and if you need clear-er explanations, do comment below. (and for everyone else, please point out if I missed anything essential or made a mistake)

0
Thankyou for your answer.. Gigaset39 111 — 1y
Ad

Answer this question