Skip to content

Getting started

Load your first script.

  1. Open the Scripts page in the Nyx menu.
  2. Click Open folder and add a .lua or .luau file. Names use letters, digits, _ and -, up to 32 characters.
  3. Pick the script in the Script dropdown and turn on Load.
  • Autoload - loads the script every time Nyx starts.
  • Reload on save - reloads it every time you save the file.

A loaded script gets its own tab at the bottom of the sidebar, with its controls and its console.

-- The script's sidebar tab: a title and an icon
ui.sidebar("Hello", "hand")
local font = render.font("ui", 16)
events.paint:add(function()
render.text(font, vector.create(20, 20, 0), color(255, 255, 255), "Hello from Nyx")
end)
-- Goes to the console on the script's tab
print("loaded")

An error stops the script. The Scripts page shows the message in red under the dropdown, and the script's tab shows the whole error with its traceback.

When the folder is empty, Nyx puts three examples in it:

  • watermark.lua - a window with your name, the script fps and the time
  • spectators.lua - dead teammates in a small window
  • hit_indicator.lua - the damage you deal, by the crosshair and over the player you hit

Their code is on the Examples page.