70sOn7

Crates

Nov 25th, 2017
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.28 KB | None | 0 0
  1. on rightclick on a black shulker box:
  2. if {crate.%location of block%} is set:
  3. if player is holding a prismarine shard named "&3Crate Key":
  4. cancel event
  5. remove 1 prismarine shard named "&3Crate Key" from player
  6. chance of 20%:
  7. give player 1 magma cream named "&3Pickaxe Token" with lore "&bRight click to redeem"
  8. send "&7[&6CCrate&7] &7You have received 1 &6Pickaxe Token&7!"
  9. stop
  10. chance of 20%:
  11. make console execute "/eco give %player% 2000"
  12. send "&7[&6CCrate&7] &7You have received &6$2000&7!"
  13. stop
  14. chance of 15%:
  15. give player 2 magma cream named "&3Pickaxe Token" with lore "&bRight click to redeem"
  16. send "&7[&6CCrate&7] &7You have received 2 &6Pickaxe Token&7!"
  17. stop
  18. chance of 15%:
  19. make console execute "/eco give %player% 5000"
  20. send "&7[&6CCrate&7] &7You have received &6$5000&7!"
  21. stop
  22. chance of 8%:
  23. give player 3 magma cream named "&3Pickaxe Token" with lore "&bRight click to redeem"
  24. send "&7[&6CCrate&7] &7You have received 3 &6Pickaxe Token&7!"
  25. stop
  26. chance of 7%:
  27. make console execute "/eco give %player% 10000"
  28. send "&7[&6CCrate&7] &7You have received &6$10000&7!"
  29. stop
  30. chance of 6%:
  31. give player 4 magma cream named "&3Pickaxe Token" with lore "&bRight click to redeem"
  32. send "&7[&6CCrate&7] &7You have received 4 &6Pickaxe Token&7!"
  33. stop
  34. chance of 6%:
  35. make console execute "/eco give %player% 20000"
  36. send "&7[&6CCrate&7] &7You have received &6$20000&7!"
  37. stop
  38. chance of 3%:
  39. apply swiftness 2 to the player
  40. send "&7[&6CCrate&7] &7You have received permanent &6Haste II&7!"
  41. stop
  42. else:
  43. send "&7[&6CCrate&7] You need a &3Crate &7key to use this!"
  44. cancel event
  45.  
  46. on rightclick:
  47. if player is holding a magma cream named "&3Pickaxe Token" with lore "&bRight click to redeem":
  48. remove 1 magma cream named "&3Pickaxe Token" with lore "&bRight click to redeem" from player
  49.  
  50. on leftclick on black shulker box:
  51. if {crate.%location of block%} is set:
  52. if player is sneaking:
  53. if player has permission "server.crates":
  54. delete {crate.%location of block%}
  55. send "&7[&6CCrates&7] &7You have delete a Crate!"
  56. else:
  57. cancel event
  58. open chest with 3 rows named "&3Crate" to player
  59. wait 1 tick
  60. format slot 3 of player with magma cream named "&3Pickaxe Token" with lore "&720 Percent Chance" to be unstealable
  61. format slot 4 of player with paper named "&3$2000" with lore "&720 Percent Chance" to be unstealable
  62. format slot 5 of player with 2 magma cream named "&3Pickaxe Token" with lore "&715 Percent Chance" to be unstealable
  63. format slot 12 of player with paper named "&3$5000" with lore "&715 Percent Chance" to be unstealable
  64. format slot 13 of player with 3 magma cream named "&3Pickaxe Token" with lore "&7 8 Percent Chance" to be unstealable
  65. format slot 14 of player with paper named "&3$10000" with lore "&78 Percent Chance" to be unstealable
  66. format slot 21 of player with 4 magma cream named "&3Pickaxe Token" with lore "&76 Percent Chance" to be unstealable
  67. format slot 22 of player with paper named "&3$20000" with lore "&76 Percent Chance" to be unstealable
  68. format slot 23 of player with glowing wooden pickaxe named "&3Permanent Haste II" with lore "&73 Percent Chance" to be unstealable
  69. format slot 26 of player with redstone named "&7[&6CCrate&7]" with lore "&7Created by: 70sOn7" to be unstealable
  70. else:
  71. cancel event
  72. open chest with 3 rows named "&3Crate" to player
  73. wait 1 tick
  74. format slot 3 of player with magma cream named "&3Pickaxe Token" with lore "&720 Percent Chance" to be unstealable
  75. format slot 4 of player with paper named "&3$2000" with lore "&720 Percent Chance" to be unstealable
  76. format slot 5 of player with 2 magma cream named "&3Pickaxe Token" with lore "&715 Percent Chance" to be unstealable
  77. format slot 12 of player with paper named "&3$5000" with lore "&715 Percent Chance" to be unstealable
  78. format slot 13 of player with 3 magma cream named "&3Pickaxe Token" with lore "&7 8 Percent Chance" to be unstealable
  79. format slot 14 of player with paper named "&3$10000" with lore "&78 Percent Chance" to be unstealable
  80. format slot 21 of player with 4 magma cream named "&3Pickaxe Token" with lore "&76 Percent Chance" to be unstealable
  81. format slot 22 of player with paper named "&3$20000" with lore "&76 Percent Chance" to be unstealable
  82. format slot 23 of player with glowing wooden pickaxe named "&3Permanent Haste II" with lore "&73 Percent Chance" to be unstealable
  83. format slot 26 of player with redstone named "&7[&6CCrate&7]" with lore "&7Created by: 70sOn7" to be unstealable
  84.  
  85. on break of black shulker box:
  86. if player has permission "server.crates":
  87. if {crate.%location of block%} is set:
  88. if player's gamemode is creative:
  89. if player is sneaking:
  90. delete {crate.%location of block%}
  91. send "&7[&6CCrates&7] &7You have delete a Crate!"
  92. else:
  93. cancel event
  94. open chest with 3 rows named "&3Crate" to player
  95. wait 1 tick
  96. format slot 3 of player with magma cream named "&3Pickaxe Token" with lore "&720 Percent Chance" to be unstealable
  97. format slot 4 of player with paper named "&3$2000" with lore "&720 Percent Chance" to be unstealable
  98. format slot 5 of player with 2 magma cream named "&3Pickaxe Token" with lore "&715 Percent Chance" to be unstealable
  99. format slot 12 of player with paper named "&3$5000" with lore "&715 Percent Chance" to be unstealable
  100. format slot 13 of player with 3 magma cream named "&3Pickaxe Token" with lore "&7 8 Percent Chance" to be unstealable
  101. format slot 14 of player with paper named "&3$10000" with lore "&78 Percent Chance" to be unstealable
  102. format slot 21 of player with 4 magma cream named "&3Pickaxe Token" with lore "&76 Percent Chance" to be unstealable
  103. format slot 22 of player with paper named "&3$20000" with lore "&76 Percent Chance" to be unstealable
  104. format slot 23 of player with glowing wooden pickaxe named "&3Permanent Haste II" with lore "&73 Percent Chance" to be unstealable
  105. format slot 26 of player with redstone named "&7[&6CCrate&7]" with lore "&7Created by: 70sOn7" to be unstealable
  106.  
  107. on place:
  108. if player has permission "server.crates":
  109. if lore of player's tool is "&7( | &3Crate Chest &7| )":
  110. set {crate.%location of block%} to true
  111. send "&7[&6CCrates&7] You have placed a Crate!"
  112.  
  113. command /ccrate [<text>]:
  114. trigger:
  115. if player has permission "server.crates":
  116. if arg-1 is not set:
  117. send "&7[&6CCrate&7] &7/crate (Get/Key/Help)"
  118. if arg-1 is set:
  119. if arg-1 is "get":
  120. give player 1 black shulker box named "&3Crate" with lore "&7( | &3Crate Chest &7| )"
  121. send "&7[&6CCrates&7] &7You have gotten a &6Crate&7!"
  122. if arg-1 is "key":
  123. give 1 prismarine shard named "&3Crate Key" to player
  124. send "&7[&6CCrates&7] &7You have been given a &bCrate Key&7!"
  125. if arg-1 is "help":
  126. send "&7[&6CCrate&7] &7/ccrate (Get/Key/Help)"
  127. send " "
  128. send "&7[&6CCrate&7] &7Skripted Crates"
  129. send "&7[&6CCrate&7] &7Created by: 70sOn7"
  130. else:
  131. if arg-1 is not set:
  132. send "&7[&6CCrate&7] &7Skripted Crates"
  133. send "&7[&6CCrate&7] &7Created by: 70sOn7"
  134. if arg-1 is "help":
  135. send "&7[&6CCrate&7] &7Skripted Crates"
  136. send "&7[&6CCrate&7] &7Created by: 70sOn7"
Add Comment
Please, Sign In to add comment