Most speedhack detectors run server-side and, due to potential lag, must only be triggered if the speedhack is extremely obvious - several times normal speed. To get around this some players will just give themselves a smaller speedhack (<2x) but this still unbalances gameplay and is very hard to detect reliably serverside. Here’s an extremely simple yet powerful speedhack prevention method I came up with which runs totally clientside.
--noSpeeding basic but precise speedhack protection by Swamp Onions --put this code in lua/autorun/client/nospeeding.lua speedingTickCount = 0 isSpeeding = 0 timer.Create("noSpeeding", 1, 0, function() if speedingTickCount > ((1 / engine.TickInterval()) + 1) then isSpeeding = isSpeeding + 1 else isSpeeding = 0 end speedingTickCount = 0 if isSpeeding > 5 then --crash their game LOL while true do end end end) hook.Add("Tick", "noSpeedingTick", function() speedingTickCount = speedingTickCount + 1 end)
This can reliably detect speedhacks at an impressively low level while having almost zero false detections. It just works based on the fact that some timers are affected by Cheat Engine and some aren’t, and compares values between the two. Of course, any real hacker could stop this from running easily, but this is a good way to stop people who aren’t familiar with GMOD hacking and just boot up Cheat Engine to speedhack like in every game.