Create a new scene with MarginContainer as root
Save the scene as hud.tscn
Add an HBoxContainer as child
This will align horizontally
Add Label and HBoxContainer as children
Renamed to Score and LifeCounter
In Layout => Container Sizing
Set Kenney Thick.ttf as Font
Add a TextureRect as child
Set heart.png as the Texture
Set Stretch Mode to Keep Aspect Centered
Now duplicate L1 node four times
Add a new script to the HUD node
Add a ready var for the life counter
Add a function to update lives
Return to the LevelBase scene
Add a CanvasLayer node as child of LevelBase
Add an instance of HUD scene as a child
Connect the hud functions
To the signals from player and
Play Test The Game to Verify