------------------
--| Clock Loop |--
------------------


while true do
	if Running and TimeObject.Value >= 0 then -- Change TimeObject's Value by how much time has passed
		local now = tick()
		local deltaTime = now - LastTime
		if CountingDown then
			TimeObject.Value = TimeObject.Value - deltaTime
		else
			TimeObject.Value = TimeObject.Value + deltaTime
		end
		LastTime = now
	end
	wait()
end
