Advertisement
Cool_Colton

Untitled

Aug 4th, 2020
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 0
  1. on right click on chest:
  2. if event-block is south facing chest:
  3. set {_facing} to south
  4. else if event-block is north facing chest:
  5. set {_facing} to north
  6. else if event-block is east facing chest:
  7. set {_facing} to east
  8. else if event-block is west facing chest:
  9. set {_facing} to west
  10. cancel event
  11. set {_d} to location of event-block
  12. set {_d} to rounded {_d}
  13. create new gui with id "crate" with virtual chest named " &8>=&b&lCRATES&8=<" with 5 rows
  14. open gui with id "crate" to player
  15. loop all integers between 0 and 21:
  16. format gui slot loop-value-2 of player with gray glass panes named ""
  17. loop all integers between 22 and 23:
  18. format gui slot loop-value-2 of player with gray glass panes named ""
  19. loop all integers between 25 and 25:
  20. format gui slot loop-value-2 of player with gray glass panes named ""
  21. loop all integers between 27 and 58:
  22. format gui slot loop-value-2 of player with gray glass panes named ""
  23. set {_t} to x coordinate of event-block
  24. set {_d} to y coordinate of event-block
  25. set {_g} to z coordinate of event-block
  26. set {_nochange} to location of event-block
  27. set {_nochange} to rounded {_nochange}
  28. set {_p} to player
  29. format gui slot 20 of player with chest named "&aRookie Crate &8(%{crates::rookie::%player's uuid%}%)" to close:
  30. if {crates::rookie::%player's uuid%} is more than 0:
  31. add 1 to {_d}
  32. if {_facing} is south:
  33. add 1.5 to {_t}
  34. set {_h} to location({_t}, {_d}, {_g}, world "world", 180)
  35. summon a armor stand at {_h}
  36. add "{Invisible:1b,Invulnerable:1b,ArmorItems:[{},{},{},{id:""diamond_sword"",Count:1b}],HandItems:[{},{}],Pose:{Head:[0f,0f,110f]}}" to nbt of last spawned entity
  37. set {_o} to last spawned entity
  38. whileAlive({_o})
  39. subtract 3 from {_t}
  40. add 0.5 to {_g}
  41. set {_h} to location({_t}, {_d}, {_g}, world "world")
  42. summon a armor stand at {_h}
  43. add "{Invisible:1b,Invulnerable:1b,ArmorItems:[{},{},{},{id:""diamond_sword"",Count:1b}],HandItems:[{},{}],Pose:{Head:[0f,0f,110f]}}" to nbt of last spawned entity
  44. set {_o2} to last spawned entity
  45. whileAlive({_o2})
  46. loop 7 times:
  47. push {_o} down with force 0.16
  48. push {_o} west with force 0.0068
  49. push {_o2} down with force 0.16
  50. push {_o2} east with force 0.0068
  51. wait 1 tick
  52. play chest open animation at block at {_nochange} for all players
  53. wait 1.5 seconds
  54. kill {_o}
  55. kill {_o2}
  56. wait 3.5 seconds
  57. play chest close animation at block at {_nochange} for all players
  58. else:
  59. send "You do not have a key for this crate"
  60. format gui slot 22 of player with chest named "&aAncient Crate &8(%{crates::ancient::%player's uuid%}%)" to close:
  61. if {crates::rookie::%player's uuid%} is more than 0:
  62. play chest open animation at block at {_nochange} for all players
  63. wait 10 seconds
  64. play chest close animation at block at {_nochange} for all players
  65. else:
  66. send "You do not have a key for this crate"
  67. format gui slot 24 of player with chest named "&aMythical Crate &8(%{crates::mythical::%player's uuid%}%)" to close:
  68. if {crates::rookie::%player's uuid%} is more than 0:
  69. play chest open animation at block at {_nochange} for all players
  70. wait 10 seconds
  71. play chest close animation at block at {_nochange} for all players
  72. else:
  73. send "You do not have a key for this crate"
  74.  
  75.  
  76. command /bye:
  77. trigger:
  78. loop all entities in a radius of 5 around player:
  79. if loop-entity is a armor stand:
  80. kill loop-entity
  81.  
  82. on left click on chest:
  83. cancel event
  84. play chest open animation at event-block for player
  85. wait 10 seconds
  86. play chest close animation at event-block for player
  87.  
  88. command /setcrates <player> <text> <integer>:
  89. permission: set.crates
  90. trigger:
  91. set {crates::%arg 2%::%arg-1's uuid%} to arg 3
  92.  
  93. on join:
  94. if {crates::rookie::%player's uuid%} is not set:
  95. set {crates::rookie::%player's uuid%} to 0
  96. if {crates::ancient::%player's uuid%} is not set:
  97. set {crates::ancient::%player's uuid%} to 0
  98. if {crates::mythical::%player's uuid%} is not set:
  99. set {crates::mythical::%player's uuid%} to 0
  100.  
  101.  
  102. command /itemset <text> <
  103.  
  104. function whileAlive(E: entity):
  105. while {_E} is alive:
  106. set {_V} to velocity of {_E}
  107. set velocity of {_E} to vector(x of {_V}, 0, z of {_V})
  108. wait 1 tick
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement