getscripthash

Computes a script's bytecode fingerprint.

Syntax

Signature
getscripthash(Script: Instance) -> string

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
ScriptInstanceLocalScript or ModuleScript instance.

Returns

TypeDescription
string64-character hexadecimal digest of the script bytecode.

Notes

Raises the same bytecode-unavailable errors as getscriptbytecode.

Example

Luau
local Script = getscripts()[1]
assert(Script, "No captured script available")
local Result = getscripthash(Script)
print(Result)