Skip to content
Saiko

isfunctionhooked

Returns true when the function has been replaced with hookfunction, and false for one that has not.

Signature

luau
isfunctionhooked(function_to_check: (...any) -> ...any): boolean

Parameters

function_to_check(...any) -> ...any

The function to ask about.

Returns

boolean

Example

luau
local function target()
    return 1
end

print(isfunctionhooked(target)) --> false

hookfunction(target, function()
    return 2
end)

print(isfunctionhooked(target)) --> true