How do you create a respawn system where the player retains their items (variables?)

The easiest option, just move the player back to when things were ok:

But, you need to set the checkpoints of the locations, as you go.