local luaCutscenesUtils = require("#ExtendedVariants.Module.LuaCutscenesUtils")

function onBegin()
    disableMovement()
    disablePause()
    playMusic("-")
    setFlag("fade_to_black", true)
    luaCutscenesUtils.TriggerFloatVariant("GameSpeed", 1.0, false)

    wait(0.75)

    postcard("FFFFF_failed_to_load","event:/ui/main/postcard_csides_in","event:/ui/main/postcard_csides_out")

    wait(1)

    playSound("event:/new_content/game/10_farewell/glitch_short")

    wait(1.5)
end

function onEnd()
    if(getFlag("failure_b")) then
        setFlag("failure_for_good")
    end

    enableMovement()
    enablePause()
    teleportTo(19356,-1893,"50 Find your Fortune")
end