The script does not ban players when the walkspeed is above 30
local Restrictly = require(script.Parent.Parent.Modules["Restrictly [V3]"])
game:GetService("RunService").Heartbeat:Connect(function()
for i, player in pairs(game:GetService("Players"):GetPlayers()) do
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
if humanoid.WalkSpeed > 30 then
print("speeding")
Restrictly.Ban(player, "Speeding hacks")
end
end
end)
local Restrictly = require(script.Parent.Parent.Modules["Restrictly [V3]"])
game:GetService("RunService").Heartbeat:Connect(function()
for _, player in game:GetService("Players"):GetPlayers() do
local char = player.Character or player.CharacterAdded:Wait()
local humanoid = char:WaitForChild("Humanoid")
if humanoid.WalkSpeed > 30 then
if game:GetService("RunService"):IsStudio() then player:Kick("Speeding hacks") continue end
print("speeding")
Restrictly.Ban(player, "Speeding hacks")
end
end
end)
Is this supposed to be an anti-cheat? It will not work because the client can change its own character WalkSpeed to 30 or something else without the server seeing that change. Yes, on the server it will appear that the hacker is moving faster but for server the WalkSpeed will remain the same. You should approach this problem differently. Take a look at this post: My attempt at an anti speed script
I hope that helps. Have a nice day!