# Skill Check (/docs/orbit-studios-resources/orbit-dynamichud/interface/skill-check)



# Skill Check [#skill-check]

`skillCheck` yields the calling Lua thread until the player succeeds, fails, cancels, or reaches the 60-second safety timeout. It returns `true` only when every configured step succeeds.

```lua title="Single check"
local success = exports['orbit-dynamichud-v2']:skillCheck('medium', { 'E', 'Q' })

if success then
    print('Skill check passed')
else
    print('Skill check failed or was cancelled')
end
```

## Difficulty [#difficulty]

| Preset   | Success area | Speed multiplier |
| -------- | -----------: | ---------------: |
| `easy`   |         `50` |            `1.0` |
| `medium` |         `40` |            `1.5` |
| `hard`   |         `25` |           `1.75` |

Pass an array for sequential checks. Each successful step advances to the next:

```lua title="Sequence"
local success = exports['orbit-dynamichud-v2']:skillCheck({
    'easy',
    'medium',
    { areaSize = 30, speedMultiplier = 1.9 }
}, { 'E', 'Q', 'SPACE' })
```

`areaSize` is clamped from `1` to `360`. `speedMultiplier` has a minimum of `0.1`. Inputs are normalized to uppercase; `SPACEBAR` becomes `SPACE`, `ESCAPE` becomes `ESC`, and no input table defaults to `E`.

Only one skill check can run at once. A second call returns `false` immediately.

```lua title="State and cancellation"
if exports['orbit-dynamichud-v2']:skillCheckActive() then
    exports['orbit-dynamichud-v2']:cancelSkillCheck()
end
```

## ox\_lib drop-in replacement [#ox_lib-drop-in-replacement]

```lua title="client/orbit_skillcheck.lua"
lib = lib or {}

lib.skillCheck = function(difficulty, inputs)
    return exports['orbit-dynamichud-v2']:skillCheck(difficulty, inputs)
end

lib.skillCheckActive = function()
    return exports['orbit-dynamichud-v2']:skillCheckActive()
end

lib.cancelSkillCheck = function()
    return exports['orbit-dynamichud-v2']:cancelSkillCheck()
end
```

The difficulty, input, active-state, cancellation, and boolean return contracts match the ox\_lib calls, so existing gameplay branches remain unchanged.

The local client event `orbit-dynamichud:skillCheckOver` fires when NUI submits a result. Normal gameplay code should use the blocking return value.
