Inspect running code
inspect_codeInspect running game code for reverse engineering: read upvalues and constants, search the garbage collector for functions or tables, and list signal connections.
Instructions
Look inside code that is running in the game, for reverse engineering. Actions: upvalues and constants (path of a script; for a ModuleScript also function_name to look at one function of the module), gc (search the garbage collector for functions by name_contains or has_constant, or for tables by has_key; at least one filter is required) and connections (path of an instance and the name of one of its signals: lists the handlers that are connected, with the function name, line, source and owning script). Needs the matching executor functions (getscriptclosure, getupvalues, getconstants, getgc, getconnections) and says which one is missing. Only reads. Requires the connected state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | gc: what to search for (default function). | |
| path | No | upvalues, constants: dotted path of the script. connections: dotted path of the instance. | |
| limit | No | Maximum entries to return (default 40 for upvalues and constants, 25 otherwise). | |
| action | Yes | What to inspect. | |
| client | No | Client id from list_clients, for example c2. Defaults to the client that connected last. | |
| signal | No | connections: the event name, for example MouseButton1Click or Touched. | |
| has_key | No | gc, tables: the table has this string key. | |
| has_constant | No | gc, functions: the function uses this string constant. | |
| function_name | No | upvalues, constants: a function of the ModuleScript's returned table, instead of the main chunk. | |
| name_contains | No | gc, functions: the function name contains this. |