> For the complete documentation index, see [llms.txt](https://kaizo-1.gitbook.io/kaizo-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kaizo-1.gitbook.io/kaizo-docs/lua-engine/game-and-session/essentials.md).

# Essentials

The important Game and session functions.

## world.players

All players in the current snapshot.

world.players

```lua
local players = world.players()
log.info("count " .. #players)
```

## world.resolved

Targets after resolver filters. Use this for ESP style loops.

world.resolved

```lua
for _, t in ipairs(world.resolved()) do
    local p = world.players()[t.player_index]
end
```

## world.to\_screen

Project a world point to overlay coords. Returns `nil` if it is behind the camera.

world.to\_screen

```lua
local p = world.to_screen(0, 10, 0)
if p then
    draw.esp_box(p.x - 20, p.y - 40, 40, 80)
end
```

## world.screen

Screen size and whether the menu is open.

world.screen

```lua
if world.screen().menu_open then
    -- safe to draw clickable ui
end
```

## input.was\_pressed

One shot key press. Use keys macros like `keys.F1` instead of raw numbers.

input.was\_pressed

```lua
if input.was_pressed(keys.F1) then
    toast.push("F1")
end
```

## config.get and config.set

Read and write cheat settings as strings. Bools use `"1"` and `"0"`.

config.get and config.set

```lua
config.set("espEnabled", "1")
local esp = config.get("espEnabled")
```

## Also useful

* keys
* input.is\_down


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kaizo-1.gitbook.io/kaizo-docs/lua-engine/game-and-session/essentials.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
