RbxStu V3 Docs
  • Welcome
  • Information
    • Engine Information
      • Luau API Security
  • Stunc
    • Overview
    • Connections
    • Filesystem
      • readfile
      • writefile
      • appendfile
      • isfile
      • isfolder
      • listfiles
      • makefolder
      • delfile
      • delfolder
      • loadfile
      • dofile
  • Memory
    • getgc
    • reference_object
    • unreference_object
    • get_gc_threshold
  • Closures
    • isunhookable
    • makeunhookable
    • ishooked
    • restorefunction
    • hookfunction
    • hookmetamethod
    • isourclosure
    • iscclosure
    • islclosure
    • clonefunction
    • newcclosure
    • newlclosure
    • loadstring
Powered by GitBook
On this page
  1. Closures

isunhookable

Overview of the isunhookable function.

Function Characteristics

This function is pure; it does not modify any data when called.

Function definition
function isunhookable(closure: (...any) -> (...any)): boolean

High-Level Overview

isunhookable returns true for every function that is considered unhookable; this means you cannot call hookfunction with it being hookWhat⁣; this does not limit you to calling hookfunction with it as hookWith. You can make functions unhookable by utilising makeunhookable.

Low-Level Overview

Internally, an std::vectorof all the unhookable functions of the session are kept. When a new one is made unhookable, it is added to the vector.

When validating if it is hooked, we check our list and validate the c.ffor C closures and l.pfor Luau closures; if any of them match, the function is considered unhookable, the result of it being pushed onto the Luau stack.

PreviousClosuresNextmakeunhookable

Last updated 4 months ago