So like I've done this script to remove cheaters from the game and I don't know what's wrong with it :(
local Players = game:GetService("Players") local hackers = { } Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(character) local cheater = character:WaitForChild("Humanoid") if cheater.WalkSpeed > 16 or plr.Name == hackers then hackers = {plr.Name} plr:Kick("You have violated the walk speed limit.") end end) end)
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid1 = character:WaitForChild("Humanoid") local humanoid = character:FindFirstChildOfClass("Humanoid") -- so they cant rename humanoid humanoid.Running:Connect(function(speed) if speed > 17 then -- walkspeed kinda player:Kick('speeding') end end) end) end)
pretty g00d
hum = game.Players.LocalPlayer.Character:WaitForChild("Humanoid") plr = game.Players.LocalPlayer if hum.WalkSpeed < 20 then game.Player.Kick.(plr.Name):Kick("Hacking")
****So basically I put it in the comments but this will fix it I believe...
local Players = game:GetService("Players") local hackers = { } Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(character) local cheater = character:WaitForChild("Humanoid") cheater.Changed:connect(function() if cheater.WalkSpeed > 16 or plr.Name == hackers then hackers = {plr.Name} plr:Kick("You have violated the walk speed limit.") end end) end) end)