Zeldaboy111

ATM (1) ]|[ Skript #307

Apr 30th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. #©
  2. #- Reselling/Reuploading while claiming that it is yours or made by you is disallowed
  3. #- Do not edit it and upload it as your own
  4. #- While using it in a video, please feature everything under "Video"
  5. #©
  6. #
  7. #Video:
  8. #Skript made by Zeldaboy111
  9. #More content of the creator: https://forums.skunity.com/search/26443679/
  10. options:
  11. starterBalance: 2000
  12.  
  13. function drawOutline(p: Player, mat: Material, rows: Number):
  14. loop 9 times:
  15. set slot loop-value - 1 of {_p}'s current inventory to {_mat} named "&8"
  16. set slot ({_rows}*9) - loop-value of {_p}'s current inventory to {_mat} named "&8"
  17.  
  18. loop {_rows} times:
  19. set slot loop-value * 9 of {_p}'s current inventory to {_mat} named "&8"
  20. set slot loop-value * 9 - 1 of {_p}'s current inventory to {_mat} named "&8"
  21.  
  22. function drawBalance(p: Player):
  23.  
  24.  
  25. command /atm:
  26. trigger:
  27. open chest with 5 rows named "&cATM %player%" to player
  28. wait 2 ticks
  29. drawOutline(player, gray stained glass pane, 5)
  30. drawBalance(player)
  31.  
  32. on join:
  33. if {balance.atm.%player%} is not set:
  34. set {balance.atm.%player%} to 2000
  35.  
  36. on inventory click:
  37. if type of clicked inventory is chest inventory:
  38. if inventory name of clicked inventory is "&cATM %player%":
  39. cancel event
Add Comment
Please, Sign In to add comment