# Source URL: https://dev.epicgames.com/community/snippets/Aerm/fortnite-ezui-customisable-security-keypad-with-sfx
# Local doc: epic-docs/community/snippets/Aerm/fortnite-ezui-customisable-security-keypad-with-sfx.md
<#
A customisable security keypad connected to a barrier device but
could be rewritten to affect anything you want such as chests, doors
or even NPCs. These placeholder visuals are freely available from my
Instagram Threads page at this link: https://www.threads.net/@kryyative/post/CzXCZ_ENBc3
#>
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
#imports
using { /UnrealEngine.com/Temporary/UI }
using { /Fortnite.com/UI }
using { /Verse.org/Colors }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Assets }
using {EZUI}
EZ_KeypadManager := class ()
{
EZ_LinkedCreativeDevice<public> : ez_ui_keypad_v2 # a backreference to the device that created this EZUI class
EZ_LinkedPlayer<public> : player # the player linked to this instance of the EZUI class
EZ_UI_ID<public> : int # used to control what UI is initialised by the class
EZ_RequiredPIN_000to999<public> : string # the valid PIN
EZ_BarrierDevice<public> : barrier_device # the device controlled by the keypad
EZ_AccessGrantedSFX<public> : audio_player_device # correct PIN sfx
EZ_AccessDeniedSFX<public> : audio_player_device # incorrect PIN sfx
var IsInitialized<private> : logic = false # a lock to prevent recreating the canvas after the first execution of Initialize()
var MainCanvas<private> : canvas = canvas{} # the canvas that holds all the screen elements and will be added to the PlayerUI
var InputCount : int = 0
Verse Library
verse
01 Snippet
Manages a custom UI keypad for verifying player PINs to unlock linked creative devices while playing access sounds.
extracted-snippets/community/snippets/Aerm/fortnite-ezui-customisable-security-keypad-with-sfx/01-snippet.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.