How to detect speed hacks when the player's speed changes often

Hi, my game has a walk, run, dash, and a variety of moves that constantly change the player’s movement speed and I’m wondering how I can create a speed hack anticheat that isn’t triggered by the various movement systems I have.

1 Like

Try Somehtign like:

if not (here would probably go a table of everything that you have, and if I’m not wrong should check if the players is doing that, not sure tho) and speed == anything you need then
player:Kick()

Honestly thats going to require a bit of time sitting in silence and thinking of all the math.

One idea is getting how much studs the plr can travel in a specific amount of time using all the tools they get, then checking for if a plr moves faster than the max studs one can travel in the same specific time amount, then check if that speed is consistent.

Moves:
Dash: 20 studs in 0.25 seconds, cooldown 1s
Run: 30 studs/second
Wall Jump: 10 studs in 0.25 seconds, cooldown 0.5s

then add all that together in a 1 second period,

  • they can only dash once in 1 second so thats +30 studs

  • they can wall jump 1 time but they dont have time for another as they already dashed taking 0.25s

  • and they can run at 30 studs so thats +30

making a total of 60 studs they can travel a second at their peak. Using that you can check if a plr is consistently going faster than that.

You can also take account if their movement abilities are on cooldown and just minus those distance from the max they can travel.

So if they dash then their peak without dashing is 30 studs until they can dash again.
If that even makes sense kinda went on a ramble hopefully this helped.

3 Likes

Also don’t forget that people may have lag, making the Server see that they’re going faster while they actually aren’t, what I would do is instead of checking if they are going faster than 60 studs is to check if they are going faster than 65-70 studs, so you’re sure that people that lags almost never gets falsely reported