> For the complete documentation index, see [llms.txt](https://scripter-sm.gitbook.io/elite-zone/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripter-sm.gitbook.io/elite-zone/misc-luas.md).

# Misc Luas

See and override the targets of aimbot, flickbot, silent aim and triggerbot, read the game, and reshape the menu.

A misc Lua (`"misc"` or `"both"`) does everything that isn't the ragebot.

## Aimbot, flickbot, silent aim and triggerbot targets

You can **see** who each feature is targeting, and **override** it in two ways.

| You want to...                                                         | Use                             |
| ---------------------------------------------------------------------- | ------------------------------- |
| know who a feature is on right now                                     | `api.targeting.target(feature)` |
| replace **how** targets are chosen (Elite Zone's selection is skipped) | the `lua.aim_select` hook       |
| let Elite Zone choose, then **change the result**                      | the `lua.aim_target` hook       |

`feature` is `"aimbot"`, `"flickbot"`, `"silentaim"` or `"triggerbot"`. Return the same thing for every feature to override the **shared** target, or check `feature` to override **one** of them.

{% tabs %}
{% tab title="Override the result" %}
Ignore anyone holding a katana, for every feature:

```lua
local lua = api.register("No Katanas", "misc")

lua.aim_target = function(feature, target)
    if target and api.game.weapon(target.player) == "Katana" then
        return false
    end
end

lua:override()
```

{% endtab %}

{% tab title="Replace selection" %}
Silent aim always goes for one player's head, the other features stay normal:

```lua
local lua = api.register("Focus", "misc")

lua.aim_select = function(feature)
    if feature ~= "silentaim" then
        return
    end
    for _, p in api.game.players() do
        if p.Name == "SomeRival" and api.game.is_alive(p) then
            return api.targeting.make(p, "HitboxHead")
        end
    end
    return false
end

lua:override()
```

{% endtab %}
{% endtabs %}

In both hooks: return a **target** to use it, `false` for **no target**, or nothing to leave it as it is. Details on api.targeting.

## Reading the game

| You want to know\...                   | Use                                                     |
| -------------------------------------- | ------------------------------------------------------- |
| who is in the server                   | `api.game.players()`                                    |
| what someone has equipped              | `api.game.weapon(player)`                               |
| if someone is **deflecting** right now | `api.game.is_deflecting(player)`                        |
| if someone is alive or on your team    | `api.game.is_alive(player)`, `api.game.is_ally(player)` |
| the round state                        | `api.game.status()`                                     |

You can also fire the game's **UseItem** remote yourself with `api.game.use_item(...)`. See api.game.

## Reshaping the menu

A misc Lua can fully mess with the UI:

* add your own tabs, **before** any existing tab or at the end: `lua:tab("name", "world")`
* add groupboxes to **existing** tabs: `lua:box("main", "right", "my stuff")`
* show settings only when another setting has a value, with dependency boxes
* change or remove any existing setting

Everything you add through the handle is removed when your Lua unloads. See api.ui.

## Read next

* Lua basics
* api.targeting
* api.ui
* api.game


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://scripter-sm.gitbook.io/elite-zone/misc-luas.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
