Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Anti-Speed Hacker Script Not Working?

Asked by
yoshiegg6 176
10 years ago

I made this script to stop exploiters but it doesn't work. Can anyone help me? There's no output. It's supposed to check every 20 seconds to prevent lag is someone is exploiting. Also its in a normal script in the workspace.

01while wait(20) do
02for i,v in pairs (game.Players:GetChildren()) do
03wait(0.6)
04H = v.Character.Humanoid
05if H.WalkSpeed > 16 then
06print(v.Name.."also known as"..v.Name:Sub(1,5).."has been caught exploiting. His or Her Walkspeed was changed to"..H.WalkSpeed..". They will be kicked shortly.")
07wait(5)
08v:Kick()
09print(v.Name.."was kicked. Play fair, don't exploit.")
10wait(5)
11else
12wait(0.6) --to prevent lag
13end
14end
15end
16end
0
Actually changing the walkspeed directly isn't a very common way to speed hack. http://wiki.roblox.com/index.php?title=Stop_Speed_Hackers Perci1 4988 — 10y
1
I can't open that link, would you mind summarizing that for me? yoshiegg6 176 — 10y

1 answer

Log in to vote
3
Answered by
iFlusters 355 Moderation Voter
10 years ago
01local MaxSpeed = 16 -- Max speed possible in game
02 
03-- Note: I've added a rule-counter, which means you have to go too fast for 2 ticks to get punished.
04-- That's necessary for teleporting by spawning, maybe your admins tp'ing, entering a vehicle, ...
05 
06local caught = {}
07local function punish(plr)
08    if caught[plr] then
09        -- More than 2x too fast in a second? Seems like he needs to get punished
10        -- (As far as I know, it's impossible to teleport 2x in a second without exploiting)
11        -- (Assuming that people don't use admincommands teleport/ very fast)
12        -- (Also assuming that the game doesn't teleport someone 2x in a second)
13        if tick() - caught[plr] < 1 then
14            -- Should never fail, as we don't check RobloxLocked players
15            -- Even if it fails, punish() is called in a pcall() so it's safe anyway
View all 85 lines...
0
Thank you. yoshiegg6 176 — 10y
Ad

Answer this question