Guest User

Untitled

a guest
Apr 12th, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. variables:
  2. {diamonds.%player%}=0
  3. {rand}=0
  4. {count}=0
  5. {balance}=false
  6. command /balance:
  7. description:Enables Balance
  8. permission:skript.op
  9. trigger:
  10. broadcast "<orange>Balance has been enabled"
  11. set {balance} to true
  12. loop all players:
  13. set {diamonds.%loop-player%} to 0
  14. command /unbalance:
  15. description:Disable Balance
  16. permission:skript.op
  17. trigger:
  18. broadcast "<orange>Balance has been disabled"
  19. set {balance} to false
  20. loop all players:
  21. set {diamonds.%loop-player%} to 0
  22. on mine of diamond ore:
  23. if {balance} is true:
  24. if {diamonds.%player%} is greater than 4:
  25. set {count} to ({diamonds.%player%}-3)
  26. set {rand} to a random integer between 1 and {count}
  27. if {rand} is not 1:
  28. cancel event
  29. delete block
  30. if {rand} is 1:
  31. add 1 to {diamonds.%player%}
  32. add 1 to {count}
  33. send "<orange>Diamonds now have a 1/%{count}% chance to drop!" to player
  34. if {diamonds.%player%} is less than 5:
  35. add 1 to {diamonds.%player%}
  36. if {diamonds.%player%} is 5:
  37. send "<orange>Uh oh! Diamonds might disappear when mined now!" to player
Advertisement
Add Comment
Please, Sign In to add comment