> For the complete documentation index, see [llms.txt](https://docs.easy.gg/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.easy.gg/scripting/bedwars-scripting/services/disasterservice.md).

# DisasterService

Example usage:

```lua
Events.Enchant(function(event)
    -- Start a Tornado disaster if someone receives the Wind enchant
    if (event.enchant == EnchantType.WIND_3) then
         DisasterService.startDisaster(DisasterType.TORNADO, 3 * 60)
    end
end)
```

### Functions

#### startDisaster(disasterType: [DisasterType](/scripting/bedwars-scripting/types/disastertype.md), duration: number)

Starts a [Disaster](/scripting/bedwars-scripting/types/disastertype.md) event that lasts for an optional duration (in seconds).
