Platformer ;) || A Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Frozen Droplets v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\nset [level v] to [1]\nbroadcast (start level v)\n\nwhen I receive [start level v]\nset [jumping v] to [false]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    change [y velocity v] by (-1)\n    if <key (left arrow v) pressed?> then\n        if <(x velocity) > [-10]> then\n            change [x velocity v] by (-2)\n        end\n    end\n    if <key (right arrow v) pressed?> then\n        if <(x velocity) < [10]> then\n            change [x velocity v] by (2)\n        end\n    end\n    if <(x velocity) > [0]> then\n        change [x velocity v] by (-1)\n    end\n    if <(x velocity) < [0]> then\n        change [x velocity v] by (1)\n    end\n    change x by (x velocity)\n    move vertical\n    move horizontal\n    if <touching color (#14ff00)?> then\n        broadcast (next level v)\n    end\n    if <<(y position) < [-179]> or <touching color (#ff0000)?>> then\n        broadcast (start level v)\n    end\nend\n\ndefine move vertical\nchange y by (y velocity)\nif <touching color (#2900ff)?> then\n    if <(y velocity) > [0]> then\n        repeat until <not <touching color (#2900ff)?>>\n            change y by (-1)\n        end\n    else\n        repeat until <not <touching color (#2900ff)?>>\n            change y by (1)\n        end\n        set [jumping v] to [false]\n    end\n    set [y velocity v] to [0]\nend\n\nwhen [up arrow v] key pressed\nif <(jumping) = [false]> then\n    set [y velocity v] to [15]\n    set [jumping v] to [true]\nend\n\ndefine move horizontal\nif <touching color (#2900ff)?> then\n    if <(x velocity) > [0]> then\n        repeat until <not <touching color (#2900ff)?>>\n            change y by (-2)\n        end\n    else\n        repeat until <not <touching color (#2900ff)?>>\n            change y by (2)\n        end\n    end\n    set [x velocity v] to [0]\nend\n\nwhen I receive [start level v]\nif <(level) = [1]> then\n    go to x: (-184) y: (-42)\n    switch backdrop to (backdrop1 v)\nend\nif <(level) = [2]> then\n    go to x: (200) y: (-55)\n    switch backdrop to (backdrop2 v)\nend\nif <(level) = [3]> then\n    go to x: (-196) y: (127)\n    switch backdrop to (backdrop3 v)\nend\nif <(level) = [4]> then\n    go to x: (-174) y: (-137)\n    switch backdrop to (backdrop5 v)\nend\nif <(level) = [5]> then\n    switch backdrop to (backdrop4 v)\nend\nif <(level) = [6]> then\n    switch backdrop to (backdrop6 v)\n    go to x: (-212) y: (-83)\nend\nif <(level) = [6]> then\n    switch backdrop to (backdrop6 v)\n    go to x: (-212) y: (-83)\nend\nif <(level) = [7]> then\n    switch backdrop to (backdrop7 v)\n    go to x: (-212) y: (-83)\nend\nif <(level) = [8]> then\n    switch backdrop to (backdrop8 v)\n    go to x: (-212) y: (-83)\nend\nif <(level) = [10]> then\n    switch backdrop to (backdrop10 v)\n    go to x: (-212) y: (-83)\nend\nif <(level) = [11]> then\n    switch backdrop to (backdrop10 v)\n    go to x: (-212) y: (-83)\nend\nif <(level) = [9]> then\n    switch backdrop to (backdrop9 v)\n    go to x: (-212) y: (-83)\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\nstop [other scripts in sprite v]\nbroadcast (start level v)\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to (1 v)\n    end\n    if <key (right arrow v) pressed?> then\n        switch costume to (2 v)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [start level v]\nstop [other scripts in sprite v]\nif <(level) = [3]> then\n    show\nelse\n    hide\nend\nmove platform\n\ndefine move platform\ngo to x: (3) y: (-179)\nforever\n    glide (1) secs to x: (3) y: (40)\n    glide (1) secs to x: (-3) y: (-179)\nend\n\ngo [forward v] (1) layers\nhide\nhide\nhide\nshow\nshow\nshow\nshow\nshow\n\n
Use arrow keys to move \ni unshared it to make more levels\nhave fun :P\nit's a little bit longer now tell me in the comments if u want more\nyou have to get to the door to win \nthere is 1 door on each level there is a win screen at the end so if u win tell me :D\nif you touch the red u die