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


function onBegin()

  disablePause()
  waitUntilOnGround()
  disableMovement()
  player.ForceCameraUpdate = true
  player.DummyAutoAnimate = false
  player.Sprite:Play("runStumble", true, false)
  walkTo(2195, false, 1.5)

  blackscreen = celeste.Mod.MaxHelpingHand.Entities.MoreCustomNPC.GetNPC("blackscreen")
  blackscreen.Position = vector2(2195, 7010)

  player.DummyAutoAnimate = true
  wait(2)

  doFadeWipe(false)
  wait(1.3)
  setFlag("outcorredor")

end