Skip to content
Saiko

getfunctionhash

Returns a SHA384 hash of the function's bytecode. Two functions compiled from identical source share a hash, which makes this useful for fingerprinting game functions across sessions.

Signature

luau
getfunctionhash(fn: (...any) -> ...any): string

Parameters

fnfunction

A Luau closure to hash.

Returns

string

Example

luau
local function greet()
    return "hello"
end

print(getfunctionhash(greet)) --> 96 hex characters
print(getfunctionhash(greet) == getfunctionhash(greet)) --> true