Skip to content

Miscellaneous

Script environment

Identify executor

function identifyexecutor(): string
if ({pcall(identifyexecutor)})[2] == "Celery" then
    print("Using Celery")
end

Returns a string to identify what executor is being used. In this case, it's "Celery"


Get ROBLOX environment

function getrenv(): table

Returns the ROBLOX script environment.


Get global environment

function getgenv(): table

Identical to getfenv().

There is no way to implement this in Celery because ROBLOX automatically sandboxes and protects each script environment for us -- so, there is no way of connecting the environments for Celery scripts, because of how it executes them.


Get Lua registry

function getreg(): table

Returns a table containing all elements stored in lua registry.


Get identity

function getidentity(): number

Returns the context level of execution that the script is running with, most likely 6.


Set identity

function setidentity(<number> identity): void

Sets the current context level to identity.


Tables

Is read only

function isreadonly(<table> t): bool

Returns whether the table t is read only or not.


Set read only

function setreadonly(<table> t, <bool> value): value

Sets whether the table t is read only or not.


Make read only

function makereadonly(<table> t): table

Sets table t to read only. Equal to doing setreadonly(t, true).

Returns table t.


Make writeable

function makewriteable(<table> t): void

Makes the table t write-able (not read only). Equal to doing setreadonly(t, false).


Functions

Is C closure

function iscclosure(<function> f): bool

Returns true is f is a C closure and not a Lua function.


New C closure

function newcclosure(<function> f): function

Returns a C closure function which invokes the Lua function f


Hook function

function hookfunction(<function> a, <function> b): bool

Swaps the internal function of a with b, so every time a is called it will call b instead.

Returns the old a function.


Get namecall method

function getnamecallmethod(): string

Returns the current namecall method used by __namecall, as a string.


Set namecall method

function setnamecallmethod(<string> method): string

Sets the current namecall method used by __namecall to method.


Get raw metatable

function getrawmetatable(<table> t): table

Returns the raw metatable of t -- basically just bypasses the __metatable check for it.


Instances

Scripts

Get script bytecode

function getscriptbytecode(<Instance<LocalScript>> localscript): string

Returns the LuaU bytecode contained in the localscript script.

Warning

ModuleScripts are not supported yet


Dissasemble bytecode

function disassemble(<string> bytecode): string

Translates a script's bytecode into a readable, disassembled output.


Decompile script

function decompile(<Instance<LocalScript>> localscript): string

Decompiles a localscript's bytecode into readable lua, as close to the original script as possible.


Fire click detector

function fireclickdetector(<Instance<ClickDetector>> clickdetector): void

Fires the clickdetector instance -- calling any signals connected to it.


Fire touch interest

function firetouchinterest(<Instance> part, <BasePart> toTouch, <number> mode): void

Fires toTouch's TouchInterest.

Note

The toTouch argument must have a child with class TouchTransmitter in order for this function to work.


Get hidden properties

function gethiddenproperties(<Instance> instance): table

Returns hidden lua properties associated with instance.


Get hidden property

function gethiddenproperty(Instance instance, String property): Variant

Gets the hidden property property from instance.


Set hidden property

function sethiddenproperty(<Instance> instance, <string> property, <Variant> value): void

Sets the hidden property property of instance to value.


Client

Get simulation radius

function getsimulationradius(): number

Returns your client's simulation radius.


Set simulation radius

function setsimulationradius(<number> value): void

Sets your client's simulation radius to value.