Read a script's source
get_script_sourceReads a Roblox script’s source by dotted path, using executor decompilation when available and falling back to the Source property.
Instructions
Read the source code of a Script, LocalScript or ModuleScript by dotted path. It uses the executor's decompile when available and falls back to the Source property. Decompiled sources are cached in the executor (fromCache in the result, refresh decompiles again). Long sources are cut at max_chars. Requires the connected state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Dotted path to the script, starting at game. | |
| client | No | Client id from list_clients, for example c2. Defaults to the client that connected last. | |
| refresh | No | Decompile again instead of using the cached source (default false). | |
| max_chars | No | Maximum number of characters to return (default 20000). |