function onBegin()

	math.randomseed(os.time())
	-- intro voice plays regardless of settings
	if not getFlag("intermission0StoryTold") then
		wait(2.5)
		playSound("event:/2024StoryContest/Narrator_Robot/i0_0")
		wait(1.75)
		playSound("event:/2024StoryContest/Narrator_Robot/i0_1")
		wait(1.75)
		playSound("event:/2024StoryContest/Narrator_Robot/i0_2")
		wait(3.5)
		playSound("event:/2024StoryContest/Narrator_Robot/i0_3")
		wait(3.5)
		playSound("event:/2024StoryContest/Narrator_Robot/i0_4")
		wait(5)
		playSound("event:/2024StoryContest/Narrator_Robot/i0_5")
		setFlag("intermission0StoryTold")
	end
	
	::randomSentence::
	timeToWait = math.random(12,15)
	sentence = math.random(0,5)
	wait(timeToWait)
	if getFlag("MO_CC_FIERecyclingPlant_voice") then
		if sentence == 0 then
			playSound("event:/2024StoryContest/Narrator_Robot/i0b_0")
		elseif sentence == 1 then
			playSound("event:/2024StoryContest/Narrator_Robot/i0b_1")
		elseif sentence == 2 then
			playSound("event:/2024StoryContest/Narrator_Robot/i0b_2")
		elseif sentence == 3 then
			playSound("event:/2024StoryContest/Narrator_Robot/i0b_3")
		elseif sentence == 4 then
			playSound("event:/2024StoryContest/Narrator_Robot/i0b_4")
		elseif sentence == 5 then
			playSound("event:/2024StoryContest/Narrator_Robot/i0b_5")
		end
	end
	goto randomSentence
end