Zeldaboy111

ATM (1) ]|[ Skript #307

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