> For the complete documentation index, see [llms.txt](https://docs.nursultan.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nursultan.fun/what-this-is.md).

# What this is

Nursultan scripts are plain Kotlin files with a `.kts` extension that the client compiles while the game is running. Save the file and the script reloads — no restart needed.

One file is one script. Here is a whole working one:

```kotlin
name("Hello")
description("My first script")

chat.print("hi")

on<ClientTickEvent> {
    // runs every game tick while the script is on
}
```

No `main`, no classes, no imports — the whole API is already available at the top level of the file.

## What you can build

* **Your own module** — settings, a bind, a switch in the Scripts tab. See [How a script works](/getting-started/how-a-script-works.md) and [Kinds of settings](/settings/kinds-of-settings.md).
* **Reactions to the game** — ticks, damage, attacks, input, packets, entities spawning. See [Events](/events/subscribing.md).
* **Reading the world** — player, blocks, entities, inventory, server. See [Game data](/game-data/your-player.md).
* **Actions** — attack, place, break, turn your head, swap slots, send packets. See [Actions](/actions/interaction.md).
* **Your own graphics** — HUD, boxes and lines in the world, custom shaders. See [Interface](/interface/2d-render.md).
* **Your own commands** — with Tab completion, just like the client's own. See [Your own commands](/more/your-own-commands.md).

## Where scripts live

|         | Path                                   |
| ------- | -------------------------------------- |
| Windows | `%APPDATA%\Nursultan\scripts`          |
| macOS   | `<minecraft folder>/Nursultan/scripts` |

That folder holds **only** finished `.kts` files. Writing scripts is nicer in a separate project folder — see [The project in your IDE](/getting-started/the-project-in-your-ide.md).

The file name is the script id: `auto-jump.kts` shows up in the menu as `auto-jump` until you give it a `name(...)`.

## The Scripts tab

Everything is managed from the **Scripts** tab in the client menu.

* **Add script** — pick a `.kts`, it gets copied into the scripts folder and compiled.
* While compiling, the card is dimmed and shows its status. An error turns it red and shows the message.
* Every script gets one card: the **switch** turns it on and off, **the dots or right click** opens settings, **the keyboard icon or middle click** sets a bind.
* State survives restarts: on/off, bind and settings all come back.

While the API is settling, scripting is only available to accounts with the **administrator** role.
