Category

Overview

What the Lua API is, how scripts run, and how this reference is organised.

Agnes Tachyon scripts are written in Luau and run inside a sandbox. A script can talk to the client (read game state, draw on screen, toggle modules, watch network packets) but not to the rest of your computer.

Quick start

-- Prints your position once per second.
while true do
  local p = mc.getPlayer()
  if p then
    print(string.format("x=%.1f y=%.1f z=%.1f", p.x, p.y, p.z))
  end
  task.wait(1)
end

Your script's main chunk runs inside a coroutine, so task.wait and other yielding functions work at the top level.

How this reference is organised

CategoryWhat it covers
OverviewScript lifecycle, the environment, the standard libraries
Schedulertask, wait, signals, RunService, input events
MinecraftThe mc table: state, player, world, entities, actions
ModulesReading and changing client modules and their settings
Drawing2D Drawing, Render3D, Camera, ESP, Notify
TypesVector2, Vector3, Color3, Colorx
Networkrnet (also raknet and netty): packet watching, editing and sending
FilesFile functions, loadstring, require, Storage, json, crypt
ClosuresHooking and executor-style functions
Consoleprint, warn and the rconsole console window
UtilitiesExtra libraries: stringx, tablex, mathx, data structures, timing, helpers

Conventions used in these pages

  • Signatures use name(arg, optionalArg). A default is written as arg = value.
  • "Returns" lists what the function gives back. When a value comes from the native layer, only the fields the built-in scripts rely on are listed.
  • Functions on objects use a colon (obj:Method()), except where a page says otherwise.
  • Most library functions are wrapped so that hookfunction can replace them.

In this category