These are always available in every script — no import required. Internally they’re registered as separate native modules (core, vector3, coroutine), but that boundary isn’t visible to scripts and isn’t worth remembering: just use them.
Function Description print(value)Log a value at info level length(value)Length of a string, array, or dictionary isEmpty(value)true for null, an empty string, array, or dictionaryassert(condition, message?)Throw if condition is false time()Seconds since the game started (scaled) realtimeSinceStartup()Seconds since the game started (unscaled) deltaTime()Time since the last frame frameCount()Current frame number startsWith(str, prefix) / endsWith(str, suffix) / contains(str, substring)String search toLowerCase(str) / toUpperCase(str)Case conversion trim(str)Remove leading/trailing whitespace replace(str, oldValue, newValue)Replace all occurrences substring(str, startIndex, length)Extract a substring pcall(func, ...args)Call func in a protected context; returns [true, result] or [false, errorMessage] instead of throwing getSourceLocation(frameIndex)Debug: source location string for a call-stack frame
A value-semantics 3D vector type.
Constructor Description Vector3()(0, 0, 0)Vector3(s)(s, s, s)Vector3(x, y, z)Explicit components
Property Type Description x / y / zfloat Components (read/write) magnitudefloat Length (read-only) sqrMagnitudefloat Squared length (read-only) normalizedVector3 Unit-length copy (read-only)
Method Description normalize()Returns a unit-length copy dot(other)Dot product cross(other)Cross product distance(other)Distance to another vector lerp(other, t)Linear interpolation toward other slerp(other, t)Spherical interpolation toward other scale(other)Component-wise multiply
Member Description Vector3.zero / .one(0,0,0) / (1,1,1)Vector3.up / .down / .left / .right / .forward / .backUnit direction vectors Vector3.dot(a, b) / .cross(a, b) / .distance(a, b) / .angle(a, b)Static equivalents
Schedules a closure to run cooperatively over multiple frames, where coroutines are supported by the host context. Distinct from the language’s built-in yield-based generators : Coroutine() is a native function that hands a closure to the host’s coroutine manager, rather than a language construct.
var handle = Coroutine( () => {
yield null // suspend one frame
Starts closure as a coroutine and returns a CoroutineHandle.
Member Type Description isRunningbool Whether the coroutine is currently running isDonebool Whether the coroutine has finished isStoppedbool Whether the coroutine was stopped before completion errorstring? Error message if the coroutine threw, else null namestring Coroutine name (for debugging) stop()— Stop the coroutine
© 2026 Giraffe Lab LLC. All rights reserved.