Yuari
Documentation
Docs/Core functions

Core functions

Globals available in every script. The full standard Luau library set (string, table, math, utf8, coroutine, os minus execute/exit) is also available, plus the Luau extensions listed below (string.split, table.find/create/clear, math.clamp/round/sign).

Write to the executor's output console. print-family logs at info level, warn at warning level, error-family at error level. printl and errorl are aliases.

print("info", 123)
printl("alias of print")
warn("warning")
error("error message")

Returns "yuari" and the current version string.

local name, version = identifyexecutor()
print(name, version) -- yuari, 0.1

Yields the current thread for seconds (default 0.03). Resumes on the VM scheduler.

print("before")
wait(0.5)
print("after")

Runs fn immediately on a new coroutine. Errors are logged, not propagated.

spawn(function()
    print("running in a new coroutine")
end)

Seconds elapsed since the VM started (a monotonic timer, not the Unix epoch).

local started = tick()
wait(0.1)
print(tick() - started)

Monotonic seconds since the VM started, read from the same steady clock as tick. elapsedTime() is an alias.

local started = time()
task.wait(0.25)
print(time() - started)

Type name for any value. VM userdata report as "Vector3", "Vector2", "CFrame", "Color3", "RBXScriptConnection" or "Drawing"; everything else uses standard Luau type names.

print(typeof(Vector3.new(1, 2, 3)))
print(typeof(Drawing.new("Square")))

Creates a plain userdata, optionally with an empty metatable — same behaviour as Roblox.

local userdata = newproxy(true)
getmetatable(userdata).__index = function() return "value" end
print(userdata.anything)

Approximate memory in use by the external VM, in kilobytes.

print("memory KB:", gcinfo())

Alias of table.unpack.

local values = { 1, 2, 3 }
print(unpack(values))

Shows a message in the executor console. title defaults to "Yuari", duration to 3 seconds.

notify("Script loaded", "Yuari", 3)

Ping compatibility shim (currently returns 0).

print(GetPingValue())

Name of the current place (reads the Workspace name), or "Unknown".

print(getgamename())

Standard Base64 helpers.

local encoded = base64encode("hello")
print(encoded, base64decode(encoded))

Projects a Vector3 through the current camera. The boolean is false when the point is behind the camera or outside the viewport.

local screen, onScreen = worldtoscreen(Vector3.new(0, 10, 0))
if onScreen then
    print(screen.X, screen.Y)
end

Current camera viewport size.

local size = getscreensize()
print(size.X, size.Y)

Returns the local player's Mouse userdata. .X and .Y are client-space coordinates.

local mouse = getmouse()
print(mouse.X, mouse.Y)

Returns every Instance reachable from the DataModel, up to 50,000 nodes. Large games can return tens of thousands of entries.

for _, inst in getinstances() do
    if inst.ClassName == "RemoteEvent" then
        print(inst:GetFullName())
    end
end

Global alias of RunService.RenderStepped.

RenderStepped:Connect(function(dt)
    print(dt)
end)

Splits a string on separator (default ",") and returns the fields as an array. Empty fields are kept, and an empty separator splits into characters.

local parts = string.split("a,b,,c", ",")
print(#parts, parts[2])  -- 4  b

Returns the index of the first entry equal to value, or nil. Comparison is raw, and a negative init counts back from the end.

local names = { "aoife", "mika", "nord" }
print(table.find(names, "mika"))  -- 2

Preallocates a table for count entries and fills indices 1..count only when a value is given. A negative count raises an error.

local zeros = table.create(5, 0)
print(#zeros, zeros[1])  -- 5  0

Removes every array and hash key in place, so existing references to the table see it emptied.

local cache = { a = 1, b = 2 }
table.clear(cache)

Limits a number to an inclusive range.

print(math.clamp(150, 0, 100))  -- 100

Rounds to the nearest integer, with halves away from zero like Luau.

print(math.round(2.5), math.round(-2.5))  -- 3  -3

Returns -1, 0, or 1 for the sign of a number.

part.CFrame = part.CFrame * CFrame.Angles(0, math.sign(dx) * 0.1, 0)