Best method for anti-exploit?

I’m looking into creating some anti-exploit scripts for Flood Escape 2 to prevent cheaters and those ruining the gameplay for others. The main issues I’m encountering are players teleporting, flying in the form of constant jumping, and potential other methods like noclipping and all axis flight.

I’m already thinking of covering teleporting by only allowing the server to move players far distances in setting up for a new round, and to boot random teleports not validated by the server, though I need to account for players who may be visibly lagging enough to cause a false positive.

5 Likes

One of the ways this could be worked out is to create a script that would look for a specific GUI, or specific GUI children under CoreGui and then remove that GUI, essentially enabling read & write access to foreign GUIs, but keeping Roblox specific GUIs locked. Roblox, however, seems to be against this method of handling exploits.

One thing that I can think of that is possible, is check for their ping. If their ping is a certain amount, such as 500-1000, leave them alone. If their ping is only 80-90, normal ping, then kick them since they could be exploiting. Kick them for extremely high ping above 500-1000 just to be on the save side as well. This would handle normal rubber banding and teleportation exploits.

1 Like

For anti speed and jumppower hacks you can do something like this (or use it directly)

for noclipping you can have a small part positioned at the hrp that constantly calls GetTouchingParts() and you can see if it is colliding with any non character parts (if so, u can assume noclip) (check must be done on server)

flying is a little more difficult because you need to distinguish between freefall and actual hacking
again on server:
to check if person is in either state you can cast a ray downwards from the hrp (with ignoring character parts) and see if the distance is > 3 or something
then to distinguish between freefall and actual hacking, the key differences are that in freefall you always go down and the speed you go down increases (specifically 196.20 studs/s extra velocity increase per second)
if you’re feeling lazy you can probably get away with just ensuring the y position is decreasing (which if true then means you’re in freefall, if false means you’re flying (hacking))

also i think this fits better in #development-support:scripting-support

4 Likes