Oxalist

Untitled

Apr 20th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.02 KB | None | 0 0
  1. variables:
  2. {coins::%player%} = 0
  3. {kills::%player%} = 0
  4. {ingame::%player%} = "False"
  5. {kitdefault::%player%} = "False"
  6. {kitarcher::%player%} = "False"
  7.  
  8. on death:
  9. if victim is a player:
  10. if attacker is a zombie:
  11. clear victim's inventory
  12. broadcast "&8| &2A&apocalypse &8» &2%victim% &awas killed by a &2%attacker%"
  13. add 1 to {deaths::%victim%}
  14. wait 1 second
  15. set {ingame::%player%} to "False"
  16. teleport victim to {spawn}
  17.  
  18. on join:
  19. set join message to "&8| &2A&apocalypse &8» &a&l%player%"
  20. on first join:
  21. set join message to "&8| &2A&apocalypse &8» &a&l%player%"#
  22. on quit:
  23. set leave message to "&8| &2A&apocalypse &8» &c&l%player%"
  24. set {ingame::%player%} to "False"
  25.  
  26. on rightclick on sign:
  27. if line 2 of event-block is "&2Join":
  28. make player execute command "/join"
  29. set line 3 of event-block to "&8(Click to join)"
  30.  
  31. command /leave:
  32. trigger:
  33. if {ingame::%player%} is "True":
  34. set {ingame::%player%} to "False"
  35. send "&8| &2A&apocalypse &8» &7Sending you to spawn"
  36. clear player's inventory
  37. teleport player to {spawn}
  38. stop
  39. if {ingame::%player%} is "False":
  40. send "&8| &2A&apocalypse &8» &7You are not in a game"
  41. stop
  42.  
  43. on rightclick on sign:
  44. if line 2 of event-block is "&cLeave":
  45. make player execute command "/leave"
  46. set line 3 of event-block to "&8(Click to leave)"
  47.  
  48. command /join:
  49. trigger:
  50. if {ingame::%player%} is "False":
  51. if {kitarcher::%player%} is "True":
  52. set slot 0 of player to 1 wooden sword
  53. set slot 1 of player to 1 bow of infinity 1
  54. set slot 2 of player to 64 arrow
  55. set slot 3 of player to 6 322
  56. set slot 4 of player to 64 steak
  57. set helmet slot of player to a leather helmet
  58. set chestplate slot of player to a leather chestplate
  59. set legging slot of player to leather leggings
  60. set boot slot of player to leather boots
  61. set {ingame::%player%} to "True"
  62. send "&8| &2A&apocalypse &8» &7Sending you to the arena with kit (Archer)"
  63. teleport player to {arena}
  64. stop
  65. if {kitdefault::%player%} is "True":
  66. set slot 0 of player to 1 diamond sword
  67. set slot 1 of player to 6 322
  68. set slot 2 of player to 64 steak
  69. set helmet slot of player to a iron helmet
  70. set chestplate slot of player to a iron chestplate
  71. set legging slot of player to iron leggings
  72. set boot slot of player to iron boots
  73. set {ingame::%player%} to "True"
  74. send "&8| &2A&apocalypse &8» &7Sending you to the arena with kit (Default)"
  75. teleport player to {arena}
  76. stop
  77. else:
  78. send "&8| &2A&apocalypse &8» &7Please select a kit"
  79. stop
  80. if {ingame::%player%} is "True":
  81. send "&8| &2A&apocalypse &8» &7You are already in the game"
  82. stop
  83.  
  84.  
  85. command /zombie [<text>] [<number>] [<text>]:
  86. trigger:
  87. if arg 1 is set:
  88. if arg 1 is "setapocalypse" or "seta":
  89. if player has permission "zombie.setapoc":
  90. if arg 2 is set:
  91. if arg 2 is 1:
  92. set {Zombie.Apocalypse.1} to location of player
  93. send "&8|&2A&apocalypse &8» &7Set spawn number &21"
  94. stop
  95. if arg 2 is 2:
  96. set {Zombie.Apocalypse.2} to location of player
  97. send "&8|&2A&apocalypse &8» &7Set spawn number &22"
  98. stop
  99. if arg 2 is 3:
  100. set {Zombie.Apocalypse.3} to location of player
  101. send "&8|&2A&apocalypse &8» &7Set spawn number &23"
  102. stop
  103. if arg 2 is 4:
  104. set {Zombie.Apocalypse.4} to location of player
  105. send "&8|&2A&apocalypse &8» &7Set spawn number &24"
  106. stop
  107. if arg 2 is 5:
  108. set {Zombie.Apocalypse.5} to location of player
  109. send "&8|&2A&apocalypse &8» &7Set spawn number &25"
  110. stop
  111. if arg 2 is not 1 or 2 or 3 or 4 or 5:
  112. send "&8| &2Z&aombie &8» &7/Zombie Setapocalypse 1-5"
  113. stop
  114. else:
  115. send "&8| &2Z&aombie &8» &7/Zombie Setapocalypse 1-5"
  116. stop
  117. else:
  118. send "&8| &2Z&aombie &8» &7Dazu bist du nicht Berechtigt!"
  119. stop
  120. if arg 1 is "apocalypse" or "apoc":
  121. if player has permission "zombie.apoc":
  122. add 25 to {Zombie.live}
  123. spawn a zombie at location of {Zombie.Apocalypse.1}
  124. spawn a zombie at location of {Zombie.Apocalypse.1}
  125. spawn a zombie at location of {Zombie.Apocalypse.1}
  126. spawn a zombie at location of {Zombie.Apocalypse.1}
  127. spawn a zombie at location of {Zombie.Apocalypse.1}
  128. spawn a zombie at location of {Zombie.Apocalypse.1}
  129. spawn a zombie at location of {Zombie.Apocalypse.2}
  130. spawn a zombie at location of {Zombie.Apocalypse.2}
  131. spawn a zombie at location of {Zombie.Apocalypse.2}
  132. spawn a zombie at location of {Zombie.Apocalypse.2}
  133. spawn a zombie at location of {Zombie.Apocalypse.2}
  134. spawn a zombie at location of {Zombie.Apocalypse.3}
  135. spawn a zombie at location of {Zombie.Apocalypse.3}
  136. spawn a zombie at location of {Zombie.Apocalypse.3}
  137. spawn a zombie at location of {Zombie.Apocalypse.3}
  138. spawn a zombie at location of {Zombie.Apocalypse.3}
  139. spawn a zombie at location of {Zombie.Apocalypse.4}
  140. spawn a zombie at location of {Zombie.Apocalypse.4}
  141. spawn a zombie at location of {Zombie.Apocalypse.4}
  142. spawn a zombie at location of {Zombie.Apocalypse.4}
  143. spawn a zombie at location of {Zombie.Apocalypse.4}
  144. spawn a zombie at location of {Zombie.Apocalypse.5}
  145. spawn a zombie at location of {Zombie.Apocalypse.5}
  146. spawn a zombie at location of {Zombie.Apocalypse.5}
  147. spawn a zombie at location of {Zombie.Apocalypse.5}
  148. spawn a zombie at location of {Zombie.Apocalypse.5}
  149. send "&8| &2Z&aombie &8» &7Es wurden &e25 &7Gespawnt!"
  150. broadcast " "
  151. broadcast " &aEs ist eine Neue Zombie Welle mit &225 &aZomies Ausgebrochen!"
  152. broadcast " "
  153. invoke "scoreboard"
  154. stop
  155. else:
  156. send "&8| &2Z&aombie &8» &7Dazu bist du nicht Berechtigt!"
  157. stop
  158. if arg 1 is "kill" or "clear":
  159. if player has permission "zombie.clear":
  160. set {Zombie.live} to 0
  161. kill all zombies
  162. invoke "scoreboard"
  163. else:
  164. send "&8| &2Z&aombie &8» &7Dazu bist du nicht Berechtigt!"
  165. stop
  166. if arg 1 is not "kill" or "clear" or "apocalypse" or "apoc" or "setapocalypse" or "seta":
  167. if player has permission "zombie.help":
  168. send "&8| &2Z&aombie &8» &7"
  169. send "&8| &2Z&aombie &8» &7/Zombie Setapocalypse 1-5 &8| &eSetzte die Spawns fuer die Apocalypsen"
  170. send "&8| &2Z&aombie &8» &7/Zombie Apocalypse &8| &eLasse eine Zombie Welle Ausbrechen."
  171. send "&8| &2Z&aombie &8» &7/Zombie Clear &8| &eToete die ganzen Zombies."
  172. stop
  173. else:
  174. send "&8| &2Z&aombie &8» &7Dieser Commands exestiert nicht!"
  175. stop
  176. else:
  177. if player has permission "zombie.help":
  178. send "&8| &2Z&aombie &8» &7"
  179. send "&8| &2Z&aombie &8» &7/Zombie Setapocalypse 1-5 &8| &eSetzte die Spawns fuer die Apocalypsen"
  180. send "&8| &2Z&aombie &8» &7/Zombie Apocalypse &8| &eLasse eine Zombie Welle Ausbrechen."
  181. send "&8| &2Z&aombie &8» &7/Zombie Clear &8| &eToete die ganzen Zombies."
  182. stop
  183. else:
  184. send "&8| &2Z&aombie &8» &7Dieser Commands exestiert nicht!"
  185. stop
  186. every minute:
  187. loop all players:
  188. if {ingame::%loop-player%} is "True":
  189. add 25 to {Zombie.live}
  190. spawn a zombie at location of {Zombie.Apocalypse.1}
  191. spawn a zombie at location of {Zombie.Apocalypse.1}
  192. spawn a zombie at location of {Zombie.Apocalypse.1}
  193. spawn a zombie at location of {Zombie.Apocalypse.1}
  194. spawn a zombie at location of {Zombie.Apocalypse.1}
  195. spawn a zombie at location of {Zombie.Apocalypse.1}
  196. spawn a zombie at location of {Zombie.Apocalypse.2}
  197. spawn a zombie at location of {Zombie.Apocalypse.2}
  198. spawn a zombie at location of {Zombie.Apocalypse.2}
  199. spawn a zombie at location of {Zombie.Apocalypse.2}
  200. spawn a zombie at location of {Zombie.Apocalypse.2}
  201. spawn a zombie at location of {Zombie.Apocalypse.3}
  202. spawn a zombie at location of {Zombie.Apocalypse.3}
  203. spawn a zombie at location of {Zombie.Apocalypse.3}
  204. spawn a zombie at location of {Zombie.Apocalypse.3}
  205. spawn a zombie at location of {Zombie.Apocalypse.3}
  206. spawn a zombie at location of {Zombie.Apocalypse.4}
  207. spawn a zombie at location of {Zombie.Apocalypse.4}
  208. spawn a zombie at location of {Zombie.Apocalypse.4}
  209. spawn a zombie at location of {Zombie.Apocalypse.4}
  210. spawn a zombie at location of {Zombie.Apocalypse.4}
  211. spawn a zombie at location of {Zombie.Apocalypse.5}
  212. spawn a zombie at location of {Zombie.Apocalypse.5}
  213. spawn a zombie at location of {Zombie.Apocalypse.5}
  214. spawn a zombie at location of {Zombie.Apocalypse.5}
  215. spawn a zombie at location of {Zombie.Apocalypse.5}
  216. set {zombies} to random integer between 1 and 4
  217. if {zombies} is 1:
  218. send " " to loop-player
  219. send " &aLets keep going &2+25 &amore ""hahahahaha"" " to loop-player
  220. send " " to loop-player
  221. invoke "scoreboard"
  222. if {zombies} is 2:
  223. send " " to loop-player
  224. send " &aGod this is getting boring &2+25" to loop-player
  225. send " " to loop-player
  226. invoke "scoreboard"
  227. if {zombies} is 3:
  228. send " " to loop-player
  229. send " &aLets hurry and make it a lot more fun :) &2+25" to loop-player
  230. send " " to loop-player
  231. invoke "scoreboard"
  232. if {zombies} is 4:
  233. send " " to loop-player
  234. send " &a5, 4, 3, 2, 1 here we go! &2+25" to loop-player
  235. send " " to loop-player
  236. invoke "scoreboard"
  237. on death of zombie:
  238. clear drops
  239. remove 1 from {Zombie.live}
  240. invoke "scoreboard"
  241. stop
  242.  
  243. every second:
  244. loop all players:
  245. if {ingame::%loop-player%} is "False":
  246. wipe loop-player's sidebar
  247. set name of sidebar of loop-player to "&8» &2A&apocalypse &8«"
  248. set score "&7" in sidebar of loop-player to 5
  249. set score "&2Z&aombie &2K&aills&2: &7&l%{kills::%loop-player%}%" in sidebar of loop-player to 4
  250. set score "&2C&aoins&2: &7&l%{coins::%loop-player%}%" in sidebar of loop-player to 3
  251. set score "&2D&aeaths&2: &7&l%{deaths::%loop-player%}%" in sidebar of loop-player to 2
  252. set score "&a" in sidebar of loop-player to 1
  253.  
  254. on death of zombie:
  255. if attacker is a player:
  256. set action bar of attacker to "&2+1 &aCoin for the zombie kill"
  257. clear drops
  258. add 1 to {kills::%attacker%}
  259. add 1 to {coins::%attacker%}
  260.  
  261. on npc right click:
  262. if citizen is named "&eShop":
  263. open chest with 3 rows named "&2Z&aombie &8- &7Shop" to player
  264. wait 1 tick
  265. set slot 0 of player's current inventory to diamond sword of sharpness 5, knockback 3
  266. stop
  267. every second:
  268. loop all players:
  269. if {ingame::%loop-player%} is "True":
  270. wipe loop-player's sidebar
  271. set name of sidebar of loop-player to "&8» &2A&apocalypse &8«"
  272. set score "&7" in sidebar of loop-player to 3
  273. set score "&2Z&aombie &2C&aount&2:" in sidebar of loop-player to 2
  274. if {Zombie.live} is higher than 0:
  275. set score "&7&l%{Zombie.live}%" in sidebar of loop-player to 1
  276. else:
  277. set score "&7&l0" in sidebar of loop-player to 1
  278. set score "&8" in sidebar of loop-player to 0
  279. command /ping:
  280. trigger:
  281. set {_ping} to player's ping
  282. send player title "&2%{_ping}%" for 1 second
  283. stop
  284. on hunger meter change:
  285. cancel event
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294. options:
  295. # CONFIG
  296. PermissionActivated: true #Do you want to use a permission? So set it to true or to false if you don't want it
  297. Permission: coloredsignssk.use # Here you can set the permission when this PermissionActivated is set to true
  298.  
  299.  
  300.  
  301. ColorReplacer: "&"
  302.  
  303. on sign change:
  304. if {@PermissionActivated} is true:
  305. if player has permission "{@Permission}":
  306. replace all {@ColorReplacer} with "§" in line 1 of event-block
  307. replace all {@ColorReplacer} with "§" in line 2 of event-block
  308. replace all {@ColorReplacer} with "§" in line 3 of event-block
  309. replace all {@ColorReplacer} with "§" in line 4 of event-block
  310. else:
  311. replace all {@ColorReplacer} with "§" in line 1 of event-block
  312. replace all {@ColorReplacer} with "§" in line 2 of event-block
  313. replace all {@ColorReplacer} with "§" in line 3 of event-block
  314. replace all {@ColorReplacer} with "§" in line 4 of event-block
  315.  
  316. command /setserverspawn:
  317. trigger:
  318. set {spawn} to location of player
  319. command /setserverlobby:
  320. trigger:
  321. set {arena} to location of player
  322.  
  323. on sign change:
  324. player is op
  325. if line 1 of block is "[TopKills]":
  326. add block to {TopKills.signs::*}
  327. set {_skull} to skull of {topkiller}
  328. set the block above the event-block to {_skull}'s skull
  329. set line 1 of block to "&2"
  330. set line 2 of block to "&5%{topkiller}%"
  331. set line 3 of block to "&2Kills: &f%{topkills}%"
  332.  
  333. every second:
  334. loop {TopKills.signs::*}:
  335. set line 2 of loop-value to "&a%{topkiller}%"
  336. set line 3 of loop-value to "&cKills: &f%{topkills}%"
  337. set block above loop-value to {topkiller}'s skull
  338.  
  339. every second:
  340. loop all players:
  341. set {topkills} to {kills::%loop-player%}
  342. set {topkiller} to loop-player
  343.  
  344. on sign change:
  345. player is op
  346. if line 1 of block is "[TopCoins]":
  347. add block to {TopCoins.signs::*}
  348. set {_skull} to skull of {topcoinholder}
  349. set block above block to {topcoinholder}'s skull
  350. set line 1 of block to "&2"
  351. set line 2 of block to "&5%{topcoinholder}%"
  352. set line 3 of block to "&2Coins: &f%{topcoins}%"
  353.  
  354. every second:
  355. loop {TopCoins.signs::*}:
  356. set line 2 of loop-value to "&a%{topcoinholder}%"
  357. set line 3 of loop-value to "&cCoins: &f%{topcoins}%"
  358. set block above loop-value to {topcoinholder}'s skull
  359.  
  360. every second:
  361. loop all players:
  362. set {topcoins} to {coins::%loop-player%}
  363. set {topcoinholder} to loop-player
  364.  
  365. command /kitdefault:
  366. trigger:
  367. if {kitdefault::%player%} is "False":
  368. send "&8| &2A&apocalypse &8» &7Successfully selected kit default"
  369. set {kitdefault::%player%} to "True"
  370. set {kitarcher::%player%} to "False"
  371. stop
  372. if {kitdefault::%player%} is "True":
  373. send "&8| &2A&apocalypse &8» &7Successfully unselected kit default"
  374. set {kitdefault::%player%} to "False"
  375. stop
  376.  
  377. command /kitarcher:
  378. trigger:
  379. if {kitarcherpurchased::%player%} is not set:
  380. if {coins::%player%} is less than 399:
  381. send "&8| &2A&apocalypse &8» &7You need 400 coins to purchase this kit"
  382. stop
  383. if {coins::%player%} is more than 399:
  384. send "&8| &2A&apocalypse &8» &7Succesfully purchased kit archer"
  385. remove 400 from {coins::%player%}
  386. set {kitarcherpurchased::%player%} to "True"
  387. stop
  388. if {kitarcherpurchased::%player%} is "True":
  389. if {kitarcher::%player%} is "False":
  390. send "&8| &2A&apocalypse &8» &7Successfully selected kit archer"
  391. set {kitarcher::%player%} to "True"
  392. set {kitdefault::%player%} to "False"
  393. stop
  394. if {kitarcher::%player%} is "True":
  395. send "&8| &2A&apocalypse &8» &7Successfully unselected kit archer"
  396. set {kitarcher::%player%} to "False"
  397. stop
  398.  
  399. command /test coins:
  400. trigger:
  401. add 100 to {coins::%player%}
  402.  
  403. on damage:
  404. if victim is a zombie:
  405. bind hologram "&6&lZombie &a&l%health of victim% &4&l" to victim for 2 seconds offset by 0.0, 2.5, 0.0
  406. if victim is a player:
  407. send "&8| &2A&apocalypse &8» &7You cannot attack other players" to attacker
  408. cancel event
Advertisement
Add Comment
Please, Sign In to add comment