options: passiveChance: 25 freezeTime: 5 seconds abilityCooldown: 60 seconds radius: 15 # =============================== # GIVE SHIELD # =============================== command /frostshield: trigger: give player shield named "&b❄ Frost Barrier ❄" with lore "&8&m━━━━━━━━━━━━━━━━━━━━", "&b❄ Frozen Relic", "", "&bPassive: Frostbite", "&7➤ 25% chance on hit", "&7➤ Inflicts Freeze (5s)", "&7➤ Applies Slowness I", "", "&bAbility: Frozen Domain", "&7➤ Double Shift to activate", "&7➤ Freezes all enemies nearby", "&7➤ Radius: 15 blocks", "&7➤ Duration: 5 seconds", "&7➤ Cooldown: 60 seconds", "&8&m━━━━━━━━━━━━━━━━━━━━" # =============================== # PASSIVE # =============================== on damage: attacker is player if attacker's tool is shield: if lore of attacker's tool contains "Frostbite": chance of {@passiveChance}%: apply slowness 1 to victim for {@freezeTime} apply freezing to victim for {@freezeTime} send action bar "&b❄ Frostbite triggered!" to attacker # =============================== # DOUBLE SHIFT # =============================== on toggle sneak: if player is sneaking: if {frostshift::%player%} is set: delete {frostshift::%player%} execute player command "frostdomain" else: set {frostshift::%player%} to true wait 10 ticks delete {frostshift::%player%} # =============================== # ABILITY # =============================== command /frostdomain: trigger: if player's tool is not shield: stop if lore of player's tool does not contain "Frozen Domain": stop # cooldown check if {frostcd::%player%} is set: set {_time} to difference between {frostcd::%player%} and now send "&cAbility on cooldown: %{_time}%" to player stop set {frostcd::%player%} to now + {@abilityCooldown} play sound "block.anvil.use" at player loop all players in radius {@radius} around player: if loop-player is not player: apply slowness 2 to loop-player for {@freezeTime} apply freezing to loop-player for {@freezeTime} send action bar "&b❄ You are frozen!" to loop-player send "&b❄ Frozen Domain activated!" to player