Help with an Anti-Cheat system

Hello! Lately I’ve been working on an Anti-Cheat system, I have two scripts the Anti-Cheat and the Anti-Delete:

image

Both scripts will kick the player if one of the scripts is removed. My problem is if both scripts are deleted at the same time it won’t kick the player.

My first thought was to have an authentication system, so the Anti-Delete script would fire a RemotEvent every second and if the server didn’t get a response for X amount of seconds it would kick the player. After thinking about it I realized an exploiter could fire the RemoteEvent and fake the authentication.

So now I’m stuck, how do I detect if both scripts have been deleted without exploiters being able to tamper with it?

5 Likes

A lot of anti exploits can be fairly easily transferred to the server, I would probably always treat the client as a no mans land that the exploiter has full and absolute control over, theres no amount of fancy stuff you can do on the client that an exploiter couldnt eventually figure out

3 Likes

Just use it in the server, much safer and you get more control over the client.

2 Likes

The goal is just to kick the player if they delete the scripts, authentication isn’t a good idea although the idea is just to have enough time to kick the player. Any way I could do that?

anti delete like for scripts you can use clone and stored script will placed into ServerStorage and folder it then on serverscriptservice a script for checker :FindFirstChild(NameScript) if it nil it will find first the script name on ServerStorage and clone it back and place it, when the Script it gone a value for stop the server working to 1 (IntValue) after cloned and placed it the value will back to 0 and server working back normaly

This is a local script though, if you deleted it locally it would break everything. And the server would still think its there.

1 Like

Add a script In “ServerScriptService” Create a normal script & Then create a local script with the name “Checker” In side of the script (Below will be the code for both of it), The script will check by server if you deleted the script & the localscript will check by client if you deleted the script! - Also remove your current Anti-Delete Script

Script

function checkServer(char, player)
if(char:FindFirstChild(“Anti-Cheat”)) then
return true
else
player:Kick("\n [Anti Cheat] \n The Anti-Cheat was removed from your character to ensure maximum safety you were kicked please rejoin!")
end

function checkLocal(c)
local newLocalChecker = script.Checker:Clone()
newLocalChecker.Parent = c
end

game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(c)
while task.wait(0.5) do
if checkServer(c, p) == true then
checkLocal()
else
p:Kick("\n [Anti Cheat] \n The Anti-Cheat was removed from your character to ensure maximum safety you were kicked please rejoin!")
end
end)

Localscript

while task.wait(0.5) do
if(script.Parent:FindFirstChild(“Anti-Cheat”)) then
script:Destroy()
else
game.Players.LocalPlayer:Kick("\n [Anti Cheat] \n The Anti-Cheat was removed from your character to ensure maximum safety you were kicked please rejoin!")
end

Hope the script help :slight_smile:

3 Likes

Yeah thats what my code does, although if you delete both scripts at the same time the scripts dont have enough time to delete it, also I think your system would allow for an exploiter to remove another player’s local script and get them kicked (I think)

Method 1:
You could try to use more than two scripts. I once made a clientside anti-cheat which utilized 6 different scripts in different folders. One in StarterCharacter, another in ReplicatedStorage, etc. This worked very well and made it a lot harder to exploit. (still not impossible)

Method 2 (unbeatable):
Make a serverside anti-cheat. Even I don’t make my anti-cheats fully on the client. First of all, exploiters can see local scripts and find vulnerabilities and go past the anti-cheat. Second, if the exploiter tries hard enough, he could bypass any local anti cheat.

Method 3:
Intergrate the anti-cheat in a game critical script. This would make bypassing the anti cheat hard as the exploiter needs to break the game in a critical way for it to happen. Only way to beat this one is for the exploiter to re-add an edited script.

Final Words:
The disadvantage of remote events is that laggy players often get false positives. This is why I don’t like using remotes for this.

Bypasses for admins could be done serverside with remotes to request a list of whitelisted UserIDs

Those are just some of the ways I have to beat exploiters in deleting anti cheats.

3 Likes

You can use events but then youd have to account for them just stopping the events from firing and if u use remotes they could also manipulate those

The exploiter could just make another script to get the key?

Wasting a lot of time on a client-side anti cheat is a waste of time and should and only has to be mediocre at best. Client side will stop some hackers but the determined ones will easily bypass it. Remember exploiters have a control on the client that is so deep that it’s crazy. Also exploiters can litterly bypass the kick function on the client by overriding the metatable for it.

2 Likes

They cannot delete a server script service script, I think this would be your best bet If you needed a proffesional anti exploit (Server-Sided, Client sided) You should check my anti exploit Its called Anonymous Anti Exploit

This is very true! And also He can edit and re-run the anti cheat as there own version!

The best anti-cheat system you can ever make is to never trust the client.
Do all the logic on the server.

Exploiters can bypass anything that’s client-sided, and anything that is replicated to them.
Serverscripts and modulescripts required by one, is safe, as their bytecode is never replicated to the client, regardless of where it is located.

3 Likes

well when you actually use my remote event anti-cheat then they cant

Just gonna destroy the player’s ping?

What’s stopping them from just recreating the client-side security, but just getting rid of the security part of it and just responding to any of the server’s requests?

To Correct you, exploiters can get ModuleScripts in places like workspace and ReplicatedStorage because they are replicated. They can read them.

2 Likes

You can lmao Ripull used one and 3dsboy bypassed it

1 Like