local function doFadeWipe(state)
  fadeWipe = celeste.FadeWipe(engine.Scene, state, nil)
  engine.Scene:Add(fadeWipe)
  fadeWipe.duration = 2
  fadeWipe.EndTimer = 1
end

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


function onBegin()

  disablePause()
  disableMovement()

  coroutine.yield(luaCutscenesUtils.SayWithDifferentFont("OMORI_GAME", "CBR_BlackSpace_door1_room6_catskip"))

  coroutine.yield(luaCutscenesUtils.ChoiceWithDifferentFont("OMORI_GAME", "CBR_BlackSpace_door1_room6_choice1", "CBR_BlackSpace_door1_room6_choice2"))
  local multipla = luaCutscenesUtils.GetChoice()

  if multipla == 1 then

    wait(0.5)
    setFlag("stopmusic1")
    doFadeWipe(false)
    wait(1.3)
    setFlag("enddoor1")
    enableMovement()
    enablePause()

  else

    setFlag("catskip", false)
    enableMovement()
    enablePause()

  end

end