function onBegin()
    disableMovement()
    disableRetry()
    setFlag("BLACKLIGHT_ITB_01_01_BARRIER", false)
    setFlag("BLACKLIGHT_ITB_INTRO_ROSE", false)
    
    wait(1)
    setFlag("BLACKLIGHT_ITB_01_01_BARRIER", true)

    jump()
    run(24)
    wait(0.4)
    jump()
    run(24)
    wait(0.4)
    walk(4)
    wait(1.5)

    say("BLACKLIGHT_ITB_DIALOGUE_ROSE")
    wait(1)

    walk(24)
    wait(1)
    playSprite("duck")
    wait(0.4)
    setFlag("BLACKLIGHT_ITB_INTRO_ROSE", true)
    wait(0.2)
    playSprite("idle", 1)
end

function playSprite(sprite, duration)
    player.DummyAutoAnimate = false
    player.Sprite:Play(sprite, false, false)
    if (duration) then
        wait(duration)
        player.DummyAutoAnimate = true
    end
end

function onEnd(room, wasSkipped)
    enableMovement()
    enableRetry()
    setFlag("BLACKLIGHT_ITB_01_01_BARRIER", true)
    setFlag("BLACKLIGHT_ITB_INTRO_ROSE", true)
end