SHARE
TWEET

Untitled

a guest Oct 19th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. variables:
  2.     {totaljoins} = 1
  3.  
  4. options:
  5.     name: &6gravestone &7»
  6.  
  7. #REPLACE PRESENT (ONLY USE IF BROKEN)--------------------------------------------------------------------
  8.  
  9. command /replacepumpkin:
  10.     permission: *
  11.     permission message: &cNo permission!
  12.     trigger:
  13.         execute console command "setblock %{presentx}% %{presenty}% %{presentz}% minecraft:player_head{ExtraType:""Rovertdoow1st"",SkullType:3}"
  14.  
  15. #SETTING GHOST SPAWN-------------------------------------------------------------------------------------
  16.  
  17. command /setghostspawn:
  18.     permission: *
  19.     permission message: &cNo permission!
  20.     trigger:
  21.         set {ghostspawn} to location of player
  22.         send "{@name} You set the ghost spawn to &c%{ghostspawn}%&7!"
  23.  
  24. #SETTING ZOMBIE SPAWN------------------------------------------------------------------------------------
  25.  
  26. command /setzombiespawn:
  27.     permission: *
  28.     permission message: &cNo permission!
  29.     trigger:
  30.         set {zombiespawn} to location of player
  31.         send "{@name} You set the zombie spawn to &c%{zombiespawn}%&7!"
  32.  
  33. #SETTING PUMPKIN BLOCKS----------------------------------------------------------------------------------
  34.  
  35. command /setumpkinblock:
  36.     permission: *
  37.     permission message: &cNo permission!
  38.     trigger:
  39.         set {pumpkinblock} to skull of "Rovertdoow1st" parsed as offline player named "&ePumpkin"
  40.         set {pumpkinloc} to location of targeted block
  41.         set {pumpkinx} to target block's x coordinate
  42.         set {pumpkinx} to {presentx}-0.5
  43.         set {pumpkiny} to target block's y coordinate
  44.         set {pumpkiny} to {presenty}-0.5
  45.         set {pumpkinz} to target block's z coordinate
  46.         set {presentz} to {presentz}-0.5
  47.         send "{@name} &7You have set the present block to %{pumpkinblock}%&7 at location %{pumpkinloc}%&7!"
  48.  
  49. #SETTING "PLACE" BLOCKS----------------------------------------------------------------------------------
  50.  
  51. command /setplaceblock:
  52.     permission: *
  53.     permission message: &cNo permission!
  54.     trigger:
  55.         set {placeblock} to "%targeted block%" parsed as an item type
  56.         set {placeloc} to location of targeted block
  57.         send "{@name} &7You have set the place block to %{placeblock}%&7 at location %{placeloc}%&7!"
  58.  
  59. #GETTING PRESENT BLOCKS----------------------------------------------------------------------------------
  60.  
  61. on break:
  62.     if {onzombie.%player%} is true:
  63.         if event-block is {presentblock}:
  64.             if location of event-block is {presentloc}:
  65.                 set event-block to air
  66.                 send "{@name} You have picked up a &cpumpkin&7!" to player
  67.                 give 1 of skull of "Rovertdoow1st" parsed as offline player named "&ePumpkin" to player
  68.                 broadcast "{@name} &2%player%&7 has picked up a pumpkin!"
  69.                 execute console command "effect give %player% minecraft:glowing 99999 99 true"
  70.     if {onghost.%player%} is true:
  71.         if event-block is {presentblock}:
  72.             if location of event-block is {presentloc}:
  73.                 set event-block to air
  74.                 send "{@name} You have picked up a &cpumpkin&7!" to player
  75.                 give 1 of skull of "Rovertdoow1st" parsed as offline player named "&ePumpkin" to player
  76.                 broadcast "{@name} &f%player%&7 has picked up a pumpkin!"
  77.                 execute console command "effect give %player% minecraft:glowing 99999 99 true"
  78.  
  79. #PLACING PRESENT BLOCKS----------------------------------------------------------------------------------
  80.  
  81. on place:
  82.     if {onzombie.%player%} is true:
  83.         if player is holding skull of "Rovertdoow1st" parsed as offline player with name "&ePumpkin":
  84.             if block 1 below event-block is {placeblock}:
  85.                 cancel event
  86.                 remove 1 of skull of "Rovertdoow1st" parsed as offline player with name "&ePumpkin" from player
  87.                 add 1 to {presentstotal.zombie}
  88.                 add 1 to {collected.%player%}
  89.                 add 4 to {coins.%player%}
  90.                 send "{@name} You have gained &c4 coins&7 for placing a pumpkin!"
  91.                 broadcast "{@name} &2%player%&7 has placed down the pumpkin! The Zombie team now have collected &c%{presentstotal.zombie}%&7 pumpkins!"
  92.                 send "{@name} You have placed a pumpkin!" to player
  93.                 execute console command "effect clear %player%"
  94.                 execute console command "setblock %{presentx}% %{presenty}% %{presentz}% minecraft:player_head{ExtraType:""Rovertdoow1st"",SkullType:3}"
  95.             else:
  96.                 cancel event
  97.                 send "{@name} Silly! You can't place that here!" to player
  98.     if {onghost.%player%} is true:
  99.         if player is holding skull of "Rovertdoow1st" parsed as offline player with name "&ePumpkin":
  100.             if block 1 below event-block is {placeblock}:
  101.                 cancel event
  102.                 remove 1 of skull of "Rovertdoow1st" parsed as offline player with name "&ePumpkin" from player
  103.                 add 1 to {presentstotal.ghost}
  104.                 add 1 to {collected.%player%}
  105.                 add 4 to {coins.%player%}
  106.                 send "{@name} You have gained &c4 coins&7 for placing a pumpkin!"
  107.                 broadcast "{@name} &f%player%&7 has placed down the pumpkin! The Ghost team now have collected &c%{presentstotal.ghost}%&7 pumpkins!"
  108.                 send "{@name} You have placed a pumpkin!" to player
  109.                 execute console command "effect clear %player%"
  110.                 execute console command "setblock %{presentx}% %{presenty}% %{presentz}% minecraft:player_head{ExtraType:""Rovertdoow1st"",SkullType:3}"
  111.             else:
  112.                 cancel event
  113.                 send "{@name} Silly! You can't place that here!" to player
  114.  
  115.  
  116.  
  117. #LEAVE------------------------------------------------
  118. command /leave:
  119.    trigger:
  120.       if {queue.%player%} is true:
  121.          set {queue.%player%} to false
  122.          set {ghost.%player%} to false
  123.          set {zombie.%player%} to false
  124.          set {onzombie.%player%} to false
  125.          set {onghost.%player%} to false
  126.          teleport player to {spawn}
  127.          clear player's inventory
  128.          send "{@name} You have successfully left the game/queue!" to player
  129.  
  130. #JOINING QUEUE-------------------------------------------------------------------------------------------
  131.  
  132. command /join:
  133.    trigger:
  134.       if {elymode.%player%} is true:
  135.          send "&CError! You cannot join a game while in elytra mode!"
  136.          stop
  137.       if {elymode.%player%} is false:
  138.          if {currentgame} is true:
  139.             if {ghost.%player%} or {zombie.%player%} is false:
  140.                if {queue.%player%} is false:
  141.                   if {ghostteamdecide} is false:
  142.                      set {ghost.%player%} to true
  143.                      send "{@name} You have joined the &cGhost Team&7!" to player
  144.                      set {ghostteamdecide} to true
  145.                      set {queue.%player%} to true
  146.                      set {spectator.%player%} to false
  147.                      set player's gamemode to survival
  148.                      teleport player to {spawn}
  149.                      clear player's inventory
  150.                      stop
  151.                   if {ghostteamdecide} is true:
  152.                      set {zombie.%player%} to true
  153.                      send "{@name} You have joined the &cZombie Team&7!" to player
  154.                      set {ghostteamdecide} to false
  155.                      set {queue.%player%} to true
  156.                      set {spectator.%player%} to false
  157.                      set player's gamemode to survival
  158.                      teleport player to {spawn}
  159.                      clear player's inventory
  160.                      stop
  161.          if {currentgame} is false:
  162.             if {queue.%player%} is false:
  163.                set {queue.%player%} to true
  164.                send "{@name} You have joined the queue!" to player
  165.                add 1 to {totalqueue}
  166.                broadcast "{@name} &c%player%&7 has joined the game! &c%{totalqueue}%&7 players in the queue!"
  167.                if {ghostteamdecide} is false:
  168.                   set {ghost.%player%} to true
  169.                   send "{@name} You have joined the &cGhost Team&7!" to player
  170.                   set {ghostteamdecide} to true
  171.                   stop
  172.                if {ghostteamdecide} is true:
  173.                   set {zombie.%player%} to true
  174.                   send "{@name} You have joined the &cZombie Team&7!" to player
  175.                   set {ghostteamdecide} to false
  176.                   stop
  177.  
  178. #RESETING QUEUE------------------------------------------------------------------------------------------
  179.  
  180. command /qreset:
  181.    permission: *
  182.    permission message: &cNo permission!
  183.    trigger:
  184.       loop all players:
  185.          set {queue.%loop-player%} to false
  186.          set {ghostteamdecide} to false
  187.          set {ghost.%loop-player%} to false
  188.          set {zombie.%loop-player%} to false
  189.          set {totalqueue} to 0
  190.          set {currentgame} to false
  191.          set {totalplaying} to 0
  192. on quit:
  193.     set {spectator.%player%} to false
  194.     if {queue.%player%} is true:
  195.         remove 1 from {totalplaying}
  196.     set {queue.%player%} to false
  197.     set {ghost.%player%} to false
  198.     set {zombie.%player%} to false
  199.     set {onzombie.%player%} to false
  200.     set {onghost.%player%} to false
  201.     if player has skull of "Rovertdoow1st" parsed as offline player named "&&ePumpkin":
  202.         execute console command "replacepresent"
  203. on join:
  204.     if {activated.%player%} does not exist:
  205.         set {activated.%player%} to false
  206.     set {spectator.%player%} to false
  207.     if {queue.%player%} is true:
  208.         remove 1 from {totalqueue}
  209.     set {queue.%player%} to false
  210.     set {ghost.%player%} to false
  211.     set {zombie.%player%} to false
  212.     set {onzombie.%player%} to false
  213.     set {onghost.%player%} to false
  214.     teleport player to {spawn}
  215. #CHECKING IF QUEUE IS READY TO PLAY----------------------------------------------------------------------
  216.  
  217. every 5 ticks:
  218.   if {totalqueue} > 1:
  219.     set {currentgame} to true
  220.     set {totalqueue} to 0
  221.     broadcast "{@name} A game is ready to play! Do /join to join in!"
  222.  
  223. #DEATH THING---------------------------------------------------------------------------------------------
  224.  
  225. on death of player:
  226.   if damage cause is attack:
  227.     broadcast "&c%victim% &7has died to &c%attacker%"
  228.     add 2 to {coins.%attacker%}
  229.     add 1 to {kills.%attacker%}
  230.     send "{@name} You gained &c2 coins&7 for killing &c%victim%&7!" to attacker
  231.     if victim has skull of "Rovertdoow1st" parsed as offline player with name "&ePumpkin":
  232.       give damager skull of "Rovertdoow1st" parsed as offline player with name "&ePumpkin"
  233.       broadcast "{@name} &c%victim% &7has lost the pumpkin! &c%attacker% &7now has it!"
  234.       execute console command "effect give %attacker% minecraft:glowing 99999 99 true"
  235.   if victim has skull of "Rovertdoow1st" parsed as offline player with name "&ePumpkin":
  236.     broadcast "{@name} &c%victim% &7has lost the pumpkin! It has now respawned!"
  237.     execute console command "replacepumpkin"
  238.  
  239. #SETTING UP INITIAL GAME---------------------------------------------------------------------------------
  240.  
  241. every 1 tick:
  242.     if {currentgame} is true:
  243.         loop all players:
  244.             if {ghost.%loop-player%} is true:
  245.                 add 1 to {totalplaying}
  246.                 teleport loop-player to {ghostspawn}
  247.                 set {ghost.%loop-player%} to false
  248.                 set {onghost.%loop-player%} to true
  249.                 send "{@name} You are an &cGhost (Red team)&7!" to loop-player
  250.                 give unbreakable wooden sword to loop-player
  251.                 give unbreakable bow to loop-player
  252.                 give 18 arrows to loop-player
  253.                 set loop-player's chestplate to unbreakable leather chestplate
  254.                 dye loop-player's chestplate red
  255.                 set loop-player's leggings to unbreakable leather leggings
  256.                 dye loop-player's leggings red
  257.                 set loop-player's boots to unbreakable leather boots
  258.                 dye loop-player's boots black
  259.                 if {activated.%loop-player%} is true:
  260.                     stopEffect id "%loop-player%.shield"
  261.                     stopEffect id "%loop-player%.sphere"
  262.                     stopEffect id "%loop-player%.floor1"
  263.                     stopEffect id "%loop-player%.floor2"
  264.                     stopEffect id "%loop-player%.floor3"
  265.                     stopEffect id "%loop-player%.floor4"
  266.                     stopEffect id "%loop-player%.floor5"
  267.                     stopEffect id "%loop-player%.floor6"
  268.                     stopEffect id "%loop-player%.floor7"
  269.                     stopEffect id "%loop-player%.floor8"
  270.                     stopEffect id "%loop-player%.floor12"
  271.                     stopEffect id "%loop-player%.floor13"
  272.                     stopEffect id "%loop-player%.floor14"
  273.                     stopEffect id "%loop-player%.floor15"
  274.                     stopEffect id "%loop-player%.floor16"
  275.                     stopEffect id "%loop-player%.floor17"
  276.                     stopEffect id "%loop-player%.floor18"
  277.                     stopEffect id "%loop-player%.floor19"
  278.                     stopEffect id "%loop-player%.tail"
  279.                     stopEffect id "%loop-player%.wings"
  280.                     stopEffect id "%loop-player%.text"
  281.                     stopEffect id "%loop-player%.spiral0"
  282.                     stopEffect id "%loop-player%.spiral1"
  283.                     stopEffect id "%loop-player%.circle1"
  284.                     stopEffect id "%loop-player%.circle2"
  285.                     stopEffect id "%loop-player%.bigcircle"
  286.                     set {activated.%loop-player%} to false
  287.             if {zombie.%loop-player%} is true:
  288.                 add 1 to {totalplaying}
  289.                 teleport loop-player to {zombiespawn}
  290.                 set {zombie.%loop-player%} to false
  291.                 set {onzombie.%loop-player%} to true
  292.                 send "{@name} You are a &cZombie (Green team)&7!" to loop-player
  293.                 give unbreakable wooden sword to loop-player
  294.                 give unbreakable bow to loop-player
  295.                 give 18 arrows to loop-player
  296.                 set loop-player's chestplate to unbreakable leather chestplate
  297.                 dye loop-player's chestplate green
  298.                 set loop-player's leggings to unbreakable leather leggings
  299.                 dye loop-player's leggings green
  300.                 set loop-player's boots to unbreakable leather boots
  301.                 dye loop-player's boots black
  302.                 if {activated.%loop-player%} is true:
  303.                     stopEffect id "%loop-player%.shield"
  304.                     stopEffect id "%loop-player%.sphere"
  305.                     stopEffect id "%loop-player%.floor1"
  306.                     stopEffect id "%loop-player%.floor2"
  307.                     stopEffect id "%loop-player%.floor3"
  308.                     stopEffect id "%loop-player%.floor4"
  309.                     stopEffect id "%loop-player%.floor5"
  310.                     stopEffect id "%loop-player%.floor6"
  311.                     stopEffect id "%loop-player%.floor7"
  312.                     stopEffect id "%loop-player%.floor8"
  313.                     stopEffect id "%loop-player%.floor12"
  314.                     stopEffect id "%loop-player%.floor13"
  315.                     stopEffect id "%loop-player%.floor14"
  316.                     stopEffect id "%loop-player%.floor15"
  317.                     stopEffect id "%loop-player%.floor16"
  318.                     stopEffect id "%loop-player%.floor17"
  319.                     stopEffect id "%loop-player%.floor18"
  320.                     stopEffect id "%loop-player%.floor19"
  321.                     stopEffect id "%loop-player%.tail"
  322.                     stopEffect id "%loop-player%.wings"
  323.                     stopEffect id "%loop-player%.text"
  324.                     stopEffect id "%loop-player%.spiral0"
  325.                     stopEffect id "%loop-player%.spiral1"
  326.                     stopEffect id "%loop-player%.circle1"
  327.                     stopEffect id "%loop-player%.circle2"
  328.                     stopEffect id "%loop-player%.bigcircle"
  329.                     set {activated.%loop-player%} to false
  330.  
  331. #RESPAWNING PLAYERS WHO ARE PLAYING CURRENTLY PLAYING----------------------------------------------------
  332.  
  333. on respawn:
  334.     if {onghost.%player%} is true:
  335.         clear player's inventory
  336.         teleport player to {ghostspawn}
  337.         give unbreakable wooden sword to player
  338.         give unbreakable bow to player
  339.         give 18 arrows to player
  340.         set player's chestplate to unbreakable leather chestplate
  341.         dye player's chestplate red
  342.         set player's leggings to unbreakable leather leggings
  343.         dye player's leggings red
  344.         set player's boots to unbreakable leather boots
  345.         dye player's boots black
  346.     if {onzombie.%player%} is true:
  347.         clear player's inventory
  348.         teleport player to {zombiespawn}
  349.         give unbreakable wooden sword to player
  350.         give unbreakable bow to player
  351.         give 18 arrows to player
  352.         set player's chestplate to unbreakable leather chestplate
  353.         dye player's chestplate green
  354.         set player's leggings to unbreakable leather leggings
  355.         dye player's leggings green
  356.         set player's boots to unbreakable leather boots
  357.         dye player's boots black
  358.  
  359. #ENDING GAME---------------------------------------------------------------------------------------------
  360.  
  361. every tick:
  362.   if {presentstotal.ghost} is 5:
  363.     broadcast "{@name} The &cGhost team&7 won the game!"
  364.     loop all players:
  365.       set {queue.%loop-player%} to false
  366.       set {ghostteamdecide} to false
  367.       set {ghost.%loop-player%} to false
  368.       set {zombie.%loop-player%} to false
  369.       set {totalqueue} to 0
  370.       set {currentgame} to false
  371.       if {onghost.%loop-player%} is true:
  372.         add 1 to {wins.%loop-player%}
  373.         add 10 to {coins.%loop-player%}
  374.         send "{@name} You gained &c10 coins&7 for winning!" to loop-player
  375.       set {onghost.%loop-player%} to false
  376.       set {onzombie.%loop-player%} to false
  377.       set loop-player's leggings to air
  378.       set loop-player's chestplate to air
  379.       set loop-player's boots to air
  380.       execute console command "clear %loop-player%"
  381.       teleport loop-player to {spawn}
  382.       set {presentstotal.ghost} to 0
  383.       set {presentstotal.zombie} to 0
  384.       set {spectator.%loop-player%} to false
  385.       set loop-player's gamemode to survival
  386.   if {presentstotal.zombie} is 5:
  387.     broadcast "{@name} The &cZombie team&7 won the game!"
  388.     loop all players:
  389.       set {queue.%loop-player%} to false
  390.       set {ghostteamdecide} to false
  391.       set {ghost.%loop-player%} to false
  392.       set {zombie.%loop-player%} to false
  393.       set {totalqueue} to 0
  394.       set {currentgame} to false
  395.       set {onghost.%loop-player%} to false
  396.       if {onzombie.%loop-player%} is true:
  397.         add 1 to {wins.%loop-player%}
  398.         add 10 to {coins.%loop-player%}
  399.         send "{@name} You gained &c10 coins&7 for winning!" to loop-player
  400.       set {onzombie.%loop-player%} to false
  401.       set loop-player's leggings to air
  402.       set loop-player's chestplate to air
  403.       set loop-player's boots to air
  404.       execute console command "clear %loop-player%"
  405.       teleport loop-player to {spawn}
  406.       set {presentstotal.zombie} to 0
  407.       set {presentstotal.ghost} to 0
  408.       set {spectator.%loop-player%} to false
  409.       set loop-player's gamemode to survival
  410.  
  411. #SPECTATOR MODE------------------------------------------------------------------------------------------
  412.  
  413. command /spectator:
  414.     trigger:
  415.         if {onghost} is false:
  416.             if {onzombie} is false:
  417.                 if {spectator.%player%} is false:
  418.                     set {spectator.%player%} to true
  419.                     set player's gamemode to spectator
  420.                     teleport player to {ghostspawn}
  421.                     send "{@name} You are now a spectator! Type /spectator again to get out of spectator mode!" to player
  422.                     clear player's inventory
  423.                     stop
  424.                 if {spectator.%player%} is true:
  425.                     set {spectator.%player%} to false
  426.                     set player's gamemode to survival
  427.                     teleport player to {spawn}
  428.                     send "{@name} You are no longer a spectator! Type /spectator again to enter spectator mode!" to player
  429.                     clear player's inventory
  430.                     stop
  431.  
  432. #ON DROP ------------------------------------------------------------------------------------------------
  433.  
  434. on drop:
  435.     cancel event
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top