#.______ __ .__ __. __ ______ _______ __ .__ __. #| _ \ | | | \ | | | | / __ \ / _____|| | | \ | | #| |_) | | | | \| | | | | | | | | | __ | | | \| | #| ___/ | | | . ` | | | | | | | | | |_ | | | | . ` | #| | | | | |\ | | `----.| `--' | | |__| | | | | |\ | #| _| |__| |__| \__| |_______| \______/ \______| |__| |__| \__| options: # Change the messages below to your liking. newpin: "&aYour new pin is:" dontforget: "&4Please remember this pin or write it down!" menuname: "&1Please enter your pin." nopermission: "&4You do not have permission for that command" pinresetted: "&aYour pin has been resetted! Please relog to get a new one." playerpinresetted: "&aThe pin of &e%player-arg% &ahas been resetted." pincorrect: "&a&lSuccessful logged in." pinincorrect: "&4&lPin incorrect!" # Change other options to your liking. numberitem: paper okitem: emerald resetitem: redstone numbercolour: &e&l #------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------ #------------------------------------------------------------------------------------------ #Dont' change anything below this line if you don't know what you are doing! on join: if {pin.1.%player%} is not set: send "&e---------------------" send {@newpin} set {pin.1.%player%} to a random integer between 0 and 9 wait 1 tick set {pin.2.%player%} to a random integer between 0 and 9 wait 1 tick set {pin.3.%player%} to a random integer between 0 and 9 wait 1 tick set {pin.4.%player%} to a random integer between 0 and 9 send "&c&k...&b&l%{pin.1.%player%}%%{pin.2.%player%}%%{pin.3.%player%}%%{pin.4.%player%}%&c&k..." send {@dontforget} send "&e---------------------" else: wait 2 ticks make player execute command "/pin" command /pinlogin reload: permission: pinlogin.reload trigger: send "&aPlugin reloaded!" make console execute command "/skript reload pinlogin" command /pin: trigger: open chest with 4 rows named {@menuname} to player wait 1 tick format slot 0 of player with {@numberitem} named "{@numbercolour}1" to run [make player execute command "pinadd 1"] format slot 1 of player with {@numberitem} named "{@numbercolour}2" to run [make player execute command "pinadd 2"] format slot 2 of player with {@numberitem} named "{@numbercolour}3" to run [make player execute command "pinadd 3"] format slot 9 of player with {@numberitem} named "{@numbercolour}4" to run [make player execute command "pinadd 4"] format slot 10 of player with {@numberitem} named "{@numbercolour}5" to run [make player execute command "pinadd 5"] format slot 11 of player with {@numberitem} named "{@numbercolour}6" to run [make player execute command "pinadd 6"] format slot 18 of player with {@numberitem} named "{@numbercolour}7" to run [make player execute command "pinadd 7"] format slot 19 of player with {@numberitem} named "{@numbercolour}8" to run [make player execute command "pinadd 8"] format slot 20 of player with {@numberitem} named "{@numbercolour}9" to run [make player execute command "pinadd 9"] format slot 27 of player with {@okitem} named "&aOK" to run [make player execute command "checkpin"] format slot 28 of player with {@numberitem} named "{@numbercolour}0" to run [make player execute command "pinadd 0"] format slot 29 of player with {@resetitem} named "&cRESET" to run [make player execute command "retrypin"] command /pinreset []: trigger: if player-arg is not set: delete {pin.1.%player%} delete {pin.2.%player%} delete {pin.3.%player%} delete {pin.4.%player%} send {@pinresetted} if player-arg is set: if player has permission "pinlogin.reset": delete {pin.1.%player-arg%} delete {pin.2.%player-arg%} delete {pin.3.%player-arg%} delete {pin.4.%player-arg%} send {@playerpinresetted} else: send {@nopermission} command /pinadd : trigger: inventory name of player's current inventory is {@menuname} if {pintype.1.%player%} is not set: set {pintype.1.%player%} to integer-arg format slot 13 of player with {@numberitem} named "{@numbercolour}%integer-arg%" to be unstealable stop if {pintype.2.%player%} is not set: {pintype.1.%player%} is set set {pintype.2.%player%} to integer-arg format slot 14 of player with {@numberitem} named "{@numbercolour}%integer-arg%" to be unstealable stop if {pintype.3.%player%} is not set: {pintype.2.%player%} is set set {pintype.3.%player%} to integer-arg format slot 15 of player with {@numberitem} named "{@numbercolour}%integer-arg%" to be unstealable stop if {pintype.4.%player%} is not set: {pintype.3.%player%} is set set {pintype.4.%player%} to integer-arg format slot 16 of player with {@numberitem} named "{@numbercolour}%integer-arg%" to be unstealable stop on quit: delete {pintype.1.%player%} delete {pintype.2.%player%} delete {pintype.3.%player%} delete {pintype.4.%player%} command /retrypin: trigger: inventory name of player's current inventory is {@menuname} delete {pintype.1.%player%} delete {pintype.2.%player%} delete {pintype.3.%player%} delete {pintype.4.%player%} format slot 12 of player with air to be unstealable format slot 13 of player with air to be unstealable format slot 14 of player with air to be unstealable format slot 15 of player with air to be unstealable format slot 16 of player with air to be unstealable command /checkpin: trigger: inventory name of player's current inventory is {@menuname} if "%{pintype.1.%player%}%%{pintype.2.%player%}%%{pintype.3.%player%}%%{pintype.4.%player%}%" is "%{pin.1.%player%}%%{pin.2.%player%}%%{pin.3.%player%}%%{pin.4.%player%}%": set {pincorrect.%player%} to true close inventory of player delete {pintype.1.%player%} delete {pintype.2.%player%} delete {pintype.3.%player%} delete {pintype.4.%player%} send {@pincorrect} to player stop else: delete {pintype.1.%player%} delete {pintype.2.%player%} delete {pintype.3.%player%} delete {pintype.4.%player%} close inventory of player kick player due to {@pinincorrect} on inventory close: inventory name of player's current inventory is {@menuname} wait 1 tick if {pin.1.%player%} is not set: stop if {pincorrect.%player%} is not set: make player execute command "/pin" stop if {pincorrect.%player%} is true: delete {pincorrect.%player%} stop