Hey guys I made this anti exploit script do you think it would be a good way to detect speed hacking
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
while wait(10) do
local oldlocation = char.HumanoidRootPart.Position.Z
wait(10)
local newlocation = oldlocation - char.HumanoidRootPart.Position.Z
print(newlocation)
if newlocation > 500 then
plr:Kick("Speed hacking")
end
end
end)
end)
But let’s say I have this code in my game (which i won’t cause idk how to script and that is theft)
And i also have admin. and i give a user admin and he uses the speed command. Would the user be kicked because of that?
Actually humanoid.running don’t give the player walk speed it give the player absolute speed which mean if the player is going fast and his walkspeed in the server is 16 then in the humanoid.running it will be more than that
Yea but humanoid.running don’t return the humanoid walkspeed it return the player absolute speed which mean if the player is going fast it will have a velocity which is replicated and this function get that and turn it to speed idk how its turning it but there is a formula to that