--// 스크립트 \\--


while wait(0.2) do
	for _,v in pairs(Main:GetChildren()) do
		if v:isA("Part") then
			Found = false
			local hitbox = Region3.new(v.Position - (v.Size/2), v.Position + (v.Size/2))
			local Char = Player.Character or Player.CharacterAdded:Wait()
			local list = workspace:FindPartsInRegion3WithWhiteList(hitbox, Char:GetDescendants())
			
			for _, Filter in pairs(list) do
				if Filter:FindFirstAncestor(Player.Name) then
					Found = true
					break
				else
					Found = false
				end
			end
			if Found == true then
				for _,v in pairs(Main:WaitForChild(v.Name.."Music"):GetChildren()) do
					if v:isA("Sound") and v.IsPlaying == false then
						v:Play()
						break
					end
				end
			else
				for _,v in pairs(Main:WaitForChild(v.Name.."Music"):GetChildren()) do
					if v:isA("Sound") then
						v:Stop()
					end
				end
			end
		end
	end
end
