Zeldaboy111

ATM (2) ]|[ Skript #308

May 3rd, 2020
89
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. on enable:
  12. set {atm.guiItems::*} to diamond block, gold block, iron block, gold ingot, iron ingot, gold nugget, iron nugget
  13. set {atm.guiWorth::*} to 1000, 500, 100, 50, 10, 2 and 1
  14.  
  15. function drawOutline(p: Player, mat: Material, rows: Number):
  16. loop 9 times:
  17. set slot loop-value - 1 of {_p}'s current inventory to {_mat} named "&8"
  18. set slot ({_rows}*9) - loop-value of {_p}'s current inventory to {_mat} named "&8"
  19.  
  20. loop {_rows} times:
  21. set slot loop-value * 9 of {_p}'s current inventory to {_mat} named "&8"
  22. set slot loop-value * 9 - 1 of {_p}'s current inventory to {_mat} named "&8"
  23.  
  24. function drawBalance(p: Player):
  25. set {_balance} to {balance.atm.%{_p}%}
  26.  
  27. set {_slot} to 10
  28. loop {atm.guiWorth::*}:
  29. set {_amount} to 0
  30. set {_worth} to 0
  31. while {_balance} >= loop-value:
  32. add 1 to {_amount}
  33. add loop-value to {_worth}
  34. remove
Add Comment
Please, Sign In to add comment