Need help with collectibles in game

Hello. I’m currently programming a 2D sidescrolling game. In it, I have collectibles that you can choose to pick up while running through the levels. When you pick them up, it adds 1 to an integer variable stored in the Game Instance, which then puts the integer in a widget telling you your score. This is all fine and dandy, but when your character dies I want to subtract a point from this value. While using an integer - integer is a good band-aid fix, this also means if you die on level 1 without getting any points, you end up with points in the negatives. Also, say you collect 2 items but then die 2 times in level 3. You end up losing both of those items, which I don’t want it to do. Is there a way to set it so that, if I’m on level 2 and have the item from level 1, I cannot lose the item from level 1 by dying on level 2 but CAN lose the item from level 2?

You should have two types of integers. Temporary which you can add and subtract within the same level (by the way use clamp node if you don’t want to get negative value). And the permanent which you should increase every level by current temporary (don’t forget to zero Temporary at this point).