Advertisement
Vasture

Punishment Gui -VASTURE

Jun 27th, 2021
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. command /punish [<offlineplayer>]:
  2. trigger:
  3. if arg-1 isn't set:
  4. send "&7You must specify a player!"
  5. else:
  6. set {_ph} to arg-1
  7. set metadata tag "punishmentGUI" of player to chest inventory with 3 rows named "&c&lPunishments"
  8. set slot 0 of (metadata tag "punishmentGUI" of player) to skull of {_ph} named "&3%{_ph}%"
  9. set slot 12 of (metadata tag "punishmentGUI" of player) to stone named ""
  10. set slot 26 of (metadata tag "punishmentGUI" of player) to barrier named "&4Cancel"
  11. open (metadata tag "punishmentGUI" of player) to player
  12.  
  13.  
  14.  
  15.  
  16.  
  17. function compare(1: inventory, 2: inventory) :: boolean:
  18. return false if (name of {_1}) != (name of {_2})
  19. return false if (rows of {_1}) != (rows of {_2})
  20. return false if type of {_1} != type of {_2}
  21. return true
  22.  
  23.  
  24.  
  25. on inventory click:
  26. if compare(metadata tag "punishmentGUI" of player, event-inventory) = true:
  27. cancel event
  28. if index of event-slot is 26:
  29. close inventory of player
  30. if index of event-slot is 12:
  31. cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement