I assume you don't have a rank, so here's how I would do it without holograms (for the player):
- Spawn a button (literally anywhere)
- Set it to persistent (so it never despawns), disable its gravity, and set its item pickup delay to 100000000000 (very big number)
- Create a variable named %default hpUUID and set it to the UUID of the last-spawned entity (game value)
- Call a process named 'HPLoop'
In the 'HPLoop' process:
Repeat forever
{
- Set a local variable named 'hpLoc' to the eye location of the default player and shift it on the y axis by 1
- Select all entities by the name %default hpUUID (use the variable ofc)
- Launch the selected entity towards hpLoc with 100 launch power (add to current velocity: false, ignore distance: false)
(you can also do this with a teleport but it's gonna look very janky)
- Use 'set to text' to set a local variable to the text version of the current health of the default player (I called it 'hpText')
- Set the selected entity's name to hpText
- Select the default player
- Wait 1 tick
}
This is a simple solution because it only shows the number, but I can show you how to do it with hearts if you can hop on the server sometime soon :)
(also I have the code so if this sounds too confusing then you can just copy it lmao)