Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.41 KB | None | 0 0
  1. on break:
  2. cancel drops
  3. if event-block is grass block or sand block:
  4. set event-block to event-block
  5. if event-block is grass block:
  6. set {block} to 1
  7. else if event-block is sand block:
  8. set {block} to 5
  9. if {fortlvl::%player's uuid%} is not 0:
  10. set {_val} to floor({block} * "%{fortlvl::%player's uuid%}%" parsed as number + 1)
  11. add {_val} to {balance::%player's uuid%}
  12. send action bar "&8&l+ &a&l%{_val}% &8&l: &8&lBalance&0&l: &a&l£%{balance::%player's uuid%}%" to player
  13. set event-block to event-block
  14. if {lucklvl::%player's uuid%} is not 0:
  15. if {fortlvl::%player's uuid%} is 0:
  16. add {block} to {balance::%player's uuid%}
  17. send action bar "&8&l+ &a&l%{block}% &8&l: &8&lBalance&0&l: &a&l£%{balance::%player's uuid%}%" to player
  18. set event-block to event-block
  19. set {_chance} to floor(1 * "%{lucklvl::%player's uuid%}%" parsed as number)
  20. chance of {_chance}%:
  21. set {_reward} to random integer between 500 and 10000
  22. add {_reward} to {balance::%player's uuid%}
  23. send "&5&lLucky: &d+%{_reward}%" to player
  24. if {cratelvl::%player's uuid%} is not 0:
  25. if {fortlvl::%player's uuid%} is 0:
  26. add {block} to {balance::%player's uuid%}
  27. send action bar "&8&l+ &a&l%{block}% &8&l: &8&lBalance&0&l: &a&l£%{balance::%player's uuid%}%" to player
  28. set event-block to event-block
  29. set {_chance} to 0.25 * "%{cratelvl::%player's uuid%}%" parsed as number
  30. chance of {_chance}%:
  31. chance of 50%:
  32. set {_reward} to nether star named "&1&lCommon Crate"
  33. set line 1 of {_reward}'s lore to "&9Right click to redeem"
  34. give 1 of {_reward} to player
  35. send "&1&lCrates: &9+ 1 Common Crate" to player
  36. chance of 25%:
  37. set {_reward} to nether star named "&1&lUncommon Crate"
  38. set line 1 of {_reward}'s lore to "&9Right click to redeem"
  39. give 1 of {_reward} to player
  40. send "&1&lCrates: &9+ 1 Uncommon Crate" to player
  41. chance of 10%:
  42. set {_reward} to nether star named "&1&lRare Crate"
  43. set line 1 of {_reward}'s lore to "&9Right click to redeem"
  44. give 1 of {_reward} to player
  45. send "&1&lCrates: &9+ 1 Rare Crate" to player
  46. chance of 2.5%:
  47. set {_reward} to nether star named "&1&lEpic Crate"
  48. set line 1 of {_reward}'s lore to "&9Right click to redeem"
  49. give 1 of {_reward} to player
  50. send "&1&lCrates: &6+ 1 Epic Crate" to player
  51. if {fortlvl::%player's uuid%} and {lucklvl::%player's uuid%} and {cratelvl::%player's uuid%} is 0:
  52. add {block} to {balance::%player's uuid%}
  53. send action bar "&8&l+ &a&l%{block}% &8&l: &8&lBalance&0&l: &a&l£%{balance::%player's uuid%}%" to player
  54. set event-block to event-block
  55. if player does not have permission "op":
  56. if event-block is not grass block or sand block:
  57. cancel event
  58. send "&cYou cannot break that!" to player
  59.  
  60. on right click:
  61. if player's tool is shovel:
  62. cancel event
  63. sender command "enchant"
  64. if player's tool is nether star:
  65. set {_name} to name of player's tool
  66. if {_name} contains "Common Crate":
  67. remove 1 of player's tool from player's inventory
  68. set {_reward} to random integer between 100 and 2000
  69. add {_reward} to {balance::%player's uuid%}
  70. send "&9+ %{_reward}%" to player
  71. if {_name} contains "Uncommon Crate":
  72. remove 1 of player's tool from player's inventory
  73. set {_reward} to random integer between 2000 and 10000
  74. add {_reward} to {balance::%player's uuid%}
  75. send "&9+ %{_reward}%" to player
  76. if {_name} contains "Rare Crate":
  77. remove 1 of player's tool from player's inventory
  78. set {_reward} to random integer between 10000 and 20000
  79. add {_reward} to {balance::%player's uuid%}
  80. send "&9+ %{_reward}%" to player
  81. if {_name} contains "Epic Crate":
  82. remove 1 of player's tool from player's inventory
  83. set {_reward} to random integer between 20000 and 100000
  84. add {_reward} to {balance::%player's uuid%}
  85. send "&6+ %{_reward}%" to player
  86.  
  87. command /enchant:
  88. trigger:
  89. open virtual chest inventory with size 4 named "&8&lEnchanter" to player
  90. set {_n} to 0
  91. loop 36 times:
  92. make gui slot {_n} of player with light gray stained glass pane named " " to do nothing
  93. add 1 to {_n}
  94. set {_slot} to glowing gold pickaxe named "&6&lEfficiency"
  95. set line 1 of {_slot}'s lore to "&8Cost: &e%{effcost::%player's uuid%}%"
  96. set line 2 of {_slot}'s lore to "&8Level: &e%{efflvl::%player's uuid%}%"
  97. set line 3 of {_slot}'s lore to "&8Max Level: &e5"
  98. make gui slot 10 of player with {_slot} to run:
  99. if {balance::%player's uuid%} is greater than or equal to {effcost::%player's uuid%}:
  100. if {efflvl::%player's uuid%} is less than 5:
  101. add 1 to {efflvl::%player's uuid%}
  102. enchant player's tool with "Efficiency %{efflvl::%player's uuid%}%" parsed as enchantment type
  103. subtract {effcost::%player's uuid%} from {balance::%player's uuid%}
  104. set {_bal} to floor("%{effcost::%player's uuid%}%" parsed as number * 3)
  105. set {effcost::%player's uuid%} to {_bal}
  106. sender command "enchant"
  107. else:
  108. send "&cYou have maxed this enchant!" to player
  109. else:
  110. send "&cInsufficient Funds" to player
  111. set {_slot} to emerald with name "&2&lFortune"
  112. set line 1 of {_slot}'s lore to "&8Cost: &a%{fortcost::%player's uuid%}%"
  113. set line 2 of {_slot}'s lore to "&8Level: &a%{fortlvl::%player's uuid%}%"
  114. set line 3 of {_slot}'s lore to "&8Max Level: &a3"
  115. make gui slot 12 of player with {_slot} to run:
  116. if {balance::%player's uuid%} is greater than or equal to {fortcost::%player's uuid%}:
  117. if {fortlvl::%player's uuid%} is less than 3:
  118. add 1 to {fortlvl::%player's uuid%}
  119. #enchant player's tool with "Efficiency %{efflvl::%player's uuid%}%" parsed as enchantment type
  120. subtract {fortcost::%player's uuid%} from {balance::%player's uuid%}
  121. set {_bal} to floor("%{fortcost::%player's uuid%}%" parsed as number * 4)
  122. set {fortcost::%player's uuid%} to {_bal}
  123. sender command "enchant"
  124. else:
  125. send "&cYou have maxed this enchant!" to player
  126. else:
  127. send "&cInsufficient Funds" to player
  128. set {_slot} to totem of undying with name "&5&lLucky"
  129. set line 1 of {_slot}'s lore to "&8Cost: &d%{luckcost::%player's uuid%}%"
  130. set line 2 of {_slot}'s lore to "&8Level: &d%{lucklvl::%player's uuid%}%"
  131. set line 3 of {_slot}'s lore to "&8Max Level: &d10"
  132. make gui slot 14 of player with {_slot} to run:
  133. if {balance::%player's uuid%} is greater than or equal to {luckcost::%player's uuid%}:
  134. if {lucklvl::%player's uuid%} is less than 10:
  135. add 1 to {lucklvl::%player's uuid%}
  136. #enchant player's tool with "Efficiency %{efflvl::%player's uuid%}%" parsed as enchantment type
  137. subtract {luckcost::%player's uuid%} from {balance::%player's uuid%}
  138. set {_bal} to floor("%{luckcost::%player's uuid%}%" parsed as number * 2)
  139. set {luckcost::%player's uuid%} to {_bal}
  140. sender command "enchant"
  141. else:
  142. send "&cYou have maxed this enchant!" to player
  143. else:
  144. send "&cInsufficient Funds" to player
  145. set {_slot} to chest with name "&1&lCrate Finder"
  146. set line 1 of {_slot}'s lore to "&8Cost: &9%{cratecost::%player's uuid%}%"
  147. set line 2 of {_slot}'s lore to "&8Level: &9%{cratelvl::%player's uuid%}%"
  148. set line 3 of {_slot}'s lore to "&8Max Level: &910"
  149. make gui slot 16 of player with {_slot} to run:
  150. if {balance::%player's uuid%} is greater than or equal to {cratecost::%player's uuid%}:
  151. if {cratelvl::%player's uuid%} is less than 10:
  152. add 1 to {cratelvl::%player's uuid%}
  153. #enchant player's tool with "Efficiency %{efflvl::%player's uuid%}%" parsed as enchantment type
  154. subtract {cratecost::%player's uuid%} from {balance::%player's uuid%}
  155. set {_bal} to floor("%{cratecost::%player's uuid%}%" parsed as number * 2)
  156. set {cratecost::%player's uuid%} to {_bal}
  157. sender command "enchant"
  158. else:
  159. send "&cYou have maxed this enchant!" to player
  160. else:
  161. send "&cInsufficient Funds" to player
  162. set {_slot} to red stained glass pane named "&8&lDescription"
  163. set line 1 of {_slot}'s lore to "&8Name: &6Efficiency"
  164. set line 2 of {_slot}'s lore to "&7Increases the speed at which blocks are broken."
  165. make gui slot 19 of player with {_slot} to do nothing
  166. set line 1 of {_slot}'s lore to "&8Name: &6Fortune"
  167. set line 2 of {_slot}'s lore to "&7Increases the value of each block broken."
  168. make gui slot 21 of player with {_slot} to do nothing
  169. set line 1 of {_slot}'s lore to "&8Name: &6Lucky"
  170. set line 2 of {_slot}'s lore to "&7Chance to get a sum of money with each block broken."
  171. set line 3 of {_slot}'s lore to "&7Each level is a 1 percent increase in chance"
  172. make gui slot 23 of player with {_slot} to do nothing
  173. set line 1 of {_slot}'s lore to "&8Name: &6Efficiency"
  174. set line 2 of {_slot}'s lore to "&7Chance to find a crate with each block broken."
  175. set line 3 of {_slot}'s lore to "&7Each level is a 0.25 percent increase in chance"
  176. make gui slot 25 of player with {_slot} to do nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement