> For the complete documentation index, see [llms.txt](https://jiffyjrdevelopment.gitbook.io/jiffyjrdevelopmentdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jiffyjrdevelopment.gitbook.io/jiffyjrdevelopmentdocs/jiffy-jr-development-docs/jiffy-minigames/games/skillbar.md).

# Skillbar

<figure><img src="https://1591991476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPIxZnZDGzl5v0n1I2OKQ%2Fuploads%2FfEnDziK5TjM8SDUOgaDU%2Fimage.png?alt=media&amp;token=ff97e844-41e3-4540-a654-30620c7c7b85" alt=""><figcaption></figcaption></figure>

A marker bounces back and forth along a bar. The player must press the key when the marker is inside the highlighted success zone. Complete the required number of rounds to win.

***

## Options

| Option       | Type   | Default    | Description                                                                 |
| ------------ | ------ | ---------- | --------------------------------------------------------------------------- |
| `difficulty` | string | `'medium'` | Preset: `'easy'` `'medium'` `'hard'` `'insane'`. Sets `rounds` and `speed`. |
| `rounds`     | number | `3`        | Number of successful presses required to win.                               |
| `speed`      | number | `1.0`      | Marker movement speed multiplier.                                           |
| `size`       | string | `'medium'` | Success zone width: `'small'`, `'medium'`, or `'large'`.                    |
| `key`        | string | `'E'`      | Key label shown on screen.                                                  |

***

## Example

```lua
exports['jiffy-minigames']:Skillbar({
    difficulty = 'medium',
    rounds     = 3,
    size       = 'small',
}, function(success)
    if success then
        -- crafting succeeded
    end
end)
```

***

## Notes

* `size` is independent of difficulty. Use it to tune the visual width of the zone without changing the speed or round count.
