Neutralize a function so it does nothing (MUTATES STATE via hookfunction)
block-functionInstalls a persistent no-op hook on a target Luau function to disable behaviors such as anticheat ticks or kick routines; stop restores the original.
Instructions
WRITES LIVE GAME STATE — INSTALLS A PERSISTENT GLOBAL HOOK. Replaces a target function with a no-op that ignores its arguments, returns nothing, and NEVER calls the original. Use this to disable a behavior outright: silence an anticheat heartbeat/tick, stop a function that kicks the player, neutralize a telemetry reporter, or freeze a damage routine. Distinct from spoof-function-return (which forces a specific return value) — block-function simply makes the call a complete no-op (returns nil/nothing). WORKFLOW (stateful — survives across tool calls via getgenv().__mcp_blockedFns, keyed by functionPath): 1. action='start' with functionPath — resolves the target, captures the original, installs the no-op stub. Returns { started, key }. 2. action='stop' with the same functionPath — restores the original function. Returns { stopped }. CAVEATS: the hook is GLOBAL and PERSISTS until you stop it (or the client restarts). Because the original never runs, blocking a function the game depends on can break gameplay, and a live function hook CAN TRIP ANTICHEAT. Always stop when done. Requires hookfunction, newcclosure, and getgenv; restoration uses hookfunction(target, original) with a restorefunction fallback. Returns { error } if a capability is missing, the target cannot be resolved, or there is already an active block for fetch/stop. Signature: { action: "start" | "stop", functionPath: string?, threadContext: number? }. Phase: act; cost=medium; idempotency=idempotent-write. Requires: active-client, resolved-target, explicit-mutation-approval. Produces: operation-receipt. Verify with: assert-state. Safety: MUTATING; writes live game/client state. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | 'start' installs the no-op stub on functionPath; 'stop' restores the original function. Use the SAME functionPath for both so they address the same registry entry. | |
| functionPath | No | Luau expression resolving to the function to neutralize, e.g. 'getsenv(game.Players.LocalPlayer.PlayerScripts.AntiCheat).tick' or 'getconnections(game.Players.LocalPlayer.Idled)[1].Function'. Evaluated as `return <functionPath>` and must resolve to a function. REQUIRED for 'start'. For 'stop' it is the registry key identifying which block to restore, so it must match the string used at start. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |