local badeline = nil

function onBegin()
 disableMovement()
 player.ForceCameraUpdate = true
  -- determine the position and flipping properties
  local pos_x, scale
  -- change to minus 18 and positive 1 if you want the badeline on the left
  pos_x = player.Position.X + 18
  scale = -1
  local pos_y = player.Position.Y - 8

  -- create and add a new badeline dummy entity
  badeline = celeste.BadelineDummy(vector2(pos_x, pos_y))
 badeline:Appear(getRoom(), true)
 getRoom():Add(badeline)
 say("Somera_newLimbo_a_d_08_badelineDies")
--screen glitch
setFlag("d-08_glitch", true)
setFlag("d-08_rumble", true)
--screen rumble
 say("Somera_newLimbo_a_d_08_badelineDies2")
--screen glitch
setFlag("d-08_glitch2", true)
wait(.22)
local pos = badeline.Position
pos.Y = pos.Y + 24
badeline.Position = pos
 badeline.Sprite:Play("glitch")
wait(2.0)
 say("Somera_newLimbo_a_d_08_badelineDies3")
end

function onEnd(room, wasSkipped)
 enableMovement()
 teleportTo(3494, -1944,"e-00")
end