---
description: Swipe a digital keycard to gain secure entry.
---

# Keycard Swipe

<figure><img src="https://3546595727-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoRne7ThJaBZiwCpSKT7V%2Fuploads%2FpNS0wNayGvsFhmT9DaAY%2Fkeycard.png?alt=media&#x26;token=2d3ee143-bef3-4aa6-b699-0c65ed2caef2" alt=""><figcaption></figcaption></figure>

```lua
-- Key Card Swipe Lock
RegisterCommand('testkeycard', function()
    exports['moon-ui']:OpenKeycardLock('keycard', function(success) -- Suports Ox_inv qb_inv and Qs_inv
        if success then
            print('Keycard found and swipe accepted!')
            -- Add your logic here for successful swipe
        else
            print('No keycard found or swipe denied!')
            -- Add your logic here for failed swipe
        end
    end)    
end)
```

