advancement revoke @s from subchronos:click_lobby_dye

#Updates if should play or spectate
scoreboard players add @s spectating 1
execute if score @s spectating matches 2.. run scoreboard players set @s spectating 0
function subchronos:lobby/hotbar/get_dye

execute if score @s spectating matches 1 run playsound block.note_block.pling ambient @s ~ ~ ~ 0.5 0.75
execute if score @s spectating matches 0 run playsound block.note_block.pling ambient @s ~ ~ ~ 0.5 1.5

#Remove sound
tag @s add stopsound_this
schedule function subchronos:lobby/hotbar/stopsound 0.5t