Please Help me for this script:

local minigame = game.ReplicatedStorage.MiniGames:GetChildren()
local choosen = nil
local internmission = false
local GameEnded = true
local TimeWait = 11
local TimeSet = 11
local InternWait = 11
local InternSet = 11
---------------
local CountDownFinished = false
local IntermissionFinished = false
--------- 
function CountDown()
	if workspace:FindFirstChild("CdTime")and CountDownFinished == false then
		for i = 1 , TimeSet do
			TimeWait = TimeWait-1
			workspace:FindFirstChild("CdTime").Text = "minigame will start in".." "..TimeWait.." ".."Seconds."
		end
		workspace:FindFirstChild("CdTime"):Destroy()
		CountDownFinished = true
		
		
		
		 
	elseif workspace:FindFirstChild("CdTime") == nil and CountDownFinished == false  then
		local Cd = Instance.new("Hint")
		Cd.Parent = workspace
		for i = 1,TimeSet do
			wait(1)
			print("M")
			TimeWait = TimeWait-1
			Cd.Text = "minigame will start in".." "..TimeWait.." ".."Seconds."
		end
		Cd:remove()
		CountDownFinished = true
		
	end
end
if CountDownFinished == false then
	CountDown()
end
function Intermission()
	if CountDownFinished == true and IntermissionFinished == false then
	local h2 = Instance.new("Hint")
	h2.Parent = workspace
	for i = 1,InternSet do
		InternWait = InternWait-1
		h2.Text = "Intermission In".." "..InternWait.." ".."Seconds !!!,Get Ready!"
	end
	h2:remove()
	IntermissionFinished = true
	end
end
if CountDownFinished == true and IntermissionFinished == false then
	Intermission()
end -- Can i use the for loop?

Any Advice,Help or examples will be appreciated. Thanks