Find identical / duplicated functions (IDA find-identical)
find-duplicate-functionsScan every Luau function in the GC, hash each with getfunctionhash, and group identical functions to reveal copy-pasted code, duplicate handlers, and repeated module logic.
Instructions
Walk every Luau function in the GC, hash each one with getfunctionhash, and group functions that share the exact same hash — the runtime equivalent of IDA's 'find identical functions'. Reveals clones and copy-pasted code (duplicated module logic, repeated handlers, library functions instantiated many times). Each group reports the shared hash, how many functions carry it, and a few sample functions (ptr/name/source/line). Requires getgc + getfunctionhash; caps the scan and flags truncation. Signature: { minGroup: any?, limit: any?, maxScan: any?, threadContext: number? }. Phase: observe; cost=medium; idempotency=read-only. Requires: active-client. Produces: bounded-candidates. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max duplicate groups to return, largest groups first (default 50). | |
| maxScan | No | Max GC functions to scan (default 9000). | |
| minGroup | No | Only report hash groups shared by at least this many functions (default 2 = any duplicate). | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |