local function doFadeWipe(state)
  local Color = require("#Microsoft.Xna.Framework.Color")
  local screenWipe = require("#Celeste.ScreenWipe")
    fadeWipe = celeste.FadeWipe(engine.Scene, state, nil)
    engine.Scene:Add(fadeWipe)
    fadeWipe.duration = 8
    fadeWipe.EndTimer = 3
    screenWipe.WipeColor = Color.White
end

local luaCutscenesUtils = require("#Celeste.Mod.MaxHelpingHand.Module.LuaCutscenesUtils")


function onBegin()

  if getFlag("vazou7") then

    disableMovement()

    setFlag("comorquidea")
    coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CelesteBrasil_wanderbirthdaymap_orquidea"))

    disablePause()
    setFlag("falou7", false)
    setFlag("vazou7", false)
    wait(1)

    doFadeWipe(false)
    wait(5)

    setFlag("bibliotecasaida")

  end

end

function onEnd(wasSkipped)
  if wasSkipped then
    disablePause()
    setFlag("comorquidea")
    setFlag("falou7", false)
    setFlag("vazou7", false)
    setFlag("bibliotecasaida")
  end
end