effect give @s slowness 1 6 true

execute unless entity @s[scores={ability_charge=4..5}] run playsound minecraft:weather.rain hostile @a[distance=..16] ~ ~ ~ 1 0.5

execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~8 ~0.5 ~ 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~7 ~0.5 ~1 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~7 ~0.5 ~2 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~6 ~0.5 ~3 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~6 ~0.5 ~4 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~5 ~0.5 ~5 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~4 ~0.5 ~6 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~3 ~0.5 ~6 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~2 ~0.5 ~7 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~1 ~0.5 ~7 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~ ~0.5 ~8 0.4 0 0.4 0.01 6 normal @a

execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-8 ~0.5 ~ 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-7 ~0.5 ~1 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-7 ~0.5 ~2 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-6 ~0.5 ~3 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-6 ~0.5 ~4 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-5 ~0.5 ~5 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-4 ~0.5 ~6 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-3 ~0.5 ~6 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-2 ~0.5 ~7 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-1 ~0.5 ~7 0.4 0 0.4 0.01 6 normal @a

execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-7 ~0.5 ~-1 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-7 ~0.5 ~-2 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-6 ~0.5 ~-3 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-6 ~0.5 ~-4 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-5 ~0.5 ~-5 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-4 ~0.5 ~-6 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-3 ~0.5 ~-6 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-2 ~0.5 ~-7 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~-1 ~0.5 ~-7 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~ ~0.5 ~-8 0.4 0 0.4 0.01 6 normal @a

execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~7 ~0.5 ~-1 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~7 ~0.5 ~-2 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~6 ~0.5 ~-3 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~6 ~0.5 ~-4 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~5 ~0.5 ~-5 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~4 ~0.5 ~-6 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~3 ~0.5 ~-6 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~2 ~0.5 ~-7 0.4 0 0.4 0.01 6 normal @a
execute unless entity @s[scores={ability_charge=4..5}] run particle minecraft:item_snowball ~1 ~0.5 ~-7 0.4 0 0.4 0.01 6 normal @a

execute unless entity @s[scores={ability_charge=4..5}] run effect give @s glowing 1 0 true

execute unless entity @s[scores={ability_charge=5}] run scoreboard players add @s ability_charge 1

execute if entity @s[scores={ability_charge=5}] run function cartographer_mob_abilities:abilities/frost_nova

