function EventLoopCoroutine()
    dialogCoroutine = coroutine.create(function()
        loadBackground("res/backgrounds/Backgrounds (Other)/BG_C03N2.png", 0)
        loadCharacter("res/characters/Sayaka Yukidoh/SY06CL.png", 0)
        drawCharacter(getScreenWidth()/2, getScreenHeight()/2, 2.2, 0)
        drawBackground(getScreenWidth()/2, getScreenHeight()/2, 1.68, 0)
        loadMusic("res/music/07 - Delusive consciousness amb..mp3")
        playMusic()
        dialogBox({
            "[Self] Sayaka! Sayaka! You should leave this place, now! Follow my voice!",
            "[Sayaka] Who... are you?",
            "[Self] It doesn't matter! Follow me, please! For God's sake!",
            "[Sayaka] You can't run. There's nowhere to go.",
            "[Self] What are you talking about?",
            "[Sayaka] We're on an isolated island. There's nowhere to run.",
            "[Satoru] Sayaka! Good morning! How are you?",
            "[Self] Damn... Can I somehow do anything with it?",
        }, {})
        while isDialogExecuted() do
            coroutine.yield()
        end
        dialogBox({
            "[Satoru] ...",
            "[Satoru] Sayaka. I think we should leave this facility. For your safety and life.",
            "[Sayaka] Shadow... You've rewritten my brother, haven't you?",
            "[Sayaka] There's no reason to do this. I still won't go anywhere. Sorry.",
            "[Sayaka] ...I'm afraid I might kill someone.",
            "[Satoru] Sayaka! Is it still you?",
            "[Sayaka] ...",
            "[Inubushi] Huh? Who are you talking to?...",
            "[Self] No! You're Sayaka! Sayaka Yukidoh!",
            "[Self] (I've failed.)",
        }, {})
        while isDialogExecuted() do
            coroutine.yield()
        end
        stopMusic()
        stopDrawBackground(0)
        stopDrawCharacter(0)
        local currentTime = getTime()
        while getTime() - currentTime < 0.4 do
            coroutine.yield()
        end
        unloadCharacter(0)
        unloadBackground(0)
        unloadMusic()
        loadScript("scripts/SE07.lua")
    end)
end

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

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