---
description: Swipe the handle at the right moment to unlock.
---

# Swipe

<figure><img src="https://3546595727-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoRne7ThJaBZiwCpSKT7V%2Fuploads%2Fhltj0CDrkZ0oNDG7lKa1%2Fswipe.png?alt=media&#x26;token=dfd9227f-8644-4a30-96ff-6e04030dc412" alt=""><figcaption></figcaption></figure>

```lua
-- Swipe Lock
RegisterCommand('testswipe', function()
    exports['moon-ui']:OpenSwipeLock(function(success)
        if success then
            print('Swipe successful! Access granted.')
            -- Add your logic here for successful swipe
        else
            print('Swipe cancelled.')
            -- Add your logic here for cancelled swipe
        end
    end)
end)
```

