use wasd to move (sorry non-pc players) and basically this is a basics for like a health system in any type of game and feel free to use this in your game!