ThomaE function reference
The complete ThomaE environment reference — every function below ships in the current build, with signatures and examples.
◇ Environment 17 functions
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
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
Returns every instance in the DataModel.
for _, inst in ipairs(getinstances()) do
if inst:IsA("Sound") then break end
end
getloadedmodules
Returns loaded ModuleScripts found in the DataModel.
getscripts
Returns Script and LocalScript instances found in the DataModel.
getrunningscripts
Best-effort list of scripts that are present and enabled (the engine does not expose true run state).
clonefunction
Returns a copy of a function with its own upvalues.
local f2 = clonefunction(print)
checkcaller
Returns true when the current thread was started by the executor (your executed scripts).
if checkcaller() then print("our code") end
loadstring
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
Returns a safe parent for GUI the game cannot iterate or destroy.
local gui = Instance.new("ScreenGui")
gui.Parent = gethui()
setreadonly
Locks a table. Unlocking is only possible for tables your scripts created (the engine provides no unfreeze for its own tables).
isreadonly
Returns whether a table is frozen/locked.
print(isreadonly(getgenv()))
cloneref
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
Returns "ThomaE <version>".
print(identifyexecutor())
setclipboard
Writes text to the Windows clipboard.
setclipboard("copied!")
getclipboard
Reads text from the Windows clipboard (reads are logged locally).
print(getclipboard())
queue_on_teleport
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
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
True when the function is implemented in C.
print(iscclosure(print))
islclosure
True when the function is implemented in Luau.
✎ Drawing library 5 functions
Drawing
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
Font constants for Drawing Text objects (mapped to engine fonts).
local t = Drawing.new("Text")
t.Font = Drawing.Fonts.Monospace
t.Text = "ThomaE"
isrenderobject
True when the object is a ThomaE drawing object.
getrenderproperty
Returns a property of a drawing object.
print(getrenderproperty(line, "Thickness"))
setrenderproperty
Sets a property of a drawing object.
⌨ Input / simulation 12 functions
mouse1click
Simulates a full left click.
mouse1press
Presses the left mouse button.
mouse1release
Releases the left mouse button.
mouse2click
Simulates a full right click.
mouse2press
Presses the right mouse button.
mouse2release
Releases the right mouse button.
keypress
Presses a key. Accepts a key name string ("E", "LeftControl") or a virtual key code.
keypress("E")
keyrelease
Releases a key.
mousemoverel
Moves the mouse relative to its current position.
mousemoveabs
Moves the mouse to an absolute screen position.
isrbxactive
True when the Roblox window is focused.
firesignal
Fires a signal's handlers directly.
⊞ Misc 14 functions
request
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
Shows a native Windows message box; returns the button code.
messagebox("hello", "ThomaE", 0)
readfile
Reads a file from your ThomaE workspace folder.
print(readfile("notes.txt"))
writefile
Writes a file into your ThomaE workspace folder (5 MB cap).
writefile("notes.txt", "hello")
appendfile
Appends to a file in your workspace folder.
isfile
True when the workspace file exists.
isfolder
True when the workspace folder exists.
listfiles
Lists names inside a workspace folder.
for _, n in ipairs(listfiles("")) do print(n) end
makefolder
Creates a folder in your workspace.
delfile
Deletes a workspace file.
delfolder
Deletes a workspace folder.
setfpscap
Caps the client frame rate through the engine scheduler.
setfpscap(120)
getfpscap
Returns the current frame-rate cap.
print(getfpscap())
getcustomasset
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.