Yuari
Documentation
Docs/Script/getscripthash

getscripthash(script)

Returns the SHA-384 hex hash of the script's bytecode.

Syntax

getscripthash(script: Instance) -> string?

Parameters

ParameterTypeDescription
scriptInstanceScript, LocalScript or ModuleScript.

Returns

TypeDescription
string?96-character lowercase SHA-384 hex, or nil when no bytecode/source is available.

Description

Logic change: the hash is now computed over exactly the bytes getscriptbytecode returns. The executor fetches the decoded Proto container, compiles Source as a fallback, and applies the same target bytecode-version byte before hashing.

The result is deterministic and matches crypt.hash(getscriptbytecode(script), "sha384").

Example

local script = game:GetService("Players").LocalPlayer.PlayerScripts:FindFirstChildWhichIsA("LocalScript", true)
print(#getscripthash(script)) -- 96