#50
execute store result score @s maxhp run attribute @s max_health get
execute store result score @s burst run data get entity @s Health
scoreboard players operation @s maxhp /= #2 number
execute if score @s burst <= @s maxhp if score @s timer matches 20 run function survivalplus:tools/add1hp

execute if entity @s[nbt=!{HurtTime:0s}] run scoreboard players set @s timer -60

scoreboard players add @s timer 1
scoreboard players set @s[scores={timer=21..}] timer 0