Skip to content

getscripthash

Do not decrypt or decompress the bytecode

The hash must be computed on the encrypted, compressed bytecode - not after any modification.
This function should also return nil if the script has no bytecode.

getscripthash returns a hexadecimal format SHA-384 hash of the raw bytecode for a given Script, LocalScript, or ModuleScript.

This is useful for identifying scripts by their content, especially when checking for known modules or verifying integrity.

function getscripthash(script: BaseScript | ModuleScript): string | nil

Parameters

Parameter Description
script The script instance to hash.

Example

Hashing a live script
1
2
3
4
5
local Animate = game.Players.LocalPlayer.Character:FindFirstChild("Animate")

print(getscripthash(Animate)) -- Output: 384-bit hash string

print(getscripthash(Instance.new("LocalScript"))) -- Output: nil