Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. options:
  2. name: "&6Crates System"
  3. on rightclick on jukebox:
  4. cancel event
  5. open chest with 5 rows named {@name} to player
  6. wait a tick
  7. add stone to {_roll::*}
  8. add diamond to {_roll::*}
  9. add diamond sword to {_roll::*}
  10. add dirt to {_roll::*}
  11. add gold block to {_roll::*}
  12. add redstone block to {_roll::*}
  13. add beacon to {_roll::*}
  14. add name tag to {_roll::*}
  15. #!Speed option safety net, so running 0 ticks doesn't crash your server
  16. set {_speedFinal} to 2
  17. set {_Selector1} to 21
  18. set {_Selector2} to 23
  19. loop (random integer between 10 and 40) times:
  20. if inventory name of player's current inventory is not {@name}:
  21. stop
  22. set {_sel} to 5
  23. loop 5 times:
  24. set {_sel2} to {_sel} - 1
  25. set {_item::%{_sel}%} to {_item::%{_sel2}%}
  26. subtract 1 from {_sel}
  27. set {_item::1} to a random element out of {_roll::*}
  28. loop integers between 0 and 44:
  29. if loop-number-2 is {_Selector1} or {_Selector2}:
  30. set slot loop-number-2 of player's current inventory to shiny light green stained glass pane named " "
  31. else:
  32. set slot loop-number-2 of player's current inventory to black stained glass pane named " "
  33. loop 5 times:
  34. set slot -5 + (9 * loop-number-3) of player's current inventory to {_item::%loop-number-3%}
  35. add 1 to {_sound}
  36. if {_sound} > 3:
  37. set {_sound} to 1
  38. if {_sound} = 1:
  39. play note pling at player with pitch 2
  40. if {_sound} = 2:
  41. play note pling at player with pitch 1
  42. if {_sound} = 3:
  43. play note pling at player with pitch 0.5
  44. add 1 to {_speed}
  45. if {_speed} is 5:
  46. set {_speed} to 0
  47. add 1 to {_speedFinal}
  48. loop {_speedFinal} times:
  49. wait a tick
  50. message "You won %slot 22 of player's current inventory%"
  51. give player slot 22 of player's current inventory
  52. on inventory click:
  53. if inventory name of player's current inventory is {@name}:
  54. cancel event
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement