Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- Prefix: &8[&cPyrotechnics&8]
- HC: &e
- CC: &r
- command /pyrotechnics [<text>]:
- trigger:
- if arg-1 is "on" or "enable":
- command sender has permission "skript.pyrotechnics":
- if {Pyrotechnics.Enabled} is not set:
- set {Pyrotechnics.Enabled} to true
- broadcast "{@Prefix}{@CC} Enabled by {@HC}%command sender%!"
- loop all players:
- set {Pyrotechnics.HasWater.%loop-player%} to true
- add loop-player to {Pyrotechnics.List::*}
- player's inventory has space for 1 water block:
- give 1 water block to loop-player
- message "{@Prefix}{@CC} A water block was given to you!" to loop-player
- else:
- drop 1 water block at loop-player
- message "{@Prefix}{@CC} A water block was dropped near you!" to loop-player
- else:
- message "{@Prefix}{@CC} Already enabled!" to the command sender
- else:
- execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
- message "{@Prefix}{@CC} You don't have permission for that!" to the command sender
- else if arg-1 is "off" or "disable":
- command sender has permission "skript.pyrotechnics":
- if {Pyrotechnics.Enabled} is true:
- delete {Pyrotechnics.Enabled}
- broadcast "{@Prefix}{@CC} Disabled by {@HC}%command sender%!"
- loop {Pyrotechnics.List::*}:
- delete {Pyrotechnics.HasWater.%loop-value%}
- else:
- message "{@Prefix}{@CC} Already disabled!" to the command sender
- else:
- execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
- message "{@Prefix}{@CC} You don't have permission for that!" to the command sender
- else if arg-1 is "toggle" or "switch":
- if {Pyrotechnics.Enabled} is true:
- command sender command "/pyrotechnics off"
- stop trigger
- if {Pyrotechnics.Enabled} is not set:
- command sender command "/pyrotechnics on"
- stop trigger
- else if arg-1 is "help" or "?" or "question" or "info" or "information":
- message "" to the command sender
- if command sender has permission "skript.pyrotechnics":
- message "{@Prefix}{@CC} /pyrotechnics {@HC}on/off/toggle" to the command sender
- message "{@Prefix}{@CC} Scenario by: {@HC}/u/flooft"
- if command sender is "Fleft":
- message "{@Prefix}{@CC} Skript: {@HC}You!" to the command sender
- else:
- message "{@Prefix}{@CC} Skript: {@HC}Fleft" to the command sender
- message "" to the command sender
- message "{@Prefix}{@CC} In {@HC}Pyrotechnics{@CC}, all damage not" to the command sender
- message "{@Prefix}{@CC} caused by fire will ignite you. All players" to the command sender
- message "{@Prefix}{@CC} start out with a water block!" to the command sender
- message "" to the command sender
- else if arg-1 is not set:
- command sender command "/pyrotechnics help"
- else:
- command sender command "/pyrotechnics help"
- on login:
- {Pyrotechnics.Enabled} is true:
- {Pyrotechnics.HasWater.%player%} is not set:
- player's inventory has space for 1 water block:
- give 1 water block to the player
- message "{@Prefix}{@CC} A water block was given to you!" to the player
- else:
- drop 1 water block at player
- message "{@Prefix}{@CC} A water block was dropped near you!" to the player
- on damage of player:
- {Pyrotechnics.Enabled} is true:
- damage was caused by fire:
- stop trigger
- else:
- ignite the victim
Advertisement
Add Comment
Please, Sign In to add comment