Test whether two references point at the same underlying instance
compare-instancesResolve two Luau expressions and report whether they reference the same underlying Roblox instance, revealing lookalike or decoy objects despite matching names.
Instructions
Resolve two Luau expressions and report whether they reference the SAME underlying Roblox instance via compareinstances. This matters because a game (or an executor proxy/clone) can hand you a wrapped userdata whose identity differs from the real Instance even though == or :GetFullName() looks identical — and some anticheat hands out decoy/newproxy objects. compareinstances unwraps those and compares true instance identity, so you can confirm 'is this captured remote actually game.ReplicatedStorage.RemoteEvent, or a lookalike?'. Non-mutating. Requires compareinstances; returns { Same, TypeA, TypeB } or { error } when the capability is missing or either expression fails to evaluate. Signature: { pathA: string, pathB: string, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client, resolved-target. Produces: structured-observation. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pathA | Yes | First Luau expression to compare, e.g. 'game.ReplicatedStorage.RemoteEvent' or a captured handle like 'getgenv().__capturedRemote'. Evaluated as `return <pathA>`. | |
| pathB | Yes | Second Luau expression to compare against pathA, e.g. 'getreg()[123]' or 'getrawmetatable(game).__index'. Evaluated as `return <pathB>`. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |