Scripts

getscripthash

Returns a stable hash for a script when bytecode is available.

Syntax

getscripthash(script: userdata): string | nil

Arguments

NameTypeDescription
scriptuserdataScript or ModuleScript instance to inspect.

Returns

NameTypeDescription
hashstring | nilHash string, or nil when hashing is unavailable.

Description

Returns a stable hash for a script when bytecode is available.

Call it with 1 parameter(s): script. The argument table explains which values are required and which ones only refine the behavior.

It returns hash (string | nil). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Example call with placeholder values.

local result = getscripthash(game)
print(result)