oth

The oth library provides functions for hooking C closures with Luau callbacks.

Overview

The oth library allows you to:

  • Hook C closures
  • Remove hooks when no longer needed
  • Access the original function even after multiple hooks
  • Detect if code is running in a hook thread

Available Functions

FunctionDescription
oth.hookHook a C closure
oth.unhookRemove a hook created with oth.hook
oth.get_root_callbackGet the original function
oth.is_hook_threadCheck if running in a hook thread
get_original_threadGet the original thread
  • closures - Standard function hooking with hookfunction