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

# Circle

<figure><img src="https://1591991476-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPIxZnZDGzl5v0n1I2OKQ%2Fuploads%2FAQuBqRDAKKT65Bz9jTVu%2Fimage.png?alt=media&amp;token=e9b5f5ec-f71e-48cd-b64c-b3cfd905e4f0" alt=""><figcaption></figcaption></figure>

A needle spins around a ring. The player must press the key at the moment the needle 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` unless overridden. |
| `rounds`     | number | `3`        | Number of successful presses required to win.                                                 |
| `speed`      | number | `1.0`      | Needle rotation speed multiplier. Higher = faster.                                            |
| `key`        | string | `'E'`      | Key label shown on screen. The NUI listens for this keypress.                                 |
| `zone`       | number | `0.18`     | Width of the success zone as a fraction of the ring (0–1). Smaller = harder.                  |

***

## Example

```lua
-- Callback style:
exports['jiffy-minigames']:Circle({
    difficulty = 'hard',
    rounds     = 4,
}, function(success)
    if success then
        TriggerServerEvent('my-script:server:crateOpened')
    end
end)

-- Blocking style:
local success = exports['jiffy-minigames']:Circle({ difficulty = 'medium' })
```

***

## Notes

* The zone narrows slightly on each successive round to maintain challenge over multiple presses.
* `speed` stacks with the difficulty preset's speed multiplier when both are set. Set `difficulty` first, then override `speed` if needed.
