scoreboard players set @s svm_ep.previous_dimension 0

execute if dimension minecraft:the_nether run scoreboard players set @s svm_ep.previous_dimension 1
execute if dimension minecraft:the_end run scoreboard players set @s svm_ep.previous_dimension 2
execute if dimension svm_ep:paradise run scoreboard players set @s svm_ep.previous_dimension 3
execute if dimension svm_ep:cherry_island run scoreboard players set @s svm_ep.previous_dimension 4
execute if dimension svm_ep:pocket run scoreboard players set @s svm_ep.previous_dimension 5
execute if dimension svm_ep:void run scoreboard players set @s svm_ep.previous_dimension 6