scoreboard players remove @s SlowfallUpgradeCharges 1


effect give @s[tag=SlowFallSpell2,tag=K,tag=!SlowfallReset] minecraft:slow_falling 60 0
tellraw @s[tag=SlowFallSpell2,tag=!SlowfallReset] ["",{"text":"Slowfall has been activated!","color":"green"}]


#handles the extra slowfall charges from the upgrade

tellraw @s[tag=SlowfallUpgrade2,tag=SlowFallSpell2,tag=K,tag=!SlowfallReset,scores={SlowfallUpgradeCharges=2}] ["",{"text":"Slowfall charges left: 2","color":"yellow"}]
tellraw @s[tag=SlowfallUpgrade2,tag=SlowFallSpell2,tag=K,tag=!SlowfallReset,scores={SlowfallUpgradeCharges=1}] ["",{"text":"Slowfall charges left: 1","color":"yellow"}]
tellraw @s[tag=SlowfallUpgrade2,tag=SlowFallSpell2,tag=K,tag=!SlowfallReset,scores={SlowfallUpgradeCharges=0}] ["",{"text":"Slowfall charges left: 0","color":"yellow"}]

tellraw @s[tag=SlowFallSpell2,tag=SlowfallReset] ["",{"text":"You have already used the Slowfall spell today - You may use it again tomorrow.","color":"yellow"}]
#tellraw @s[tag=SlowFallSpell2,tag=!SlowfallReset,scores={SlowfallUpgradeCharges=..0}] ["",{"text":"You have already used the Slowfall spell today - You may use it again tomorrow.","color":"yellow"}]


tag @s[scores={SlowfallUpgradeCharges=..0},tag=SlowFallSpell2,tag=K,tag=!SlowfallReset] add SlowfallReset
tag @s remove KyuLatentSlowfallSpell


#scoreboard players set @s KyuSpells 0