> For the complete documentation index, see [llms.txt](https://docs.londonstudios.net/london-studios-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.londonstudios.net/london-studios-documentation/resources/smart-defib/custom-death-scripts.md).

# Custom Death Scripts

We have integrated Smart Defib straight out of the box with a few custom death scripts. Some of these require you to add additional code to your death script to work properly.

## Fax-Revive (<https://github.com/FAXES/fax-revive>)

Add the following code to a new line in the **client.lua** file:

```lua
RegisterNetEvent("faxrevive:defibrevive")
AddEventHandler("faxrevive:defibrevive", function()
    revivePed(PlayerPedId())
end)
```

You will now need to enable this integration in the Smart Defib **config.lua** file.

## Death Script (<https://github.com/ItsAmmarB/DeathScript>)

Add the following code to a new line in the **client.lua** file. This is only if you are using the **OLD** version of the death script which uses lua and not javascript.

You will also need to enable this in the config. If you are using the javascript version, make sure to enable v2.

```lua
RegisterNetEvent("DeathScript:DefibRevive")
AddEventHandler("DeathScript:DefibRevive", function()
    revivePed(PlayerPedId())
end)
```

Smart Defib triggers this event on the client when a revive succeeds. Use the function your death script provides to bring the player back.


---

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.londonstudios.net/london-studios-documentation/resources/smart-defib/custom-death-scripts.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.
