Anti cheat thing i made


so i made a script that checks if there is any error that came from exploiting script so it might protect the game from exploiters who tests their scripts

9 Likes

Can you send the code for this? I’m intrigued.

1 Like
game:GetService("LogService").MessageOut:Connect(function(Message,MessageType)
	local BannedError = "Script ''"
	local Matching = string.match(Message, BannedError)
	if Matching == BannedError then
		game.ReplicatedStorage:WaitForChild("Kick"):FireServer() 
	end
end)

keep in mind it doesnt detect the excuting but detects the errors that comes from the exploiting scripts
also note: it wont work on synpase x

2 Likes

Issue with this is that would it not falsely kick people if you even have one error in your code client side? Also this is very easy to bypass which is just not to have any errors in your code when exploiting.

Also is this code not in the client side (in a local script) because of it firing to the server so could exploiters not just remove this script?

5 Likes

There multiple ways to bypass this anticheat.

  • Unhooking the connection using getconnections(RBXScriptSignal signal)
  • Deleting Kick from ReplicatedStorage
  • Deleting the script
  • Most exploiters’ scripts don’t make errors, simple

There are of course more of them, but they are more complicated than this. An exploiter wouldn’t try to bypass this the hardest way but rather a way that would make this harder to get to work again.

7 Likes

it doesnt, the string.match() will return nil if it was normal script

2 Likes

what if i did something like
instead of firing kick instead i use while loop with no wait to crash them
and script.Destroying also fire a while loop with no wait

1 Like

hookfunction(while, function() print('haha') end)

I know that its probably not going to work (i’ve never had to hook while)

1 Like

idk what to do at this point :skull:

1 Like

ok after thinking a bit how about if i put something like 3 local scripts with the same name with that script so they cant hook it

1 Like

hookfunction(while, function() print('haha') end)
would make it so that while loops dont work (this wouldn’t work but its phseudocode)

1 Like

give up on clientsided anti-cheat
embrace serversided

4 Likes

yeah this is a known thing, there is another way of doing it which isn’t very known (don’t know i it’s been patched yet) but the downside is that it can also be false flagged by core script errors (I’m sure there is probably a way to filter them out but it’s whatever)

1 Like

What if their script doesn’t error? What if they can just join right back in the game? What if they can prevent connections to LogService from firing? What if they have anti-clientkick script? They can do all that, unfortunately.

2 Likes

if it doesnt error then idk i cant find a way to get the script that printed , if they rejoined you just make anti cheat that auto bans them , idk what to do at this point , use while loop with no wait so they cant see the console

anti-rejoin is fairly simple to make, you can check the LogService connection and the anti-clientkick script I suggest crashing instead.

did you just post a video of you exploiting on the dev forum

1 Like

Isn’t replicated storage on the server?

Exploiters can simply stop that from happening by using ScriptService.

ReplicatedStorage is on the client and the server. It is normally used to put remote events that communicate between the client and the server.