local function Q(Q,c)ResultString.Text=string.upper(Q)if c and c>0 then local Q=math.floor(c/60)local k=math.floor(c%60)if k<10 then k="\048"..tostring(k)end ResultTime.Text=string.upper("\087\073\078\078\073\078\071 \084\073\077\069\058 "..(tostring(Q)..("\058"..tostring(k))))else ResultTime.Text=""end dlg.Visible=true wait(DISPLAY_DURATION)dlg.Visible=false end
-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================
-- Display result dialog
local function openDlg(resultString, resultTime)
	-- Display result string
	ResultString.Text = string.upper(resultString)

	-- Display result time if > 0 (formatted)
	if resultTime and resultTime > 0 then
		local minutes = math.floor(resultTime / 60)
		local seconds = math.floor(resultTime % 60)
		if seconds < 10 then
			seconds = "0" .. tostring(seconds)
		end
		ResultTime.Text = string.upper("WINNING TIME: " .. tostring(minutes) .. ":" .. tostring(seconds))
	else
		ResultTime.Text = ""
	end

	dlg.Visible = true

	wait(DISPLAY_DURATION)

	dlg.Visible = false
end -- openDlg()
