> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Progress bar

> Replace the default progress bar with your own, or trigger the default one from external scripts.

## How to replace it?

You can use a Drugs Creator [module](/drugs-creator/modules) if you want to use your own progress bar.

## Use in external scripts

If you like the default progress bar of the script and want to use it in external scripts, this is the event:

```lua theme={null}
TriggerEvent("drugs_creator:startProgressBar", timeInMS, text, hexColor)
```

### Parameters

| Name       | Data Type | Description                                                                                                 |
| ---------- | --------- | ----------------------------------------------------------------------------------------------------------- |
| `timeInMS` | integer   | Duration of the progress bar in milliseconds                                                                |
| `text`     | string    | The text that will be shown with the progress bar                                                           |
| `hexColor` | string    | The color of the progress bar in hex code (example `#70f2b4`). Can be `nil` to use the script's default one |

### Example

```lua theme={null}
-- This will create a command to show a red progress bar
-- /progressbar 5000 Hello
RegisterCommand("progressbar", function(playerId, args)
    TriggerEvent("drugs_creator:startProgressBar", tonumber(args[1]), args[2], "#ff0000")
end)
```


## Related topics

- [Progress bar](/farming-creator/client/progress-bar.md)
- [Modules](/drugs-creator/modules.md)
