After reviewing the code, it looks messy (for the ban system)
game:GetService("Players").PlayerAdded:Connect(function(Player)
if Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "Atem_Pharaoh1735" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" then
Player.CharacterAdded:Connect(function(Character)
--credits to Ron_GM(Kayaba) for helping
while wait(1) do
if Character:FindFirstChildOfClass("Humanoid").WalkSpeed > 40 or Character:FindFirstChildOfClass("Humanoid").JumpPower > 50 then
Player:Kick("You know why. Stupid.")
break
end
end
end)
end
end)
I recommend you use this code provided by @BankrollAbd
Player.CharacterAdded:Connect(function(Character)
--credits to Ron_GM(Kayaba) for helping
while wait(1) do
if Character:FindFirstChildOfClass("Humanoid").WalkSpeed > 40 or Character:FindFirstChildOfClass("Humanoid").JumpPower > 50 then
Player:Kick("You know why. Stupid.")
break
end
end
end)
Also, as everyone said:
@hrxin Since you’re anti-cheat is SS, and the code you provided can’t do anything it’s rendered useless.
Here is what I mean (if you don’t understand what my point is.)
@BankrollAbd’s code encourages banning users by username, which is bad because you can change your name to bypass it. UserIds should be the only banning method. @Jermartynojm’s code should be used.
Then at that point you might as well not be using your method anyway, since you’d only be using UserIds and Jermartynojm’s code does that in a simpler way.
The version that I have seen would ban everyone except banned people. We do not know how does your script works for you. You probably haven’t tested it even when you say so (or maybe you tested it changing the speed on the server instead of the client).
If you still want to use the version of the script you have now, at least kick players who are banned, like this:
game:GetService("Players").PlayerAdded:Connect(function(Player)
if Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "Atem_Pharaoh1735" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" and Player.Name ~= "BannedPersonNameHere" then
--[[Player.CharacterAdded:Connect(function(Character)
--credits to Ron_GM(Kayaba) for helping
while wait(1) do
if Character:FindFirstChildOfClass("Humanoid").WalkSpeed > 40 or Character:FindFirstChildOfClass("Humanoid").JumpPower > 50 then
Player:Kick("You know why. Stupid.")
break
end
end
end)]]
--Will not work as exploiters change their speed locally and locally changed speed is not replicated to the server.
else
Player:Kick("You are banned!")
end
end)
Using the .WalkSpeed to detect speed exploits it’s actually useless, a better check-system would be checking the studs that the server-walk speed can move in a second and if the player moves more than these studs in a second the script should teleport him back to the last good position.