--------------------------------------------------------------------------------


local function SetWaterState(ReadyToUse: boolean)
	for _, WaterPart in Fountain.Water:GetChildren() do
		if WaterPart:IsA("BasePart") then
			if not WaterColor[WaterPart] then
				WaterColor[WaterPart] = WaterPart.Color
			end
			Tween:Play(WaterPart, {1, "Circular"}, {Color = ReadyToUse and WaterColor[WaterPart] or Color3.fromRGB(118, 118, 118)})
		end
	end
end

Fountain.Healed.OnClientEvent:Connect(function(ServerTime: number)
	SetWaterState(false)
	Tween:Play(BillboardGui.Header, {1, "Circular"}, {TextTransparency = 0.7})
	BillboardGui.Cooldown.Visible = true
	
	while true do
		local Difference = workspace:GetServerTimeNow() - ServerTime
		local ReadyToUse = Difference > Timer
		if ReadyToUse then
			break
		end
		BillboardGui.Cooldown.Text = "-".. math.ceil(Timer-Difference) .."-"
		task.wait(0.2)
	end
	
	SetWaterState(true)
	Tween:Play(BillboardGui.Header, {1, "Circular"}, {TextTransparency = 0})
	BillboardGui.Cooldown.Visible = false
end)
