> ## Documentation Index
> Fetch the complete documentation index at: https://docs.selvut.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Concepts

> How scripts map to Selvut modules.

## One File, One Module

Each `.lua` file in the scripts folder becomes one toggle module. Metadata controls the module name and description:

```lua theme={null}
Script.meta({
  name = "Example",
  category = "Scripts",
  description = "Short module description."
})
```

Scripts are loaded during Wynn startup and on `;scripts reload`. Syntax errors prevent that file from registering; runtime errors disable only the owning script module.

## Globals

The runtime exposes these globals:

```lua theme={null}
Script
Setting
Client
Chat
Player
World
Input
Inventory
KeyBind
Rotation
Interaction
Async
Pathfinder
Spell
Wynn
Color
Random
Vec3
Anim
Render
Texture
Shader
Hud
Packet
Friend
Time
Java
Reflect
GlobalVars
```

## Return Values

Game-state APIs return `nil` when Minecraft state is unavailable:

```lua theme={null}
local pos = Player.position()
if pos == nil then return end
```

Most structured return values are script-accessible tables with fields, functions, or both. Raw Minecraft objects are available through selected `raw()` methods or `Java.mc()` when direct interop is needed.
