local function doFadeWipe(state)
    fadeWipe = celeste.FadeWipe(engine.Scene, state, nil) -- (state = "false" escurece ,"true" clareia)
    engine.Scene:Add(fadeWipe)
    fadeWipe.duration = 2
    fadeWipe.EndTimer = 1
  end


function onBegin()

  if getFlag("tpsaladovizinho") then
    player.Facing = getEnum("Celeste.Facings", "Right")
    player.ForceCameraUpdate = true
    doFadeWipe(true)

    wait(1.5)
    player.Speed = vector2(0, -400)
    wait(1)
    enableMovement()
    enablePause()
    setFlag("tpsaladovizinho", false)

  end

end