$scoreboard players set @s invulnerable_timer $(ticks)
execute as @s at @s run function pctf:music/invulnerable/play
attribute @s minecraft:knockback_resistance base set 0.8
$effect give @s minecraft:resistance $(seconds) 10 true
$effect give @s minecraft:fire_resistance $(seconds) 10 true
execute at @s run playsound minecraft:entity.ender_dragon.growl player @a ~ ~ ~ 2 2
$tellraw @a[distance=..250] [{"bold":true,"color":"gold","selector":"@s"},{"bold":false,"color":"yellow","italic":false,"text":" has become "},{"bold":true,"color":"#FFA114","text":"I"},{"bold":true,"color":"#FF9C28","text":"N"},{"bold":true,"color":"#FE973B","text":"V"},{"bold":true,"color":"#FE924F","text":"U"},{"bold":true,"color":"#FD8C62","text":"L"},{"bold":true,"color":"#FD8776","text":"N"},{"bold":true,"color":"#FD828A","text":"E"},{"bold":true,"color":"#FC7D9D","text":"R"},{"bold":true,"color":"#FC78B1","text":"A"},{"bold":true,"color":"#FB73C4","text":"B"},{"bold":true,"color":"#FB6DD8","text":"L"},{"bold":true,"color":"#FA63FF","text":"E"},{"bold":false,"color":"yellow","italic":false,"text":" for $(seconds)s!"}]