> 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-ui/skill-check.md).

# Skill Check

A rotating-needle timing minigame. The player presses **E** when the needle lands on the green success zone. Fail the zone and the check fails immediately.

## Usage

```lua
exports['jiffy-ui']:SkillCheck({
    difficulty  = 'medium',   -- 'easy' | 'medium' | 'hard'
    circles     = 3,          -- zones to clear before success (1–10)
    label       = 'Picking lock',
}, function(success)
    if success then
        -- player succeeded
    else
        -- player failed
    end
end)
```

## Difficulty presets

| Preset   | Needle speed | Success arc | Danger arc |
| -------- | ------------ | ----------- | ---------- |
| `easy`   | 1.5 °/frame  | 120°        | none       |
| `medium` | 2.5 °/frame  | 80°         | 20°        |
| `hard`   | 4.0 °/frame  | 50°         | 35°        |

## Advanced overrides

Skip `difficulty` and set the values manually:

```lua
exports['jiffy-ui']:SkillCheck({
    speed       = 3.0,   -- degrees per frame
    successSize = 70,    -- green zone arc in degrees
    dangerSize  = 25,    -- red zone arc (0 = no danger zone)
    circles     = 2,
    label       = 'Custom check',
}, function(success) ... end)
```

{% hint style="info" %}
The check runs fully in the NUI — no cursor is captured and the game world remains visible. The player can still move while the check is active.
{% endhint %}
