> 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/generatorservice.md).

# GeneratorService

Example usage:

```lua
-- Create a TNT generator above newly placed Ceramic blocks
Events.BlockPlace(function(event)
    if (event.blockType ~= ItemType.BLASTPROOF_CERAMIC) then
        return
    end

    local gen = GeneratorService.createGenerator(ItemType.TNT, event.position)
    gen:setCooldown(4)
    gen:setMax(100)
end)
```

### Functions

#### createGenerator(itemType: [ItemType](/scripting/bedwars-scripting/types/itemtype.md), position: [Vector3](https://create.roblox.com/docs/reference/engine/datatypes/Vector3)): [Generator](/scripting/bedwars-scripting/objects/generator.md)

Creates a Generator at the given position that will drop the item on a cooldown.
