Potassium API
  • Environment
    • Cache
    • Closures
    • Console
    • Crypt
    • Debug
    • Drawing
    • File System
    • Input
    • Instance
    • Metatable
    • Miscellaneous
    • Scripts
    • Web Sockets
    • Actor
Powered by GitBook
On this page
  • getgc
  • getgenv
  • gettenv
  • getreg
  • getloadedmodules
  • getrenv
  • getrunningscripts
  • getscriptbytecode
  • getscriptclosure
  • getscripthash
  • getscripts
  • getsenv
  • getthreadidentity
  • setthreadidentity
  1. Environment

Scripts

getgc

<table<function | userdata | table>> getgc(<boolean?> includetables)

Returns a list of objects in the Luau garbage collector.

If includeTables is false, tables will not be included in the list.


getgenv

<table<[string]: any>> getgenv()

Returns the custom global environment of the executor.


gettenv

<table<[string]: any> gettenv(<thread> thread)

Returns the environment of thread.


getreg

<table<function | thread>> getreg()

Returns the lua registry.


getloadedmodules

<table<ModuleScript>> getloadedmodules()

Returns a list of ModuleScripts that have been loaded.


getrenv

<table<[string]: any>> getrenv()

Returns the global environment of the game client. It can be used to access the global functions that LocalScripts and ModuleScripts use.


getrunningscripts

<table<LocalScript | ModuleScript>> getrunningscripts()

Returns a list of scripts that are currently running.


getscriptbytecode

<string> getscriptbytecode(<LocalScript | ModuleScript> script)

Returns the raw Luau bytecode of the given script.


getscriptclosure

<function> getscriptclosure(<LocalScript | ModuleScript> script)

Generates a new closure using the bytecode of script.


getscripthash

<string> getscripthash(<LocalScript | ModuleScript> script)

Returns a SHA384 hash of the script's bytecode.


getscripts

<table<LocalScript | ModuleScript>> getscripts()

Returns a list of every script in the game.


getsenv

<table<[string]: any>> getsenv(<LocalScript | ModuleScript> script)

Returns the global environment of the given script. It can be used to access variables and functions that are not defined as local.


getthreadidentity

<number> getthreadidentity()

Returns the identity of the current thread.


setthreadidentity

<nil> setthreadidentity(<number> identity)

Sets the current thread identity.


PreviousMiscellaneousNextWeb Sockets

Last updated 2 months ago