Advertisement
Randall123459

Timebomb [SK]

Dec 28th, 2016
774
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.67 KB | None | 0 0
  1. options:
  2.     Perm: uhc.staff
  3.     P: &f[&bTime-Bomb&f]
  4.     C: &b
  5.     H: &f
  6.     Excluded: spawn
  7.     Force: 20
  8.  
  9. command /TimeBomb <text>:
  10.     permission: {@Perm}
  11.     usage: /TimeBomb <On:Off>
  12.     trigger:
  13.         if arg-1 is "enable" or "on":
  14.             set {TimeBomb} to true
  15.             broadcast "{@P}{@C} Time Bomb {@H}Enabled{@C}!"
  16.         if arg-1 is "disable" or "off":
  17.             delete {TimeBomb}
  18.             broadcast "{@P}{@C} Time Bomb {@H}Disabled{@C}!"
  19.  
  20. on death of player:
  21.     victim's world is not "{@Excluded}"
  22.     {Timebomb} is true
  23.     set block at block at victim's location to chest
  24.     set {_loc} to the block at victim's location
  25.     set {_chest} to block at victim's location
  26.     set block at block left of {_chest} to chest
  27.     add 1 golden apple named "&6Golden Head" to the block at {_chest}
  28.     add victim's inventory to the block at {_chest}
  29.     add the victim's helmet slot to the inventory of the block at {_chest}
  30.     add the victim's chestplate slot to the inventory of the block at {_chest}
  31.     add the victim's leggings slot to the inventory of the block at {_chest}
  32.     add the victim's boots slot to the inventory of the block at {_chest}
  33.     clear drops
  34.     delete holo object "%victim%"
  35.     create holo object "%victim%" with id "%victim%" at location of block above victim's location
  36.     set {_time.%victim%} to 30
  37.     broadcast "{@P}{@H} %victim%'s {@C}corpse is now ticking"
  38.     loop 30 times:
  39.         edit holo object "%victim%" line 1 to "&b%{_time.%victim%}% secs"
  40.         add -1 to {_time.%victim%}
  41.         wait 1 second
  42.     delete holo object "%victim%"
  43.     set block at {_chest} to air
  44.     set block at {_loc} to air
  45.     wait 3 ticks
  46.     create an explosion of force {@Force} at {_chest}
  47.     strike lightning effect at {_chest}
  48.     broadcast "{@P}{@H} %victim%'s {@C}corpse has exploded"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement