# Setup

## Config

* This Script requires a death system. Basically, it's an add-on script, not a death system itself.
* You can use the death screen in both ways, either by pressing a key or by using the mouse to perform an action.
* There are four buttons by default to configure: EMS Help, Force Respawn, Accept Die, and Report Player. You can customize these buttons as per your preference.
* If you want to edit the language, you can directly do that under index.html.
* A detailed guide for each thing is provided in the configuration. Please take a look at it.

<figure><img src="/files/0K23GQx5WTPrSEVzSsjx" alt=""><figcaption><p>Detailed Config Preview</p></figcaption></figure>

* Toggle Death Screen UI:<br>

  <pre class="language-lua" data-title="Example Usage:" data-full-width="true"><code class="lang-lua">TriggerEvent('cs:deathscreen:show')
  </code></pre>
* To update the Death Screen buttons, set 'true' or 'false' to disable or enable a particular button, like this: \ <mark style="color:yellow;">TriggerEvent('cs:deathscreen:button', EMSHelp, ForceRespawn, AcceptDie, Report)</mark><br>

  <pre class="language-lua" data-title="Example Usage:" data-full-width="true"><code class="lang-lua">TriggerEvent('cs:deathscreen:button', true, false, false, true)
  </code></pre>
* To update the death screen UI text and timer:\ <mark style="color:yellow;">TriggerEvent('cs:deathscreen:update', 'Any UI Text', death timer in number)</mark><br>

  <pre class="language-lua" data-title="Example Usage:"><code class="lang-lua">TriggerEvent('cs:deathscreen:update', 'You Are Dead', 10)
  </code></pre>


---

# Agent Instructions: 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:

```
GET https://codestudio5m.gitbook.io/codestudio/our-scripts/death-screen/setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
