Advertisement
Guest User

sad boi needs help

a guest
Dec 13th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.23 KB | None | 0 0
  1. command /gen:
  2. permission: *
  3. trigger:
  4. give player 1 white stained glass named "&7Tier &f1 &7Generator" with lore "&6Place to earn cash!"
  5.  
  6. on place:
  7. if {place::%player%} = {max::%player%}:
  8. send "&cYou can't place any more gens!"
  9. cancel event
  10. else:
  11. set {playerblock::%player%} to player
  12. if event-block is white stained glass:
  13. add 1 to {block::%player%}
  14. add 1 to {place::%player%}
  15. set {generator::%player%} to event-location
  16. if {otherblock::%player%} is set:
  17. set {otherblock2::%player%} to "white stained glass"
  18. else:
  19. set {otherblock::%player%} to "white stained glass"
  20. else if event-block is cyan stained glass:
  21. add 3 to {block::%player%}
  22. add 1 to {place::%player%}
  23. set {genowner::%event-location%} to player
  24. else if event-block is light blue stained glass:
  25. add 5 to {block::%player%}
  26. add 1 to {place::%player%}
  27. set {genowner::%event-location%} to player
  28. else if event-block is blue stained glass:
  29. add 7 to {block::%player%}
  30. add 1 to {place::%player%}
  31. set {genowner::%event-location%} to player
  32. else if event-block is green stained glass:
  33. add 10 to {block::%player%}
  34. add 1 to {place::%player%}
  35. set {genowner::%event-location%} to player
  36. else if event-block is lime stained glass:
  37. add 12 to {block::%player%}
  38. add 1 to {place::%player%}
  39. set {genowner::%event-location%} to player
  40. else if event-block is magenta stained glass:
  41. add 14 to {block::%player%}
  42. add 1 to {place::%player%}
  43. set {genowner::%event-location%} to player
  44. else if event-block is red stained glass:
  45. add 16 to {block::%player%}
  46. add 1 to {place::%player%}
  47. set {genowner::%event-location%} to player
  48. else if event-block is orange stained glass:
  49. add 18 to {block::%player%}
  50. add 1 to {place::%player%}
  51. set {genowner::%event-location%} to player
  52. else if event-block is yellow stained glass:
  53. add 20 to {block::%player%}
  54. add 1 to {place::%player%}
  55. set {genowner::%event-location%} to player
  56.  
  57.  
  58.  
  59. on join:
  60. if {max::%player%} is not set:
  61. set {max::%player%} to 2
  62. if {place::%player%} is not set:
  63. set {place::%player%} to 0
  64.  
  65. on break:
  66. if event-block is white stained glass:
  67. cancel event
  68. send "&cYou cannot break this block!"
  69. else if event-block is cyan stained glass:
  70. cancel event
  71. send "&cYou cannot break this block!"
  72.  
  73. on right click:
  74. set {_block} to location of event-block
  75. if event-block is white stained glass:
  76. open virtual chest inventory with size 3 named "&8&lGen" to player
  77. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  78. set block at {_block} to air
  79. send "&aPicked up Gen!"
  80. subtract 1 from {block::%player%}
  81. give player 1 white stained glass named "&7Tier &f1 &7Generator" with lore "&6Place to earn cash!"
  82. if {place::%player%} = 0:
  83. stop
  84. else:
  85. subtract 1 from {place::%player%}
  86. format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$500" to close:
  87. if balance of player >= 500:
  88. subtract 500 from balance of player
  89. send "&a$500 &7has been taken from your account!"
  90. give player 1 cyan stained glass named "&7Tier &f2 &7Generator" with lore "&6Place to earn cash!"
  91. set block at {_block} to air
  92. subtract 1 from {block::%player%}
  93. else:
  94. send "&cYou don't have enough money!"
  95. else if event-block is cyan stained glass:
  96. open virtual chest inventory with size 3 named "&8&lGen" to player
  97. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  98. set block at {_block} to air
  99. subtract 3 from {block::%player%}
  100. send "&aPicked up Gen!"
  101. give player 1 cyan stained glass named "&7Tier &f2 &7Generator" with lore "&6Place to earn cash!"
  102. if {place::%player%} = 0:
  103. stop
  104. else:
  105. subtract 1 from {place::%player%}
  106. format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$2,000" to close:
  107. if balance of player >= 2000:
  108. subtract 2000 from balance of player
  109. send "&a$2,000 &7has been taken from your account!"
  110. give player 1 light blue stained glass named "&7Tier &f3 &7Generator" with lore "&6Place to earn cash!"
  111. set block at {_block} to air
  112. subtract 3 from {block::%player%}
  113. else:
  114. send "&cYou don't have enough money!"
  115. else if event-block is light blue stained glass:
  116. open virtual chest inventory with size 3 named "&8&lGen" to player
  117. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  118. set block at {_block} to air
  119. subtract 5 from {block::%player%}
  120. send "&aPicked up Gen!"
  121. give player 1 light blue stained glass named "&7Tier &f3 &7Generator" with lore "&6Place to earn cash!"
  122. if {place::%player%} = 0:
  123. stop
  124. else:
  125. subtract 1 from {place::%player%}
  126. format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$4,000" to close:
  127. if balance of player >= 4000:
  128. subtract 4000 from balance of player
  129. send "&a$4,000 &7has been taken from your account!"
  130. give player 1 blue stained glass named "&7Tier &f4 &7Generator" with lore "&6Place to earn cash!"
  131. set block at {_block} to air
  132. subtract 5 from {block::%player%}
  133. else:
  134. send "&cYou don't have enough money!"
  135. else if event-block is blue stained glass:
  136. open virtual chest inventory with size 3 named "&8&lGen" to player
  137. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  138. set block at {_block} to air
  139. subtract 7 from {block::%player%}
  140. send "&aPicked up Gen!"
  141. give player 1 blue stained glass named "&7Tier &f4 &7Generator" with lore "&6Place to earn cash!"
  142. if {place::%player%} = 0:
  143. stop
  144. else:
  145. subtract 1 from {place::%player%}
  146. format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$15,000" to close:
  147. if balance of player >= 2000:
  148. subtract 15000 from balance of player
  149. send "&a$15,000 &7has been taken from your account!"
  150. give player 1 green stained glass named "&7Tier &f5 &7Generator" with lore "&6Place to earn cash!"
  151. set block at {_block} to air
  152. subtract 7 from {block::%player%}
  153. else:
  154. send "&cYou don't have enough money!"
  155. else if event-block is green stained glass:
  156. open virtual chest inventory with size 3 named "&8&lGen" to player
  157. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  158. set block at {_block} to air
  159. subtract 3 from {block::%player%}
  160. send "&aPicked up Gen!"
  161. give player 1 green stained glass named "&7Tier &f5 &7Generator" with lore "&6Place to earn cash!"
  162. if {place::%player%} = 0:
  163. stop
  164. else:
  165. subtract 1 from {place::%player%}
  166. format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$30,000" to close:
  167. if balance of player >= 30000:
  168. subtract 30000 from balance of player
  169. send "&a$30,000 &7has been taken from your account!"
  170. give player 1 lime stained glass named "&7Tier &f6 &7Generator" with lore "&6Place to earn cash!"
  171. set block at {_block} to air
  172. subtract 10 from {block::%player%}
  173. else:
  174. send "&cYou don't have enough money!"
  175. else if event-block is lime stained glass:
  176. open virtual chest inventory with size 3 named "&8&lGen" to player
  177. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  178. set block at {_block} to air
  179. subtract 12 from {block::%player%}
  180. send "&aPicked up Gen!"
  181. give player 1 lime stained glass named "&7Tier &f6 &7Generator" with lore "&6Place to earn cash!"
  182. if {place::%player%} = 0:
  183. stop
  184. else:
  185. subtract 1 from {place::%player%}
  186. format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$50,000" to close:
  187. if balance of player >= 50000:
  188. subtract 50000 from balance of player
  189. send "&a$50,000 &7has been taken from your account!"
  190. give player 1 magenta stained glass named "&7Tier &f7 &7Generator" with lore "&6Place to earn cash!"
  191. set block at {_block} to air
  192. subtract 12 from {block::%player%}
  193. else:
  194. send "&cYou don't have enough money!"
  195. else if event-block is magenta stained glass:
  196. open virtual chest inventory with size 3 named "&8&lGen" to player
  197. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  198. set block at {_block} to air
  199. subtract 14 from {block::%player%}
  200. send "&aPicked up Gen!"
  201. give player 1 magenta stained glass named "&7Tier &f7 &7Generator" with lore "&6Place to earn cash!"
  202. if {place::%player%} = 0:
  203. stop
  204. else:
  205. subtract 1 from {place::%player%}
  206. format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$75,000" to close:
  207. if balance of player >= 75000:
  208. subtract 75000 from balance of player
  209. send "&a$75,000 &7has been taken from your account!"
  210. give player 1 red stained glass named "&7Tier &f8 &7Generator" with lore "&6Place to earn cash!"
  211. set block at {_block} to air
  212. subtract 14 from {block::%player%}
  213. else:
  214. send "&cYou don't have enough money!"
  215. else if event-block is red stained glass:
  216. open virtual chest inventory with size 3 named "&8&lGen" to player
  217. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  218. set block at {_block} to air
  219. subtract 16 from {block::%player%}
  220. send "&aPicked up Gen!"
  221. give player 1 red stained glass named "&7Tier &f8 &7Generator" with lore "&6Place to earn cash!"
  222. if {place::%player%} = 0:
  223. stop
  224. else:
  225. subtract 1 from {place::%player%}
  226. format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$125,000" to close:
  227. if balance of player >= 125000:
  228. subtract 125000 from balance of player
  229. send "&a$125,000 &7has been taken from your account!"
  230. give player 1 orange stained glass named "&7Tier &f9 &7Generator" with lore "&6Place to earn cash!"
  231. set block at {_block} to air
  232. subtract 16 from {block::%player%}
  233. else:
  234. send "&cYou don't have enough money!"
  235. else if event-block is orange stained glass:
  236. open virtual chest inventory with size 3 named "&8&lGen" to player
  237. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  238. set block at {_block} to air
  239. subtract 18 from {block::%player%}
  240. send "&aPicked up Gen!"
  241. give player 1 orange stained glass named "&7Tier &f9 &7Generator" with lore "&6Place to earn cash!"
  242. if {place::%player%} = 0:
  243. stop
  244. else:
  245. subtract 1 from {place::%player%}
  246. format gui slot 11 of player with green stained glass named "&aUpgrade Gen" with lore "&7Cost: &a$200,000" to close:
  247. if balance of player >= 200000:
  248. subtract 200000 from balance of player
  249. send "&a$200,000 &7has been taken from your account!"
  250. give player 1 yellow stained glass named "&7Tier &f10 &7Generator" with lore "&6Place to earn cash!"
  251. set block at {_block} to air
  252. subtract 18 from {block::%player%}
  253. else:
  254. send "&cYou don't have enough money!"
  255. else if event-block is yellow stained glass:
  256. open virtual chest inventory with size 3 named "&8&lGen" to player
  257. format gui slot 15 of player with red stained glass named "&cPick up Gen" to close:
  258. set block at {_block} to air
  259. subtract 20 from {block::%player%}
  260. send "&aPicked up Gen!"
  261. give player 1 yellow stained glass named "&7Tier &f10 &7Generator" with lore "&6Place to earn cash!"
  262. if {place::%player%} = 0:
  263. stop
  264. else:
  265. subtract 1 from {place::%player%}
  266.  
  267. every 3 seconds in world "void":
  268. loop all players:
  269. if {block::%loop-player%} >= 1:
  270. set {_money::%loop-player%} to {block::%loop-player%}
  271. set action bar of loop-player to "&7[&a+%{_money::%loop-player%}% Cash&7]"
  272. add {_money::%loop-player%} to balance of loop-player
  273.  
  274. every second in world "void":
  275. loop all players:
  276. if {generator::%loop-player%} is air:
  277. if {otherblock::%loop-player%} is "white stained glass":
  278. if {otherblock2::%loop-player%} is set:
  279. subtract 1 from {place::%loop-player%}
  280. subtract 1 from {block::%loop-player%}
  281. delete {otherblock2::%loop-player%}
  282. else:
  283. stop
  284. subtract 1 from {place::%loop-player%}
  285. subtract 1 from {block::%loop-player%}
  286. delete {otherblock2::%loop-player%}
  287.  
  288. command /fix [<offlineplayer>]:
  289. permission: *
  290. trigger:
  291. set {place::%arg 1%} to 0
  292. set {max::%arg 1%} to 2
  293. set {block::%arg 1%} to 0
  294. delete {block::%arg 1%}
  295.  
  296. command /fixall:
  297. permission: *
  298. trigger:
  299. loop all players:
  300. set {place::%loop-player%} to 0
  301. set {max::%loop-player%} to 2
  302. set {block::%loop-player%} to 0
  303. delete {block::%loop-player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement