I just improved the code last night, did an all nighter to get the checkpoint system to work.
Now resting at the bed really works as intended by setting all variables to their current value so when you die in the game these values will be retrieved, avoiding soft locking the game and making it so much easier for me to code :)