Console & input
Console
print / printl
function print(...)Prints its arguments to the console, space-separated. printl behaves identically.
warn
function warn(...)Prints its arguments as a yellow, warning-styled line, space-separated.
error
function error(...)Prints its arguments as a red, error-styled line; returns nil.
Despite the name,
errordoes not raise an error or halt execution — it only prints. To raise apcall-catchable error, useassert(false, message).
errorl
function errorl(...)Identical to error — a red, error-styled console line. The error-level counterpart to warn.
Input
List of key codes can be found here: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
setrobloxinput
function setrobloxinput(state: boolean): nilToggles whether Matcha's injected input is sent to the game.
isrbxactive
function isrbxactive(): booleanReturns true while the Roblox window is the active (foreground) window.
setclipboard
function setclipboard(value: string): nilCopies value to the system clipboard.
keypress
function keypress(keycode: int): booleanSends a key-down for keycode — a Windows virtual-key code (e.g. 0x41 = A). Pair with keyrelease to release it. Returns true.
keyrelease
function keyrelease(keycode: int): booleanSends a key-up for keycode. Returns true.
iskeypressed
function iskeypressed(keycode: int): booleanReturns true while the key for keycode (Windows VK code) is currently held. Reads live keyboard state.
ismouse1pressed
function ismouse1pressed(): booleanReturns true while the left mouse button is currently held.
ismouse2pressed
function ismouse2pressed(): booleanReturns true while the right mouse button is currently held.
mouse1press
function mouse1press(): nilPresses and holds the left mouse button.
mouse1release
function mouse1release(): nilReleases the left mouse button.
mouse1click
function mouse1click(): nilPerforms a full left click (press + release).
mouse2press
function mouse2press(): nilPresses and holds the right mouse button.
mouse2release
function mouse2release(): nilReleases the right mouse button.
mouse2click
function mouse2click(): nilPerforms a full right click (press + release).
mousemoveabs
function mousemoveabs(x: int, y: int): nilMoves the cursor to the absolute pixel position (x, y) in the Roblox viewport's coordinate space — origin top-left, the same space as Camera.ViewportSize and WorldToScreen. A WorldToScreen result can be fed straight in.
mousemoverel
function mousemoverel(x: int, y: int): nilMoves the cursor by a relative offset (x, y) in pixels from its current position.
mousescroll
function mousescroll(amount: int): nilScrolls the mouse wheel by amount; the sign sets the direction.