execute unless entity @s[nbt={Dimension:"minecraft:overworld"}] run tellraw @s [{"text":"[۩]","color":"green","bold":true},{"text":": ","color":"white","bold":false},{"text":"You must settle in the Overworld.","color":"white","bold":false}]
execute if entity @e[tag=nitKTP,distance=..500] run tellraw @s [{"text":"[۩]","color":"green","bold":true},{"text":": ","color":"white","bold":false},{"text":"You cannot settle so close to another town. Venture out farther!","color":"white","bold":false}]
execute if entity @s[nbt={Dimension:"minecraft:overworld"}] unless entity @e[tag=nitKTP,distance=..500] run tellraw @s [{"text":"[۩]","color":"green","bold":true},{"text":": ","color":"white","bold":false},{"text":"You begin to unpack your wagon...","color":"white","bold":false}]
execute if entity @s[nbt={Dimension:"minecraft:overworld"}] unless entity @e[tag=nitKTP,distance=..500] run function nitk:contract
scoreboard players set @s nitContract 0
execute if entity @e[tag=nitKTP,distance=..20] run gamerule sendCommandFeedback true