CCCPaste

New Woods System

local number = 0
local Maxnumber = 10

local WoodsGui = script.Parent.PlankInWindow.WoodsGui

for i, Window in pairs(script.Parent:GetChildren()) do
	if Window.Name == "Window" then
		
		local Proximity = Window.Proximity

		Proximity.Triggered:Connect(function(player)

			local Plank = player.Character:FindFirstChild("Plank")

			if Plank then
				Plank:Destroy()
				number = number + 1
				WoodsGui.TextLabel.Text = "Woods: "..number.." / "..Maxnumber
			end
			
			if number == Maxnumber then
				script.Parent.PlankInWindow.Transparency = 0
			end
			
			while wait() do
				if number == Maxnumber then
					wait(1)
					break
				end
			end
		end)
	end
end