For example, with each reborn, you get storage:
player:setStorageValue(123123, player:getStorageValue(123123) + 1)
And to enter through a door, you use a script for the door, example: ActionID = 123123
In actions / scripts, you connect the door and set the script:
if...