> For the complete documentation index, see [llms.txt](https://tefox-scripts.gitbook.io/tefox-scripts-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tefox-scripts.gitbook.io/tefox-scripts-docs/tefox-scripts-documentation/tefox_hud/exports.md). Agents can also search and read this documentation through its [MCP server](https://tefox-scripts.gitbook.io/tefox-scripts-docs/~gitbook/mcp).

# Exports

All exports are **client-side**.

### Show & hide the HUD

```lua
exports.tefox_hud:Hide('my_resource')
exports.tefox_hud:Show('my_resource')
exports.tefox_hud:SetVisible(false, 'my_resource')
local visible = exports.tefox_hud:IsVisible()
```

Each resource hides the HUD under its own name. The HUD only comes back when every resource that hid it has called <mark style="color:$info;">`Show`</mark>. If a resource stops, its hide is removed automatically.

### Custom statuses

Add your own status icon next to the built-in ones.

```lua
exports.tefox_hud:AddStatus('drunk', {
    label = 'Drunk',
    icon = 'stress',
    color = '#a855f7',
    inverse = true,
    value = 0
})

exports.tefox_hud:UpdateStatus('drunk', 45)
exports.tefox_hud:RemoveStatus('drunk')
```

| Option    | Description                                      |
| --------- | ------------------------------------------------ |
| `label`   | Name shown in the settings menu.                 |
| `icon`    | Name of a built-in icon.                         |
| `color`   | Icon color.                                      |
| `inverse` | `true` if a higher value is worse (like stress). |
| `value`   | Starting value, from 0 to 100.                   |

Custom statuses are removed automatically when the resource that added them stops.

### Built-in statuses

```lua
exports.tefox_hud:SetStatus('hunger', 80)
exports.tefox_hud:SetStatus('thirst', 60)
exports.tefox_hud:SetStatus('stress', 10)
```

Values go from 0 to 100.

### Cinematic mode

```lua
exports.tefox_hud:SetCinematic(true)
local active = exports.tefox_hud:IsCinematic()
```
