--//Controller//--

ClickDetector.MouseClick:Connect(function()
	if not Settings.Clicked then
		Settings.Clicked = true
		
		MainButton.Color = Color3.fromRGB(0, 255, 0)
		
		if CurrentLayer.Value == 0 then
			CurrentLayer.Value = 1
			
			for _, Object in pairs(FirstLayer:GetChildren()) do
				if Object:IsA("BasePart") then
					Object.Transparency = 0
					Object.CanCollide = true
					
				end
			end
			
		elseif CurrentLayer.Value == 1 then
			CurrentLayer.Value = 2
			
			for _, Object in pairs(SecondLayer:GetChildren()) do
				if Object:IsA("BasePart") then
					Object.Transparency = 0
					Object.CanCollide = true

				end
			end
			
		elseif CurrentLayer.Value == 2 then
			CurrentLayer.Value = 3

			for _, Object in pairs(ThirdLayer:GetChildren()) do
				if Object:IsA("BasePart") then
					Object.Transparency = 0
					Object.CanCollide = true

				end
			end
		end
	end
end)
