> For the complete documentation index, see [llms.txt](https://viper-development-1.gitbook.io/viperdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://viper-development-1.gitbook.io/viperdocs/viper-scripts/safe-zone/guide/custom-framework.md).

# Custom Framework

{% hint style="info" %}
Using a custom framework with Viper Safe Zone is simple. Your framework just needs to expose whether it's running, the player's current job, and the events it fires when a job changes.
{% endhint %}

***

{% stepper %}
{% step %}

### Open the custom framework file

Go to `viper-safezones/framework/custom.lua`
{% endstep %}

{% step %}

### Fill in the framework hooks

Set <mark style="color:$primary;">detect</mark>, <mark style="color:$primary;">getJob</mark>, and <mark style="color:$primary;">jobEvents</mark> for your framework.
{% endstep %}

{% step %}

### Register the framework

```
Framework.Register('custom', { ... })
```

{% endstep %}

{% step %}

### Enable it in config.lua

```
Config.Framework = 'custom'
```

{% endstep %}
{% endstepper %}

{% code title="custom.lua" %}

```lua
-- Add your own framework here, then set Config.Framework = 'custom' in config.lua
-- detect: return true when your framework is running
-- getJob: return the player's job name, or nil
-- jobEvents: events your framework fires when a job changes

Framework.Register('custom', {
    detect = function()
        return false
    end,

    getJob = function()
        return nil
    end,

    jobEvents = {},
})
```

{% endcode %}

{% hint style="success" %}
That's it — your custom framework is registered. Head back to the **Config** page to finish setup.
{% endhint %}
