Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.08 KB | None | 0 0
  1. options:
  2. none: &7[&cToken &6Shop&7] You don't have enough tokens!
  3. prefix: &7[&cToken &6Shop&7]
  4.  
  5. on skript load:
  6. set {sm::stone} to cobblestone
  7. set {sm::coal ore} to coal
  8. set {sm::lapis lazuli ore} to 4 lapis lazuli
  9. set {sm::diamond ore} to 1 diamond
  10. set {smelt::*} to stone, coal ore, lapis lazuli ore and diamond ore
  11.  
  12. on mine:
  13. if lore of player's tool contains "Explosive ":
  14. loop all blocks in radius ({expl::%player's uuid%} + 2):
  15. if loop-block is not barrier, command block, repeating command block, chain command block or bedrock:
  16. if {smelt::*} doesn't contain loop-block:
  17. give player loop-block
  18. set loop-block to air
  19. if {tokm::%player's uuid%} is not 9:
  20. add 1 to {tokm::%player's uuid%}
  21. else:
  22. set {_tokm::%player's uuid%} to 0
  23. add 1 to {tokens::%player's uuid%}
  24. else:
  25. give player {sm::%type of loop-block%}
  26. else:
  27. continue loop
  28. else if lore of player's tool contains "Luck ":
  29. send "hi"
  30. else:
  31. if {tokm::%player's uuid%} is not 9:
  32. add 1 to {tokm::%player's uuid%}
  33. else:
  34. set {tokm::%player's uuid%} to 0
  35. add 1 to {tokens::%player's uuid%}
  36.  
  37.  
  38. command tokenshop:
  39. trigger:
  40. if player's tool is a pickaxe:
  41. open virtual chest with 6 rows to player
  42. loop integers between 0 and 53:
  43. format gui slot loop-int of player with gray stained glass pane named " " to do nothing
  44. format gui slot 13 of player with player's tool to do nothing
  45. format gui slot 29 of player with quartz block named "&aFortune" with lore "&7You &areceive &7more items!" and "&8Price: &71000 Tokens" to run:
  46. if {tokens::%player's uuid%} >= 1000:
  47. if player's tool is enchanted with fortune:
  48. set {_pick::%player%} to player's tool
  49. set {_ench} to "fortune %level of fortune of player's tool + 1%" parsed as enchantment type
  50. set player's tool to air
  51. enchant {_pick::%player%} with {_ench}
  52. set player's tool to {_pick::%player%}
  53. remove 1000 from {tokens::%player's uuid%}
  54. send "{@prefix} You upgraded your Fortune enchantment!"
  55. else:
  56. remove 1000 from {tokens::%player's uuid%}
  57. enchant player's tool with fortune 1
  58. send "{@prefix} You upgraded your Fortune enchantment!"
  59. else:
  60. send "{@none}"
  61. format gui slot 30 of player with diamond pickaxe named "&aDigspeed" with lore "&7You can now &amine &7faster when you &aupgrade &7this!" and "&8Price: &72000 Tokens" to run:
  62. if {tokens::%player's uuid%} >= 2000:
  63. if player's tool is enchanted with efficiency:
  64. set {_pick::%player%} to player's tool
  65. set {_ench} to "efficiency %level of efficiency of player's tool + 1%" parsed as enchantment type
  66. set player's tool to air
  67. enchant {_pick::%player%} with {_ench}
  68. set player's tool to {_pick::%player%}
  69. remove 2000 from {tokens::%player's uuid%}
  70. send "{@prefix} You upgraded your Digspeed enchantment!"
  71. else:
  72. remove 2000 from {tokens::%player's uuid%}
  73. enchant player's tool with efficiency 1
  74. send "{@prefix} You upgraded your Digspeed enchantment!"
  75. else:
  76. send "{@none}"
  77. format gui slot 31 of player with anvil named "&aUnbreaking" with lore "&7You can &2avoid &7the chances of your pickaxe breaking!" and "&8Price: &71500 Tokens" to run:
  78. if {tokens::%player's uuid%} is greater than or equal to 1500:
  79. if player's tool is enchanted with unbreaking:
  80. set {_pick::%player%} to player's tool
  81. set {_ench} to "unbreaking %level of unbreaking of player's tool + 1%" parsed as enchantment type
  82. set player's tool to air
  83. enchant {_pick::%player%} with {_ench}
  84. set player's tool to {_pick::%player%}
  85. remove 1500 from {tokens::%player's uuid%}
  86. send "{@prefix} You upgraded your Unbreaking enchantment!"
  87. else:
  88. remove 1500 from {tokens::%player's uuid%}
  89. enchant player's tool with unbreaking 1
  90. send "{@prefix} You upgraded your Unbreaking enchantment!"
  91. else:
  92. send "{@none}"
  93. format gui slot 32 of player with sunflower named "&aLucky" with lore "&7You'll have a better &dchance &7of findind more &dtokens&7!" and "&8Price: &74000 Tokens" to run:
  94. if {tokens::%player's uuid%} >= 4000:
  95. if {luck::%player's uuid%} < 5:
  96. remove 4000 from {tokens::%player's uuid%}
  97. add 1 to {luck::%player's uuid%}
  98. if lore of player's tool contains "Luck %{luck::%player's uuid%}%":
  99. loop integers between 1 and 25:
  100. if line loop-int of lore of player's tool is "Luck %{luck::%player's uuid%}%":
  101. set line loop-int of lore of player's tool to ""
  102. add 1 to {_luck::%player's uuid%}
  103. set line loop-int of lore of player's tool to "Luck %{luck::%player's uuid%}%"
  104. send "{@prefix} You upgraded your Luck enchantment!"
  105. stop loop
  106. else:
  107. loop integers between 1 and 25:
  108. if line loop-int of lore of player's tool isn't set:
  109. set line loop-int of lore of player's tool to "Luck %{luck::%player's uuid%}%"
  110. send "{@prefix} You got the Luck enchantment!"
  111. stop loop
  112. else:
  113. send "{@prefix} Your Luck enchantment is maxed out!"
  114. else:
  115. send "{@none}"
  116. format gui slot 33 of player with tnt named "&aExplosive" with lore "&7You'll have a &cchance &7to create an &cexplosion &7while mining" and "&8Price: &75000 Tokens" to run:
  117. if {tokens::%player's uuid%} >= 5000:
  118. if {expl::%player's uuid%} < 5:
  119. remove 5000 from {tokens::%player's uuid%}
  120. add 1 to {expl::%player's uuid%}
  121. if lore of player's tool contains "Explosive ":
  122. replace "Explosive %{expl::%player's uuid%}%" in lore of player's tool with "Explosive {expl::%player's uuid%}"
  123. send "{@prefix} You upgraded your Explosive enchantment!"
  124. else:
  125. loop integers between 1 and 25:
  126. if line loop-int of lore of player's tool isn't set:
  127. set line loop-int of lore of player's tool to "Explosive {expl::%player's uuid%}"
  128. send "{@prefix} You got the Explosive enchantment!"
  129.  
  130. else:
  131. send "{@prefix} Your Explosive enchantment is maxed out!"
  132. else:
  133. send "{@none}"
  134. format gui slot 34 of player with diamond hoe named "&aKeyfinder" with lore "&7You'll have the &bchance &7to &breceive &7keys whilst mining!" and "&8Price: &77000 Tokens" to run:
  135. if {tokens::%player's uuid%} >= 7000:
  136. if {keyf::%player's uuid%} < 5:
  137. remove 7000 from {tokens::%player's uuid%}
  138. add 1 to {luck::%player's uuid%}
  139. if lore of player's tool contains "Keyfinder ":
  140. replace "Keyfinder %{keyf::%player's uuid%}%" in lore of player's tool with "Keyfinder {keyf::%player's uuid%}"
  141. send "{@prefix} You upgraded your Keyfinder enchantment!"
  142. else:
  143. loop integers between 1 and 25:
  144. if line loop-int of lore of player's tool isn't set:
  145. set line loop-int of lore of player's tool to "Keyfinder {keyf::%player's uuid%}"
  146. send "{@prefix} You got the Keyfinder enchantment!"
  147. else:
  148. send "{@prefix} Your Keyfinder enchantment is maxed out!"
  149. else:
  150. send "{@none}"
  151. command token <text> <player> <int>:
  152. usage: {@prefix} /token pay <player> <amount>
  153. trigger:
  154. if arg-text is "pay":
  155. if arg-int > 0:
  156. if {tokens::%player's uuid%} >= arg-int:
  157. remove arg-int from {tokens::%player's uuid%}
  158. add arg-int to {tokens::%arg-player's uuid%}
  159. send "{@prefix} You gave %arg-player% &7%arg-int% &7tokens!"
  160. send "{@prefix} %player% &7gave you %arg-int% &7tokens!" to arg-player
  161. else:
  162. send "{@prefix} You do not have enough tokens!"
  163. else:
  164. send "{@prefix} Put a number that is higher than 0!"
  165. else:
  166. send "{@prefix} Unknown command, do /token pay <player> <amount>"
  167. command settoken <int>:
  168. permission: admin.st
  169. trigger:
  170. set {tokens::%player's uuid%} to arg-integer
  171. send "{@prefix} Successfully set tokens to %arg-int%&7!"
  172. command resetstuff:
  173. permission: admin.rs
  174. aliases: /rf
  175. trigger:
  176. set {luck::%player's uuid%} to 0
  177. set {expl::%player's uuid%} to 0
  178. set {keyf::%player's uuid%} to 0
  179. send "{@prefix} Successfully reset Luck, Explosion and Keyfinder!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement