Testing if there is an entity with a objective score lower than another objective score

Testing if there is an entity with a objective score lower than another objective score - Black and White Dartboard

Say there is a player called Dave with a Health score of 10 and a MaxHealth score of 20. I need to check if there is any players with a health score lower than MaxHealth and tellraw it. Also is there a way to add values onto Health say 60 or 20 but without it going over MaxHealth? E.G. Health + 60 = MaxHealth (without going over)? Thanks in advance.






Pictures about "Testing if there is an entity with a objective score lower than another objective score"

Testing if there is an entity with a objective score lower than another objective score - Brown Basketball Under Blue Sky
Testing if there is an entity with a objective score lower than another objective score - Brown Basketball on Brown Carpet
Testing if there is an entity with a objective score lower than another objective score - Red and White Metal Fence





/execute if score // Minecraft 1.19 Command Tutorial




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

Images: Engin Akyurt, cottonbro, cottonbro, cottonbro