local function O()TimerFrame.Visible=true local O=DURATION repeat Timer.Text=tostring(O)O=O-1 CountdownBeep:Play()wait(1)until O==0 CountdownEndBeep:Play()TimerFrame.Visible=false end

local function countdown()
	-- Show GUI
	TimerFrame.Visible = true
	
	-- Set time remaining to countdown duration
	local timeRemaining = DURATION
	
	-- Countdown
	repeat
		Timer.Text = tostring(timeRemaining)
		timeRemaining = timeRemaining - 1
		CountdownBeep:Play()
		wait(1)
	until timeRemaining == 0
	
	CountdownEndBeep:Play()
	-- Hide GUI
	TimerFrame.Visible = false
end