local y="\083\104\111\112\082\101\103\105\111\110"local Z=1 local s=0 function hookupRegionPart(y)y.Touched:Connect(function(y)if os.clock()<s+Z then return end local A=Players.LocalPlayer.Character if A and A:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")==y then MerchBooth.openMerchBooth()end end)y.TouchEnded:Connect(function(y)local Z=Players.LocalPlayer.Character if Z and Z:FindFirstChild("\072\117\109\097\110\111\105\100\082\111\111\116\080\097\114\116")==y then s=os.clock()MerchBooth.closeMerchBooth()end end)end for y,Z in ipairs(CollectionService:GetTagged(y))do hookupRegionPart(Z)end;(CollectionService:GetInstanceAddedSignal(y)):connect(hookupRegionPart)
-- Hook up ShopRegion parts to open and close the merch booth
local TAG_NAME = "ShopRegion"
local DEBOUNCE_TIME = 1
local lastClose = 0
function hookupRegionPart(regionPart)
	regionPart.Touched:Connect(function(otherPart)
		-- Debounce the shop from opening too soon after being closed
		if os.clock() < lastClose + DEBOUNCE_TIME then
			return
		end

		local character = Players.LocalPlayer.Character
		if character and character:FindFirstChild("HumanoidRootPart") == otherPart then
			MerchBooth.openMerchBooth()
		end
	end)

	regionPart.TouchEnded:Connect(function(otherPart)
		local character = Players.LocalPlayer.Character
		if character and character:FindFirstChild("HumanoidRootPart") == otherPart then
			lastClose = os.clock()
			MerchBooth.closeMerchBooth()
		end
	end)
end

for _, regionPart in ipairs(CollectionService:GetTagged(TAG_NAME)) do
	hookupRegionPart(regionPart)
end
CollectionService:GetInstanceAddedSignal(TAG_NAME):connect(hookupRegionPart)
