In my game, I would like to have a points system, but I do not know how to implement that.

I've seen other games where the value of the points saves on player entry and exit, and I would like to know how to do that as well.

Thank you for your time!