type ```
this will make a Lua Code Block
ServerScriptService or starterPlayerScripts?
as myaltsthis said this script cant stop exploiting because it checks when player joined , exploiters will change the speed later isnt it wrong?
I would recommend ServerScriptService so that Hackerâs wont delete it.
Exactly what I was thinking, it needs to be either in a .Running function or a loop of some sort
did this script worked? i made a .Running function
true, i was thinking in StarterPlayerScript, To Check the Humanoidâs Walk Speed and Send it to the Server via Remote Event, So if the Player Walkspeed Doesnât Match >20 then
to Kick the Player
yes! good idea but exploiters can delete it , i think
I believe my last idea should work, checking the last position every second compare to the current position in Magnitude, then checking if that is greater than the playerâs walkspeed should work. Like this:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local HRP = char:WaitForChild("HumanoidRootPart")
local lastpos
wait()
while wait(1) do
if not lastpos then
lastpos = Vector3.new(HRP.CFrame.Position.X, 0, HRP.CFrame.Position.Z)
else
local magnitude = math.round((lastpos - Vector3.new(HRP.CFrame.Position.X, 0, HRP.CFrame.Position.Z)).Magnitude)
lastpos = Vector3.new(HRP.CFrame.Position.X, 0, HRP.CFrame.Position.Z)
if magnitude > char.Humanoid.WalkSpeed then
plr:Kick("Speed hacking")
end
end
end
end)
end)
Of course, in a server script.
Then I Could do
if script.Parent:Destroy() == true then
game.ReplicatedStorage.OnDestroyed:FireServer()
end```
And Automatically the Server gets the Name of who Fired that RemoteEvent
then Proceed to kick them
You know, if hackers really can send a walkspeed over from the client, and it would not replicate from the server, you can probably detect it some other way, such as with MoveDirection.Magnitude, or with the humanoid rootpartâs velocity. You should probably also involve Kaid3n22âs method if you want
That Could Work, But I Donât Really Know how to use
moveDirection.Magnitude or Velocityâs
You Always Couldvâe Kicked the Player From Server Side Right?
If it was Local Script, then Who says a Exploiter Canât Kick Everyone from the game
I posted a code block in my last post, you could use that.
Okay iâll Check it out right now.
Yes, you can use the function on the client, but you only kick the LocalPlayer.