documentation

ThomaE function reference

The complete ThomaE environment reference — every function below ships in the current build, with signatures and examples.

◇ Environment 17 functions

getgenv

table getgenv()

Returns the shared executor global environment. Assignments persist across every script you execute in the session.

local g = getgenv()
g.MyFlag = true  -- visible in your next script

getrenv

table getrenv()

Returns the game script registry environment. ThomaE executes inside Roblox's own VM, so this is the same live environment your scripts run in — not a frozen copy.

local renv = getrenv()
print(renv.game.PlaceId)

getinstances

{Instance} getinstances()

Returns every instance in the DataModel.

for _, inst in ipairs(getinstances()) do
  if inst:IsA("Sound") then break end
end

getloadedmodules

{ModuleScript} getloadedmodules()

Returns loaded ModuleScripts found in the DataModel.

getscripts

{Instance} getscripts()

Returns Script and LocalScript instances found in the DataModel.

getrunningscripts

{Instance} getrunningscripts()

Best-effort list of scripts that are present and enabled (the engine does not expose true run state).

clonefunction

function clonefunction(function f)

Returns a copy of a function with its own upvalues.

local f2 = clonefunction(print)

checkcaller

bool checkcaller()

Returns true when the current thread was started by the executor (your executed scripts).

if checkcaller() then print("our code") end

loadstring

function loadstring(string src, string chunkname)

Compiles and delivers a Luau source string through the execution pipeline; the returned function runs the chunk in the game VM (delivery is asynchronous, so return values do not propagate to the caller).

local f = loadstring("print(1 + 1)")
if f then f() end

gethui

Instance gethui()

Returns a safe parent for GUI the game cannot iterate or destroy.

local gui = Instance.new("ScreenGui")
gui.Parent = gethui()

setreadonly

void setreadonly(table t, bool readonly)

Locks a table. Unlocking is only possible for tables your scripts created (the engine provides no unfreeze for its own tables).

isreadonly

bool isreadonly(table t)

Returns whether a table is frozen/locked.

print(isreadonly(getgenv()))

cloneref

any cloneref(Instance obj)

Returns a reference that compares equal to the original instance while being a distinct value; property access, assignment and IsA pass through to the original.

local part = workspace.Baseplate
local ref = cloneref(part)
print(ref == part, ref.Name, ref:IsA(part.ClassName))

identifyexecutor

string identifyexecutor()

Returns "ThomaE <version>".

print(identifyexecutor())

setclipboard

void setclipboard(string text)

Writes text to the Windows clipboard.

setclipboard("copied!")

getclipboard

string getclipboard()

Reads text from the Windows clipboard (reads are logged locally).

print(getclipboard())

queue_on_teleport

void queue_on_teleport(string src)

Queues source to execute automatically after your next teleport or game switch. The client re-executes it in the new session.

queue_on_teleport([[print("reloaded after teleport")]])

⚙ Debug hooks 3 functions

newcclosure

function newcclosure(function f)

Wraps a Lua function to look like a C closure to iscclosure-based detection. Wraps the function with a closure guard.

local safe = newcclosure(function() return 1 end)

iscclosure

bool iscclosure(function f)

True when the function is implemented in C.

print(iscclosure(print))

islclosure

bool islclosure(function f)

True when the function is implemented in Luau.

✎ Drawing library 5 functions

Drawing

Drawing Drawing.new(string type)

On-screen drawing. Line, Text and Square render as engine instances via gethui — visible over the world, hidden from game UI scans. Circle/Image/Triangle render types are not enabled in this build.

local line = Drawing.new("Line")
line.From = Vector2.new(0,0)
line.To = Vector2.new(500,400)
line.Color = Color3.fromRGB(94,234,212)
line.Thickness = 2
line.Visible = true

Drawing.Fonts

table Drawing.Fonts

Font constants for Drawing Text objects (mapped to engine fonts).

local t = Drawing.new("Text")
t.Font = Drawing.Fonts.Monospace
t.Text = "ThomaE"

isrenderobject

bool isrenderobject(any obj)

True when the object is a ThomaE drawing object.

getrenderproperty

any getrenderobjectproperty(any obj, string prop) / getrenderproperty

Returns a property of a drawing object.

print(getrenderproperty(line, "Thickness"))

setrenderproperty

void setrenderproperty(any obj, string prop, any value)

Sets a property of a drawing object.

⌨ Input / simulation 12 functions

mouse1click

void mouse1click()

Simulates a full left click.

mouse1press

void mouse1press()

Presses the left mouse button.

mouse1release

void mouse1release()

Releases the left mouse button.

mouse2click

void mouse2click()

Simulates a full right click.

mouse2press

void mouse2press()

Presses the right mouse button.

mouse2release

void mouse2release()

Releases the right mouse button.

keypress

void keypress(string|number key)

Presses a key. Accepts a key name string ("E", "LeftControl") or a virtual key code.

keypress("E")

keyrelease

void keyrelease(string|number key)

Releases a key.

mousemoverel

void mousemoverel(number dx, number dy)

Moves the mouse relative to its current position.

mousemoveabs

void mousemoveabs(number x, number y)

Moves the mouse to an absolute screen position.

isrbxactive

bool isrbxactive()

True when the Roblox window is focused.

firesignal

void firesignal(RBXScriptSignal signal, ...)

Fires a signal's handlers directly.

⊞ Misc 14 functions

request

table request(table options)

Synchronous HTTP request from the executor context. Fields: Method, Url, Headers, Body; returns Status, Body, Headers.

local r = request({
  Url = "https://httpbin.org/get",
  Method = "GET"
})
print(r.Status)

messagebox

number messagebox(string text, string title, number type)

Shows a native Windows message box; returns the button code.

messagebox("hello", "ThomaE", 0)

readfile

string readfile(string path)

Reads a file from your ThomaE workspace folder.

print(readfile("notes.txt"))

writefile

void writefile(string path, string content)

Writes a file into your ThomaE workspace folder (5 MB cap).

writefile("notes.txt", "hello")

appendfile

void appendfile(string path, string content)

Appends to a file in your workspace folder.

isfile

bool isfile(string path)

True when the workspace file exists.

isfolder

bool isfolder(string path)

True when the workspace folder exists.

listfiles

{string} listfiles(string folder)

Lists names inside a workspace folder.

for _, n in ipairs(listfiles("")) do print(n) end

makefolder

void makefolder(string path)

Creates a folder in your workspace.

delfile

void delfile(string path)

Deletes a workspace file.

delfolder

void delfolder(string path)

Deletes a workspace folder.

setfpscap

void setfpscap(number cap)

Caps the client frame rate through the engine scheduler.

setfpscap(120)

getfpscap

number getfpscap()

Returns the current frame-rate cap.

print(getfpscap())

getcustomasset

string getcustomasset(string path)

Registers a workspace file (png/jpg/ogg/mp3/wav) with the engine and returns a playable rbxasset:// URI.

local id = getcustomasset("pic.png")
-- use as ImageLabel.Image or Sound.SoundId

Coverage grows with every release — the UNC status page always shows the measured number for the shipped build.