getscripthash — content hash of a script
get-script-hashComputes a script's content hash from a Luau expression to detect bytecode or source changes between checks.
Instructions
Compute the content hash of a script via the executor's getscripthash. The script is resolved from a Luau expression (typically a path to a LuaSourceContainer, e.g. 'game.ReplicatedStorage.Module') via loadstring('return ' .. expr). Handy for detecting when a script's bytecode/source changes between two checks. Requires getscripthash — type-guarded and pcall-wrapped, returning { error } when missing or on failure. Returns { hash } or { error }. Signature: { scriptPath: string, threadContext: number? }. Phase: orchestrate; 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 |
|---|---|---|---|
| scriptPath | Yes | Luau expression resolving to a LuaSourceContainer, e.g. 'game.ReplicatedStorage.Module'. Evaluated as `return <expression>`. | |
| threadContext | No | Optional Roblox thread identity for this call; omit it to use the server default. |