Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local maxFPS = 65 -- Maximum allowed FPS
- function OnPlayerJoin(player)
- -- Initialize player-specific variables
- player.fpsCheck = false
- end
- function OnPlayerUpdate(player)
- local fps = player:GetFPS()
- if not player.fpsCheck then
- -- First frame check, record player's FPS
- player.fpsCheck = true
- player.initialFPS = fps
- elseif fps > maxFPS and player.initialFPS > maxFPS then
- -- Player's FPS exceeds the maximum allowed FPS
- player:Kick("System detecting that you are cheating")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement