Hi guys i really need help in making code for a side scroll score.

I want to make the score based on distance traveled pretty the same as temple run i have my game and enemy's with hit box's collisions etc however i am having trouble coding the score on the HUD that i want

Any help would be very appreciated guys and thank you in advance.