> For the complete documentation index, see [llms.txt](https://fantasy-scripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fantasy-scripts.gitbook.io/docs/hud-v-system/exports.md).

# Exports

## Exports

Everything here is also an event, because some scripts are easier to change by firing an event than by adding an export. The two do exactly the same thing.

All of it is client side.

### Putting the HUD away

Hiding is **by name**, not by an on and off switch. Two scripts that both hide the HUD — a phone and a cutscene, say — used to fight over it: whichever finished first handed the screen back while the other was still using it. Ask by name and the HUD comes back only when the last one has let go.

#### hide

```lua
exports['fs-hud']:hide('phone')
```

```lua
TriggerEvent('fs-hud:hide', 'phone')
```

#### show

```lua
exports['fs-hud']:show('phone')
```

```lua
TriggerEvent('fs-hud:show', 'phone')
```

Use the same name you hid with. A name you never hid with does nothing.

#### isVisible

```lua
local shown = exports['fs-hud']:isVisible()
```

Returns `true` or `false`.

**A worked example.** A phone that covers the screen:

```lua
exports['fs-hud']:hide('phone')
-- ... the phone is open ...
exports['fs-hud']:show('phone')
```

If a cutscene also hid it as `'cutscene'` while the phone was open, the HUD stays away until the cutscene shows it again too.

### The key reminders along the bottom

#### setHints

Put your own rows up.

```lua
exports['fs-hud']:setHints('fishing', {
    { key = 'E', label = 'Cast' },
    { key = 'G', label = 'Reel in' },
})
```

```lua
TriggerEvent('fs-hud:setHints', 'fishing', {
    { key = 'E', label = 'Cast' },
})
```

| Field   | What it is                    |
| ------- | ----------------------------- |
| `key`   | The key as it should be drawn |
| `label` | What it does                  |

The name works the same way as hiding: your rows are yours, and taking them down does not take anybody else's down.

#### clearHints

```lua
exports['fs-hud']:clearHints('fishing')
```

Takes your rows down again. Calling `setHints` with nothing in place of the rows does the same.

### The seatbelt

#### getSeatbelt

```lua
local on = exports['fs-hud']:getSeatbelt()
```

#### toggleSeatbelt

```lua
exports['fs-hud']:toggleSeatbelt()
```

For a script with a reason to take the belt off — a police stop, a cutscene.


---

# 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://fantasy-scripts.gitbook.io/docs/hud-v-system/exports.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.
