{"id":"moxxum/guard","name":"guard","scope":"moxxum","platform":"roblox","description":"Anti-exploit baseline: position sanity checks, remote flood detection, strike system","version":"0.1.0","latest":"0.1.0","versions":["0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":["The package archive does not include its license text; the license is declared in its manifest metadata."],"licenseVerified":false,"dependencies":{},"integrity":"f2607c11e59af6a7d654b439149496cd1360216442581866316ed13b8ae4a39b","likes":0,"downloads":0,"install":"forest install moxxum/guard","url":"https://forest.dev/p/roblox/moxxum/guard","files":"https://api.forest.dev/ai/package/roblox/moxxum/guard/files","readme":"# guard\n\nAnti-exploit **baseline** — deliberately not an anti-cheat suite. Server-authoritative\nposition sanity (horizontal speed + teleport-distance thresholds), remote flood\ndetection that plugs into netkit's middleware, a strike system with decay, and a\nconfigurable kick/log action. The third leg of the baseline is convention, enforced by\ncode review: currency is never client-trusted — only datakit mutations on the server.\n\nServer realm: `Guard = \"moxxum/guard@0.1.0\"` under `[server-dependencies]`.\n\n## API\n\n```lua\nGuard.Init(config?)          -- starts position checks + strike decay\nGuard.NetMiddleware()        -- pass to NetKit.Use(); blocks + strikes on remote floods\nGuard.Excuse(player, secs?)  -- call BEFORE game-initiated teleports (default 5s grace)\nGuard.Flag(player, reason)   -- manual strike (e.g. from game-specific detections)\nGuard.GetStrikes(player)\n```\n\nConfig defaults: `MaxSpeed = 100` (horizontal studs/s), `TeleportThreshold = 200`\n(horizontal studs per check), `CheckInterval = 1`, `StrikeLimit = 5`,\n`StrikeDecaySeconds = 30`, `SpawnGraceSeconds = 3`, `RemoteFloodPerSecond = 50`,\n`Action = \"log\"` (kick is opt-in), `OnViolation` hook (wire to analytics).\n\nChecks use horizontal (XZ) distance so falling never flags. Skipped while seated\n(vehicles), during spawn grace, and during an `Excuse` window. Hitting `StrikeLimit`\nlogs (and kicks when `Action = \"kick\"`), then resets the count.\n\n## Example\n\n```lua\nlocal Guard = require(ServerPackages.Guard)\nlocal NetKit = require(ReplicatedStorage.Packages.NetKit)\n\nGuard.Init({\n\tAction = \"kick\",\n\tOnViolation = function(player, reason, strikes)\n\t\tAnalytics.Custom(player, \"guard_violation\", strikes, { reason })\n\tend,\n})\nNetKit.Use(Guard.NetMiddleware())\n\n-- Anywhere the game legitimately teleports someone:\nGuard.Excuse(player)\ncharacter:PivotTo(arenaSpawn)\n```\n\n## Test\n\n`rojo build test.project.json -o test.rbxl`, open in Studio, Play Solo, expect\n`[guard-test] ALL PASS` after ~10s (flood blocking, teleport flag, excused teleport).\n","readmeTruncated":false}