Forest Logo
search
package_2

fairguard

By @thelightsaberthatisblue-cell

Roblox

Mirrored from Wally

FairGuard

A free, open-source, server-only anticheat for Roblox. It is a framework, not a drop-in: anything that can change where a player is or how fast they move goes through FairGuard's API, which mirrors the Roblox APIs. That way the server always knows the cause of every physical change, and anything it can't explain is a violation.

Install

Put it in ServerScriptService (a Wally server package under ServerPackages is fine if that folder is inside ServerScriptService). Do not put it in ServerStorage: Scripts never run there, so it can't start.

There is no Start call and it can't be turned off from the client. It boots itself when installed.

local FairGuard = require(path.to.FairGuard)

What it creates

One RemoteEvent named FairGuard in ReplicatedStorage, made at runtime. It is the only door from client to server. The client fires it as

remote:FireServer("ActionName", ...)
remote.OnClientEvent:Connect(function(actionName, ...) end)

The client holds nothing valuable; assume it can always be tampered with.

Use the API instead of the Roblox calls

RobloxFairGuard
character:PivotTo(cf)FG:PivotTo(character, cf)
character:TranslateBy(v)FG:TranslateBy(character, v)
humanoid.WalkSpeed = nFG:SetWalkSpeed(character, n, { Duration = 3 })
humanoid.JumpHeight = nFG:SetJumpHeight(character, n, { Duration = 3 })
workspace.Gravity = nFG:SetGravity(n)
root.Anchored = bFG:SetAnchored(character, b)
root:ApplyImpulse(v)FG:ApplyImpulse(character, v, ruleNameOrTable)
root.AssemblyLinearVelocity = vFG:SetVelocity(character, v, ruleNameOrTable)

Other calls: FG:SetState / ClearState / HasState (your own state names, used by Allow rules), FG:Grant / Revoke (for client-side mechanics like a sprint), FG:CreateRemote(name, contract) (register a client action), FG:IsTracked / GetVerifiedCFrame / GetScore / GetShadow (read-only queries).

Report shots (aim detection)

FG:ReportShot(player, origin, direction, didHit, { Targets = enemies })

Call it once per shot from your own hit code. direction must be where the player aimed, before any weapon spread. FairGuard works out who they were aiming at and runs four statistical detectors: Aim.Perfect (dead-center shots), Aim.Snap (flicks that land dead-center), Aim.Reaction (shots faster than a human can react to a target appearing), and Aim.Accuracy (long-range hit rate). Each one tests its window of shots against a human baseline and only flags when an honest player would do that less than about 1 time in 100,000. They are Tier B: they can add up to a kick request but never to a ban on their own. Baselines and thresholds are in the Aim section of the Model; tune AccuracyBaseline to your game's weapons.

Line-of-sight tracking for Aim.Reaction costs a few raycasts per second for players who have fired in the last 45 seconds, capped by VisionBudgetMs.

Register client actions

local shoot = FG:CreateRemote("Shoot", {
	Args = { "Vector3", "Instance?" },
	Rate = 10,
	Cooldown = 0.1,
	Validate = function(player, aim, target) return true end,
})
shoot.OnServerEvent:Connect(function(player, aim, target) end)
shoot:FireClient(player, "hit")

Every call passes: rate, alive, argument types, Allow rules (default deny), cooldown, limits, then your Validate. Anything not registered is dropped and counted against the sender.

Swimming, vehicles, knockback

Swimming. Humanoid state is reported by the client, so a Swimming claim only exempts the air checks while terrain water is actually at the player (Movement.VerifySwimming, read from the terrain at most every 0.15 s). A claim with no water behind it earns no exemption and is logged as Movement.FakeSwim. Only terrain water counts; a Part that looks like water does not.

Climbing works the same way (Movement.VerifyClimbing): a Climbing claim is believed only while a TrussPart, or a part carrying your Movement.ClimbTag, is within ClimbReach studs. Otherwise it is logged as Movement.FakeClimb. If your game climbs on something else, tag it or turn the check off.

Model numbers win. If you set Movement.WalkSpeed or Movement.JumpHeight, FairGuard applies them to the Humanoid at spawn, so the player and the expectation can't disagree.

Vehicles. Tag a seat, or any model above it, and describe it in the Model:

Vehicles = {
	Car = { Tag = "Car", Speed = 90 },
	Plane = { Tag = "Plane", Speed = 220, Flies = true },
},

Speed is the top horizontal speed in studs/s; Climb and Fall default to Speed; Flies = true lets the vehicle leave the ground freely. A seat that matches no vehicle gets the generic Movement.SeatedSpeed allowance. Stepping out of a fast vehicle stays covered for a short grace period.

Anti-knockback. When you push a player with FG:ApplyImpulse or FG:SetVelocity, FairGuard expects them to move. A push that carries them less than a small fraction of what it should is recorded as a miss; a significance test over the recent pushes (Movement.AntiKnockback, Tier B) decides whether the misses are more than an honest player would produce. Pushes into walls, seats, water, ladders or anchors are not judged. If most other players are also ignoring pushes, the pushes themselves are not taking effect and nobody is flagged. Settings are in the Knockback section.

The Model

FairGuard.Model is a table inside the root module. Edit it in place. Every section is optional; an empty Model runs on safe defaults.

Allow = {
	{ Name = "Sprint", When = { Granted = true }, Permit = { Speed = 24, Duration = 5 } },
	{ Name = "Shoot", When = { State = "InRound" }, Permit = { Actions = { "Shoot" } } },
},
Zones = { Lobby = { Tag = "LobbyZone" } },
Actions = { Shoot = { Args = { "Vector3" }, Rate = 10 } },

"When X is true, Y is permitted." Anything not permitted is denied. States are your own names, set with FG:SetState(player, "InRound"). Typos are reported in Studio with a "did you mean" suggestion. Every setting and its default is in src/FairGuard/Core/Config.luau.

active

FairGuard.active = false -- the anticheat sleeps

Sleeping turns off the judging only: no verdicts, no rejections, no snap-backs, no scoring, no kick or ban requests. The API keeps working, and the shadows keep following every player, so waking is instant. Use it for cutscenes, map loads, or tuning. Read live, so it can be flipped at any time.

Kick and ban are requests

FairGuard never removes anyone on its own. It raises a request with an evidence package, and your handler decides:

FG.BanRequested:Connect(function(request) request:Approve() end)
FG.KickRequested:Connect(function(request) request:Reject("reviewed") end)

Approve is the only path to Player:Kick / BanAsync. With no handler connected, nobody is removed (suppression still runs). In Studio, Approve only logs.

Other events: Flagged, Suppressed, Alerted, RequestDecided.

What it does not solve

Humanized aimbots, ESP data itself, alts and ban evasion, bugs in your own Allow rules, and backdoored server code. These are documented, not hidden.

Status

Written, not yet tested in Studio. Expect rough edges. Local development: rojo serve dev.project.json. Publishing uses default.project.json. Edit wally.toml to set your own Wally scope before publishing.

Package Details

Install command (Click to copy)


Version

0.1.0

License

MIT

check_circle

Safe for commercial use

infoThe package archive does not include its license text; the license is declared in its manifest metadata.

Automated license review — not legal advice.