How to exempt dashes and grapples from server anti-cheat
An anti-cheat that pauses when the client says a dash has started can be paused for good. How to give abilities a limited allowance the server controls.
What it looks like
The server's movement check has to let some fast movement through: a dash, a grappling hook, a launch pad, a cutscene. Instead of working that out itself, the server pauses the check whenever the client says the movement is about to happen. A remote like StartDash or Grappling sets an exemption, and the speed or teleport check skips that player until it runs out.
Remotes.StartDash.OnServerEvent:Connect(function(player) exemptUntil[player] = os.clock() + 1 end)
What an exploiter could do
They fire the exemption remote on a loop and the server stops checking their movement. Speed hacks, flying and teleports all go unnoticed, so they can reach any area, outrun every other player and claim anything a movement check was guarding, while the game reports that its anti-cheat is running.
How to fix it
- Let the server decide when fast movement happens. A server teleport or server-applied pad force can reset the last position itself, so no client message is needed.
- When the client starts the ability, check it on the server first: a per-player cooldown measured with the server's clock, a game state that allows it, and the player owning the ability.
- Give the exemption a budget rather than switching the check off: add the ability's extra distance to the allowed distance once, or allow movement only towards a destination the server chose.
Vulnerable example
local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local maxSpeed = 16 local allowance = 1.5 local lastPosition: { [Player]: Vector3 } = {} local exemptUntil: { [Player]: number } = {} ReplicatedStorage.Remotes.StartDash.OnServerEvent:Connect(function(player: Player) exemptUntil[player] = os.clock() + 1 end) RunService.Heartbeat:Connect(function(delta) for _, player in Players:GetPlayers() do local root = player.Character and player.Character:FindFirstChild("HumanoidRootPart") if root and root:IsA("BasePart") then local position = root.Position * Vector3.new(1, 0, 1) local previous = lastPosition[player] if (exemptUntil[player] or 0) > os.clock() or not previous then lastPosition[player] = position elseif (position - previous).Magnitude <= maxSpeed * allowance * delta then lastPosition[player] = position else root.CFrame = CFrame.new(previous.X, root.Position.Y, previous.Z) end end end end) Players.PlayerRemoving:Connect(function(player) lastPosition[player] = nil exemptUntil[player] = nil end)
Fixed example
local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local maxSpeed = 16 local allowance = 1.5 local dashDistance = 24 local dashCooldown = 3 local lastPosition: { [Player]: Vector3 } = {} local lastDash: { [Player]: number } = {} local bonus: { [Player]: number } = {} ReplicatedStorage.Remotes.StartDash.OnServerEvent:Connect(function(player: Player) local now = os.clock() if now - (lastDash[player] or -math.huge) < dashCooldown then return end lastDash[player] = now bonus[player] = dashDistance end) RunService.Heartbeat:Connect(function(delta) for _, player in Players:GetPlayers() do local root = player.Character and player.Character:FindFirstChild("HumanoidRootPart") if root and root:IsA("BasePart") then local position = root.Position local previous = lastPosition[player] if not previous then if position.Magnitude < math.huge then lastPosition[player] = position end continue end local walked = maxSpeed * allowance * delta local moved = ((position - previous) * Vector3.new(1, 0, 1)).Magnitude local extra = bonus[player] or 0 if moved <= walked + extra and position.Magnitude < math.huge then bonus[player] = if moved > walked then math.max(extra - (moved - walked), 0) else extra lastPosition[player] = position else root.CFrame = CFrame.new(previous) end end end end) Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function() lastPosition[player] = nil bonus[player] = nil end) end) Players.PlayerRemoving:Connect(function(player) lastPosition[player] = nil lastDash[player] = nil bonus[player] = nil end)
How to spot this in your own scripts, and the cases that only look like it, are part of the Luaudit check your AI runs.