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

function onBegin()

	if getFlag("saida_deeperwell") then

		setFlag("saida_deeperwell", false)
		disablePause()
		disableMovement()
		doFadeWipe(true)
		player.ForceCameraUpdate = true
		wait(1.05)
		enablePause()
		enableMovement()

	end

end