Scrolling Platformer

Instructions: Click the green flag and then answer if you want lives or not. Use arrow keys to move around. Your goal is to get through the obstacle course. Dodge lava and spikes. If you used lives comment how many lives you had left at the end (if you get to it!).\n\nTip: hold on up and right arrow keys to jump up wall.\n\n \n\n

@Stage\n\nwhen flag clicked\n\nwhen I receive [start v]\n\nswitch backdrop to (title v)\n\nswitch backdrop to (backdrop1 v)\n\n@Character\n\nwhen I receive [start v]\nset [paused v] to [0]\nshow\ngo to x: (24) y: (54)\nset [yvel v] to [-1]\nset [xvel v] to [0]\nset [step v] to [0]\nswitch costume to (costume1 v)\nforever\n    switch costume to (costume1 v)\n    repeat until <not <(Paused) = [1]>>\n        go [backward v] (1) layers\n        wait (0.1) seconds\n    end\n    go to [front v] layer\n    change [yvel v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [xvel v] by (1)\n    else\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            change [xvel v] by (-1)\n        end\n    end\n    set [xvel v] to ((Xvel) / (1.097))\n    Check For Walls\n    if <not <(special) = [1]>> then\n        change [scrollx v] by (() - (Xvel))\n    end\n    if <<<(ScrollX) > [0]> or <(ScrollX) < ((-480) * (11))>> or <(special) = [1]>> then\n        change x by (Xvel)\n    else\n        set x to (0)\n    end\n    change y by (Yvel)\n    if <touching color (#00ff6a)?> then\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-0.5)\n    if <<key (up arrow v) pressed?> and <touching color (#00ff6a)?>> then\n        set [yvel v] to [8]\n    end\n    change y by (0.5)\n    switch costume to (step)\nend\n\ndefine Check For Walls\nset [bleh v] to [0]\nrepeat until <<not <touching color (#00ff6a)?>> or <(bleh) > [10]>>\n    change [bleh v] by (1)\n    change y by (1)\nend\nif <(bleh) > [10]> then\n    change y by (-10)\n    if <key (up arrow v) pressed?> then\n        if <(Xvel) > [0]> then\n            set [xvel v] to [-8]\n        else\n            set [xvel v] to [8]\n        end\n    else\n        if <(Xvel) > [0]> then\n            set [xvel v] to (((Xvel) * (-1)) - (1))\n        else\n            set [xvel v] to (((Xvel) * (-1)) + (1))\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <<touching color (#ff0000)?> or <touching color (#b5b5b5)?>> then\n        change [lives v] by (-1)\n        change [bleh v] by (0)\n        hide\n        start sound [rattle v]\n        set [ouch? v] to [1]\n        set [xvel v] to [0]\n        wait (0.5) seconds\n        set [xvel v] to [0]\n        go to x: (0) y: (130)\n        show\n        wait (1) seconds\n    end\n    if <(answer) = [yes]> then\n        if <(lives) < [1]> then\n            stop [all v]\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> then\n        next costume\n        set [step v] to (costume [number v])\n        wait (0.05) seconds\n    else\n        switch costume to (costume1 v)\n        set [step v] to [1]\n    end\nend\n\nwhen [space v] key pressed\nhide\nwait (1) seconds\nshow\ngo to x: () y: (-75)\n\nwhen flag clicked\nbroadcast (start v)\n\nbroadcast (thing v)\n\nwhen flag clicked\nhide variable [lives v]\nask [Do you want there to be lives?] and wait\nif <(answer) = [yes]> then\n    show variable [lives v]\n    set [lives v] to [15]\nend\n\nif <(lives) > [0]> then\n\n@Scroller\n\nwhen flag clicked\nhide\n\nwhen [space v] key pressed\nif <(special) = [1]> then\n    glide (1) secs to x: (x position) y: (350)\n    hide\nelse\n    show\n    glide (1) secs to x: (x position) y: (0)\nend\n\nwhen I receive [start v]\nset [scrollx v] to [0]\nset [levelid v] to [0]\nswitch costume to (level 0 v)\ngo [backward v] (9999) layers\ngo to x: (0) y: (0)\nshow\nrepeat (13)\n    create clone of (_myself_ v)\n    change [levelid v] by (1)\nend\nswitch costume to (level 0 v)\nhide\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (10) layers\nswitch costume to (join [Level ] (LevelID))\nforever\n    if <(ouch?) = [1]> then\n        set [scrollxt v] to (ScrollX)\n        repeat (25)\n            change [scrollxt v] by (((((ScrollX) + (([abs v] of (ScrollX) ) mod (480))) + (480)) - (ScrollXT)) / (5))\n            set x to ((ScrollXT) + ((480) * (LevelID)))\n            if <<((ScrollXT) + ((480) * (LevelID))) > [479]> or <((ScrollXT) + ((480) * (LevelID))) < [-479]>> then\n                hide\n            else\n                show\n            end\n        end\n        set [ouch? v] to [0]\n        set [scrollx v] to (ScrollXT)\n    end\n    if <<((ScrollX) + ((480) * (LevelID))) > [479]> or <((ScrollX) + ((480) * (LevelID))) < [-479]>> then\n        hide\n    else\n        show\n    end\n    if <<(ScrollX) < [0]> and <(ScrollX) > ((-480) * (11))>> then\n        set x to ((ScrollX) + ((480) * (LevelID)))\n    end\nend\n\nwhen I receive [thing v]\nswitch costume to (level 0 v)\n\nset [levelid v] to [11]\n\n@Music mute button\n\nwhen I receive [start v]\nforever\n    play sound [MJ1 v] until done\nend\n\nwhen I receive [start v]\nshow\nwait (0.1) seconds\nset volume to (100) %\ngo to x: (-7) y: (-146)\ngo to [front v] layer\nset [ghost v] effect to (0)\nswitch costume to (button v)\nwait (0.5) seconds\nforever\n    if <not <touching (mouse-pointer v)?>> then\n        change [ghost v] effect by (3)\n    else\n        change [ghost v] effect by (-3)\n        if <mouse down?> then\n            set volume to ((100) - ([abs v] of (volume) )) %\n            next costume\n            wait until <not <mouse down?>>\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@Secret Room\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-350)\nset [special v] to [0]\n\nwhen [space v] key pressed\nif <(special) = [0]> then\n    set [special v] to [1]\n    show\n    glide (1) secs to x: (0) y: (0)\nelse\n    set [special v] to [0]\n    glide (1) secs to x: (0) y: (-350)\n    hide\nend\n\nchange y by (-10)\n\n@thumbnail\n\nwhen flag clicked\nhide\n\nshow\ngo to x: (-12) y: (18)\n\nhide\n\n