scoreboard players remove @s farmer.buffer.timer 1
scoreboard players remove @s[scores={farmer.buffer.timer=0}] farmer.buffer 1
execute as @s[scores={farmer.buffer.timer=0}] at @s run playsound minecraft:block.beacon.deactivate player @s ~ ~ ~
scoreboard players set @s[scores={farmer.buffer.timer=0,farmer.buffer=1..}] farmer.buffer.timer 400