Advertisement
Vasture

Banker Gui ~ Vasture

Jun 27th, 2021
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. command /banker:
  2. trigger:
  3. if {bank::%{uuid}%} is null:
  4. set {bank::%{uuid}%} to 0
  5. else:
  6. set {_p} to "%player%" parsed as player
  7. set metadata tag "bankerGUI" of player to chest inventory with 3 rows named "&e&lBanker"
  8. set slot 0 of metadata tag "bankerGUI" of player to skull of {_p} named "&3%player%"
  9. set slot 12 of metadata tag "bankerGUI" of player to paper named "&a&lWithdraw"
  10. set slot 14 of metadata tag "bankerGUI" of player to paper named "&c&lDeposit"
  11. 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}%}%"
  12. open (metadata tag "bankerGUI" of player) to player
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19. on inventory click:
  20. if compare(metadata tag "bankerGUI" of player, event-inventory) = true:
  21. cancel event
  22. if event-slot is 12:
  23. close inventory of player
  24. set {bank.chat.response.1.%uuid of player%} to true
  25. send "&a&l[!] &aPlease put the amount of money you want to withdraw in chat."
  26. wait 30 seconds
  27. if {bank.chat.response.1.%uuid of player%} is set:
  28. delete {bank.chat.response.1.%uuid of player%}
  29. send "&c&l[!] &cRan out of time, please try again."
  30. wait 1 second
  31. open (metadata tag "bankerGUI" of player) to player
  32. else:
  33. stop
  34. if index of event-slot is 14:
  35. close inventory of player
  36. set {bank.chat.response.%uuid of player%} to true
  37. send "&a&l[!] &aPlease put the amount of money you want to deposit in chat."
  38. wait 30 seconds
  39. if {bank.chat.response.%uuid of player%} is set:
  40. delete {bank.chat.response.%uuid of player%}
  41. send "&c&l[!] &cRan out of time, please try again."
  42. wait 1 second
  43. open (metadata tag "bankerGUI" of player) to player
  44. else:
  45. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement