appendfileasync
Also available as loadfileasync readfileasync writefileasync
The same operations as appendfile, loadfile, readfile and writefile, with the async name. They return the same results.
Everything else.
Also available as loadfileasync readfileasync writefileasync
The same operations as appendfile, loadfile, readfile and writefile, with the async name. They return the same results.
Also available as getsignalwhitelist get_signal_whitelist
Returns true if a signal can be sent to the server. getsignalwhitelist lists the signals that can.
Raises a signal locally from the engine's side, the same path the engine itself uses.
Also available as clearteleportqueue queueonteleport queueteleport clear_teleport_queue queue_on_teleport
queueonteleport saves code that runs automatically in the next game you join. clearteleportqueue discards what was saved.
Also available as crypt.generatekey crypt.random
Makes random data. generatebytes gives Base64 text of the length you ask for, generatekey a 32-byte Base64 key, and random raw bytes.
Also available as crypt.hmac
Hashes data with the algorithm you name, and crypt.hmac computes a keyed hash. Both return the result as text.
Also available as debug.dumpheap debug.dumprefs debug.getmemorycategory debug.loadmodule debug.profilebegin debug.profileend debug.resetmemorycategory debug.setmemorycategory debug.tracerefs
The game's own debug functions for memory and code size, passed through to you unchanged.
Returns details about a function or stack level, selected by an option string.
Loads an asset by address and returns the objects inside it.
Also available as oth.get_root_callback oth.hook oth.is_hook_thread oth.unhook
Returns the thread that originally made a call, from inside a hook. The oth group also has hook, unhook, is_hook_thread and get_root_callback.
Also available as get_actors
Returns the Actor objects in the game. Each Actor runs its scripts in its own parallel state.
Also available as get_actor_states
Returns a table for each Actor's state, so you can run code in each one.
Also available as runonthread run_on_thread
Returns the threads running inside an Actor. runonthread runs a function on one of them.
Also available as get_all_threads
Returns every coroutine thread the game's state currently holds.
Also available as getconnectionthread isconnectionenabled isluaconnection get_connection_function get_connection_thread is_connection_enabled is_lua_connection
Reads a field of a connection: its function, its thread, whether it is enabled, or whether it is Lua code.
Also available as get_current_actor
Returns the Actor the current code is running in, or nil if it is in the main state.
Returns markers for Actors that were removed while work was still running in them.
Also available as gethiddenproperties getproperties get_event_member get_hidden_properties get_properties
Returns the game's description of a member of an object, such as a property or event, by name. gethiddenproperties and getproperties return an object's properties as a table.
Also available as identifyexecutor get_executor_name identify_executor
Returns two strings: the name of the executor and its version. Use it to detect which executor a script is running under.
function identifyexecutor(): (string, string)
Also available as setfpscap get_fps_cap set_fps_cap
Returns the frame rate limit that is set. setfpscap changes it. It reports the configured value, not the frame rate you are actually getting.
Returns the compiled bytecode of a Lua function. Built-in functions are refused.
Also available as get_hwid
Returns a string that identifies this machine.
Returns the environment of a module that has already run. It does not make one for a module that has not.
Also available as setoutputcapture
Reads, or with the set form changes, whether print and warn output is shown in Apex's console instead of the game's.
Also available as get_process_identifier
Returns the number that identifies the game's process.
Also available as getsignalargumentsinfo get_signal_arguments get_signal_arguments_info
Returns the arguments a signal passes to its handlers, and with the info form their types and names.
Also available as issignalhooked restoresignal unhooksignal hook_signal is_signal_hooked restore_signal
Hooks a signal so your function runs first, with the arguments, and can change or block them. issignalhooked checks, restoresignal and unhooksignal remove it.
Also available as HttpGetAsync httpget httpgetasync game.HttpGet game.HttpGetAsync game.httpget game.httpgetasync http_get
Fetches a web address with GET and returns the body as a string. HttpGetAsync is the same call.
Also available as httppost http_post
Sends a POST request with a body and returns the response text.
Also available as request http.request http_request
Sends an HTTP request and returns the status, headers and body. Takes a table with Url and optionally Method, Headers and Body.
type RequestOptions = {
Also available as isnewcclosure
Returns true only for functions made by newcclosure, not for every built-in C function.
Also available as is_executor_thread
Returns true if the given thread was started by the executor, and false for the game's threads.
Also available as isfunctionhooked is_function_hooked
Returns true if the function is currently hooked.
Also available as isrbxactive iswindowactive is_game_active is_rbx_active is_window_active
Returns true when the game window is in focus.
Also available as iswaitingconnection setconnectionenabled is_game_script_connection is_waiting_connection set_connection_enabled
Tells you about a connection: whether a game script made it, whether it is waiting, and lets you enable or disable it.
Also available as is_network_owner
Returns true if your client controls the physics of a part.
Also available as setuntouched is_un_touched set_un_touched
Reports, or with the set form changes, whether a table is marked untouched. Some scripts treat an untouched table as safe to rely on.
Also available as validlevel debug.isvalidlevel debug.validlevel is_valid_level valid_level
Returns true if a stack level exists in the current thread, so you can check before reading it.
Also available as iswriteable is_write_able
Returns true if the table can be written to. It is the opposite of isreadonly.
Also available as makewritable makewriteable make_read_only make_write_able
Makes a table read-only (makereadonly) or writable (makewritable). It is setreadonly with the state fixed.
Also available as message_box
Shows a message box with buttons and returns which button was pressed. Not every button combination is supported.
Also available as new_l_closure
Wraps any function in a new Lua function that forwards its arguments and results. Use it when you need a Lua closure with the same behavior.
A signal that fires when a new Actor state is first seen.
A signal that fires with the new state's table when an Actor's state has been created.
Loads a module and returns what it returns. Errors from the module are passed on to you.
Also available as run_on_actor
Runs code inside an Actor's state, so the code can see that Actor's scripts and variables.
Also available as saveplace SaveInstanceOptions SaveInstanceOptions.new
Saves the game's objects to a file you can open in an editor. Saves a binary file by default, or XML if you set it, and accepts a list of roots to save.
Also available as setcallbackmember setcallbackvalue set_callback_function set_callback_member set_callback_value
Sets a callback property to a function you provide.
Also available as toclipboard set_clipboard to_clipboard write_clipboard
Copies text to your clipboard.
Also available as set_rbx_clipboard
Copies text to the clipboard the game uses for pasting. In Apex it currently uses the desktop clipboard.
Sets how far from the player the client controls physics. Takes a radius and an optional maximum, which defaults to the radius. Raises an error if there is no local player.
Also available as signal:Connect signal:Fire signal:Once signal:Wait
Creates a signal of your own. It has Connect, Once, Fire and Wait methods and delivers exactly the arguments you fire it with.