Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /timebomb <text="toggle">:
- description: Enable/Disable/Toggle Time Bomb
- usage: /timebomb [enable/disable/toggle] defaults to toggle
- permission: UHC.Admin
- trigger:
- if arg 1 is "disable":
- set {timebomb} to false
- broadcast "&7[&6Server&7]&c Time bomb disabled!"
- execute console command "/gamerule keepInventory false"
- else if arg 1 is "enable":
- set {timebomb} to true
- broadcast "&7[&6Server&7]&c Time bomb enabled!"
- execute console command "/gamerule keepInventory true"
- else if arg 1 is "toggle":
- if {timebomb} is true:
- set {timebomb} to false
- broadcast "&7[&6Server&7]&c Time bomb disabled!"
- execute console command "/gamerule keepInventory false"
- else:
- set {timebomb} to true
- broadcast "&7[&6Server&7]&c Time bomb enabled!"
- execute console command "/gamerule keepInventory true"
- command /setbombtimer <integer=30>:
- description: Set the length of time until the bomb goes off
- usage: /setbombtimer [time (s)] Defaults to 30s
- permission: UHC.Admin
- trigger:
- set {timer} to arg 1
- broadcast "&7[&6Server&7]&c Bomb timer set to %arg 1% seconds"
- command /setexplosionforce <integer=10>:
- description: Set the force of the time bomb explosion
- usage: /setexplosionforce [force (1-10)] Default force is 10
- permission: UHC.Admin
- trigger:
- set {explosionforce} to arg 1
- broadcast "&7[&6Server&7]&c Explosion force set to %arg 1%"
- on death of player:
- if {timebomb} is true:
- set {_tempinventory} to the player's inventory
- set {_templocation} to the block below the player
- set block 1 meter north of {_templocation} to Chest
- set block at {_templocation} to Chest
- set the inventory of the block at {_templocation} to {_tempinventory}
- drop player's helmet at the player
- drop player's chestplate at the player
- drop player's leggings at the player
- drop player's boots at the player
- if {timer} is set:
- set {_bombcounter} to {timer}
- else:
- set {_bombcounter} to 30
- if {explosionforce} is not set:
- set {explosionforce} to 10
- while {_bombcounter} is greater than 0:
- set {_bombcounter} to ({_bombcounter} - 1)
- wait 1 second
- broadcast "&7[&bTimeBomb&7] &c%player%'s corpse has exploded!"
- create an explosion of force {explosionforce} at {_templocation}
- strike lightning at {_templocation}
- wait 1 second
- strike lightning at {_templocation}
- on player respawn:
- if {timebomb} is true:
- clear the player's inventory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement