scoreboard players operation previous rooms_from_spawn = @e[tag=center,distance=..0.1,limit=1] rooms_from_spawn

execute if score @s rooms_from_spawn < @e[tag=center,distance=..0.1,limit=1] rooms_from_spawn run scoreboard players operation @e[tag=center,distance=..0.1] rooms_from_spawn = @s rooms_from_spawn

execute unless entity @e[tag=center,distance=..0.1,limit=1,scores={rooms_from_spawn=1..}] run scoreboard players operation @e[tag=center,distance=..0.1] rooms_from_spawn = @s rooms_from_spawn

execute unless score previous rooms_from_spawn = @e[tag=center,distance=..0.1,limit=1] rooms_from_spawn run scoreboard players add @e[tag=center,distance=..0.1] rooms_from_spawn 1
