> For the complete documentation index, see [llms.txt](https://max-workx.gitbook.io/maxworkx-private-fivem-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://max-workx.gitbook.io/maxworkx-private-fivem-docs/library/overextended/client-sided/ui/skill-check.md).

# Skill Check

#### lib.skillCheck <a href="#libskillcheck" id="libskillcheck"></a>

Runs a skill check with the defined difficulty.

```lua
lib.skillCheck(difficulty, inputs)
```

* difficulty: `easy` or `medium` or `hard` or `object`
  * Can set custom difficulty by sending a object instead of string
    * { areaSize: `number`, speedMultiplier: `number` }
      * easy: { areaSize: 50, speedMultiplier: 1 }
      * medium: { areaSize: 40, speedMultiplier: 1.5 }
      * hard: { areaSize: 25, speedMultiplier: 1.75 }
    * `areaSize` size of the area in degrees.
  * Sending an array will chain the checks together and return false if one fails and true if all succeed
* inputs: `string[]`
  * Picks a random key from the inputs table to use on each skill check pass.

#### Usage Example <a href="#usage-example" id="usage-example"></a>

```lua
local success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'hard'}, {'w', 'a', 's', 'd'})
```

<div align="left"><figure><img src="https://i.imgur.com/rgfkn0S.png" alt=""><figcaption></figcaption></figure></div>
