scoreboard objectives add heart dummy Hearts
scoreboard players add @a heart 0

tag @a remove heart1
tag @a remove heart2
tag @a remove heart3
tag @a remove heart4
tag @a remove heart5
tag @a remove heart6
tag @a remove heart7
tag @a remove heart8
tag @a remove heart9
tag @a remove heart10
tag @a remove heart11
tag @a remove heart12
tag @a remove heart13
tag @a remove heart14
tag @a remove heart15
tag @a remove heart16
tag @a remove heart17
tag @a remove heart18
tag @a remove heart19
tag @a remove heart20
tag @a remove heart21
tag @a remove heart22
tag @a remove heart23
tag @a remove heart24
tag @a remove heart25
tag @a remove heart26

tag @a[scores={heart=0}] add heart1
tag @a[scores={heart=1}] add heart2
tag @a[scores={heart=2}] add heart3
tag @a[scores={heart=3}] add heart4
tag @a[scores={heart=4}] add heart5
tag @a[scores={heart=5}] add heart6
tag @a[scores={heart=6}] add heart7
tag @a[scores={heart=7}] add heart8
tag @a[scores={heart=8}] add heart9
tag @a[scores={heart=9}] add heart10
tag @a[scores={heart=10}] add heart11
tag @a[scores={heart=11}] add heart12
tag @a[scores={heart=12}] add heart13
tag @a[scores={heart=13}] add heart14
tag @a[scores={heart=14}] add heart15
tag @a[scores={heart=15}] add heart16
tag @a[scores={heart=16}] add heart17
tag @a[scores={heart=17}] add heart18
tag @a[scores={heart=18}] add heart19
tag @a[scores={heart=19}] add heart20
tag @a[scores={heart=20}] add heart21
tag @a[scores={heart=21}] add heart22
tag @a[scores={heart=22}] add heart23
tag @a[scores={heart=23}] add heart24
tag @a[scores={heart=24}] add heart25
tag @a[scores={heart=25}] add heart26