Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /banker:
- trigger:
- if {bank::%{uuid}%} is null:
- set {bank::%{uuid}%} to 0
- else:
- set {_p} to "%player%" parsed as player
- set metadata tag "bankerGUI" of player to chest inventory with 3 rows named "&e&lBanker"
- set slot 0 of metadata tag "bankerGUI" of player to skull of {_p} named "&3%player%"
- set slot 12 of metadata tag "bankerGUI" of player to paper named "&a&lWithdraw"
- set slot 14 of metadata tag "bankerGUI" of player to paper named "&c&lDeposit"
- set slot 26 of metadata tag "bankerGUI" of player to an emerald named "&aBalance" with lore "&ePocket: &a%{_p}'s balance%" and "&eBank: &a$%{bank::%{uuid}%}%"
- open (metadata tag "bankerGUI" of player) to player
- on inventory click:
- if compare(metadata tag "bankerGUI" of player, event-inventory) = true:
- cancel event
- if event-slot is 12:
- close inventory of player
- set {bank.chat.response.1.%uuid of player%} to true
- send "&a&l[!] &aPlease put the amount of money you want to withdraw in chat."
- wait 30 seconds
- if {bank.chat.response.1.%uuid of player%} is set:
- delete {bank.chat.response.1.%uuid of player%}
- send "&c&l[!] &cRan out of time, please try again."
- wait 1 second
- open (metadata tag "bankerGUI" of player) to player
- else:
- stop
- if index of event-slot is 14:
- close inventory of player
- set {bank.chat.response.%uuid of player%} to true
- send "&a&l[!] &aPlease put the amount of money you want to deposit in chat."
- wait 30 seconds
- if {bank.chat.response.%uuid of player%} is set:
- delete {bank.chat.response.%uuid of player%}
- send "&c&l[!] &cRan out of time, please try again."
- wait 1 second
- open (metadata tag "bankerGUI" of player) to player
- else:
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement