# Table of Contents - [Introduction - Potassium](#introduction-potassium) - [create_comm_channel - Potassium](#create-comm-channel-potassium) - [getactors - Potassium](#getactors-potassium) - [get_comm_channel - Potassium](#get-comm-channel-potassium) - [getactorthreads - Potassium](#getactorthreads-potassium) - [getdeletedactors - Potassium](#getdeletedactors-potassium) - [run_on_actor - Potassium](#run-on-actor-potassium) - [is_parallel - Potassium](#is-parallel-potassium) - [run_on_thread - Potassium](#run-on-thread-potassium) - [iscclosure - Potassium](#iscclosure-potassium) - [isexecutorclosure - Potassium](#isexecutorclosure-potassium) - [islclosure - Potassium](#islclosure-potassium) - [isnewcclosure - Potassium](#isnewcclosure-potassium) - [hookfunction - Potassium](#hookfunction-potassium) - [getfunctionhash - Potassium](#getfunctionhash-potassium) - [isourthread - Potassium](#isourthread-potassium) - [isfunctionhooked - Potassium](#isfunctionhooked-potassium) - [loadstring - Potassium](#loadstring-potassium) - [restorefunction - Potassium](#restorefunction-potassium) - [newlclosure - Potassium](#newlclosure-potassium) - [newcclosure - Potassium](#newcclosure-potassium) - [rconsolecreate - Potassium](#rconsolecreate-potassium) - [rconsoleerror - Potassium](#rconsoleerror-potassium) - [rconsoleprint - Potassium](#rconsoleprint-potassium) - [rconsoledestroy - Potassium](#rconsoledestroy-potassium) - [rconsolesettitle - Potassium](#rconsolesettitle-potassium) - [rconsoleinfo - Potassium](#rconsoleinfo-potassium) - [rconsoleinput - Potassium](#rconsoleinput-potassium) - [rconsoleclear - Potassium](#rconsoleclear-potassium) - [rconsolewarn - Potassium](#rconsolewarn-potassium) - [crypt.base64encode - Potassium](#crypt-base64encode-potassium) - [crypt.base64decode - Potassium](#crypt-base64decode-potassium) - [setstackhidden - Potassium](#setstackhidden-potassium) - [Drawing.Fonts - Potassium](#drawing-fonts-potassium) - [crypt.decrypt - Potassium](#crypt-decrypt-potassium) - [crypt.generatebytes - Potassium](#crypt-generatebytes-potassium) - [DrawingImmediate.GetPaint - Potassium](#drawingimmediate-getpaint-potassium) - [crypt.lz4decompress - Potassium](#crypt-lz4decompress-potassium) - [crypt.generatekey - Potassium](#crypt-generatekey-potassium) - [crypt.lz4compress - Potassium](#crypt-lz4compress-potassium) - [crypt.encrypt - Potassium](#crypt-encrypt-potassium) - [getrenderproperty - Potassium](#getrenderproperty-potassium) - [crypt.random - Potassium](#crypt-random-potassium) - [crypt.hash - Potassium](#crypt-hash-potassium) - [Drawing.new - Potassium](#drawing-new-potassium) - [crypt.hmac - Potassium](#crypt-hmac-potassium) - [DrawingObject - Potassium](#drawingobject-potassium) - [Functions - Potassium](#functions-potassium) - [cleardrawcache - Potassium](#cleardrawcache-potassium) - [isrenderobj - Potassium](#isrenderobj-potassium) - [getgenv - Potassium](#getgenv-potassium) - [getsenv - Potassium](#getsenv-potassium) - [getreg - Potassium](#getreg-potassium) - [getgc - Potassium](#getgc-potassium) - [getrenv - Potassium](#getrenv-potassium) - [gettenv - Potassium](#gettenv-potassium) - [setrenderproperty - Potassium](#setrenderproperty-potassium) - [PsmConnection - Potassium](#psmconnection-potassium) - [filtergc - Potassium](#filtergc-potassium) - [delfile - Potassium](#delfile-potassium) - [delfolder - Potassium](#delfolder-potassium) - [dofile - Potassium](#dofile-potassium) - [PsmSignal.new - Potassium](#psmsignal-new-potassium) - [isfile - Potassium](#isfile-potassium) - [debug.getconstants - Potassium](#debug-getconstants-potassium) - [debug.getconstant - Potassium](#debug-getconstant-potassium) - [debug.getregistry - Potassium](#debug-getregistry-potassium) - [appendfile - Potassium](#appendfile-potassium) - [listfiles - Potassium](#listfiles-potassium) - [isfolder - Potassium](#isfolder-potassium) - [makefolder - Potassium](#makefolder-potassium) - [readfile - Potassium](#readfile-potassium) - [RakNetPacket - Potassium](#raknetpacket-potassium) - [Regex.Escape - Potassium](#regex-escape-potassium) - [debug.getproto - Potassium](#debug-getproto-potassium) - [debug.getprotos - Potassium](#debug-getprotos-potassium) - [loadfile - Potassium](#loadfile-potassium) - [oth.get_root_callback - Potassium](#oth-get-root-callback-potassium) - [oth.is_hook_thread - Potassium](#oth-is-hook-thread-potassium) - [Regex.new - Potassium](#regex-new-potassium) - [debug.getcallstack - Potassium](#debug-getcallstack-potassium) - [debug.getsafeenv - Potassium](#debug-getsafeenv-potassium) - [debug.getinfo - Potassium](#debug-getinfo-potassium) - [debug.isvalidlevel - Potassium](#debug-isvalidlevel-potassium) - [oth.hook - Potassium](#oth-hook-potassium) - [raknet.remove_send_hook - Potassium](#raknet-remove-send-hook-potassium) - [raknet.send - Potassium](#raknet-send-potassium) - [debug.getupvalues - Potassium](#debug-getupvalues-potassium) - [getinstances - Potassium](#getinstances-potassium) - [writefile - Potassium](#writefile-potassium) - [debug.setname - Potassium](#debug-setname-potassium) - [debug.setinfo - Potassium](#debug-setinfo-potassium) - [debug.getupvalue - Potassium](#debug-getupvalue-potassium) - [oth.get_original_thread - Potassium](#oth-get-original-thread-potassium) - [WebSocket.connect - Potassium](#websocket-connect-potassium) - [fireproximityprompt - Potassium](#fireproximityprompt-potassium) - [debug.setstack - Potassium](#debug-setstack-potassium) - [debug.setsafeenv - Potassium](#debug-setsafeenv-potassium) - [gethui - Potassium](#gethui-potassium) - [getnilinstances - Potassium](#getnilinstances-potassium) - [makereadonly - Potassium](#makereadonly-potassium) - [oth.unhook - Potassium](#oth-unhook-potassium) - [raknet.add_send_hook - Potassium](#raknet-add-send-hook-potassium) - [keypress - Potassium](#keypress-potassium) - [mouse1release - Potassium](#mouse1release-potassium) - [mouse1click - Potassium](#mouse1click-potassium) - [mouse2release - Potassium](#mouse2release-potassium) - [fireclickdetector - Potassium](#fireclickdetector-potassium) - [isreadonly - Potassium](#isreadonly-potassium) - [getcallbackvalue - Potassium](#getcallbackvalue-potassium) - [debug.setupvalue - Potassium](#debug-setupvalue-potassium) - [debug.getstack - Potassium](#debug-getstack-potassium) - [mouse2press - Potassium](#mouse2press-potassium) - [mouse2click - Potassium](#mouse2click-potassium) - [makewritable - Potassium](#makewritable-potassium) - [getrawmetatable - Potassium](#getrawmetatable-potassium) - [setnamecallmethod - Potassium](#setnamecallmethod-potassium) - [keytap - Potassium](#keytap-potassium) - [getnamecallmethod - Potassium](#getnamecallmethod-potassium) - [firetouchinterest - Potassium](#firetouchinterest-potassium) - [setrawmetatable - Potassium](#setrawmetatable-potassium) - [hookmetamethod - Potassium](#hookmetamethod-potassium) - [isrbxactive - Potassium](#isrbxactive-potassium) - [keyrelease - Potassium](#keyrelease-potassium) - [mousemoverel - Potassium](#mousemoverel-potassium) - [getcustomasset - Potassium](#getcustomasset-potassium) - [getrendersteppedlist - Potassium](#getrendersteppedlist-potassium) - [debug.setconstant - Potassium](#debug-setconstant-potassium) - [mousemoveabs - Potassium](#mousemoveabs-potassium) - [setreadonly - Potassium](#setreadonly-potassium) - [getconnection - Potassium](#getconnection-potassium) - [cansignalreplicate - Potassium](#cansignalreplicate-potassium) - [firesignal - Potassium](#firesignal-potassium) - [getsignalargumentsinfo - Potassium](#getsignalargumentsinfo-potassium) - [getsignalarguments - Potassium](#getsignalarguments-potassium) - [mousescroll - Potassium](#mousescroll-potassium) - [mouse1press - Potassium](#mouse1press-potassium) - [getsignalwhitelist - Potassium](#getsignalwhitelist-potassium) - [getconnections - Potassium](#getconnections-potassium) - [getfpscap - Potassium](#getfpscap-potassium) - [getrunningscripts - Potassium](#getrunningscripts-potassium) - [getscripthash - Potassium](#getscripthash-potassium) - [getscripts - Potassium](#getscripts-potassium) - [getthreadidentity - Potassium](#getthreadidentity-potassium) - [replicatesignal - Potassium](#replicatesignal-potassium) - [gethwid - Potassium](#gethwid-potassium) - [getobjects - Potassium](#getobjects-potassium) - [decompile - Potassium](#decompile-potassium) - [identifyexecutor - Potassium](#identifyexecutor-potassium) - [getloadedmodules - Potassium](#getloadedmodules-potassium) - [getscriptfromthread - Potassium](#getscriptfromthread-potassium) - [getscriptclosure - Potassium](#getscriptclosure-potassium) - [getscriptthread - Potassium](#getscriptthread-potassium) - [queueonteleport - Potassium](#queueonteleport-potassium) - [setclipboard - Potassium](#setclipboard-potassium) - [getscriptbytecode - Potassium](#getscriptbytecode-potassium) - [setfpscap - Potassium](#setfpscap-potassium) - [httpget - Potassium](#httpget-potassium) - [queueonteleport - Potassium](#queueonteleport-potassium) - [messagebox - Potassium](#messagebox-potassium) - [setthreadidentity - Potassium](#setthreadidentity-potassium) - [getsimulationradius - Potassium](#getsimulationradius-potassium) - [gethiddenproperties - Potassium](#gethiddenproperties-potassium) - [saveinstance - Potassium](#saveinstance-potassium) - [getproperties - Potassium](#getproperties-potassium) - [getproximitypromptduration - Potassium](#getproximitypromptduration-potassium) - [setrbxclipboard - Potassium](#setrbxclipboard-potassium) - [getpcd - Potassium](#getpcd-potassium) - [setscriptable - Potassium](#setscriptable-potassium) - [isnetworkowner - Potassium](#isnetworkowner-potassium) - [setproximitypromptduration - Potassium](#setproximitypromptduration-potassium) - [isscriptable - Potassium](#isscriptable-potassium) - [gethiddenproperty - Potassium](#gethiddenproperty-potassium) - [getbspval - Potassium](#getbspval-potassium) - [setsimulationradius - Potassium](#setsimulationradius-potassium) - [sethiddenproperty - Potassium](#sethiddenproperty-potassium) --- # Introduction - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/introduction#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation API Reference Introduction Before you continue, the documentation assumes that you are already familiar with [Luau](https://luau.org/) and basic programming. The environment follows the [UNC](https://github.com/unified-naming-convention/NamingStandard) standard, with lots of tweaks and additions. Alongside every function and feature, there is always an example to make sure you understand how to use them. The documentation will be kept up to date and is subject to change. [create\_comm\_channel](https://docs.potassium.pro/api-reference/Actor%20Library/create_comm_channel) ⌘I --- # create_comm_channel - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Actor%20Library/create_comm_channel#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Actor Library create\_comm\_channel On this page * [Example](https://docs.potassium.pro/api-reference/Actor%20Library/create_comm_channel#example) function create_comm_channel(): number, BindableEvent ### [​](https://docs.potassium.pro/api-reference/Actor%20Library/create_comm_channel#example) Example local id, channel = create_comm_channel() channel.Event:Connect(function(data) print(data) end) run_on_actor(getactors()[1], [[\ local id = ...\ local channel = get_comm_channel(id)\ channel:Fire("Hello, World!")\ ]], id) [Introduction](https://docs.potassium.pro/api-reference/introduction) [getactors](https://docs.potassium.pro/api-reference/Actor%20Library/getactors) ⌘I --- # getactors - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Actor%20Library/getactors#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Actor Library getactors On this page * [Example](https://docs.potassium.pro/api-reference/Actor%20Library/getactors#example) function getactors(): {Actor} Alias: get\_actors ### [​](https://docs.potassium.pro/api-reference/Actor%20Library/getactors#example) Example This script will print every actor. for _, actor in getactors() do print(actor) end [create\_comm\_channel](https://docs.potassium.pro/api-reference/Actor%20Library/create_comm_channel) [getactorthreads](https://docs.potassium.pro/api-reference/Actor%20Library/getactorthreads) ⌘I --- # get_comm_channel - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Actor%20Library/get_comm_channel#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Actor Library get\_comm\_channel On this page * [Example](https://docs.potassium.pro/api-reference/Actor%20Library/get_comm_channel#example) function get_comm_channel(id: number): BindableEvent [​](https://docs.potassium.pro/api-reference/Actor%20Library/get_comm_channel#param-id) id number required The `id` used in obtaining the corresponding channel. ### [​](https://docs.potassium.pro/api-reference/Actor%20Library/get_comm_channel#example) Example local id, channel = create_comm_channel() channel.Event:Connect(function(data) print(data) end) run_on_actor(getactors()[1], [[\ local id = ...\ local channel = get_comm_channel(id)\ channel:Fire("Hello, World!")\ ]], id) [getdeletedactors](https://docs.potassium.pro/api-reference/Actor%20Library/getdeletedactors) [is\_parallel](https://docs.potassium.pro/api-reference/Actor%20Library/is_parallel) ⌘I --- # getactorthreads - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Actor%20Library/getactorthreads#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Actor Library getactorthreads On this page * [Example](https://docs.potassium.pro/api-reference/Actor%20Library/getactorthreads#example) function getactorthreads(): {thread} Alias: get\_actor\_threads ### [​](https://docs.potassium.pro/api-reference/Actor%20Library/getactorthreads#example) Example This script will print every actor thread. for _, actorThread in getactorthreads() do print(actorThread) end [getactors](https://docs.potassium.pro/api-reference/Actor%20Library/getactors) [getdeletedactors](https://docs.potassium.pro/api-reference/Actor%20Library/getdeletedactors) ⌘I --- # getdeletedactors - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Actor%20Library/getdeletedactors#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Actor Library getdeletedactors On this page * [Example](https://docs.potassium.pro/api-reference/Actor%20Library/getdeletedactors#example) function getdeletedactors(): {Actor} Alias: get\_deleted\_actors ### [​](https://docs.potassium.pro/api-reference/Actor%20Library/getdeletedactors#example) Example This script will print every deleted actor. for _, deletedActor in getdeletedactors() do print(deletedActor) end [getactorthreads](https://docs.potassium.pro/api-reference/Actor%20Library/getactorthreads) [get\_comm\_channel](https://docs.potassium.pro/api-reference/Actor%20Library/get_comm_channel) ⌘I --- # run_on_actor - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_actor#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Actor Library run\_on\_actor On this page * [Example](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_actor#example) function run_on_actor(actor: Actor, script: string, ...): () [​](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_actor#param-actor) actor Actor required The `actor` used in script execution. [​](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_actor#param-script) script string required The script to be executed on `actor`. ### [​](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_actor#example) Example run_on_actor(getactors()[1], [[\ print("Hello, world!")\ ]]) [is\_parallel](https://docs.potassium.pro/api-reference/Actor%20Library/is_parallel) [run\_on\_thread](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_thread) ⌘I --- # is_parallel - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Actor%20Library/is_parallel#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Actor Library is\_parallel On this page * [Example](https://docs.potassium.pro/api-reference/Actor%20Library/is_parallel#example) function is_parallel(): boolean ### [​](https://docs.potassium.pro/api-reference/Actor%20Library/is_parallel#example) Example print(is_parallel()) --> false run_on_actor(getactors()[1], [[\ print(is_parallel())\ ]]) --> true [get\_comm\_channel](https://docs.potassium.pro/api-reference/Actor%20Library/get_comm_channel) [run\_on\_actor](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_actor) ⌘I --- # run_on_thread - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_thread#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Actor Library run\_on\_thread On this page * [Example](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_thread#example) function run_on_thread(thread: thread, script: string, ...): () ### [​](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_thread#example) Example local id, channel = create_comm_channel() channel.Event:Connect(function(data) print(data) end) run_on_thread(getactorthreads()[1], [[\ local id = ...\ local channel = get_comm_channel(id)\ channel:Fire("Hello, world!")\ ]], id) [run\_on\_actor](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_actor) [getfunctionhash](https://docs.potassium.pro/api-reference/Closure%20Library/getfunctionhash) ⌘I --- # iscclosure - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/iscclosure#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library iscclosure On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/iscclosure#example) function iscclosure(func: function): boolean [​](https://docs.potassium.pro/api-reference/Closure%20Library/iscclosure#param-func) func function required The `function` to evaluate. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/iscclosure#example) Example This code sample will print false on lua closures and true on C closures. local function foo() print("Hello, world!") end print(iscclosure(foo)) --> false print(iscclosure(print)) --> true [getfunctionhash](https://docs.potassium.pro/api-reference/Closure%20Library/getfunctionhash) [isexecutorclosure](https://docs.potassium.pro/api-reference/Closure%20Library/isexecutorclosure) ⌘I --- # isexecutorclosure - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/isexecutorclosure#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library isexecutorclosure On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/isexecutorclosure#example) function isexecutorclosure(func: function): boolean [​](https://docs.potassium.pro/api-reference/Closure%20Library/isexecutorclosure#param-func) func function required The `function` to evaluate. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/isexecutorclosure#example) Example This code sample will print true if ‘foo’ was created by Potassium. local function foo() print("Hello, world!") end print(isexecutorclosure(foo)) --> true print(isexecutorclosure(print)) --> false [iscclosure](https://docs.potassium.pro/api-reference/Closure%20Library/iscclosure) [islclosure](https://docs.potassium.pro/api-reference/Closure%20Library/islclosure) ⌘I --- # islclosure - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/islclosure#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library islclosure On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/islclosure#example) function islclosure(func: function): boolean [​](https://docs.potassium.pro/api-reference/Closure%20Library/islclosure#param-func) func function required The `function` to evaluate. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/islclosure#example) Example This code sample will print true on lua closures and false on C closures. local function foo() print("Hello, world!") end print(islclosure(foo)) --> true print(islclosure(print)) --> false [isexecutorclosure](https://docs.potassium.pro/api-reference/Closure%20Library/isexecutorclosure) [isnewcclosure](https://docs.potassium.pro/api-reference/Closure%20Library/isnewcclosure) ⌘I --- # isnewcclosure - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/isnewcclosure#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library isnewcclosure On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/isnewcclosure#example) function isnewcclosure(func: function): boolean [​](https://docs.potassium.pro/api-reference/Closure%20Library/isnewcclosure#param-func) func function required The `function` to evaluate. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/isnewcclosure#example) Example This code sample will print true if ‘foo’ has been wrapped using newcclosure, false if otherwise. local function foo() end print(isnewcclosure(foo)) --> false local bar = newcclosure(foo) print(isnewcclosure(bar)) --> true [islclosure](https://docs.potassium.pro/api-reference/Closure%20Library/islclosure) [hookfunction](https://docs.potassium.pro/api-reference/Closure%20Library/hookfunction) ⌘I --- # hookfunction - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/hookfunction#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library hookfunction On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/hookfunction#example) function hookfunction(target: function, hook: function): function [​](https://docs.potassium.pro/api-reference/Closure%20Library/hookfunction#param-target) target function required The `function` to hook. [​](https://docs.potassium.pro/api-reference/Closure%20Library/hookfunction#param-hook) hook function required The `function` to call instead. Alias: hookfunc ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/hookfunction#example) Example This example hooks the `print` function and replaces it with a warning if the content is “Hello, world!”. local old = nil old = hookfunction(print, function(...) if select(1, ...) == "Hello, world!" then return warn(...) end return old(...) end) print("Hello, world!") -- This will be a warning. print("Goodbye, world!") -- This will be a print. [isnewcclosure](https://docs.potassium.pro/api-reference/Closure%20Library/isnewcclosure) [isfunctionhooked](https://docs.potassium.pro/api-reference/Closure%20Library/isfunctionhooked) ⌘I --- # getfunctionhash - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/getfunctionhash#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library getfunctionhash On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/getfunctionhash#example) function getfunctionhash(func: function): string [​](https://docs.potassium.pro/api-reference/Closure%20Library/getfunctionhash#param-func) func function required The `function` to hash. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/getfunctionhash#example) Example This code sample will compare the hash of 2 basic lua functions. local function foo() print("Hello, world!") end local function bar(x, y) return x + y end local firstHash = getfunctionhash(foo) local secondHash = getfunctionhash(bar) print(firstHash == secondHash) --> false [run\_on\_thread](https://docs.potassium.pro/api-reference/Actor%20Library/run_on_thread) [iscclosure](https://docs.potassium.pro/api-reference/Closure%20Library/iscclosure) ⌘I --- # isourthread - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/isourthread#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library isourthread On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/isourthread#example) function isourthread(thread: thread): boolean [​](https://docs.potassium.pro/api-reference/Closure%20Library/isourthread#param-thread) thread thread required The `thread` to evaluate. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/isourthread#example) Example This code sample will iterate every thread, only printing the ones created by Potassium. for _, thread in getallthreads() do if isourthread(thread) then print(thread) end end [isfunctionhooked](https://docs.potassium.pro/api-reference/Closure%20Library/isfunctionhooked) [loadstring](https://docs.potassium.pro/api-reference/Closure%20Library/loadstring) ⌘I --- # isfunctionhooked - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/isfunctionhooked#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library isfunctionhooked On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/isfunctionhooked#example) function isfunctionhooked(target: function): boolean [​](https://docs.potassium.pro/api-reference/Closure%20Library/isfunctionhooked#param-target) target function required The `function` to evaluate. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/isfunctionhooked#example) Example This example will print true if ‘foo’ is hooked. local function foo() print("Hello, world!") end print("Before hooking:", isfunctionhooked(foo)) --> false hookfunction(foo, function() print("Hello, new world!") end) print("After hooking:", isfunctionhooked(foo)) --> true restorefunction(foo) print("After restoring:", isfunctionhooked(foo)) --> false [hookfunction](https://docs.potassium.pro/api-reference/Closure%20Library/hookfunction) [isourthread](https://docs.potassium.pro/api-reference/Closure%20Library/isourthread) ⌘I --- # loadstring - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/loadstring#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library loadstring On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/loadstring#example) function loadstring(source: string, chunkname: string?): function?, string? [​](https://docs.potassium.pro/api-reference/Closure%20Library/loadstring#param-source) source string required The `source` that will be used to create a chunk. [​](https://docs.potassium.pro/api-reference/Closure%20Library/loadstring#param-chunkname) chunkname string `chunkname` will be used as the chunk name for error messages and debug information. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/loadstring#example) Example This code sample will create two chunks. Both will be called, one will error. local source = "print('Hello, world!')" local chunk = loadstring(source, "hello") chunk() --> Hello, world! source = "error('Goodbye, world!')" chunk = loadstring(source, "goodbye") chunk() --> Error: Goodbye, world! [isourthread](https://docs.potassium.pro/api-reference/Closure%20Library/isourthread) [newcclosure](https://docs.potassium.pro/api-reference/Closure%20Library/newcclosure) ⌘I --- # restorefunction - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/restorefunction#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library restorefunction On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/restorefunction#example) function restorefunction(target: function): function [​](https://docs.potassium.pro/api-reference/Closure%20Library/restorefunction#param-target) target function required The `function` to restore. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/restorefunction#example) Example This example hooks the `tick` function to print its return value and then restores it. local old = nil old = hookfunction(tick, function(...) local result = old(...) print("Tick:", result) restorefunction(tick) return result end) [newlclosure](https://docs.potassium.pro/api-reference/Closure%20Library/newlclosure) [setstackhidden](https://docs.potassium.pro/api-reference/Closure%20Library/setstackhidden) ⌘I --- # newlclosure - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/newlclosure#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library newlclosure On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/newlclosure#example) function newlclosure(func: function, name: string?): function [​](https://docs.potassium.pro/api-reference/Closure%20Library/newlclosure#param-func) func function required Creates a Lua function that wraps around ‘func’ [​](https://docs.potassium.pro/api-reference/Closure%20Library/newlclosure#param-name) name string Set a name for the newly created L closure. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/newlclosure#example) Example print(islclosure(warn)) --> false local newLClosure = newlclosure(warn) print(islclosure(newLClosure)) --> true [newcclosure](https://docs.potassium.pro/api-reference/Closure%20Library/newcclosure) [restorefunction](https://docs.potassium.pro/api-reference/Closure%20Library/restorefunction) ⌘I --- # newcclosure - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/newcclosure#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library newcclosure On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/newcclosure#example) function newcclosure(func: function, name: string?): function [​](https://docs.potassium.pro/api-reference/Closure%20Library/newcclosure#param-func) func function required Creates a C function that wraps around ‘func’ [​](https://docs.potassium.pro/api-reference/Closure%20Library/newcclosure#param-name) name string Set a name for the newly created C closure. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/newcclosure#example) Example local function foo() print("Hello, world!") end local newCClosure = newcclosure(foo, "bar") newCClosure() --> Hello, world! print(debug.info(newCClosure, "n")) --> bar [loadstring](https://docs.potassium.pro/api-reference/Closure%20Library/loadstring) [newlclosure](https://docs.potassium.pro/api-reference/Closure%20Library/newlclosure) ⌘I --- # rconsolecreate - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Console%20Library/rconsolecreate#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Console Library rconsolecreate On this page * [Example](https://docs.potassium.pro/api-reference/Console%20Library/rconsolecreate#example) function rconsolecreate() ### [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsolecreate#example) Example This script will create a console and print a basic message. rconsolecreate() rconsoleprint("Hello, world!\n") [rconsoleclear](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleclear) [rconsoledestroy](https://docs.potassium.pro/api-reference/Console%20Library/rconsoledestroy) ⌘I --- # rconsoleerror - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleerror#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Console Library rconsoleerror On this page * [Example](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleerror#example) function rconsoleerror(text: string): () [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleerror#param-text) text string required The text to be printed. Does not clear existing text or create a new line. ### [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleerror#example) Example This script will both create a console and print a basic message. rconsoleerror("ERROR!\n") [rconsoledestroy](https://docs.potassium.pro/api-reference/Console%20Library/rconsoledestroy) [rconsoleinfo](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinfo) ⌘I --- # rconsoleprint - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleprint#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Console Library rconsoleprint On this page * [Example](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleprint#example) function rconsoleprint(text: string): () [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleprint#param-text) text string required The text to be printed. Does not clear existing text or create a new line. ### [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleprint#example) Example This script will both create a console and print a basic message. rconsoleprint("Hello, world!\n") [rconsoleinput](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinput) [rconsolesettitle](https://docs.potassium.pro/api-reference/Console%20Library/rconsolesettitle) ⌘I --- # rconsoledestroy - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Console%20Library/rconsoledestroy#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Console Library rconsoledestroy On this page * [Example](https://docs.potassium.pro/api-reference/Console%20Library/rconsoledestroy#example) function rconsoledestroy() ### [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsoledestroy#example) Example rconsolecreate() rconsoleprint("Hello, world!\n") rconsoledestroy() -- Destroy console and clear old messages. rconsolecreate() rconsoleprint("Hello, world! Again!\n") [rconsolecreate](https://docs.potassium.pro/api-reference/Console%20Library/rconsolecreate) [rconsoleerror](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleerror) ⌘I --- # rconsolesettitle - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Console%20Library/rconsolesettitle#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Console Library rconsolesettitle On this page * [Example](https://docs.potassium.pro/api-reference/Console%20Library/rconsolesettitle#example) function rconsolesettitle(title: string): () [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsolesettitle#param-title) title string required The string that the title will be set to. Alias: rconsolename ### [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsolesettitle#example) Example This script will set the title of the console. rconsolecreate() rconsolesettitle("Custom Title") [rconsoleprint](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleprint) [rconsolewarn](https://docs.potassium.pro/api-reference/Console%20Library/rconsolewarn) ⌘I --- # rconsoleinfo - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinfo#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Console Library rconsoleinfo On this page * [Example](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinfo#example) function rconsoleinfo(text: string): () [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinfo#param-text) text string required The text to be printed. Does not clear existing text or create a new line. ### [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinfo#example) Example This script will both create a console and print a basic message. rconsoleinfo("INFO!\n") [rconsoleerror](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleerror) [rconsoleinput](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinput) ⌘I --- # rconsoleinput - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinput#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Console Library rconsoleinput On this page * [Example](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinput#example) function rconsoleinput(): string ### [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinput#example) Example This script will not finish (print) until input is properly received. rconsolecreate() rconsoleprint("What's your name?\n") local username = rconsoleinput() print(username) [rconsoleinfo](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleinfo) [rconsoleprint](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleprint) ⌘I --- # rconsoleclear - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleclear#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Console Library rconsoleclear On this page * [Example](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleclear#example) function rconsoleclear() ### [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleclear#example) Example This script will both create a console and print a basic message, clearing it after. rconsolecreate() rconsoleprint("Goodbye, world!\n") task.wait(1) rconsolewarn("Clearing console...") task.wait(1) rconsoleclear() [setstackhidden](https://docs.potassium.pro/api-reference/Closure%20Library/setstackhidden) [rconsolecreate](https://docs.potassium.pro/api-reference/Console%20Library/rconsolecreate) ⌘I --- # rconsolewarn - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Console%20Library/rconsolewarn#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Console Library rconsolewarn On this page * [Example](https://docs.potassium.pro/api-reference/Console%20Library/rconsolewarn#example) function rconsolewarn(text: string): () [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsolewarn#param-text) text string required The text to be printed. Does not clear existing text or create a new line. ### [​](https://docs.potassium.pro/api-reference/Console%20Library/rconsolewarn#example) Example This script will both create a console and print a basic message. rconsolewarn("WARNING!\n") [rconsolesettitle](https://docs.potassium.pro/api-reference/Console%20Library/rconsolesettitle) [crypt.base64decode](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64decode) ⌘I --- # crypt.base64encode - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64encode#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.base64encode On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64encode#example) function crypt.base64encode(data: string): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64encode#param-data) data string required The data to be base64 encoded. Alias: base64encode ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64encode#example) Example local data = "Hello, world!" local encoded = crypt.base64encode(data) print(encoded) [crypt.base64decode](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64decode) [crypt.decrypt](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.decrypt) ⌘I --- # crypt.base64decode - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64decode#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.base64decode On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64decode#example) function crypt.base64decode(data: string): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64decode#param-data) data string required The data to be base64 decoded. Alias: base64decode ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64decode#example) Example local encodedData = "SGVsbG8sIHdvcmxkIQ==" print(crypt.base64decode(encodedData)) [rconsolewarn](https://docs.potassium.pro/api-reference/Console%20Library/rconsolewarn) [crypt.base64encode](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64encode) ⌘I --- # setstackhidden - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Closure%20Library/setstackhidden#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Closure Library setstackhidden On this page * [Example](https://docs.potassium.pro/api-reference/Closure%20Library/setstackhidden#example) function setstackhidden(func: function | number, hidden: boolean): () [​](https://docs.potassium.pro/api-reference/Closure%20Library/setstackhidden#param-func) func function | number required The function or level that will be hidden. [​](https://docs.potassium.pro/api-reference/Closure%20Library/setstackhidden#param-hidden) hidden boolean required Determines whether the function should be hidden or unhidden. ### [​](https://docs.potassium.pro/api-reference/Closure%20Library/setstackhidden#example) Example This code sample will hide ‘bar’ from ‘debug.traceback’. local function foo() print(debug.traceback()) end local function bar() foo() end bar() -- expected output setstackhidden(bar, true) bar() -- now hidden [restorefunction](https://docs.potassium.pro/api-reference/Closure%20Library/restorefunction) [rconsoleclear](https://docs.potassium.pro/api-reference/Console%20Library/rconsoleclear) ⌘I --- # Drawing.Fonts - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.Fonts#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation | Index | Value | | --- | --- | | `UI` | 0 | | `System` | 1 | | `Plex` | 2 | | `Monospace` | 3 | [debug.setupvalue](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setupvalue) [Drawing.new](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.new) ⌘I --- # crypt.decrypt - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.decrypt#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.decrypt On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.decrypt#example) function crypt.decrypt(data: string, key: string, iv: string, mode: string): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.decrypt#param-data) data string required User provided data. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.decrypt#param-key) key string required Base64 encoded decryption key. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.decrypt#param-iv) iv string required Base64 encoded initialization vector. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.decrypt#param-mode) mode string Decryption mode. Decrytion mode options: OFB, GCM, ECB, CTR, CFB, and CBC. Default option is “CBC”. ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.decrypt#example) Example local username = game:GetService("Players").LocalPlayer.Character.Name print("Username:", username) local key = crypt.generatekey(16) local data, iv = crypt.encrypt(username, key) local decryptedData = crypt.decrypt(data, key, iv) print("Decrypted result:", decryptedData) [crypt.base64encode](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.base64encode) [crypt.encrypt](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.encrypt) ⌘I --- # crypt.generatebytes - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatebytes#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.generatebytes On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatebytes#example) function crypt.generatebytes(amount: number): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatebytes#param-amount) amount number required The amount of random bytes to generate. ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatebytes#example) Example This script will print both the length of the random bytes generated, and the random bytes themselves. local randomBytes = base64decode(crypt.generatebytes(16)) print(#randomBytes, randomBytes) [crypt.encrypt](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.encrypt) [crypt.generatekey](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatekey) ⌘I --- # DrawingImmediate.GetPaint - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/DrawingImmediate.GetPaint#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation DrawingImmediate Library DrawingImmediate.GetPaint On this page * [Example](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/DrawingImmediate.GetPaint#example) function DrawingImmediate.GetPaint(zindex: int): PsmSignal [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/DrawingImmediate.GetPaint#param-zindex) zindex int required The zindex that the event will fire on. ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/DrawingImmediate.GetPaint#example) Example This script utilizes the `DrawingImmediate` library to continuously render a circle at the current mouse position. Useful for an FOV circle. local signal = DrawingImmediate.GetPaint(1) local uis = game:GetService("UserInputService") signal:Connect(function() local mousepos = uis:GetMouseLocation() DrawingImmediate.Circle(mousepos, 100, Color3.new(1, 1, 1), 1, 100, 1) end) [setrenderproperty](https://docs.potassium.pro/api-reference/Drawing%20Library/setrenderproperty) [Functions](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions) ⌘I --- # crypt.lz4decompress - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4decompress#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.lz4decompress On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4decompress#example) function crypt.lz4decompress(data: string, originallength: number): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4decompress#param-data) data string required The user specified data. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4decompress#param-originallength) originallength number required The length of the original (non lz4 compressed) string. Alias: lz4decompress ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4decompress#example) Example local data = "Hello, world!" local compressed = crypt.lz4compress(data) local decompressed = crypt.lz4decompress(compressed, #data) print(decompressed) [crypt.lz4compress](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4compress) [crypt.random](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.random) ⌘I --- # crypt.generatekey - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatekey#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.generatekey On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatekey#example) function crypt.generatekey(keylength: number?): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatekey#param-keylength) keylength number Length of the random key to generate. Default is 32 bytes in length. ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatekey#example) Example local username = game:GetService("Players").LocalPlayer.Character.Name print("Username:", username) local key = crypt.generatekey() print("Encryption key:", key) local data, iv = crypt.encrypt(username, key) print("Encrypted username:", data) [crypt.generatebytes](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatebytes) [crypt.hash](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hash) ⌘I --- # crypt.lz4compress - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4compress#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.lz4compress On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4compress#example) function crypt.lz4compress(data: string): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4compress#param-data) data string required The user specified data. Alias: lz4compress ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4compress#example) Example local data = "Hello, world!" local compressed = crypt.lz4compress(data) print(compressed) [crypt.hmac](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hmac) [crypt.lz4decompress](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4decompress) ⌘I --- # crypt.encrypt - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.encrypt#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.encrypt On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.encrypt#example) function crypt.encrypt(data: string, key: string, iv: string?, mode: string?): (string, string) [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.encrypt#param-data) data string required User provided data. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.encrypt#param-key) key string required Base64 encoded encryption key. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.encrypt#param-iv) iv string Base64 encoded initialization vector. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.encrypt#param-mode) mode string Encryption mode. Encrytion mode options: OFB, GCM, ECB, CTR, CFB, and CBC. Default option is “CBC”. ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.encrypt#example) Example local hwid = gethwid() print("HWID:", hwid) local key = crypt.generatekey(16) print("Encryption key:", key) local data, iv = crypt.encrypt(hwid, key) print(data, iv) [crypt.decrypt](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.decrypt) [crypt.generatebytes](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatebytes) ⌘I --- # getrenderproperty - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Drawing%20Library/getrenderproperty#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Drawing Library getrenderproperty On this page * [Example](https://docs.potassium.pro/api-reference/Drawing%20Library/getrenderproperty#example) function getrenderproperty(drawing: DrawingObject, property: string): any [​](https://docs.potassium.pro/api-reference/Drawing%20Library/getrenderproperty#param-drawing) drawing DrawingObject required The drawing object to retrieve the property from. [​](https://docs.potassium.pro/api-reference/Drawing%20Library/getrenderproperty#param-property) property string required The property to retrieve. ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/getrenderproperty#example) Example This script will make a print the default radius for a `Circle`. local circle = Drawing.new("Circle") print("Radius:", getrenderproperty(circle, "Radius")) [cleardrawcache](https://docs.potassium.pro/api-reference/Drawing%20Library/cleardrawcache) [isrenderobj](https://docs.potassium.pro/api-reference/Drawing%20Library/isrenderobj) ⌘I --- # crypt.random - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.random#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.random On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.random#example) function crypt.random(amount: number): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.random#param-amount) amount number required The amount of random bytes to generate. ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.random#example) Example This script will print both the length of the random bytes generated, and the random bytes themselves. local randomBytes = base64decode(crypt.random(16)) print(#randomBytes, randomBytes) [crypt.lz4decompress](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4decompress) [debug.getcallstack](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getcallstack) ⌘I --- # crypt.hash - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hash#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.hash On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hash#example) function crypt.hash(data: string, algorithm: string): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hash#param-data) data string required User provided data. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hash#param-algorithm) algorithm string required The specified hashing algorithm. Algorithms include: “md5”, “sha256”, “sha1”, “sha384”, “sha512”, “sha3-224”, “sha3-256”, “sha3-384”, “sha3-512”, “sha224”. ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hash#example) Example local data = game:GetService("Players").LocalPlayer.Character.Name print("Username:", data) local hashAlgorithmList = { "md5", "sha256", "sha1", "sha384", "sha512", "sha3-224", "sha3-256", "sha3-384", "sha3-512", "sha224" } for _, algorithm in hashAlgorithmList do print(algorithm .. ":", crypt.hash(data, algorithm)) end [crypt.generatekey](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.generatekey) [crypt.hmac](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hmac) ⌘I --- # Drawing.new - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.new#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Drawing Library Drawing.new On this page * [Types](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.new#types) * [Example](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.new#example) function Drawing.new(type: string): DrawingObject [​](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.new#param-type) type string required The type of drawing object to create. ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.new#types) Types | Type | Description | | --- | --- | | `Line` | A line between two points | | `Text` | Rendered text | | `Image` | An image from a URL or file | | `Circle` | A circle shape | | `Square` | A square shape | | `Triangle` | A triangle shape with three vertices | | `Quad` | A quadrilateral with four vertices | | `Font` | A font with data from a URL or file | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.new#example) Example This script will make a red `Circle` and remove it. local circle = Drawing.new("Circle") circle.Radius = 50 circle.Color = Color3.fromRGB(255, 0, 0) circle.Filled = true circle.NumSides = 32 circle.Position = Vector2.new(300, 300) circle.Transparency = 0.7 circle.Visible = true task.wait(1) circle:Destroy() [Drawing.Fonts](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.Fonts) [DrawingObject](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject) ⌘I --- # crypt.hmac - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hmac#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Crypt Library crypt.hmac On this page * [Example](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hmac#example) function crypt.hmac(key: string, data: string, algorithm: string): string [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hmac#param-key) key string required The secret key. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hmac#param-data) data string required User provided data. [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hmac#param-algorithm) algorithm string required The specified hashing algorithm. Algorithms include: “md5”, “sha1”, “sha224”, “sha256”, “sha384”, “sha512”, “sha3-224”, “sha3\_224”, “sha3-256”, “sha3\_256”, “sha3-384”, “sha3\_384”, “sha3-512”, and “sha3\_512”. ### [​](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hmac#example) Example local data = game:GetService("Players").LocalPlayer.Character.Name print("Username:", data) local hashAlgorithmList = { "md5", "sha1", "sha224", "sha256", "sha384", "sha512", "sha3-224", "sha3_224", "sha3-256", "sha3_256", "sha3-384", "sha3_384", "sha3-512", "sha3_512" } for _, algorithm in hashAlgorithmList do print(algorithm .. ":", crypt.hmac(crypt.generatebytes(16), data, algorithm)) end [crypt.hash](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.hash) [crypt.lz4compress](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.lz4compress) ⌘I --- # DrawingObject - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation On this page * [Base](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#base) * [Line](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#line) * [Text](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#text) * [Image](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#image) * [Circle](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#circle) * [Square](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#square) * [Triangle](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#triangle) * [Quad](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#quad) * [Font](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#font) * [Methods](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#methods) ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#base) Base | Property | Type | Default | | --- | --- | --- | | Visible | `boolean` | false | | ZIndex | `number` | 1 | | Transparency | `number` | 1 | | Color | `Color3` | Color3.new(0, 0, 0) | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#line) Line | Property | Type | Default | | --- | --- | --- | | From | `Vector2` | Vector2.new(0, 0) | | To | `Vector2` | Vector2.new(0, 0) | | Thickness | `number` | 1 | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#text) Text | Property | Type | Default | | --- | --- | --- | | Text | `string` | "" | | Size | `number` | 18 | | Center | `boolean` | false | | Outline | `boolean` | false | | OutlineColor | `Color3` | Color3.new(0, 0, 0) | | Position | `Vector2` | Vector2.new(0, 0) | | Font | `number` | 0 | | TextBounds | `Vector2` | (Read Only) | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#image) Image | Property | Type | Default | | --- | --- | --- | | Data | `string` | "" | | Size | `Vector2` | Vector2.new(0, 0) | | Position | `Vector2` | Vector2.new(0, 0) | | Rounding | `number` | 0 | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#circle) Circle | Property | Type | Default | | --- | --- | --- | | Position | `Vector2` | Vector2.new(0, 0) | | Radius | `number` | 0 | | Thickness | `number` | 1 | | Filled | `boolean` | false | | NumSides | `number` | 250 | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#square) Square | Property | Type | Default | | --- | --- | --- | | Position | `Vector2` | Vector2.new(0, 0) | | Size | `Vector2` | Vector2.new(0, 0) | | Thickness | `number` | 1 | | Filled | `boolean` | false | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#triangle) Triangle | Property | Type | Default | | --- | --- | --- | | PointA | `Vector2` | Vector2.new(0, 0) | | PointB | `Vector2` | Vector2.new(0, 0) | | PointC | `Vector2` | Vector2.new(0, 0) | | Thickness | `number` | 1 | | Filled | `boolean` | false | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#quad) Quad | Property | Type | Default | | --- | --- | --- | | PointA | `Vector2` | Vector2.new(0, 0) | | PointB | `Vector2` | Vector2.new(0, 0) | | PointC | `Vector2` | Vector2.new(0, 0) | | PointD | `Vector2` | Vector2.new(0, 0) | | Thickness | `number` | 1 | | Filled | `boolean` | false | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#font) Font | Property | Type | Default | | --- | --- | --- | | Data | `string` | "" | ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject#methods) Methods | Method | Description | | --- | --- | | `Destroy(): ()` | Destroys the `DrawingObject`. | | `Remove(): ()` | Destroys the `DrawingObject`. | [Drawing.new](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.new) [cleardrawcache](https://docs.potassium.pro/api-reference/Drawing%20Library/cleardrawcache) ⌘I --- # Functions - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation On this page * [Line](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#line) * [Circle](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#circle) * [FilledCircle](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#filledcircle) * [Triangle](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#triangle) * [FilledTriangle](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#filledtriangle) * [Rectangle](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#rectangle) * [FilledRectangle](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#filledrectangle) * [Quad](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#quad) * [FilledQuad](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#filledquad) * [Text](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#text) * [OutlinedText](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#outlinedtext) ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#line) Line _Renders a line between two specified points._ function DrawingImmediate.Line(from: Vector2, to: Vector2, color: Color3, opacity: number, thickness: number): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#circle) Circle _Renders a circle at one specified point._ function DrawingImmediate.Circle(center: Vector2, radius: number, color: Color3, opacity: number, num_sides: int, thickness: number): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#filledcircle) FilledCircle _Renders a filled circle at one specified point._ function DrawingImmediate.FilledCircle(center: Vector2, radius: number, color: Color3, num_sides: int, opacity: number): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#triangle) Triangle _Renders a triangle between three specified points._ function DrawingImmediate.Triangle(point_a: Vector2, point_b: Vector2, point_c: Vector2, color: Color3, opacity: number, thickness: number): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#filledtriangle) FilledTriangle _Renders a filled triangle between three specified points._ function DrawingImmediate.FilledTriangle(point_a: Vector2, point_b: Vector2, point_c: Vector2, color: Color3, opacity: number): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#rectangle) Rectangle _Renders a rectangle at one specified point._ function DrawingImmediate.Rectangle(top_left: Vector2, size: Vector2, color: Color3, opacity: number, rounding: number, thickness: number): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#filledrectangle) FilledRectangle _Renders a filled rectangle at one specified point._ function DrawingImmediate.FilledRectangle(top_left: Vector2, size: Vector2, color: Color3, opacity: number, rounding: number): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#quad) Quad _Renders a quad between four specified points._ function DrawingImmediate.Quad(point_a: Vector2, point_b: Vector2, point_c: Vector2, point_d: Vector2, color: Color3, opacity: number, thickness: number): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#filledquad) FilledQuad _Renders a filled quad between four specified points._ function DrawingImmediate.FilledQuad(point_a: Vector2, point_b: Vector2, point_c: Vector2, point_d: Vector2, color: Color3, opacity: number): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#text) Text _Renders text at a specified point._ function DrawingImmediate.Text(position: Vector2, font: DrawFont, font_size: number, color: Color3, opacity: number, text: string, center: bool): () ### [​](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions#outlinedtext) OutlinedText _Renders outlined text at a specified point._ function DrawingImmediate.OutlinedText(position: Vector2, font: DrawFont, font_size: number, color: Color3, opacity: number, outline_color: Color3, outline_opacity: number, text: string, center: bool): () [DrawingImmediate.GetPaint](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/DrawingImmediate.GetPaint) [filtergc](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc) ⌘I --- # cleardrawcache - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Drawing%20Library/cleardrawcache#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Drawing Library cleardrawcache On this page * [Example](https://docs.potassium.pro/api-reference/Drawing%20Library/cleardrawcache#example) function cleardrawcache(): () ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/cleardrawcache#example) Example This example draws a bunch of `Circle` objects and utilzies `cleardrawcache` to clear them all from the cache at once. for i = 1, 10 do local circle = Drawing.new("Circle") circle.Radius = 50 circle.Color = Color3.fromRGB(255, 0, 0) circle.Filled = true circle.NumSides = 32 circle.Position = Vector2.new(100 * i, 100) circle.Transparency = 0.7 circle.Visible = true end task.wait(1) cleardrawcache() [DrawingObject](https://docs.potassium.pro/api-reference/Drawing%20Library/DrawingObject) [getrenderproperty](https://docs.potassium.pro/api-reference/Drawing%20Library/getrenderproperty) ⌘I --- # isrenderobj - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Drawing%20Library/isrenderobj#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Drawing Library isrenderobj On this page * [Example](https://docs.potassium.pro/api-reference/Drawing%20Library/isrenderobj#example) function isrenderobj(object: DrawingObject): boolean [​](https://docs.potassium.pro/api-reference/Drawing%20Library/isrenderobj#param-object) object DrawingObject required The `DrawingObject` to evaluate. ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/isrenderobj#example) Example This code sample will print true on a `Circle` and false on an `Instance`. local circle = Drawing.new("Circle") local part = Instance.new("Part") print(isrenderobj(circle)) print(isrenderobj(part)) [getrenderproperty](https://docs.potassium.pro/api-reference/Drawing%20Library/getrenderproperty) [setrenderproperty](https://docs.potassium.pro/api-reference/Drawing%20Library/setrenderproperty) ⌘I --- # getgenv - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Environment%20Library/getgenv#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Environment Library getgenv On this page * [Example](https://docs.potassium.pro/api-reference/Environment%20Library/getgenv#example) function getgenv(): { any } ### [​](https://docs.potassium.pro/api-reference/Environment%20Library/getgenv#example) Example local alreadyRan = getgenv().alreadyRan if alreadyRan then print("Already ran!") else print("Hello, world!") getgenv().alreadyRan = true end [getgc](https://docs.potassium.pro/api-reference/Environment%20Library/getgc) [getreg](https://docs.potassium.pro/api-reference/Environment%20Library/getreg) ⌘I --- # getsenv - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Environment%20Library/getsenv#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Environment Library getsenv On this page * [Example function filter](https://docs.potassium.pro/api-reference/Environment%20Library/getsenv#example-function-filter) function getsenv(script: Script): { [any]: any }? [​](https://docs.potassium.pro/api-reference/Environment%20Library/getsenv#param-script) script Script required Can be a `LocalScript`, `ModuleScript` or a `Script` (if it’s `RunContext` is `Client`). The script must be running. ### [​](https://docs.potassium.pro/api-reference/Environment%20Library/getsenv#example-function-filter) Example function filter This script will print the environment of an arbitrary script. local script = getrunningscripts()[1] table.foreach(getsenv(script), print) [getrenv](https://docs.potassium.pro/api-reference/Environment%20Library/getrenv) [gettenv](https://docs.potassium.pro/api-reference/Environment%20Library/gettenv) ⌘I --- # getreg - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Environment%20Library/getreg#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Environment Library getreg On this page * [Example function filter](https://docs.potassium.pro/api-reference/Environment%20Library/getreg#example-function-filter) function getreg(): { [any]: any } ### [​](https://docs.potassium.pro/api-reference/Environment%20Library/getreg#example-function-filter) Example function filter local registry = getreg() for i, v in registry do print(i, v) end [getgenv](https://docs.potassium.pro/api-reference/Environment%20Library/getgenv) [getrenv](https://docs.potassium.pro/api-reference/Environment%20Library/getrenv) ⌘I --- # getgc - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Environment%20Library/getgc#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Environment Library getgc On this page * [Example](https://docs.potassium.pro/api-reference/Environment%20Library/getgc#example) function getgc(includeTables: boolean?): {any} [​](https://docs.potassium.pro/api-reference/Environment%20Library/getgc#param-include-tables) includeTables boolean If true, all tables will be included. ### [​](https://docs.potassium.pro/api-reference/Environment%20Library/getgc#example) Example This script will print every potassium-created function in the garbage collection list. for _, object in getgc() do if type(object) == "function" and isexecutorclosure(object) then print(object) end end [filtergc](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc) [getgenv](https://docs.potassium.pro/api-reference/Environment%20Library/getgenv) ⌘I --- # getrenv - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Environment%20Library/getrenv#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Environment Library getrenv On this page * [Example](https://docs.potassium.pro/api-reference/Environment%20Library/getrenv#example) function getrenv(): { any } ### [​](https://docs.potassium.pro/api-reference/Environment%20Library/getrenv#example) Example This script will print every module required (after execution). local old = nil old = hookfunction(getrenv().require, function(...) print(...) return old(...) end) [getreg](https://docs.potassium.pro/api-reference/Environment%20Library/getreg) [getsenv](https://docs.potassium.pro/api-reference/Environment%20Library/getsenv) ⌘I --- # gettenv - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Environment%20Library/gettenv#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Environment Library gettenv On this page * [Example](https://docs.potassium.pro/api-reference/Environment%20Library/gettenv#example) function gettenv(thread: thread?): { any } [​](https://docs.potassium.pro/api-reference/Environment%20Library/gettenv#param-thread) thread thread The thread that will be used. If not specified, it will default to the current thread. ### [​](https://docs.potassium.pro/api-reference/Environment%20Library/gettenv#example) Example This script will print everything inside of a thread’s environment. local thread = coroutine.create(function() end) table.foreach(gettenv(thread), print) [getsenv](https://docs.potassium.pro/api-reference/Environment%20Library/getsenv) [appendfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/appendfile) ⌘I --- # setrenderproperty - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Drawing%20Library/setrenderproperty#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Drawing Library setrenderproperty On this page * [Example](https://docs.potassium.pro/api-reference/Drawing%20Library/setrenderproperty#example) function setrenderproperty(drawing: DrawingObject, property: string, value: any): () [​](https://docs.potassium.pro/api-reference/Drawing%20Library/setrenderproperty#param-drawing) drawing DrawingObject required The drawing object to edit the property on. [​](https://docs.potassium.pro/api-reference/Drawing%20Library/setrenderproperty#param-property) property string required The property to edit. [​](https://docs.potassium.pro/api-reference/Drawing%20Library/setrenderproperty#param-value) value any required The value to set. ### [​](https://docs.potassium.pro/api-reference/Drawing%20Library/setrenderproperty#example) Example This script will make a red `Circle` and remove it. local circle = Drawing.new("Circle") setrenderproperty(circle, "Radius", 50) setrenderproperty(circle, "Position", Vector2.new(300, 300)) setrenderproperty(circle, "NumSides", 32) setrenderproperty(circle, "Color", Color3.fromRGB(255, 0, 0)) setrenderproperty(circle, "Transparency", 1) setrenderproperty(circle, "Visible", true) setrenderproperty(circle, "Filled", true) setrenderproperty(circle, "Thickness", 2) setrenderproperty(circle, "ZIndex", 1) task.wait(1) circle:Destroy() [isrenderobj](https://docs.potassium.pro/api-reference/Drawing%20Library/isrenderobj) [DrawingImmediate.GetPaint](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/DrawingImmediate.GetPaint) ⌘I --- # PsmConnection - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmConnection#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation On this page * [Methods](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmConnection#methods) ### [​](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmConnection#methods) Methods | Method | Description | | --- | --- | | `Disconnect(): ()` | Disconnect a callback function from the signal. | [PsmSignal.new](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmSignal.new) [raknet.add\_send\_hook](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.add_send_hook) ⌘I --- # filtergc - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Environment Library filtergc On this page * [Function filter options](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#function-filter-options) * [Table filter options](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#table-filter-options) * [Example function filter](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#example-function-filter) * [Example table filter](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#example-table-filter) function filtergc(filtertype: string, filteroptions: table, filterone: boolean): {any} | any? [​](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#param-filtertype) filtertype string required The specific type to filter for. “function” or “table” are the only accepted strings. Each filter type has it’s own filter options. [​](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#param-filteroptions) filteroptions table required Filter options. See corresponding usage in example below. [​](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#param-filterone) filterone boolean required Boolean indicating whether to return a singular object. [​](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#function-filter-options) Function filter options ------------------------------------------------------------------------------------------------------------------------------- | Field | Type | Description | | --- | --- | --- | | IgnoreExecutor | boolean | Whether to ignore executor-created functions | | Name | string | The name of the function | | Hash | string | The function hash | | Constants | table | A list of constants the function must contain | | Upvalues | table | A list of upvalues the function must contain | [​](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#table-filter-options) Table filter options ------------------------------------------------------------------------------------------------------------------------- | Field | Type | Description | | --- | --- | --- | | Keys | table | A list of keys the table must contain | | Values | table | A list of values the table must contain | | KeyValuePairs | table | A dictionary of key-value pairs the table must match | | Metatable | table | The metatable the table must have | ### [​](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#example-function-filter) Example function filter local function helloWorld() return "Hello, world!" end local filteroptions = { IgnoreExecutor = false, Name = "helloWorld" } local found = filtergc("function", filteroptions, true) print(helloWorld == found) --> true print(found()) --> Hello, world! ### [​](https://docs.potassium.pro/api-reference/Environment%20Library/filtergc#example-table-filter) Example table filter local myTable = { ["myKey"] = 123456 } local filterOptions = { Keys = { "myKey" } } local found = filtergc("table", filterOptions, true) print(found == myTable) --> true print(found.myKey) --> 123456 [Functions](https://docs.potassium.pro/api-reference/DrawingImmediate%20Library/Functions) [getgc](https://docs.potassium.pro/api-reference/Environment%20Library/getgc) ⌘I --- # delfile - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfile#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library delfile On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfile#example) function delfile(file: string): () [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfile#param-file) file string required The file’s path. ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfile#example) Example delfile("test.txt") [appendfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/appendfile) [delfolder](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfolder) ⌘I --- # delfolder - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfolder#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library delfolder On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfolder#example) function delfolder(path: string): () [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfolder#param-path) path string required The path to the folder you want to delete ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfolder#example) Example delfolder("mk") [delfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfile) [dofile](https://docs.potassium.pro/api-reference/FileSystem%20Library/dofile) ⌘I --- # dofile - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/dofile#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library dofile On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/dofile#example) function dofile(file: string): () [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/dofile#param-file) file string required The path to the file you’re looking to load code from. ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/dofile#example) Example dofile("test.txt") -- Directly executes [delfolder](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfolder) [isfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfile) ⌘I --- # PsmSignal.new - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmSignal.new#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation PsmSignal Library PsmSignal.new On this page * [Methods](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmSignal.new#methods) * [Example](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmSignal.new#example) function PsmSignal.new(): PsmSignal Aliases: Signal.new ### [​](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmSignal.new#methods) Methods | Method | Description | | --- | --- | | `Connect(callback: function): ()` | Connect a callback function to the signal. | | `Once(callback: function): ()` | Connect a callback function to the signal that fires only once. | | `Wait(): ()` | Yields until the signal fires. | | `Fire(...: any): ()` | Fires the signal with the given arguments. | ### [​](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmSignal.new#example) Example This script creates a PsmSignal `Once` connection and fires it. local signal = PsmSignal.new() signal:Once(function() print("Signal fired!") end) signal:Fire() [setrbxclipboard](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setrbxclipboard) [PsmConnection](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmConnection) ⌘I --- # isfile - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfile#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library isfile On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfile#example) function isfile(path: string): boolean [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfile#param-path) path string required The path to the potentional file ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfile#example) Example writefile("test", "hello!") print(isfile("test")) -- true [dofile](https://docs.potassium.pro/api-reference/FileSystem%20Library/dofile) [isfolder](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfolder) ⌘I --- # debug.getconstants - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstants#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getconstants On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstants#example) function debug.getconstants(function: function | number): { any? } [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstants#param-function) function function | number required The function whose constants are returned. Alias: getconstants ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstants#example) Example function foo() return 123 end local constantTable = debug.getconstants(foo) for index, constant in constantTable do print(index, constant) end [debug.getconstant](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstant) [debug.getinfo](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getinfo) ⌘I --- # debug.getconstant - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstant#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getconstant On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstant#example) function debug.getconstant(function: function | number, index: number): any [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstant#param-function) function function | number required The function whose constant is returned. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstant#param-index) index number required The index of the constant to return. Alias: getconstant ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstant#example) Example function foo() return 123 end local constant = debug.getconstant(foo, 1) print(constant) --> 123 [debug.getcallstack](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getcallstack) [debug.getconstants](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstants) ⌘I --- # debug.getregistry - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getregistry#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getregistry On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getregistry#example) function debug.getregistry(): { [any]: any } Alias: getregistry ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getregistry#example) Example This script will print every object that’s stored in the registry. local registry = debug.getregistry() for i, v in registry do print(i, v) end [debug.getprotos](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getprotos) [debug.getsafeenv](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getsafeenv) ⌘I --- # appendfile - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/appendfile#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library appendfile On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/appendfile#example) function appendfile(file: string, contents: string): () [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/appendfile#param-file) file string required The path to the file you’re looking to append. [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/appendfile#param-contents) contents string required The contents you want to append the existing file. ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/appendfile#example) Example appendfile("test.txt", "\n" .. workspace:GetServerTimeNow()) [gettenv](https://docs.potassium.pro/api-reference/Environment%20Library/gettenv) [delfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/delfile) ⌘I --- # listfiles - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/listfiles#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library listfiles On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/listfiles#example) function listfiles(path: string): {string} [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/listfiles#param-path) path string required The path you want to list files from. ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/listfiles#example) Example for index, file in listfiles("") do -- list files from workspace root print(index, file) end [isfolder](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfolder) [loadfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/loadfile) ⌘I --- # isfolder - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfolder#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library isfolder On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfolder#example) function isfolder(path: string): boolean [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfolder#param-path) path string required The path you want to check ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfolder#example) Example writefile("test", "hello!") print(isfolder("test")) --> false [isfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/isfile) [listfiles](https://docs.potassium.pro/api-reference/FileSystem%20Library/listfiles) ⌘I --- # makefolder - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/makefolder#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library makefolder On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/makefolder#example) function makefolder(path: string): () [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/makefolder#param-path) path string required The path you want to create a folder with ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/makefolder#example) Example print(makefolder("mk")) [loadfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/loadfile) [readfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/readfile) ⌘I --- # readfile - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/readfile#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library readfile On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/readfile#example) function readfile(file: string): string [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/readfile#param-file) file string required The path to the file you’re looking to read. ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/readfile#example) Example print("Contents of 'test.txt'", readfile("test.txt")) [makefolder](https://docs.potassium.pro/api-reference/FileSystem%20Library/makefolder) [writefile](https://docs.potassium.pro/api-reference/FileSystem%20Library/writefile) ⌘I --- # RakNetPacket - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/RakNet%20Library/RakNetPacket#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation On this page * [Fields](https://docs.potassium.pro/api-reference/RakNet%20Library/RakNetPacket#fields) * [Methods](https://docs.potassium.pro/api-reference/RakNet%20Library/RakNetPacket#methods) ### [​](https://docs.potassium.pro/api-reference/RakNet%20Library/RakNetPacket#fields) Fields | Field | Type | Description | | --- | --- | --- | | `PacketId` | `number` | The ID of the packet. | | `Size` | `number` | The size of the packet data. | | `Priority` | `number` | The priority of the packet. | | `AsBuffer` | `buffer` | The data of the packet as a buffer. | | `AsArray` | `table` | The data of the packet as an array. | | `AsString` | `string` | The data of the packet as a string. | | `Reliability` | `number` | The reliability mode of the packet. | | `OrderingChannel` | `number` | The ordering channel of the packet used for ordered traffic. | ### [​](https://docs.potassium.pro/api-reference/RakNet%20Library/RakNetPacket#methods) Methods | Method | Description | | --- | --- | | `SetData(data: buffer \| table \| string \| {number}): ()` | Sets the packet’s payload. | | `Block(): ()` | Blocks the packet from being sent. | [raknet.send](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.send) [getbspval](https://docs.potassium.pro/api-reference/Reflection%20Library/getbspval) ⌘I --- # Regex.Escape - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.Escape#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Regex Library Regex.Escape On this page * [Example](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.Escape#example) function Regex.Escape(contents: string): string [​](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.Escape#param-contents) contents string required The string to escape. ### [​](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.Escape#example) Example This example uses `Regex.Escape` to escape a string that contains special characters and then uses the escaped string in a regular expression to extract an ID from an input string. local input = "[DEBUG] (ID): 99821" local label = "[DEBUG] (ID): " local escaped = Regex.Escape(label) local regex = Regex.new(escaped .. "(\\d+)") local match = regex:Match(input) if match then print("ID:", regex:Replace(match, "$1")) end [setsimulationradius](https://docs.potassium.pro/api-reference/Reflection%20Library/setsimulationradius) [Regex.new](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.new) ⌘I --- # debug.getproto - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getproto#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getproto On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getproto#example) function debug.getproto(function: function | number, index: number, active: boolean?): function | {function} [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getproto#param-function) function function | number required The function or level you want to get the proto from. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getproto#param-index) index number required The indice for the proto. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getproto#param-active) active number Return actively used protos instead of cloned ones. Alias: getproto ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getproto#example) Example local function foo() local function bar() print("foo's inner proto bar!") end end local bar = debug.getproto(foo, 1, true)[1] bar() --> foo's inner proto bar! [debug.getinfo](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getinfo) [debug.getprotos](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getprotos) ⌘I --- # debug.getprotos - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getprotos#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getprotos On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getprotos#example) function debug.getprotos(function: function | number): {function} [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getprotos#param-function) function function | number required The function or level you want to get the protos from. debug.getprotos return cloned protos which are unable to be called but can be interacted with other debug functions such as getconstant or getinfo. Consider using ‘debug.getproto’ with the ‘active’ argument set to true if you want active protos you can interact with. Alias: getprotos ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getprotos#example) Example local function foo() local function bar() print("foo's inner proto bar!") end end print(debug.info(debug.getprotos(foo)[1], "n")) --> bar [debug.getproto](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getproto) [debug.getregistry](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getregistry) ⌘I --- # loadfile - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/loadfile#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library loadfile On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/loadfile#example) function loadfile(file: string, chunkname: string): (function?, string?) [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/loadfile#param-file) file string required The path to the file you’re looking to load code from. [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/loadfile#param-chunkname) chunkname string The chunk string you want to have. ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/loadfile#example) Example local chunk, error = loadfile("test.txt") if error then print("Code failed to compile, error:", error) return end chunk() [listfiles](https://docs.potassium.pro/api-reference/FileSystem%20Library/listfiles) [makefolder](https://docs.potassium.pro/api-reference/FileSystem%20Library/makefolder) ⌘I --- # oth.get_root_callback - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_root_callback#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Oth Library oth.get\_root\_callback On this page * [Example](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_root_callback#example) function oth.get_root_callback(): function ### [​](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_root_callback#example) Example This example hooks `Instance.FindService(Instance, ...)` to return `nil` for `VirtualInputManager`, effectively hiding it from detection. oth.hook(game.FindService, function(self, service) if service == "VirtualInputManager" then return nil end return oth.get_root_callback()(self, service) end) [oth.get\_original\_thread](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_original_thread) [oth.hook](https://docs.potassium.pro/api-reference/Oth%20Library/oth.hook) ⌘I --- # oth.is_hook_thread - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Oth%20Library/oth.is_hook_thread#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Oth Library oth.is\_hook\_thread On this page * [Example](https://docs.potassium.pro/api-reference/Oth%20Library/oth.is_hook_thread#example) function oth.is_hook_thread(): boolean ### [​](https://docs.potassium.pro/api-reference/Oth%20Library/oth.is_hook_thread#example) Example This example hooks `math.random` to ensure that any calls made from within the hook thread always return 1, while allowing normal game scripts to receive actual random numbers. local old = nil old = oth.hook(math.random, function(...) if oth.is_hook_thread() then return 1 end return old(...) end) [oth.hook](https://docs.potassium.pro/api-reference/Oth%20Library/oth.hook) [oth.unhook](https://docs.potassium.pro/api-reference/Oth%20Library/oth.unhook) ⌘I --- # Regex.new - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.new#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Regex Library Regex.new On this page * [Methods](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.new#methods) * [Example](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.new#example) function Regex.new(pattern: string): Regex [​](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.new#param-pattern) pattern string required The regular expression pattern. ### [​](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.new#methods) Methods | Method | Description | | --- | --- | | `Match(contents: string): match` | Matches contents against the Regex object and returns the first Match. | | `MatchMany(contents: string): table` | Matches contents against the Regex object and returns all matches. | | `Replace(contents: string, replacement: string): string` | Replaces the first match of this Regex object in contents with `replacement`. | ### [​](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.new#example) Example This example creates a Regex object to extract an ID from a string and then prints the ID. local input = "My Cool Id: 31235335" local regex = Regex.new("My Cool Id:\\s*(\\w+)") local match = regex:Match(input) if match then print("ID:", regex:Replace(match, "$1")) end [Regex.Escape](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.Escape) [getloadedmodules](https://docs.potassium.pro/api-reference/Script%20Library/getloadedmodules) ⌘I --- # debug.getcallstack - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getcallstack#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getcallstack On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getcallstack#example) function debug.getcallstack(offset: number): table [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getcallstack#param-offset) offset number The offset you want the callstack table to begin at. Alias: getcallstack ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getcallstack#example) Example local function foo() local callStack = debug.getcallstack() print("Number of calls:", #callStack) --> 3 print("Name of caller:", callStack[2].name) --> bar end local function bar() foo() end bar() [crypt.random](https://docs.potassium.pro/api-reference/Crypt%20Library/crypt.random) [debug.getconstant](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstant) ⌘I --- # debug.getsafeenv - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getsafeenv#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getsafeenv On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getsafeenv#example) function debug.getsafeenv(object: function | table | thread) [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getsafeenv#param-object) object function | table | thread required The object you would like to get the safeenv of. Alias: debug.isuntouched ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getsafeenv#example) Example All executed scripts are marked with safeenv as false for compatibility. print(debug.getsafeenv()) --> false debug.setsafeenv(true) print(debug.getsafeenv()) --> true -- Since we are breaking safeenv protections by -- replacing a global function with getfenv, safeenv -- becomes false. Also applicable to setfenv. getfenv().warn = function() end print(debug.getsafeenv()) --> false [debug.getregistry](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getregistry) [debug.getstack](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getstack) ⌘I --- # debug.getinfo - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getinfo#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getinfo On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getinfo#example) function debug.getinfo(function: function | number, what: string): table [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getinfo#param-function) function function | number required The function or stack level whose information is collected and returned. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getinfo#param-what) what string Used to specify what information is returned in the table. Options include: “n” for name and namewhat, “s” for source and line details, “l” for currentline, and “f” for the function itself. Alias: getinfo ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getinfo#example) Example function foo() return "Hello, world!" end local functionInfo = debug.getinfo(foo) for i, v in functionInfo do print(i, v) end [debug.getconstants](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getconstants) [debug.getproto](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getproto) ⌘I --- # debug.isvalidlevel - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.isvalidlevel#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.isvalidlevel On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.isvalidlevel#example) function debug.isvalidlevel(level: number) [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.isvalidlevel#param-level) level number required The level you want to check. Alias: debug.validlevel ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.isvalidlevel#example) Example local function a() print(debug.isvalidlevel(3)) end a() --> false newlclosure(a)() --> true [debug.getupvalues](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalues) [debug.setconstant](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setconstant) ⌘I --- # oth.hook - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Oth%20Library/oth.hook#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Oth Library oth.hook On this page * [Example](https://docs.potassium.pro/api-reference/Oth%20Library/oth.hook#example) function oth.hook(target: function, hook: function): () [​](https://docs.potassium.pro/api-reference/Oth%20Library/oth.hook#param-target) target function required The function to hook. [​](https://docs.potassium.pro/api-reference/Oth%20Library/oth.hook#param-hook) hook function required The hook function. ### [​](https://docs.potassium.pro/api-reference/Oth%20Library/oth.hook#example) Example This example hooks `Instance.new` to print the class name of every new instance created. local old = nil old = oth.hook(Instance.new, function(...) print("Creating new instance:", ...) return old(...) end) [oth.get\_root\_callback](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_root_callback) [oth.is\_hook\_thread](https://docs.potassium.pro/api-reference/Oth%20Library/oth.is_hook_thread) ⌘I --- # raknet.remove_send_hook - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.remove_send_hook#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation RakNet Library raknet.remove\_send\_hook On this page * [Example](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.remove_send_hook#example) function raknet.remove_send_hook(callback: function): () [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.remove_send_hook#param-callback) callback function required The callback function to remove. Due to the nature of RakNet, in order for this function to do anything, you need to enable it in the internal UI’s settings. Bans may occur from using this. ### [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.remove_send_hook#example) Example This example prints the data of every packet sent and then removes the send hook to prevent it from printing future packets. local send_hook = nil send_hook = function(packet) print("ID:", packet.PacketId) print("Size:", packet.Size) print("Priority:", packet.Priority) print("Data (as buffer):", packet.AsBuffer) print("Data (as array):", packet.AsArray) print("Data (as string):", packet.AsString) print("Reliability:", packet.Reliability) print("Ordering Channel:", packet.OrderingChannel) raknet.remove_send_hook(send_hook) end raknet.add_send_hook(send_hook) [raknet.add\_send\_hook](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.add_send_hook) [raknet.send](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.send) ⌘I --- # raknet.send - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.send#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation RakNet Library raknet.send On this page * [Example](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.send#example) function raknet.send(packet: buffer | table | string, priority: int, reliability: int, orderingChannel: int): () [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.send#param-packet) packet buffer | table | string required The packet to send. [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.send#param-priority) priority int required The priority of the packet. [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.send#param-reliability) reliability int required The reliability mode of the packet. [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.send#param-ordering-channel) orderingChannel int required The ordering channel of the packet used for ordered traffic. Due to the nature of RakNet, in order for this function to do anything, you need to enable it in the internal UI’s settings. Bans may occur from using this. ### [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.send#example) Example This example sends a packet with a buffer as payload, a priority of `1`, a reliability of `0`, and an ordering channel of `0`. local buf = buffer.create(2); buffer.writeu8(buf, 1, 123); raknet.send(buf, 1, 0, 0) [raknet.remove\_send\_hook](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.remove_send_hook) [RakNetPacket](https://docs.potassium.pro/api-reference/RakNet%20Library/RakNetPacket) ⌘I --- # debug.getupvalues - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalues#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getupvalues On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalues#example) function debug.getupvalues(function: function | number): { any } [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalues#param-function) function function | number required The function whose upvalues are returned. Stack levels are also supported. Alias: getupvalues ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalues#example) Example This code sample will print every upvalue the function’s upvalue list. local upvalue = "Hello, World!" function foo() print(upvalue) end local upvalues = debug.getupvalues(foo) for i, v in upvalues do print(i, v) end [debug.getupvalue](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalue) [debug.isvalidlevel](https://docs.potassium.pro/api-reference/Debug%20Library/debug.isvalidlevel) ⌘I --- # getinstances - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Instance%20Library/getinstances#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Instance Library getinstances On this page * [Example](https://docs.potassium.pro/api-reference/Instance%20Library/getinstances#example) function getinstances(): { Instance } ### [​](https://docs.potassium.pro/api-reference/Instance%20Library/getinstances#example) Example This script will print every instance in the game. for _, instance in getinstances() do print(instance) end [gethui](https://docs.potassium.pro/api-reference/Instance%20Library/gethui) [getnilinstances](https://docs.potassium.pro/api-reference/Instance%20Library/getnilinstances) ⌘I --- # writefile - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/FileSystem%20Library/writefile#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation FileSystem Library writefile On this page * [Example](https://docs.potassium.pro/api-reference/FileSystem%20Library/writefile#example) function writefile(file: string, contents: string): () [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/writefile#param-file) file string required The path to the file you’re wanting to write to. [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/writefile#param-contents) contents string required The contents you want the file to contain. ### [​](https://docs.potassium.pro/api-reference/FileSystem%20Library/writefile#example) Example writefile("test.txt", tostring(workspace:GetServerTimeNow())) [readfile](https://docs.potassium.pro/api-reference/FileSystem%20Library/readfile) [isrbxactive](https://docs.potassium.pro/api-reference/Input%20Library/isrbxactive) ⌘I --- # debug.setname - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setname#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.setname On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setname#example) function debug.setname(function: function | number, name: string): () [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setname#param-function) function function | number required The function to set the name of. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setname#param-name) name number required The name you want to set the function to. Alias: setname ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setname#example) Example local function foo() print("name", debug.info(1, "n")) end foo() -- name foo debug.setname(foo, "bar") foo() -- name bar [debug.setinfo](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setinfo) [debug.setsafeenv](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setsafeenv) ⌘I --- # debug.setinfo - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setinfo#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.setinfo On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setinfo#example) function debug.setinfo(func: function, info: table): () [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setinfo#param-func) func function required The function you would like to change the info of [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setinfo#param-info) info table required The info you would like to change. (name, source, short\_src, currentline) Alias: setinfo ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setinfo#example) Example local foo = function() print(debug.traceback()) end foo() --> Original info debug.setinfo(foo, { name = "bar", source = "bar", short_src = "bar", currentline = 123 }) foo() --> Spoofed one [debug.setconstant](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setconstant) [debug.setname](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setname) ⌘I --- # debug.getupvalue - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalue#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getupvalue On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalue#example) function debug.getupvalue(function: function | number, index: number): any [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalue#param-function) function function | number required The function whose upvalue is returned. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalue#param-index) index number required The index of the upvalue to return. Alias: getupvalue ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalue#example) Example This code sample will print an upvalue from the function’s upvalue list. local bar = "Hello, World!" function foo() print(bar) end local upvalue = debug.getupvalue(foo, 1) print(upvalue) [debug.getstack](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getstack) [debug.getupvalues](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalues) ⌘I --- # oth.get_original_thread - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_original_thread#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Oth Library oth.get\_original\_thread On this page * [Example](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_original_thread#example) function oth.get_original_thread(): thread ### [​](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_original_thread#example) Example This example hooks `game.GetService(game, ...)` and returns an infinite yield for any calls made from scripts in `nilinstances` to fully bypass some anti-cheats that rely on `game.GetService` on startup. oth.hook(game.GetService, function(...) local thread = oth.get_original_thread() local script = getscriptfromthread(thread) if script and script.Parent == nil then return task.wait(9e9) end return oth.get_root_callback()(...) end) [getrendersteppedlist](https://docs.potassium.pro/api-reference/Instance%20Library/getrendersteppedlist) [oth.get\_root\_callback](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_root_callback) ⌘I --- # WebSocket.connect - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/WebSocket%20Library/WebSocket.connect#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation WebSocket Library WebSocket.connect On this page * [Methods](https://docs.potassium.pro/api-reference/WebSocket%20Library/WebSocket.connect#methods) * [Events](https://docs.potassium.pro/api-reference/WebSocket%20Library/WebSocket.connect#events) * [Example](https://docs.potassium.pro/api-reference/WebSocket%20Library/WebSocket.connect#example) function WebSocket.connect(url: string): WebSocket [​](https://docs.potassium.pro/api-reference/WebSocket%20Library/WebSocket.connect#param-url) url string required The WebSocket URL that will be connected to. Alias: WebSocket.new ### [​](https://docs.potassium.pro/api-reference/WebSocket%20Library/WebSocket.connect#methods) Methods | Method | Description | | --- | --- | | `Send(message: string): ()` | Sends a message over the WebSocket connection. | | `Close(): ()` | Closes the WebSocket connection. | ### [​](https://docs.potassium.pro/api-reference/WebSocket%20Library/WebSocket.connect#events) Events | Event | Description | | --- | --- | | `OnMessage(message: string): ()` | Fired when a message is received over the WebSocket connection. | | `OnClose(): ()` | Fired when the WebSocket connection is closed. | ### [​](https://docs.potassium.pro/api-reference/WebSocket%20Library/WebSocket.connect#example) Example This script creates a WebSocket connection, sends to the connection, and closes the connection. local ws = WebSocket.connect("wss://echo.websocket.org") ws:Send("Hello, WebSocket!") ws:Close() [replicatesignal](https://docs.potassium.pro/api-reference/Signal%20Library/replicatesignal) ⌘I --- # fireproximityprompt - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Instance%20Library/fireproximityprompt#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Instance Library fireproximityprompt On this page * [Example](https://docs.potassium.pro/api-reference/Instance%20Library/fireproximityprompt#example) function fireproximityprompt(proximityprompt: ProximityPrompt): () [​](https://docs.potassium.pro/api-reference/Instance%20Library/fireproximityprompt#param-proximityprompt) proximityprompt ProximityPrompt required The `ProximityPrompt` that’s triggered. ### [​](https://docs.potassium.pro/api-reference/Instance%20Library/fireproximityprompt#example) Example local part = Instance.new("Part", workspace) local proximityPrompt = Instance.new("ProximityPrompt", part) proximityPrompt.Triggered:Connect(function() print("proximityPrompt Triggered") end) fireproximityprompt(proximityPrompt) [fireclickdetector](https://docs.potassium.pro/api-reference/Instance%20Library/fireclickdetector) [firetouchinterest](https://docs.potassium.pro/api-reference/Instance%20Library/firetouchinterest) ⌘I --- # debug.setstack - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setstack#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.setstack On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setstack#example) function debug.setstack(level: number, index: number, replacement: any): () [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setstack#param-level) level number required The stack level of the function whose stack object is set. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setstack#param-index) index number required The index of the stack object to set. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setstack#param-replacement) replacement any required The replacement object. Must be of the same type. Alias: setstack ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setstack#example) Example This code sample will set a single object that’s on the calling function’s stack. -- Imagine this is a hook of some kind. function foo(vec3) local replacement = Vector3.new(100, 100, 100) debug.setstack(2, 1, replacement) end local function bar() local vec3 = Vector3.new() foo(vec3) return vec3 end print(bar()) [debug.setsafeenv](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setsafeenv) [debug.setupvalue](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setupvalue) ⌘I --- # debug.setsafeenv - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setsafeenv#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.setsafeenv On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setsafeenv#example) function debug.setsafeenv(func: function | table | thread | boolean, safe: boolean?) [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setsafeenv#param-object) object function | table | thread | boolean required The object you would like to set the safeenv of. (If a boolean is provided it will set the current state’s safeenv) [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setsafeenv#param-safe) safe boolean What to set the safeenv of the ‘func’. Alias: debug.setuntouched ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setsafeenv#example) Example Potassium marks safeenv to false in all executed scripts for compatibility. print(debug.getsafeenv()) --> false debug.setsafeenv(true) print(debug.getsafeenv()) --> true -- Since we are breaking safeenv protections by -- replacing a global function with getfenv, safeenv -- becomes false. Also applicable to setfenv. getfenv().warn = function() end print(debug.getsafeenv()) --> false [debug.setname](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setname) [debug.setstack](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setstack) ⌘I --- # gethui - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Instance%20Library/gethui#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Instance Library gethui On this page * [Example](https://docs.potassium.pro/api-reference/Instance%20Library/gethui#example) function gethui(): Instance Alias: get\_hidden\_gui ### [​](https://docs.potassium.pro/api-reference/Instance%20Library/gethui#example) Example local hiddenContainer = gethui() local frame = Instance.new("Frame", hiddenContainer) frame.Size = UDim2.new(0, 100, 0, 100) [getcustomasset](https://docs.potassium.pro/api-reference/Instance%20Library/getcustomasset) [getinstances](https://docs.potassium.pro/api-reference/Instance%20Library/getinstances) ⌘I --- # getnilinstances - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Instance%20Library/getnilinstances#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Instance Library getnilinstances On this page * [Example](https://docs.potassium.pro/api-reference/Instance%20Library/getnilinstances#example) function getnilinstances(): { Instance } ### [​](https://docs.potassium.pro/api-reference/Instance%20Library/getnilinstances#example) Example This script will print every nil instance in the game. for _, instance in getnilinstances() do print(instance) end [getinstances](https://docs.potassium.pro/api-reference/Instance%20Library/getinstances) [getrendersteppedlist](https://docs.potassium.pro/api-reference/Instance%20Library/getrendersteppedlist) ⌘I --- # makereadonly - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Metatable%20Library/makereadonly#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Metatable Library makereadonly On this page * [Example](https://docs.potassium.pro/api-reference/Metatable%20Library/makereadonly#example) function makereadonly(table: table): () [​](https://docs.potassium.pro/api-reference/Metatable%20Library/makereadonly#param-table) table table required The table to set as read-only. ### [​](https://docs.potassium.pro/api-reference/Metatable%20Library/makereadonly#example) Example local protected = { foo = "bar" } makereadonly(protected) -- Equivalent to setreadonly(protected, true) or table.freeze(protected) protected.foo = "test" --> attempt to modify a readonly table [isreadonly](https://docs.potassium.pro/api-reference/Metatable%20Library/isreadonly) [makewritable](https://docs.potassium.pro/api-reference/Metatable%20Library/makewritable) ⌘I --- # oth.unhook - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Oth%20Library/oth.unhook#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Oth Library oth.unhook On this page * [Example](https://docs.potassium.pro/api-reference/Oth%20Library/oth.unhook#example) function oth.unhook(target: function): () [​](https://docs.potassium.pro/api-reference/Oth%20Library/oth.unhook#param-target) target function required The function to unhook. ### [​](https://docs.potassium.pro/api-reference/Oth%20Library/oth.unhook#example) Example This example replaces `print` with `warn` and then unhooks it to restore the original behavior. local old = nil old = oth.hook(print, function(...) return warn(...) end) print("This will be a warning.") oth.unhook(print) print("This will be a print.") [oth.is\_hook\_thread](https://docs.potassium.pro/api-reference/Oth%20Library/oth.is_hook_thread) [getnamecallmethod](https://docs.potassium.pro/api-reference/Metatable%20Library/getnamecallmethod) ⌘I --- # raknet.add_send_hook - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.add_send_hook#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation RakNet Library raknet.add\_send\_hook On this page * [Example](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.add_send_hook#example) * [Desync Example](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.add_send_hook#desync-example) function raknet.add_send_hook(callback: (packet: RakNetPacket) -> nil): () [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.add_send_hook#param-callback) callback function required The callback function to register. Due to the nature of RakNet, in order for this function to do anything, you need to enable it in the internal UI’s settings. Bans may occur from using this. ### [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.add_send_hook#example) Example This example prints the data of every packet sent. raknet.add_send_hook(function(packet) print("ID:", packet.PacketId) print("Size:", packet.Size) print("Priority:", packet.Priority) print("Data (as buffer):", packet.AsBuffer) print("Data (as array):", packet.AsArray) print("Data (as string):", packet.AsString) print("Reliability:", packet.Reliability) print("Ordering Channel:", packet.OrderingChannel) end) ### [​](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.add_send_hook#desync-example) Desync Example This example is a widely known replication desync that registers a send hook that modifies `ID_TIMESTAMP` packets before they are sent. raknet.add_send_hook(function(packet) if packet.PacketId == 0x1B then local buf = packet.AsBuffer buffer.writeu32(buf, 1, 0xFFFFFFFF) packet:SetData(buf) end end) [PsmConnection](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmConnection) [raknet.remove\_send\_hook](https://docs.potassium.pro/api-reference/RakNet%20Library/raknet.remove_send_hook) ⌘I --- # keypress - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/keypress#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library keypress On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/keypress#example) function keypress(keycode: number) [​](https://docs.potassium.pro/api-reference/Input%20Library/keypress#param-keycode) keycode number required The keycode to press. The only accepted keycodes are Window’s Virtual-Key codes. ### [​](https://docs.potassium.pro/api-reference/Input%20Library/keypress#example) Example This script will press and release the ‘H’ key. task.wait(1) -- Give the user time to put roblox in focus. local H_KEYCODE = 0x48 keypress(H_KEYCODE) task.wait() keyrelease(H_KEYCODE) [isrbxactive](https://docs.potassium.pro/api-reference/Input%20Library/isrbxactive) [keyrelease](https://docs.potassium.pro/api-reference/Input%20Library/keyrelease) ⌘I --- # mouse1release - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/mouse1release#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library mouse1release On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/mouse1release#example) function mouse1release() ### [​](https://docs.potassium.pro/api-reference/Input%20Library/mouse1release#example) Example This script will press and release the left mouse button. task.wait(1) -- Give the user time to put roblox in focus. mouse1press() task.wait() mouse1release() [mouse1press](https://docs.potassium.pro/api-reference/Input%20Library/mouse1press) [mouse2click](https://docs.potassium.pro/api-reference/Input%20Library/mouse2click) ⌘I --- # mouse1click - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/mouse1click#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library mouse1click On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/mouse1click#example) function mouse1click() ### [​](https://docs.potassium.pro/api-reference/Input%20Library/mouse1click#example) Example This script will click the left mouse button. task.wait(1) -- Give the user time to put roblox in focus. mouse1click() [keytap](https://docs.potassium.pro/api-reference/Input%20Library/keytap) [mouse1press](https://docs.potassium.pro/api-reference/Input%20Library/mouse1press) ⌘I --- # mouse2release - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/mouse2release#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library mouse2release On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/mouse2release#example) function mouse2release() ### [​](https://docs.potassium.pro/api-reference/Input%20Library/mouse2release#example) Example This script will press and release the right mouse button. task.wait(1) -- Give the user time to put roblox in focus. mouse2press() task.wait() mouse2release() [mouse2press](https://docs.potassium.pro/api-reference/Input%20Library/mouse2press) [mousemoveabs](https://docs.potassium.pro/api-reference/Input%20Library/mousemoveabs) ⌘I --- # fireclickdetector - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Instance%20Library/fireclickdetector#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Instance Library fireclickdetector On this page * [Example](https://docs.potassium.pro/api-reference/Instance%20Library/fireclickdetector#example) function fireclickdetector(clickdetector: ClickDetector, distance?: number, signal?: string): () [​](https://docs.potassium.pro/api-reference/Instance%20Library/fireclickdetector#param-clickdetector) clickdetector ClickDetector required The `ClickDetector` that’s fired. [​](https://docs.potassium.pro/api-reference/Instance%20Library/fireclickdetector#param-distance) distance number The distance between the `LocalPlayer` and the `ClickDetector`’s parent part. The default distance is 0. [​](https://docs.potassium.pro/api-reference/Instance%20Library/fireclickdetector#param-signal) signal string This string determines which signal to fire. Signal types include: “MouseClick”, “RightMouseClick”, “MouseHoverEnter”, and “MouseHoverLeave”. The Default is “MouseClick”. ### [​](https://docs.potassium.pro/api-reference/Instance%20Library/fireclickdetector#example) Example local part = Instance.new("Part") local clickdetector = Instance.new("ClickDetector", part) clickdetector.MouseClick:Connect(function() print("fired MouseClick") end) clickdetector.RightMouseClick:Connect(function() print("fired RightMouseClick") end) fireclickdetector(clickdetector) -- Will fire "MouseClick" task.wait(1) fireclickdetector(clickdetector, 0, "RightMouseClick") [mousescroll](https://docs.potassium.pro/api-reference/Input%20Library/mousescroll) [fireproximityprompt](https://docs.potassium.pro/api-reference/Instance%20Library/fireproximityprompt) ⌘I --- # isreadonly - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Metatable%20Library/isreadonly#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Metatable Library isreadonly On this page * [Example](https://docs.potassium.pro/api-reference/Metatable%20Library/isreadonly#example) Aliases: is\_readonly function isreadonly(table: table): boolean [​](https://docs.potassium.pro/api-reference/Metatable%20Library/isreadonly#param-table) table table required The table to check the read-only status of. ### [​](https://docs.potassium.pro/api-reference/Metatable%20Library/isreadonly#example) Example local protected = table.freeze({ foo = "bar" }) print(isreadonly(protected)) --> true [hookmetamethod](https://docs.potassium.pro/api-reference/Metatable%20Library/hookmetamethod) [makereadonly](https://docs.potassium.pro/api-reference/Metatable%20Library/makereadonly) ⌘I --- # getcallbackvalue - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Instance%20Library/getcallbackvalue#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Instance Library getcallbackvalue On this page * [Example](https://docs.potassium.pro/api-reference/Instance%20Library/getcallbackvalue#example) function getcallbackvalue(instance: Instance, property: string): function? [​](https://docs.potassium.pro/api-reference/Instance%20Library/getcallbackvalue#param-instance) instance Instance required The `Instance` that is used to derive the callback. [​](https://docs.potassium.pro/api-reference/Instance%20Library/getcallbackvalue#param-property) property string required The name of the callback property. See example below. Alias: getcallbackmember ### [​](https://docs.potassium.pro/api-reference/Instance%20Library/getcallbackvalue#example) Example local bindableFunction = Instance.new("BindableFunction") bindableFunction.OnInvoke = function() print("Invoked") end local callback = getcallbackvalue(bindableFunction, "OnInvoke") callback() --> Invoked [firetouchinterest](https://docs.potassium.pro/api-reference/Instance%20Library/firetouchinterest) [getcustomasset](https://docs.potassium.pro/api-reference/Instance%20Library/getcustomasset) ⌘I --- # debug.setupvalue - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setupvalue#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.setupvalue On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setupvalue#example) function debug.setupvalue(function: function | number, index: number, replacement: any): () [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setupvalue#param-function) function function | number required The function whose upvalue is set. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setupvalue#param-index) index number required The index of the upvalue to set. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setupvalue#param-replacement) replacement any required The replacement object. Must be of the same type. Alias: setupvalue ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setupvalue#example) Example This script will set a function’s upvalue. local upvalue = 0 local function foo() return upvalue end local function bar() upvalue += 1 end print(foo()) debug.setupvalue(foo, 1, 10000) print(foo()) [debug.setstack](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setstack) [Drawing.Fonts](https://docs.potassium.pro/api-reference/Drawing%20Library/Drawing.Fonts) ⌘I --- # debug.getstack - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getstack#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.getstack On this page * [Example debug.getstack returning a table.](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getstack#example-debug-getstack-returning-a-table) * [Example debug.getstack returning a singluar object.](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getstack#example-debug-getstack-returning-a-singluar-object) function debug.getstack(level: number, index: number?): ( any | { any } ) [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getstack#param-level) level number required The stack level at which the objects are collected. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getstack#param-index) index number The index of a specific object on the stack to return. If omitted, the entire stack at the given level is returned as a table. Alias: getstack ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getstack#example-debug-getstack-returning-a-table) Example debug.getstack returning a table. This code sample will print all of the objects on the calling function’s stack. -- Imagine this is a hook of some kind. function foo(vec3) local stack = debug.getstack(2) for i, v in stack do print(i, v) end end local function bar() local vec3 = Vector3.new() foo(vec3) return vec3 end bar() ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getstack#example-debug-getstack-returning-a-singluar-object) Example debug.getstack returning a singluar object. This code sample will print a single object that’s on the calling function’s stack. -- Imagine this is a hook of some kind. function foo(vec3) local object = debug.getstack(2, 3) print(object) end local function bar() local vec3 = Vector3.new() foo(vec3) return vec3 end bar() [debug.getsafeenv](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getsafeenv) [debug.getupvalue](https://docs.potassium.pro/api-reference/Debug%20Library/debug.getupvalue) ⌘I --- # mouse2press - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/mouse2press#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library mouse2press On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/mouse2press#example) function mouse2press() ### [​](https://docs.potassium.pro/api-reference/Input%20Library/mouse2press#example) Example This script will press and release the right mouse button. task.wait(1) -- Give the user time to put roblox in focus. mouse2press() task.wait() mouse2release() [mouse2click](https://docs.potassium.pro/api-reference/Input%20Library/mouse2click) [mouse2release](https://docs.potassium.pro/api-reference/Input%20Library/mouse2release) ⌘I --- # mouse2click - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/mouse2click#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library mouse2click On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/mouse2click#example) function mouse2click() ### [​](https://docs.potassium.pro/api-reference/Input%20Library/mouse2click#example) Example This script will click the right mouse button. task.wait(1) -- Give the user time to put roblox in focus. mouse2click() [mouse1release](https://docs.potassium.pro/api-reference/Input%20Library/mouse1release) [mouse2press](https://docs.potassium.pro/api-reference/Input%20Library/mouse2press) ⌘I --- # makewritable - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Metatable%20Library/makewritable#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Metatable Library makewritable On this page * [Example](https://docs.potassium.pro/api-reference/Metatable%20Library/makewritable#example) function makewritable(table: table): () [​](https://docs.potassium.pro/api-reference/Metatable%20Library/makewritable#param-table) table table required The read-only table to make writable. ### [​](https://docs.potassium.pro/api-reference/Metatable%20Library/makewritable#example) Example local protected = table.freeze({ foo = "bar" }) print(pcall(function() protected.bar = "foo" end)) --> false, attempt to modify a readonly table makewritable(protected) -- Equivalent to setreadonly(protected, false) protected.bar = "foo" print(protected.bar, table.isfrozen(protected)) --> foo, false makereadonly(protected) -- Equivalent to setreadonly(protected, true) or table.freeze(protected) [makereadonly](https://docs.potassium.pro/api-reference/Metatable%20Library/makereadonly) [setnamecallmethod](https://docs.potassium.pro/api-reference/Metatable%20Library/setnamecallmethod) ⌘I --- # getrawmetatable - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Metatable%20Library/getrawmetatable#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Metatable Library getrawmetatable On this page * [Example](https://docs.potassium.pro/api-reference/Metatable%20Library/getrawmetatable#example) function getrawmetatable(meta: table | userdata): table? [​](https://docs.potassium.pro/api-reference/Metatable%20Library/getrawmetatable#param-meta) meta table | userdata required The table or userdata that contains a metatable. Alias: debug.getmetatable ### [​](https://docs.potassium.pro/api-reference/Metatable%20Library/getrawmetatable#example) Example local t = setmetatable({}, { __index = function(self, index) print(index) end, __metatable = "This table is locked." }) print(getmetatable(t)) --> This table is locked. print(getrawmetatable(t)) --> table: 0x..... [getnamecallmethod](https://docs.potassium.pro/api-reference/Metatable%20Library/getnamecallmethod) [hookmetamethod](https://docs.potassium.pro/api-reference/Metatable%20Library/hookmetamethod) ⌘I --- # setnamecallmethod - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Metatable%20Library/setnamecallmethod#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Metatable Library setnamecallmethod On this page * [Example](https://docs.potassium.pro/api-reference/Metatable%20Library/setnamecallmethod#example) function setnamecallmethod(method: string): () [​](https://docs.potassium.pro/api-reference/Metatable%20Library/setnamecallmethod#param-method) method string required The new namecall method name to set on the current state. Aliases: set\_namecall\_method ### [​](https://docs.potassium.pro/api-reference/Metatable%20Library/setnamecallmethod#example) Example game:GetFullName() print(getnamecallmethod()) --> GetFullName setnamecallmethod("getFullName") print(getnamecallmethod()) --> getFullName print(getrawmetatable(game).__namecall(game)) --> Ugc [makewritable](https://docs.potassium.pro/api-reference/Metatable%20Library/makewritable) [setrawmetatable](https://docs.potassium.pro/api-reference/Metatable%20Library/setrawmetatable) ⌘I --- # keytap - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/keytap#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library keytap On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/keytap#example) function keytap(keycode: number) [​](https://docs.potassium.pro/api-reference/Input%20Library/keytap#param-keycode) keycode number required The keycode to tap. The only accepted keycodes are Window’s Virtual-Key codes. Alias: keyclick ### [​](https://docs.potassium.pro/api-reference/Input%20Library/keytap#example) Example This script will tap (press and release) the ‘H’ key. task.wait(1) -- Give the user time to put roblox in focus. local H_KEYCODE = 0x48 keytap(H_KEYCODE) [keyrelease](https://docs.potassium.pro/api-reference/Input%20Library/keyrelease) [mouse1click](https://docs.potassium.pro/api-reference/Input%20Library/mouse1click) ⌘I --- # getnamecallmethod - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Metatable%20Library/getnamecallmethod#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Metatable Library getnamecallmethod On this page * [Example](https://docs.potassium.pro/api-reference/Metatable%20Library/getnamecallmethod#example) function getnamecallmethod(): string? Aliases: get\_namecall\_method ### [​](https://docs.potassium.pro/api-reference/Metatable%20Library/getnamecallmethod#example) Example xpcall(function() return game:method() end, function() print(getnamecallmethod()) --> method end) [oth.unhook](https://docs.potassium.pro/api-reference/Oth%20Library/oth.unhook) [getrawmetatable](https://docs.potassium.pro/api-reference/Metatable%20Library/getrawmetatable) ⌘I --- # firetouchinterest - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Instance%20Library/firetouchinterest#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Instance Library firetouchinterest On this page * [Example](https://docs.potassium.pro/api-reference/Instance%20Library/firetouchinterest#example) function firetouchinterest(source: Instance, target: Instance, touch: boolean): () [​](https://docs.potassium.pro/api-reference/Instance%20Library/firetouchinterest#param-source) source Instance required The `Instance` that will touch the target. [​](https://docs.potassium.pro/api-reference/Instance%20Library/firetouchinterest#param-target) target Instance required The `Instance` that will be touched by the source. [​](https://docs.potassium.pro/api-reference/Instance%20Library/firetouchinterest#param-touch) touch boolean required This boolean toggles between touching and not touching the target `Instance`. ### [​](https://docs.potassium.pro/api-reference/Instance%20Library/firetouchinterest#example) Example local part = Instance.new("Part", workspace) part.Touched:Connect(function() print("Touched") end) part.TouchEnded:Connect(function() print("TouchEnded") end) local character = game.Players.LocalPlayer.Character firetouchinterest(part, character.HumanoidRootPart, true) task.wait(1) firetouchinterest(part, character.HumanoidRootPart, false) task.wait() part:Destroy() [fireproximityprompt](https://docs.potassium.pro/api-reference/Instance%20Library/fireproximityprompt) [getcallbackvalue](https://docs.potassium.pro/api-reference/Instance%20Library/getcallbackvalue) ⌘I --- # setrawmetatable - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Metatable%20Library/setrawmetatable#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Metatable Library setrawmetatable On this page * [Example](https://docs.potassium.pro/api-reference/Metatable%20Library/setrawmetatable#example) function setrawmetatable(tbl: table | userdata, meta: table): table? [​](https://docs.potassium.pro/api-reference/Metatable%20Library/setrawmetatable#param-tbl) tbl table | userdata required A table or userdata. [​](https://docs.potassium.pro/api-reference/Metatable%20Library/setrawmetatable#param-meta) meta table required The metatable you want to set the ‘tbl’ to. Alias: debug.setmetatable ### [​](https://docs.potassium.pro/api-reference/Metatable%20Library/setrawmetatable#example) Example local t = setmetatable({}, { __index = function(self, index) print(index) end, __metatable = "This table is locked." }) print(pcall(setmetatable, t, {})) --> false, cannot change a protected metatable print(setrawmetatable(t, {})) --> table: 0x...... [setnamecallmethod](https://docs.potassium.pro/api-reference/Metatable%20Library/setnamecallmethod) [setreadonly](https://docs.potassium.pro/api-reference/Metatable%20Library/setreadonly) ⌘I --- # hookmetamethod - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Metatable%20Library/hookmetamethod#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Metatable Library hookmetamethod On this page * [Example](https://docs.potassium.pro/api-reference/Metatable%20Library/hookmetamethod#example) function hookmetamethod(object: Instance | table | userdata, method: string, hook: function): table? [​](https://docs.potassium.pro/api-reference/Metatable%20Library/hookmetamethod#param-object) object Instance | table | userdata required The object that contains a metatable. [​](https://docs.potassium.pro/api-reference/Metatable%20Library/hookmetamethod#param-method) method string required A metatable method. [​](https://docs.potassium.pro/api-reference/Metatable%20Library/hookmetamethod#param-hook) hook function required The function that will hook the ‘method’ function. ### [​](https://docs.potassium.pro/api-reference/Metatable%20Library/hookmetamethod#example) Example Using `old` we are able to call the old function and act as a middle man between the original function for ‘\_\_newindex’. local old = nil old = hookmetamethod(game, "__newindex", function(self, index, value) if not checkcaller() then --> Ignore non-executor newindex calls return old(self, index, value) end if value == game then --> Prevent any changes from being made to game return nil end return old(self, index, value) end) local objectValue = Instance.new("ObjectValue") objectValue.Value = workspace print(objectValue.Value) --> Workspace objectValue.Value = game print(objectValue.Value) --> Workspace [getrawmetatable](https://docs.potassium.pro/api-reference/Metatable%20Library/getrawmetatable) [isreadonly](https://docs.potassium.pro/api-reference/Metatable%20Library/isreadonly) ⌘I --- # isrbxactive - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/isrbxactive#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library isrbxactive On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/isrbxactive#example) function isrbxactive(): boolean Aliases: isgameactive, iswindowactive ### [​](https://docs.potassium.pro/api-reference/Input%20Library/isrbxactive#example) Example task.wait(1) -- Give the user time to put roblox in focus. local isactive = isrbxactive() print("isactive: ", isactive) [writefile](https://docs.potassium.pro/api-reference/FileSystem%20Library/writefile) [keypress](https://docs.potassium.pro/api-reference/Input%20Library/keypress) ⌘I --- # keyrelease - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/keyrelease#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library keyrelease On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/keyrelease#example) function keyrelease(keycode: number) [​](https://docs.potassium.pro/api-reference/Input%20Library/keyrelease#param-keycode) keycode number required The keycode to release. The only accepted keycodes are Window’s Virtual-Key codes. ### [​](https://docs.potassium.pro/api-reference/Input%20Library/keyrelease#example) Example This script will press and release the ‘H’ key. task.wait(1) -- Give the user time to put roblox in focus. local H_KEYCODE = 0x48 keypress(H_KEYCODE) task.wait() keyrelease(H_KEYCODE) [keypress](https://docs.potassium.pro/api-reference/Input%20Library/keypress) [keytap](https://docs.potassium.pro/api-reference/Input%20Library/keytap) ⌘I --- # mousemoverel - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/mousemoverel#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library mousemoverel On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/mousemoverel#example) function mousemoverel(x: number, y: number) [​](https://docs.potassium.pro/api-reference/Input%20Library/mousemoverel#param-x) x number required The relative X coordinate to move the mouse to. [​](https://docs.potassium.pro/api-reference/Input%20Library/mousemoverel#param-y) y number required The relative Y coordinate to move the mouse to. ### [​](https://docs.potassium.pro/api-reference/Input%20Library/mousemoverel#example) Example This script will move the mouse (100, 100) pixels relative to the current mouse’s position. task.wait(1) -- Give the user time to put roblox in focus. mousemoverel(100, 100) [mousemoveabs](https://docs.potassium.pro/api-reference/Input%20Library/mousemoveabs) [mousescroll](https://docs.potassium.pro/api-reference/Input%20Library/mousescroll) ⌘I --- # getcustomasset - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Instance%20Library/getcustomasset#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Instance Library getcustomasset On this page * [Example](https://docs.potassium.pro/api-reference/Instance%20Library/getcustomasset#example) function getcustomasset(filepath: string): string [​](https://docs.potassium.pro/api-reference/Instance%20Library/getcustomasset#param-file) file string required The file path from the `workspace` folder. ### [​](https://docs.potassium.pro/api-reference/Instance%20Library/getcustomasset#example) Example local assetId = getcustomasset("mysound.mp3") local sound = Instance.new("Sound", workspace) sound.SoundId = assetId sound:Play() [getcallbackvalue](https://docs.potassium.pro/api-reference/Instance%20Library/getcallbackvalue) [gethui](https://docs.potassium.pro/api-reference/Instance%20Library/gethui) ⌘I --- # getrendersteppedlist - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Instance%20Library/getrendersteppedlist#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Instance Library getrendersteppedlist On this page * [Example](https://docs.potassium.pro/api-reference/Instance%20Library/getrendersteppedlist#example) function getrendersteppedlist(): { function } ### [​](https://docs.potassium.pro/api-reference/Instance%20Library/getrendersteppedlist#example) Example This script will print every callback that’s bound to ‘RenderStepped’. local connections = getrendersteppedlist() for _, callback in connections do print("Function:", callback.Function) print("Thread:", callback.Thread) print("Priority:", callback.Priority) print("Name:", callback.Name) end [getnilinstances](https://docs.potassium.pro/api-reference/Instance%20Library/getnilinstances) [oth.get\_original\_thread](https://docs.potassium.pro/api-reference/Oth%20Library/oth.get_original_thread) ⌘I --- # debug.setconstant - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setconstant#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Debug Library debug.setconstant On this page * [Example](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setconstant#example) function debug.setconstant(function: function | number, index: number, replacement: any): () [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setconstant#param-function) function function | number required The function whose constant is set. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setconstant#param-index) index number required The index of the constant to set. [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setconstant#param-replacement) replacement any required The replacement object. Must be of the same type. Alias: setconstant ### [​](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setconstant#example) Example function foo() return 696969420 end debug.setconstant(foo, 1, 0) print(foo()) [debug.isvalidlevel](https://docs.potassium.pro/api-reference/Debug%20Library/debug.isvalidlevel) [debug.setinfo](https://docs.potassium.pro/api-reference/Debug%20Library/debug.setinfo) ⌘I --- # mousemoveabs - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/mousemoveabs#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library mousemoveabs On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/mousemoveabs#example) function mousemoveabs(x: number, y: number) [​](https://docs.potassium.pro/api-reference/Input%20Library/mousemoveabs#param-x) x number required The absolute X coordinate to move the mouse to. [​](https://docs.potassium.pro/api-reference/Input%20Library/mousemoveabs#param-y) y number required The absolute Y coordinate to move the mouse to. ### [​](https://docs.potassium.pro/api-reference/Input%20Library/mousemoveabs#example) Example This script will move the mouse to (100, 100) on the screen. task.wait(1) -- Give the user time to put roblox in focus. mousemoveabs(100, 100) [mouse2release](https://docs.potassium.pro/api-reference/Input%20Library/mouse2release) [mousemoverel](https://docs.potassium.pro/api-reference/Input%20Library/mousemoverel) ⌘I --- # setreadonly - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Metatable%20Library/setreadonly#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Metatable Library setreadonly On this page * [Example](https://docs.potassium.pro/api-reference/Metatable%20Library/setreadonly#example) Aliases: set\_readonly function setreadonly(table: table, readonly: boolean): () [​](https://docs.potassium.pro/api-reference/Metatable%20Library/setreadonly#param-table) table table required The table whose read-only status will be changed. [​](https://docs.potassium.pro/api-reference/Metatable%20Library/setreadonly#param-readonly) readonly boolean required Whether to make the table read-only (`true`) or writable (`false`). ### [​](https://docs.potassium.pro/api-reference/Metatable%20Library/setreadonly#example) Example local protected = table.freeze({ foo = "bar" }) print(pcall(function() protected.bar = "foo" end)) --> false, attempt to modify a readonly table setreadonly(protected, false) -- Makes the table writable; similar to makewritable(protected) protected.bar = "foo" print(protected.bar, table.isfrozen(protected)) --> foo, false table.freeze(protected) -- Sets the table back to read-only; similar to makereadonly(protected) [setrawmetatable](https://docs.potassium.pro/api-reference/Metatable%20Library/setrawmetatable) [queueonteleport](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/clearteleportqueue) ⌘I --- # getconnection - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Signal%20Library/getconnection#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Signal Library getconnection On this page * [Example](https://docs.potassium.pro/api-reference/Signal%20Library/getconnection#example) function getconnection(signal: RBXScriptSignal, index: number): {Connection} [​](https://docs.potassium.pro/api-reference/Signal%20Library/getconnection#param-signal) signal RBXScriptSignal required The specific signal to use. [​](https://docs.potassium.pro/api-reference/Signal%20Library/getconnection#param-index) index number required The specific signal to grab using the index provided. ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/getconnection#example) Example This script is a common anti-afk script. You will not be kicked for being afk (or “Idled”). local connection = getconnection(game.Players.LocalPlayer.Idled, 1) connection:Disable() [firesignal](https://docs.potassium.pro/api-reference/Signal%20Library/firesignal) [getconnections](https://docs.potassium.pro/api-reference/Signal%20Library/getconnections) ⌘I --- # cansignalreplicate - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Signal%20Library/cansignalreplicate#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Signal Library cansignalreplicate On this page * [Example](https://docs.potassium.pro/api-reference/Signal%20Library/cansignalreplicate#example) function cansignalreplicate(signal: RBXScriptSignal): boolean [​](https://docs.potassium.pro/api-reference/Signal%20Library/cansignalreplicate#param-signal) signal RBXScriptSignal required The signal that is checked. ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/cansignalreplicate#example) Example local part = Instance.new("Part") print(cansignalreplicate(part.Touched)) [setthreadidentity](https://docs.potassium.pro/api-reference/Script%20Library/setthreadidentity) [firesignal](https://docs.potassium.pro/api-reference/Signal%20Library/firesignal) ⌘I --- # firesignal - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Signal%20Library/firesignal#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Signal Library firesignal On this page * [Example](https://docs.potassium.pro/api-reference/Signal%20Library/firesignal#example) function firesignal(signal: RBXScriptSignal, ...: any?) [​](https://docs.potassium.pro/api-reference/Signal%20Library/firesignal#param-signal) signal RBXScriptSignal required The specific signal to fire. ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/firesignal#example) Example local localPlayer = game.Players.LocalPlayer localPlayer.Idled:Connect(function() print("Fired!") end) firesignal(localPlayer.Idled) [cansignalreplicate](https://docs.potassium.pro/api-reference/Signal%20Library/cansignalreplicate) [getconnection](https://docs.potassium.pro/api-reference/Signal%20Library/getconnection) ⌘I --- # getsignalargumentsinfo - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalargumentsinfo#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Signal Library getsignalargumentsinfo On this page * [Example](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalargumentsinfo#example) function getsignalargumentsinfo(signal: RBXScriptSignal): { ArgumentInfo } [​](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalargumentsinfo#param-signal) signal RBXScriptSignal required The signal that will have it’s arguments derived from. ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalargumentsinfo#example) Example local signal = game.Players.LocalPlayer.Idled local signalArgumentInfo = getsignalargumentsinfo(signal) for _, argumentInfo in signalArgumentInfo do print(argumentInfo) end [getsignalarguments](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalarguments) [getsignalwhitelist](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalwhitelist) ⌘I --- # getsignalarguments - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalarguments#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Signal Library getsignalarguments On this page * [Example](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalarguments#example) function getsignalarguments(signal: RBXScriptSignal): { string } [​](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalarguments#param-signal) signal RBXScriptSignal required The signal that will have it’s arguments derived from. ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalarguments#example) Example local signal = game.Players.LocalPlayer.Idled local signalArguments = getsignalarguments(signal) for _, argument in signalArguments do print(argument) end [getconnections](https://docs.potassium.pro/api-reference/Signal%20Library/getconnections) [getsignalargumentsinfo](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalargumentsinfo) ⌘I --- # mousescroll - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/mousescroll#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library mousescroll On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/mousescroll#example) function mousemoverel(scroll: number) [​](https://docs.potassium.pro/api-reference/Input%20Library/mousescroll#param-scroll) scroll number required The relative scroll amount. See the example below. ### [​](https://docs.potassium.pro/api-reference/Input%20Library/mousescroll#example) Example mousescroll(10) --> Scrolls up task.wait() mousescroll(-10) --> Scrolls down [mousemoverel](https://docs.potassium.pro/api-reference/Input%20Library/mousemoverel) [fireclickdetector](https://docs.potassium.pro/api-reference/Instance%20Library/fireclickdetector) ⌘I --- # mouse1press - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Input%20Library/mouse1press#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Input Library mouse1press On this page * [Example](https://docs.potassium.pro/api-reference/Input%20Library/mouse1press#example) function mouse1press() ### [​](https://docs.potassium.pro/api-reference/Input%20Library/mouse1press#example) Example This script will press and release the left mouse button. task.wait(1) -- Give the user time to put roblox in focus. mouse1press() task.wait() mouse1release() [mouse1click](https://docs.potassium.pro/api-reference/Input%20Library/mouse1click) [mouse1release](https://docs.potassium.pro/api-reference/Input%20Library/mouse1release) ⌘I --- # getsignalwhitelist - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalwhitelist#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Signal Library getsignalwhitelist On this page * [SignalWhitelistInfo](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalwhitelist#signalwhitelistinfo) * [Example](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalwhitelist#example) function getsignalwhitelist(): { SignalWhitelistInfo } ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalwhitelist#signalwhitelistinfo) SignalWhitelistInfo | Field | Type | Description | | --- | --- | --- | | `Parent` | `string` | Name of the signal | | `Event` | `string` | Name of the event | ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalwhitelist#example) Example This example prints the names of all signals and events that are in Roblox’s replication whitelist. local whitelist = getsignalwhitelist() for _, signal in whitelist do print(string.format("%s.%s", signal.Parent, signal.Event)) end [getsignalargumentsinfo](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalargumentsinfo) [replicatesignal](https://docs.potassium.pro/api-reference/Signal%20Library/replicatesignal) ⌘I --- # getconnections - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Signal%20Library/getconnections#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Signal Library getconnections On this page * [Connection](https://docs.potassium.pro/api-reference/Signal%20Library/getconnections#connection) * [Example](https://docs.potassium.pro/api-reference/Signal%20Library/getconnections#example) function getconnections(signal: RBXScriptSignal): {Connection} [​](https://docs.potassium.pro/api-reference/Signal%20Library/getconnections#param-signal) signal RBXScriptSignal required The specific signal to use. ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/getconnections#connection) Connection | Field | Type | Description | | --- | --- | --- | | `Enabled` | boolean | Whether the connection can receive events. | | `ForeignState` | boolean | Whether the function was connected by a foreign Luau state (i.e. CoreScripts). | | `LuaConnection` | boolean | Whether the connection was created in Luau code and not by Roblox. | | `Function` | function? | The function bound to this connection. Nil when `ForeignState` is true. | | `Thread` | thread? | The thread that created the connection. Nil when `ForeignState` is true. | | `Script` | LuaSourceContainer? | The script that created the connection. | | Method | Description | | --- | --- | | `Fire(...: any): ()` | Fires this connection with the provided arguments. | | `Defer(...: any): ()` | [Defers](https://devforum.roblox.com/t/beta-deferred-lua-event-handling/1240569)
an event to connection with the provided arguments. | | `Disconnect(): ()` | Disconnects the connection. | | `Disable(): ()` | Prevents the connection from firing. | | `Enable(): ()` | Allows the connection to fire if it was previously disabled. | ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/getconnections#example) Example This script is a common anti-afk script. You will not be kicked for being afk (or “Idled”). local connection = getconnections(game.Players.LocalPlayer.Idled)[1] connection:Disable() [getconnection](https://docs.potassium.pro/api-reference/Signal%20Library/getconnection) [getsignalarguments](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalarguments) ⌘I --- # getfpscap - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getfpscap#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library getfpscap On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getfpscap#example) function getfpscap(): number ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getfpscap#example) Example print(getfpscap()) --> 60 [decompile](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/decompile) [gethwid](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/gethwid) ⌘I --- # getrunningscripts - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/getrunningscripts#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library getrunningscripts On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/getrunningscripts#example) function getrunningscripts(): { BaseScript } ### [​](https://docs.potassium.pro/api-reference/Script%20Library/getrunningscripts#example) Example This script will print the name of `LocalPlayer`’s character. for _, script in getrunningscripts() do if script.Name == "Animate" then print(script.Parent.Name) end end [getloadedmodules](https://docs.potassium.pro/api-reference/Script%20Library/getloadedmodules) [getscriptbytecode](https://docs.potassium.pro/api-reference/Script%20Library/getscriptbytecode) ⌘I --- # getscripthash - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/getscripthash#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library getscripthash On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/getscripthash#example) function getscripthash(script: BaseScript): string [​](https://docs.potassium.pro/api-reference/Script%20Library/getscripthash#param-script) script BaseScript required The script that will be hashed. ### [​](https://docs.potassium.pro/api-reference/Script%20Library/getscripthash#example) Example This script will print every running script’s hash. for _, script in getrunningscripts() do print(getscripthash(script)) end [getscriptthread](https://docs.potassium.pro/api-reference/Script%20Library/getscriptthread) [getscripts](https://docs.potassium.pro/api-reference/Script%20Library/getscripts) ⌘I --- # getscripts - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/getscripts#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library getscripts On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/getscripts#example) function getscripts(): { BaseScript } ### [​](https://docs.potassium.pro/api-reference/Script%20Library/getscripts#example) Example This script will print every script. for _, script in getscripts() do print(script) end [getscripthash](https://docs.potassium.pro/api-reference/Script%20Library/getscripthash) [getthreadidentity](https://docs.potassium.pro/api-reference/Script%20Library/getthreadidentity) ⌘I --- # getthreadidentity - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/getthreadidentity#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library getthreadidentity On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/getthreadidentity#example) function getthreadidentity(): number Aliases: getidentity, getthreadcontext, get\_thread\_identity ### [​](https://docs.potassium.pro/api-reference/Script%20Library/getthreadidentity#example) Example This script will print the current thread’s identity. print(getthreadidentity()) --> 8 (without previous changes) [getscripts](https://docs.potassium.pro/api-reference/Script%20Library/getscripts) [setthreadidentity](https://docs.potassium.pro/api-reference/Script%20Library/setthreadidentity) ⌘I --- # replicatesignal - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Signal%20Library/replicatesignal#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Signal Library replicatesignal On this page * [Example with arguments](https://docs.potassium.pro/api-reference/Signal%20Library/replicatesignal#example-with-arguments) * [Example without arguments](https://docs.potassium.pro/api-reference/Signal%20Library/replicatesignal#example-without-arguments) function replicatesignal(signal: RBXScriptSignal, ...: any?) [​](https://docs.potassium.pro/api-reference/Signal%20Library/replicatesignal#param-signal) signal RBXScriptSignal required The specific signal to replicate. ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/replicatesignal#example-with-arguments) Example with arguments This example will replicate a mouse click for a click detector. local clickDetector = Instance.new("ClickDetector") local player = game.Players.LocalPlayer replicatesignal(clickDetector.MouseActionReplicated, player, 0) ### [​](https://docs.potassium.pro/api-reference/Signal%20Library/replicatesignal#example-without-arguments) Example without arguments This example will kill the `LocalPlayer`. local player = game.Players.LocalPlayer replicatesignal(player.Kill) [getsignalwhitelist](https://docs.potassium.pro/api-reference/Signal%20Library/getsignalwhitelist) [WebSocket.connect](https://docs.potassium.pro/api-reference/WebSocket%20Library/WebSocket.connect) ⌘I --- # gethwid - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/gethwid#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library gethwid On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/gethwid#example) function gethwid(): string Aliases: get\_hwid, get\_user\_identifier ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/gethwid#example) Example print("HWID:", gethwid()) [getfpscap](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getfpscap) [getobjects](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getobjects) ⌘I --- # getobjects - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getobjects#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library getobjects On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getobjects#example) function getobjects(self: any?, asset: string): () [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getobjects#param-self) self any An optional legacy first argument (e.g. `game`) used for backwards compatibility. When provided, the second `asset` argument is used as the asset identifier. [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getobjects#param-asset) asset string required The `rbxassetid://` URL of the Roblox asset to fetch and load. ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getobjects#example) Example local asset = getobjects("rbxassetid://1818") --> Fetches Crossroads print(asset[1]) --> SoundService [gethwid](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/gethwid) [httpget](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/httpget) ⌘I --- # decompile - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/decompile#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library decompile On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/decompile#example) function decompile(script: LuaSourceContainer): string [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/decompile#param-script) script LuaSourceContainer required The `LuaSourceContainer` (e.g. a `LocalScript` or `ModuleScript`) whose bytecode will be decompiled into pseudocode. ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/decompile#example) Example local script = game:GetService("Players").LocalPlayer.Character.Animate print(decompile(script)) --> Psuedocode of the bytecode from the script [queueonteleport](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/clearteleportqueue) [getfpscap](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getfpscap) ⌘I --- # identifyexecutor - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/identifyexecutor#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library identifyexecutor On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/identifyexecutor#example) function identifyexecutor(): (string, string) Aliases: getexecutorname ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/identifyexecutor#example) Example print(identifyexecutor()) --> Ex: Potassium, v1.0.0 [httpget](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/httpget) [messagebox](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/messagebox) ⌘I --- # getloadedmodules - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/getloadedmodules#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library getloadedmodules On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/getloadedmodules#example) function getloadedmodules(): { ModuleScript } ### [​](https://docs.potassium.pro/api-reference/Script%20Library/getloadedmodules#example) Example This script will print the path of the `ModuleScript` named “PlayerModule”. for _, script in getloadedmodules() do if script.Name == "PlayerModule" then print(script:GetFullName()) end end [Regex.new](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.new) [getrunningscripts](https://docs.potassium.pro/api-reference/Script%20Library/getrunningscripts) ⌘I --- # getscriptfromthread - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/getscriptfromthread#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library getscriptfromthread On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/getscriptfromthread#example) function getscriptfromthread(thread: thread): BaseScript? [​](https://docs.potassium.pro/api-reference/Script%20Library/getscriptfromthread#param-thread) thread thread required User provided thread. ### [​](https://docs.potassium.pro/api-reference/Script%20Library/getscriptfromthread#example) Example This script will print every script associated with a thread. for _, thread in getallthreads() do local script = getscriptfromthread(thread) if script then print(script) end end [getscriptclosure](https://docs.potassium.pro/api-reference/Script%20Library/getscriptclosure) [getscriptthread](https://docs.potassium.pro/api-reference/Script%20Library/getscriptthread) ⌘I --- # getscriptclosure - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/getscriptclosure#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library getscriptclosure On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/getscriptclosure#example) function getscriptclosure(script: BaseScript): function [​](https://docs.potassium.pro/api-reference/Script%20Library/getscriptclosure#param-script) script BaseScript required The script that will have it’s main function returned. Alias: getscriptfunction ### [​](https://docs.potassium.pro/api-reference/Script%20Library/getscriptclosure#example) Example This script will print every running script’s main function. for _, script in getrunningscripts() do print(getscriptclosure(script)) end [getscriptbytecode](https://docs.potassium.pro/api-reference/Script%20Library/getscriptbytecode) [getscriptfromthread](https://docs.potassium.pro/api-reference/Script%20Library/getscriptfromthread) ⌘I --- # getscriptthread - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/getscriptthread#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library getscriptthread On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/getscriptthread#example) function getscriptthread(script: BaseScript): thread? [​](https://docs.potassium.pro/api-reference/Script%20Library/getscriptthread#param-script) script BaseScript required The script that will have it’s thread returned. ### [​](https://docs.potassium.pro/api-reference/Script%20Library/getscriptthread#example) Example This is an example script that could be used to disable an anticheat script. for _, script in getnilinstances() do if not script:IsA("LocalScript") then continue end local thread = getscriptthread(script); if thread and coroutine.status(thread) ~= "dead" then task.cancel(thread) end end [getscriptfromthread](https://docs.potassium.pro/api-reference/Script%20Library/getscriptfromthread) [getscripthash](https://docs.potassium.pro/api-reference/Script%20Library/getscripthash) ⌘I --- # queueonteleport - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/clearteleportqueue#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library queueonteleport On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/clearteleportqueue#example) function clearteleportqueue(): () Aliases: clear\_teleport\_queue, clearqueueonteleport ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/clearteleportqueue#example) Example Once a teleport is initiated this code will execute. queueonteleport([[\ print("Hello, world!")\ ]]) -- No code will be executed after teleport clearteleportqueue() [setreadonly](https://docs.potassium.pro/api-reference/Metatable%20Library/setreadonly) [decompile](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/decompile) ⌘I --- # setclipboard - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setclipboard#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library setclipboard On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setclipboard#example) function setclipboard(text: string): () [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setclipboard#param-text) text string required The text to copy into the user’s system clipboard. Aliases: toclipboard ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setclipboard#example) Example setclipboard("Hello, world!") [saveinstance](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/saveinstance) [setfpscap](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setfpscap) ⌘I --- # getscriptbytecode - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/getscriptbytecode#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library getscriptbytecode On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/getscriptbytecode#example) function getscriptbytecode(script: BaseScript): string [​](https://docs.potassium.pro/api-reference/Script%20Library/getscriptbytecode#param-script) script BaseScript required The script that will have it’s bytecode returned. Alias: dumpstring ### [​](https://docs.potassium.pro/api-reference/Script%20Library/getscriptbytecode#example) Example This script will print the bytecode of the `Animate` script inside of `LocalPlayer`’s character. for _, script in getrunningscripts() do if script.Name == "Animate" then print(getscriptbytecode(script)) end end [getrunningscripts](https://docs.potassium.pro/api-reference/Script%20Library/getrunningscripts) [getscriptclosure](https://docs.potassium.pro/api-reference/Script%20Library/getscriptclosure) ⌘I --- # setfpscap - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setfpscap#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library setfpscap On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setfpscap#example) function setfpscap(cap: number): () [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setfpscap#param-cap) cap number required The frame rate limit to apply. Use a very large value (e.g. `2000`) to effectively uncap the frame rate. ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setfpscap#example) Example Unlock the frame cap and bypass the 240fps cap set by Roblox. print(setfpscap(2000)) [setclipboard](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setclipboard) [setrbxclipboard](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setrbxclipboard) ⌘I --- # httpget - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/httpget#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library httpget On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/httpget#example) function httpget(self: any?, url: string): () [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/httpget#param-self) self any An optional legacy first argument (e.g. `game`) used for backwards compatibility. When provided, the second `url` argument is used as the request target. [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/httpget#param-url) url string required The URL to send the HTTP GET request to. Aliases: HttpGet ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/httpget#example) Example print(httpget("https://httpbin.org/get")) --> HTTP body -- Backwards compatibility but functions exactly the same print(httpget(game, "https://httpbin.org/get")) --> HTTP body [getobjects](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/getobjects) [identifyexecutor](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/identifyexecutor) ⌘I --- # queueonteleport - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/queueonteleport#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library queueonteleport On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/queueonteleport#example) function queueonteleport(code: string): () [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/queueonteleport#param-code) code string required The Lua code string to execute once a teleport completes. Aliases: queue\_on\_teleport ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/queueonteleport#example) Example Once a teleport is initiated this code will execute queueonteleport([[\ print("Hello, world!")\ ]]) [messagebox](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/messagebox) [saveinstance](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/saveinstance) ⌘I --- # messagebox - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/messagebox#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library messagebox On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/messagebox#example) function messagebox(text: string, caption: string, flags: number): number [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/messagebox#param-text) text string required The message content to display inside the message box. [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/messagebox#param-caption) caption string required The title text shown in the message box title bar. [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/messagebox#param-flags) flags number required A bitmask of `uType` flags from `winuser.h` that control the buttons and icon displayed. Aliases: messageboxasync (properly yields as opposed to messagebox)Flags utilize winuser.h’s MessageBox uType which is documented [here](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messagebox) ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/messagebox#example) Example local MB_ICONWARNING = 0x00000030 local MB_CANCELTRYCONTINUE = 0x00000006 local MB_DEFBUTTON2 = 0x00000100 local IDCANCEL = 0x00000002 local IDTRYAGAIN = 0x0000000A local IDCONTINUE = 0x0000000B local input = messagebox("?", "Resource not found", bit32.bor(MB_ICONWARNING, MB_CANCELTRYCONTINUE, MB_DEFBUTTON2)) if input == IDCANCEL then print("IDCANCEL") elseif input == IDTRYAGAIN then print("IDTRYAGAIN") elseif input == IDCONTINUE then print("IDCONTINUE") end [identifyexecutor](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/identifyexecutor) [queueonteleport](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/queueonteleport) ⌘I --- # setthreadidentity - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Script%20Library/setthreadidentity#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Script Library setthreadidentity On this page * [Example](https://docs.potassium.pro/api-reference/Script%20Library/setthreadidentity#example) function getthreadidentity(identity: number): () [​](https://docs.potassium.pro/api-reference/Script%20Library/setthreadidentity#param-identity) identity number required The new identity of the current thread. Aliases: setidentity, setthreadcontext, set\_thread\_identity ### [​](https://docs.potassium.pro/api-reference/Script%20Library/setthreadidentity#example) Example This script will print the current thread’s new identity. setthreadidentity(2) print(getthreadidentity()) --> 2 [getthreadidentity](https://docs.potassium.pro/api-reference/Script%20Library/getthreadidentity) [cansignalreplicate](https://docs.potassium.pro/api-reference/Signal%20Library/cansignalreplicate) ⌘I --- # getsimulationradius - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/getsimulationradius#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library getsimulationradius On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/getsimulationradius#example) function getsimulationradius(): number ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getsimulationradius#example) Example print(getsimulationradius()) --> 1000 setsimulationradius(2000) print(getsimulationradius()) --> 2000 [getproximitypromptduration](https://docs.potassium.pro/api-reference/Reflection%20Library/getproximitypromptduration) [isnetworkowner](https://docs.potassium.pro/api-reference/Reflection%20Library/isnetworkowner) ⌘I --- # gethiddenproperties - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperties#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library gethiddenproperties On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperties#example) function gethiddenproperties(instance: Instance): { property: value } ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperties#example) Example This script will print the value of every non-scriptable property for workspace. for property, value in gethiddenproperties(workspace) do print(property, value); end [getbspval](https://docs.potassium.pro/api-reference/Reflection%20Library/getbspval) [gethiddenproperty](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperty) ⌘I --- # saveinstance - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/saveinstance#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library saveinstance On this page * [Options](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/saveinstance#options) * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/saveinstance#example) function saveinstance(object: Instance, options: table?) [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/saveinstance#param-object) object Instance required The `Instance` to save. Typically `game` to save the entire DataModel. [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/saveinstance#param-options) options table A table of options controlling decompilation, threading, filtering, and output behaviour. See the Options table below. ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/saveinstance#options) Options | Option | Type | Default | Description | | --- | --- | --- | --- | | `FileName` | string | Varies | Output file name | | `Decompile` | boolean | `false` | Should scripts be decompiled during saveinstance | | `NilInstances` | boolean | `false` | Save instances that are not parented in the DataModel (nil instances) | | `RemovePlayerCharacters` | boolean | `true` | Ignore characters whilst doing saveinstance | | `SavePlayers` | boolean | `false` | Save player instances | | `DecompileTimeout` | number | `10` | Timeout (in seconds) for decompile jobs | | `MaxThreads` | number | `3` | Number of threads used to decompile scripts | | `DecompileIgnore` | table | `{"Chat","CoreGui","CorePackages"}` | Services to ignore during decompile | | `ShowStatus` | boolean | `true` | Show saveinstance status while running | | `IgnoreDefaultProps` | boolean | `true` | Ignore default properties | | `IsolateStarterPlayer` | boolean | `true` | Clears StarterPlayer and places saved version into folders | ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/saveinstance#example) Example saveinstance(game, { FileName = "game.rbxl", Decompile = true, MaxThreads = 5 -- Adjust depending on PC specs }) [queueonteleport](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/queueonteleport) [setclipboard](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setclipboard) ⌘I --- # getproperties - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/getproperties#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library getproperties On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/getproperties#example) function getproperties(instance: Instance): { property: value } ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getproperties#example) Example This script will print the value of every property for workspace. for property, value in getproperties(workspace) do print(property, value) end [getpcd](https://docs.potassium.pro/api-reference/Reflection%20Library/getpcd) [getproximitypromptduration](https://docs.potassium.pro/api-reference/Reflection%20Library/getproximitypromptduration) ⌘I --- # getproximitypromptduration - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/getproximitypromptduration#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library getproximitypromptduration On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/getproximitypromptduration#example) function getproximitypromptduration(proximityprompt: ProximityPrompt): number [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getproximitypromptduration#param-proximityprompt) proximityprompt ProximityPrompt required The `ProximityPrompt` that contains the duration. ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getproximitypromptduration#example) Example This script will print the duration of a proximity prompt local proximityprompt = Instance.new("ProximityPrompt") proximityprompt.HoldDuration = 3 local duration = getproximitypromptduration(proximityprompt) print(duration) [getproperties](https://docs.potassium.pro/api-reference/Reflection%20Library/getproperties) [getsimulationradius](https://docs.potassium.pro/api-reference/Reflection%20Library/getsimulationradius) ⌘I --- # setrbxclipboard - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setrbxclipboard#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Miscellaneous Library setrbxclipboard On this page * [Example](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setrbxclipboard#example) function setrbxclipboard(text: string): () [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setrbxclipboard#param-text) text string required The XML or binary model data to copy into the Roblox Studio clipboard. The data must be in a valid xml/binary model format or it will not work. ### [​](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setrbxclipboard#example) Example local part = Instance.new("Part") part.Name = "Exploit Side" saveinstance(part, "clipboard.rbxmx") task.wait(2) setrbxclipboard(readfile("clipboard.rbxmx")) defile("clipboard.rbxmx") [setfpscap](https://docs.potassium.pro/api-reference/Miscellaneous%20Library/setfpscap) [PsmSignal.new](https://docs.potassium.pro/api-reference/PsmSignal%20Library/PsmSignal.new) ⌘I --- # getpcd - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/getpcd#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library getpcd On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/getpcd#example) function getpcd(trianglemeshpart: Instance): string, string [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getpcd#param-trianglemeshpart) trianglemeshpart Instance required The `Instance` that contains the binary data. Alias: getpcdprop ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getpcd#example) Example This example prints the hash, and the BinaryData. print(getpcd(Instance.new("UnionOperation"))) [gethiddenproperty](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperty) [getproperties](https://docs.potassium.pro/api-reference/Reflection%20Library/getproperties) ⌘I --- # setscriptable - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/setscriptable#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library setscriptable On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/setscriptable#example) function setscriptable(instance: Instance, property: string, scriptable: boolean): () [​](https://docs.potassium.pro/api-reference/Reflection%20Library/setscriptable#param-instance) instance Instance required The `Instance` that contains the property. [​](https://docs.potassium.pro/api-reference/Reflection%20Library/setscriptable#param-property) property string required The name of the property. [​](https://docs.potassium.pro/api-reference/Reflection%20Library/setscriptable#param-scriptable) scriptable boolean required Whether the property will become scriptable. ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/setscriptable#example) Example local fire = Instance.new("Fire") setscriptable(fire, "size_xml", true) fire.size_xml = 123 print(fire.size_xml) --> 123 [setproximitypromptduration](https://docs.potassium.pro/api-reference/Reflection%20Library/setproximitypromptduration) [setsimulationradius](https://docs.potassium.pro/api-reference/Reflection%20Library/setsimulationradius) ⌘I --- # isnetworkowner - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/isnetworkowner#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library isnetworkowner On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/isnetworkowner#example) function isnetworkowner(instance: Instance): boolean [​](https://docs.potassium.pro/api-reference/Reflection%20Library/isnetworkowner#param-instance) instance Instance required The `Instance` that the user has provided. ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/isnetworkowner#example) Example local part = Instance.new("Part") print(isnetworkowner(part)) [getsimulationradius](https://docs.potassium.pro/api-reference/Reflection%20Library/getsimulationradius) [isscriptable](https://docs.potassium.pro/api-reference/Reflection%20Library/isscriptable) ⌘I --- # setproximitypromptduration - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/setproximitypromptduration#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library setproximitypromptduration On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/setproximitypromptduration#example) function setproximitypromptduration(proximityprompt: ProximityPrompt, duration: number): () [​](https://docs.potassium.pro/api-reference/Reflection%20Library/setproximitypromptduration#param-proximityprompt) proximityprompt ProximityPrompt required The `ProximityPrompt` that contains the duration. [​](https://docs.potassium.pro/api-reference/Reflection%20Library/setproximitypromptduration#param-duration) duration number required The new duration of the `ProximityPrompt`. ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/setproximitypromptduration#example) Example local proximityprompt = Instance.new("ProximityPrompt") setproximitypromptduration(proximityprompt, 99) local duration = getproximitypromptduration(proximityprompt) print(duration) --> 99 [sethiddenproperty](https://docs.potassium.pro/api-reference/Reflection%20Library/sethiddenproperty) [setscriptable](https://docs.potassium.pro/api-reference/Reflection%20Library/setscriptable) ⌘I --- # isscriptable - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/isscriptable#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library isscriptable On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/isscriptable#example) function isscriptable(instance: Instance, property: string): boolean [​](https://docs.potassium.pro/api-reference/Reflection%20Library/isscriptable#param-instance) instance Instance required The `Instance` that contains the property. [​](https://docs.potassium.pro/api-reference/Reflection%20Library/isscriptable#param-property) property string required The name of the property returned. ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/isscriptable#example) Example local part = Instance.new("Part") print(isscriptable(part, "Transparency")) --> false [isnetworkowner](https://docs.potassium.pro/api-reference/Reflection%20Library/isnetworkowner) [sethiddenproperty](https://docs.potassium.pro/api-reference/Reflection%20Library/sethiddenproperty) ⌘I --- # gethiddenproperty - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperty#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library gethiddenproperty On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperty#example) function gethiddenproperty(instance: Instance, propertyname: string): (any, boolean) [​](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperty#param-instance) instance Instance required The `Instance` that contains the hidden property. [​](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperty#param-propertyname) propertyname string required The name of the property returned. Alias: gethiddenprop ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperty#example) Example local fire = Instance.new("Fire") local size_xml, hidden = gethiddenproperty(fire, "size_xml") print(size_xml, hidden) [gethiddenproperties](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperties) [getpcd](https://docs.potassium.pro/api-reference/Reflection%20Library/getpcd) ⌘I --- # getbspval - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/getbspval#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library getbspval On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/getbspval#example) function getbspval(instance: Instance, property: string, base64: boolean): string [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getbspval#param-instance) instance Instance required The `Instance` that contains the `BinaryString`’s value. [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getbspval#param-property) property string required The name of the property read. [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getbspval#param-base64) base64 boolean Boolean indicating whether the `BinaryString`’s value is Base64 encoded. ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/getbspval#example) Example local result = getbspval(workspace.Terrain, "SmoothGrid", true) print(result) --> AQU= (Example output) [RakNetPacket](https://docs.potassium.pro/api-reference/RakNet%20Library/RakNetPacket) [gethiddenproperties](https://docs.potassium.pro/api-reference/Reflection%20Library/gethiddenproperties) ⌘I --- # setsimulationradius - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/setsimulationradius#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library setsimulationradius On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/setsimulationradius#example) function setsimulationradius(simulationradius: number): () [​](https://docs.potassium.pro/api-reference/Reflection%20Library/setsimulationradius#param-simulationradius) simulationradius number required The `LocalPlayer`’s new simulation radius. ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/setsimulationradius#example) Example setsimulationradius(999) print(getsimulationradius()) --> 999 [setscriptable](https://docs.potassium.pro/api-reference/Reflection%20Library/setscriptable) [Regex.Escape](https://docs.potassium.pro/api-reference/Regex%20Library/Regex.Escape) ⌘I --- # sethiddenproperty - Potassium [Skip to main content](https://docs.potassium.pro/api-reference/Reflection%20Library/sethiddenproperty#content-area) [Potassium home page![light logo](https://mintlify.s3.us-west-1.amazonaws.com/potassium/logo/light.svg)![dark logo](https://mintcdn.com/potassium/SWfW51USBYZ_Au-a/logo.png?fit=max&auto=format&n=SWfW51USBYZ_Au-a&q=85&s=e121ed02da2c83ea39ffb21481e9aaab)](https://docs.potassium.pro/) Search... ⌘K Search... Navigation Reflection Library sethiddenproperty On this page * [Example](https://docs.potassium.pro/api-reference/Reflection%20Library/sethiddenproperty#example) function sethiddenproperty(instance: Instance, property: string, value: any): boolean [​](https://docs.potassium.pro/api-reference/Reflection%20Library/sethiddenproperty#param-instance) instance Instance required The `Instance` that contains the hidden property. [​](https://docs.potassium.pro/api-reference/Reflection%20Library/sethiddenproperty#param-property) property string required The name of the property. [​](https://docs.potassium.pro/api-reference/Reflection%20Library/sethiddenproperty#param-value) value any required The new value of the property. Alias: sethiddenprop ### [​](https://docs.potassium.pro/api-reference/Reflection%20Library/sethiddenproperty#example) Example local fire = Instance.new("Fire") local hidden = sethiddenproperty(fire, "size_xml", 123) print(hidden) --> true [isscriptable](https://docs.potassium.pro/api-reference/Reflection%20Library/isscriptable) [setproximitypromptduration](https://docs.potassium.pro/api-reference/Reflection%20Library/setproximitypromptduration) ⌘I ---