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

# Exports

For ambulance scripts that are not supported out of the box. Call them from the death and revive code of your script.

## Client

```lua
exports['daddy-deathscreen']:OpenDeathscreen(timer, opts)
exports['daddy-deathscreen']:CloseDeathscreen()
exports['daddy-deathscreen']:IsDeathscreenActive()   -- true / false
exports['daddy-deathscreen']:GetDeathscreenState()   -- 'dead', 'laststand' or nil
```

`timer` is the countdown in seconds. `opts` is optional:

| Field         | Description                                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `state`       | `'dead'` or `'laststand'` (default `'laststand'`)                                                                                    |
| `style`       | `'minimal'`, `'center'` or `'cinematic'`, default `Config.Style`                                                                     |
| `title`       | Replaces the title                                                                                                                   |
| `description` | Replaces the description. `{key}` and `{second}` are highlighted                                                                     |
| `reportKey`   | The key shown for `{key}`                                                                                                            |
| `cause`       | Cause text that is shown as is                                                                                                       |
| `causeKey`    | One of the keys of [Cause of Death](/daddy-studios-docs/scripts/daddy-deathscreen/configuration/cause-of-death.md), chooses the icon |
| `killer`      | Name shown after "Killed by"                                                                                                         |

```lua
exports['daddy-deathscreen']:OpenDeathscreen(300, {
    state = 'dead',
    cause = 'Gunshot wound',
    causeKey = 'shot',
})
```

## Server

```lua
exports['daddy-deathscreen']:OpenDeathscreen(playerId, timer, opts)
exports['daddy-deathscreen']:CloseDeathscreen(playerId)
```

Same `opts` as on the client.

{% hint style="info" %}
The exports only draw the screen. Timers, keys and the respawn itself stay in your ambulance script.
{% endhint %}


---

# 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://daddy-studios.gitbook.io/daddy-studios-docs/scripts/daddy-deathscreen/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.
