Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.PlayerAdded:Connect(function(plr)
- local anticheat = coroutine.create(function()
- plr.CharacterAdded:Connect(function(char)
- local HRP = char:WaitForChild("HumanoidRootPart")
- local lastpos
- wait()
- while wait(1) do
- if not lastpos then
- lastpos = Vector3.new(HRP.CFrame.Position.X, 0, HRP.CFrame.Position.Z)
- else
- local magnitude = math.round((lastpos - Vector3.new(HRP.CFrame.Position.X, 0, HRP.CFrame.Position.Z)).Magnitude)
- lastpos = Vector3.new(HRP.CFrame.Position.X, 0, HRP.CFrame.Position.Z)
- local limit = math.round(char.Humanoid.WalkSpeed + (char.Humanoid.WalkSpeed / 25))
- if magnitude > limit then
- plr:Kick("Imagine hacking to increase WalkSpeed...")
- end
- end
- end
- end)
- end)
- coroutine.resume(anticheat)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement