Incrementing attributes in Minecraft

Incrementing attributes in Minecraft - White Metal High-rise Viewing Deck Building

I want to figure out how to increment a player's health without writing 225 lines of Datapack code. I cannot find any way to do this. I've tried :

execute at @a run execute unless score @p custHealth matches 1 run attribute @p generic.max_health base set Health @p 

but that does not work.

Pictures about "Incrementing attributes in Minecraft"

Incrementing attributes in Minecraft - Cheerful football fans drinking beer in pub and talking
Incrementing attributes in Minecraft - Wooden Robot
Incrementing attributes in Minecraft - Minimalistic workplace with laptop and empty frame with office attributes during coffee break

What are all the attributes in Minecraft?

Attributes available on all living entitiesAttribute NameDefault BaseMaximumgeneric.max_health20.01024.0generic.follow_range32.02048.0generic.knockback_resistance0.01.0generic.movement_speed0.71024.04 more rows

How to use attributes in Minecraft 1.17 (special items, infinite health/armor)

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Pixabay, Laura Tancredi, Kaboompics .com, Tatiana Syrikova