Skip to content

Miscellaneous

Various uncategorised functions

identifyexecutor()

Returns information about the current executor.

Returns: Two strings - the name of the executor and its version.

local name, version = identifyexecutor()
print("Executor:", name, "Version:", version)

lz4compress(data)

Compresses data using the LZ4 algorithm.

  • data: The string to compress.

Returns: The compressed data as a string.

local compressed = lz4compress("Hello, world!")

lz4decompress(data, originalSize)

Decompresses LZ4 compressed data.

  • data: The compressed data string.
  • originalSize: The size of the original, uncompressed data.

Returns: The decompressed data as a string.

local decompressed = lz4decompress(compressed, #"Hello, world!")

messagebox(text, caption, type)

Displays a message box.

  • text: The message to display.
  • caption: The title of the message box.
  • type: An integer representing the type of message box.

Returns: An integer representing the user's response.

local response = messagebox("Do you want to continue?", "Confirmation", 4)

messageboxasync(text, caption, type)

Displays a message box asynchronously.

  • text: The message to display.
  • caption: The title of the message box.
  • type: An integer representing the type of message box.

Returns: Yields and resumes with an integer representing the user's response.

local response = messageboxasync("Processing complete!", "Information", 0)

executescript(script)

Executes an encrypted script.

  • script: The encrypted script string to execute.
executescript("encrypted_script_data")

queue_on_teleport(script)

Queues a script to run after teleporting.

  • script: The script to run after teleportation.
queue_on_teleport("print('Teleported!')")

setclipboard(text)

Sets the clipboard content.

  • text: The text to set as the clipboard content.
setclipboard("Copied text")

setfpscap(fps)

Sets the FPS cap for Roblox.

  • fps: The desired FPS cap.
setfpscap(60)

getfpscap()

Gets the current FPS cap for Roblox.

Returns: The current FPS cap as a number.

local currentFpsCap = getfpscap()
print("Current FPS Cap:", currentFpsCap)

getreg()

Gets the Lua registry table.

Returns: The Lua registry table.

local registry = getreg()

cloneref(instance)

Clones a Roblox instance reference.

  • instance: The Roblox instance to clone.

Returns: A new reference to the same Roblox instance.

local clonedRef = cloneref(game.Workspace)

compareinstances(instance1, instance2)

Compares two Roblox instances.

  • instance1: The first Roblox instance.
  • instance2: The second Roblox instance.

Returns: A boolean indicating whether the instances are the same.

local areEqual = compareinstances(game.Workspace, game:GetService("Workspace"))

getobjects(assetId)

Retrieves objects from an asset ID.

  • assetId: The asset ID to retrieve objects from.

Returns: A table containing the retrieved objects.

local objects = getobjects("rbxassetid://1234567")

newtable(narray: number, nhash: number): table

Creates a new table with specified array and hash sizes, filled with random data to hide memory from scripts.

local hiddenTable = newtable(50, 20)

Parameters: - narray: The size of the array part of the table. - nhash: The size of the hash part of the table.

Returns: A new table with hidden memory.

  • The array part (indices 1 to narray) is filled with false values.
  • The hash part contains nhash elements with random Vector3 keys and false values.
  • Vector3 keys have random X, Y, and Z values between 0 and 1.
  • For effective memory hiding, use narray >= 33 and nhash >= 17.
  • To maintain hidden memory, avoid reducing the number of array/hash values to prevent table reallocation.

Example usage:

-- Create a table with hidden memory
local hiddenTable = newtable(50, 20)

-- Access is normal, but hidden memory is present
print(#hiddenTable)  -- Outputs: 50

-- Adding new elements won't expose hidden memory if within original size
hiddenTable[51] = true

saveinstance(object, filename, options)

Saves a Roblox instance and its descendants to a file.

Parameters: - object: The userdata object to save (typically game) - filename: The output filename as a string - options: A table containing the following configuration options:

Option Type Default Description
_Recurse boolean true Whether to save child instances
Decompile boolean false Whether to decompile scripts
NilInstances boolean false Whether to save nil instances
RemovePlayerCharacters boolean true Whether to exclude player characters
SavePlayers boolean false Whether to save player instances
DecompileTimeout number 10 Timeout in seconds for decompiling scripts
MaxThreads number 3 Maximum number of threads for processing
DecompileIgnore table {"Chat", "CoreGui", "CorePackages"} Services to skip decompiling
ShowStatus boolean true Whether to show save progress
IgnoreDefaultProps boolean true Whether to skip saving default properties
IsolateStarterPlayer boolean true Whether to isolate StarterPlayer settings

Example usage:

-- Basic usage
saveinstance(game, "place.rbxlx")

-- With options
saveinstance(game, "place.rbxlx", {
    Decompile = true,
    ShowStatus = false,
    MaxThreads = 5
})