How do I restart level on player death?

You will have to switch level anyway. So you can store new levelname in a variable and use it like that.

Each time you switch level you can simply set new name like that and use same function.