Potassium API
  • Environment
    • Cache
    • Closures
    • Console
    • Crypt
    • Debug
    • Drawing
    • File System
    • Input
    • Instance
    • Metatable
    • Miscellaneous
    • Scripts
    • Web Sockets
    • Actor
Powered by GitBook
On this page
  • identifyexecutor
  • lz4compress
  • lz4decompress
  • messagebox
  • queue_on_teleport
  • request
  • getinternalparent
  • getfflag
  • setfflag
  • setinternalparent
  • setclipboard
  • setfpscap
  1. Environment

Miscellaneous

identifyexecutor

<string, string> identifyexecutor()

Returns the name and version of Potassium.


lz4compress

<string> lz4compress(<string> data)

Compresses data using LZ4 compression.


lz4decompress

<string> lz4compress(<string> data, <number> size)

Decompresses data using LZ4 compression, with the decompressed size specified by size.


messagebox

<number> messagebox(<string> text, <string> caption, <number> flags)

Creates a message box with the specified text, caption, and flags. Yields until the message box is closed, and returns the user input code.



queue_on_teleport

<nil> queue_on_teleport(<string> code)

Queues the specified script to be executed after the player teleports to a different place.


request

<HttpResponse> request(<HttpRequest> options)

Sends an HTTP request using the specified options. Yields until the request is complete, and returns the response.

Field
Type
Description

Url

string

The URL for the request.

Method

string

The HTTP method to use.

Body

string?

The body of the request.

Headers

table?

A table of headers.

Cookies

table?

A table of cookies.


getinternalparent

<Instance> getinternalparent(<Instance> instance)

Returns the internal parent field of the instance.


getfflag

<any> getfflag(<string> fflag)

Returns the value of fflag


setfflag

<nil> setfflag(<string> fflag, <any> value)

Sets the value of fflag to value


setinternalparent

<nil> setinternalparent(<Instance> instance, <Instance> newparent)

Sets the internal parent field of instance to newparent


setclipboard

<nil> setclipboard(<string> text)

Copies text to the clipboard.


setfpscap

<nil> setfpscap(<number> fps)

Sets the in-game FPS cap to fps. If fps is 0, the FPS cap is disabled.


PreviousMetatableNextScripts

Last updated 2 months ago