> ## Documentation Index
> Fetch the complete documentation index at: https://docs.awokenlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Server verification

> Optionally ask your server whether a player really passed, so a cheater can't just fire the payout event.

A minigame runs in the player's browser, so whether they "won" is decided on their own machine (the **client**). If a reward is paid out by a server event the player's game triggers, a cheater can skip the minigame and fire that event anyway.

This lets **your server** double-check that the player actually passed. It's optional - if you never call it, nothing changes.

## Use it

Keep your client code as-is:

```lua theme={"dark"}
-- your client
if exports['awoken_minigames']:SkillCheck({ keys = { 'E' } }) then
    TriggerServerEvent('myheist:cracked')
end
```

Then check on the server before paying out:

```lua theme={"dark"}
-- your server
RegisterNetEvent('myheist:cracked', function()
    if not exports['awoken_minigames']:ConsumeResult(source, 'skillCheck') then
        return -- not a verified win; don't pay out
    end
    -- verified - pay out
end)
```

That's it. `ConsumeResult(src, gameId)` returns `true` for a genuine, recent win and spends it, so the same win can't be claimed twice.

<Tip>
  Pass the `gameId` you gated on (here `'skillCheck'`) so a player can't clear an easy game elsewhere and spend it here. For a [Sequence](/resources/awoken-minigames/sequences), the id is `'sequence'`.
</Tip>

## Turn it off

```lua config.lua theme={"dark"}
server = {
    enabled = false,
},
```

<Warning>
  With `enabled = false`, `ConsumeResult` returns `true` for **everyone** - on purpose. You've turned verification off, so the check simply always passes rather than quietly rejecting honest players and breaking your payouts. The other settings (`minDurationMs`, `resultTtlMs`, `sessionTtlMs`) have sensible defaults; leave them alone unless you have a reason.
</Warning>

## Honest limits

It stops the easy cheats - firing the event with no game behind it, replaying one win, or "winning" a 30-second game in 200ms (the duration is timed on the server). It **cannot** stop a modified client that plays a real session and lies about the result; no client-side minigame can. It raises the bar; it doesn't close the door.

<Info>
  There are two more server exports if you need them: `PeekResult(src, gameId)` asks the same question without spending the win, and `VerificationEnabled()` tells you whether it's switched on.
</Info>
