

Note the values for maxspeed and checktime. Local lastcf = root.CFrame -We will store the player's CFrame so that we can move the player there if they seem to be hacking. Local root = script.Parent:WaitForChild("HumanoidRootPart") -Get HumanoidRootPart so we can keep track of the player's position. If we make checktime too fast, like ".1", the script will be recording positions too fast and thus will fail to work correctly! Local checktime = 1 -How many seconds we wait before we record their speed. Let’s add some variables first: local maxspeed = 22 -The maximum distance the player can travel within a check time. To begin, place a script into StarterCharacterScripts. We cannot rely on properties like WalkSpeed or Velocity to catch a hacker, but we can compare their positions to see if they’re cheating! Don’t freak out if that sounds too complex for you, because it’s actually really easy.

If a player seems to be moving too fast, we stop them.

The best way to detect a speed hacker is to check their location on the server. This means we need a way to detect ALL speed hacks, not just a specific method of doing it. The most basic hack could alter the player’s WalkSpeed, and more advanced hacks can change their FPS. Before we can stop speed hackers, we need to know how they speed hack in the first place! The truh is, there’s no single way people do this.
