Anti exploit "bug"

No, as the humanoid.running() has 1 default argument, speed. This means you can check how fast the player is walking, and compare it to the player’s walkspeed on the SERVER. So if a player changes their speed on the client, it will kick them as their speed argument is more than their walkspeed on the server

1 Like

Hm, I haven’t tested that out but that sounds reasonable.

2 Likes

if the player is above what you would consider exploiting, cast rays downwords and subtract the magnitude of the velocity from the hit object from the speed. but also i wouldnt kick them i find a “rubber band” effect is way better

2 Likes

How would I go about doing this? I am not very familiar with rays

Don’t detect walkspeed as the server can’t detect walkspeed changes through client.

@RatiusRat This explains what the script does

You can’t really do anything about exploiters changing their walkspeed.

Yes, you can. If you want, you can copy and paste the script into studio (On the server) and give it a try yourself. When you change the player speed on the client, it kicks you, but when you change it on the server, it doesn’t.

But exploiters can easily change that localscript?

Nevermind this actually works since the walkspeed is set on the server.

1 Like

RayOrigin = Root.Position
RayDirection = Vector3.new(0, -100,0)

and then just use the code on the wiki for raycasts, make the blacklist Character:GetDescendants()

1 Like

Maybe setting a limit for the player’s walk speed? So if the walk speed exceeds than, you can set it back.
There might be a problem with client-server.

1 Like

the Running function just returns the characters overall speed, not there walkspeed, you are faster on a conveyor belt thus it returns that instead of its walkspeed

trying printing out “speed”, you will notice how it would be printing out numbers that aren’t your walkspeed often

1 Like

I re-maken your code, cause there could be 2 whitelisted WalkSpeed. I don’t know why I re-maken it, but, honestly:

local whitelistedSpeed1 = 16
local whitelistedSpeed2 = convoyorspeedhere

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local hum = character:WaitForChild("Humanoid")
if hum.WalkSpeed ~= whitelistedSpeed1 or whitelistedSpeed2 then
player:Kick("hi there ur hacks are cool now get out of here :)")
  end
 end)
end)

Also, putting it on the client is a risk.

Problem is that if there were variations of conveyor speeds then what is the point of that?

That’s not how or statements work. That will kick the player every time. Look on the Dev hub on how or statements work.

What you are doing right now in pseudo code:
(Walkspeed is not equal to white list speed 1) or (white list speed 2 exists)

Whitelist speed 2 always exists

Sorry to inform, but it takes an exploiter way less time to delete this script then it takes you to write it. Anti cheats on the client are never a good option. An exploiter can simply delete or disable your scripts.

In addition, exploit detection scripts based off any information provided by the client should never be trusted as anything the client tells you can be easily manipulated. As @Sensei_Developer stated on their reply, you should be worrying about making server protection instead.

I suggest you check out this post. It’s one of the greatest community resources ever posted in the developer forum.

:sob: I have literally said about 50 times, THIS IS ON THE SERVER. Please read the whole post and replies, as I did state this quite a few times.

If you would like to try the script yourself, just copy and paste into studio on the server. I can assure you, it will work. If you change walk-speed on the client and walk, it will kick you, but if you change on the server, it won’t.

local whitelistedSpeed1 = 16
local whitelistedSpeed2 = convoyorspeedhere

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
       local hum = character:WaitForChild("Humanoid",30) -- wait 30 before declare (infinity yield with waitforchild and continue withoud ever finding it)
       if not hum or not hum:IsA("Humanoid") then 
-- to make sure player didnt rename his humanoid or remove it or renamed it and name somthing else humanoid cause it replicated to the server from what i heard with roblox characters
       --kickhere (warning if hes legit and takes longer then 30 seconds to spawn he also get kicked increase to ur liking)
       elseif hum.WalkSpeed ~= whitelistedSpeed1 or hum.WalkSpeed ~= whitelistedSpeed2 then
            --kick() --some speedy boy
        end
        end
    end)
end)

exploiters can destroy any individual object in their characters, including non-physical items like decals, joints, and scripts, and that destruction replicates to the server.

this is only for character so keep that in mind so make sure to add checks in case he tries to break ur script by changing names or removing stuff

probaly forgot something