execute store result score @s maxhp run attribute @s max_health get
scoreboard players set @s itemcount 2
scoreboard players operation @s maxhp /= @s itemcount
execute if score @s Health <= @s maxhp run tag @s add hp50pass
scoreboard players reset @s maxhp
scoreboard players reset @s itemcount