function EventLoopCoroutine()
    dialogCoroutine = coroutine.create(function()
        loadBackground("res/backgrounds/himmel.png", 0)
        loadBackground("res/backgrounds/Backgrounds (Other)/EBG11A.png", 1)
        loadBackground("res/backgrounds/Backgrounds (Other)/EBG01N1.png", 2)
        loadMusic("res/music/03 - Chaining -beta-.mp3")
        local currentTime = getTime()
        while getTime() - currentTime < 1.5 do
            drawText("Leiblich's Plan", 100, 100, 30)
            coroutine.yield()
        end
        playMusic()
        drawBackground(getScreenWidth()/2, getScreenHeight()/2, 1.68, 0)
        dialogBox({
            "Sayaka Yukidoh died on January 11, 2001.",
            "But that's only the official information.",
            "Her new name - Inubushi Keiko - was written into every government database.",
            "Nothing can reveal her true personality.",
            "She can't do it either.",
            "She is Inubushi Keiko now. A girl with DID. And, for some reason, she believes her birthday is April 30, even though that's not true.",
        }, {})
        while isDialogExecuted() do
            coroutine.yield()
        end
        stopDrawBackground(0)
        local currentTime = getTime()
        while getTime() - currentTime < 0.4 do
            coroutine.yield()
        end
        drawBackground(getScreenWidth()/2, getScreenHeight()/2, 1.68, 1)
        dialogBox({
            "Inubushi Keiko killed 12 patients and wounded 19 others in Awazumi Hospital.",
            "Leiblich's plan began executing itself. Again.",
            "She forgot everything about Awazumi Hospital - but not the pain she endured because of Leiblich inside that facility, even with another personality.",
            "Among the victims was the person responsible for the plan's development. She got her revenge.",
        }, {})
        while isDialogExecuted() do
            coroutine.yield()
        end
        stopDrawBackground(1)
        local currentTime = getTime()
        while getTime() - currentTime < 0.4 do
            coroutine.yield()
        end
        drawBackground(getScreenWidth()/2, getScreenHeight()/2, 1.68, 2)
        dialogBox({
            "Sayaka was imprisoned in SPHIA.",
        }, {})
        while isDialogExecuted() do
            coroutine.yield()
        end
        stopMusic()
        stopDrawBackground(2)
        local currentTime = getTime()
        while getTime() - currentTime < 0.4 do
            coroutine.yield()
        end
        unloadBackground(0)
        unloadBackground(1)
        unloadBackground(2)
        unloadMusic()
        loadScript("scripts/SE08.lua")
    end)
end

function EventLoop()
    if dialogCoroutine and coroutine.status(dialogCoroutine) ~= "dead" then
        coroutine.resume(dialogCoroutine)
    end
end

setFont("res/InterTight-Regular.ttf")
EventLoopCoroutine()