Skip to content
Scripts & runtimeOverview

getscripthash

Represents identification of a script by its hash.

Details#

Returns a hash representation for a script's available compiled data. It does not recover source or prove that two scripts have identical runtime state. Retrieval can fail when bytecode is unavailable.

Examples#

Example

Luau
local ownScript = Instance.new("LocalScript")
local ok, hash = pcall(getscripthash, ownScript)
print(ok, hash)
ownScript:Destroy()