Jumper - A Platformer

Instructions: 11 levels\nUse arrow keys or wasd or mobile controls\nIf lags probably skip the level or click the green flag again.\nPress S to skip levels that are too hard for you.\nPress R to restart a level.\nHave fun!!\nClick the menu to turn the music off and on and levels auto and the timer.\nOn level auto press the numbers to change the level.\nThings to press to switch the levels to which one you want:\n1 = Level 1\n2 = Level 2\n3 = Level 3\n4 = Level 4\n5 = Level 5\n6 = Level 6\n7 = Level 7\n8 = Level 8\n9 = Level 9\n0 = Level 10\nL = Level 11\nE = Ending\nDon't forget to love, fav , remix,\ncomment, follow, share, and play my other games!! \n

@Stage\n\nwhen flag clicked\nbroadcast (show music v)\nset volume to (20) %\nforever\n    wait (0) seconds\n    play sound [Xaf - Nebula v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [on v]\nset volume to (20) %\nforever\n    play sound [Xaf - Nebula v] until done\nend\n\nwhen I receive [off v]\nstop all sounds\n\n@Player\n\nwhen flag clicked\nset volume to (20) %\ngo to [front v] layer\nset [hurts v] to [0]\nset size to (80) %\nclear graphic effects\nswitch costume to (player1 v)\npoint in direction (90)\ngo to x: (-210) y: (-70)\nset rotation style [left-right v]\ngo [forward v] (2) layers\nset [x v] to [0]\nset [y v] to [0]\nshow\nforever\n    change [y v] by (-1)\n    if <<<mouse down?> and <(mouse x) > ([x position v] of [player v])>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n        change [x v] by (1.5)\n        switch costume to (player1 v)\n    end\n    if <<<mouse down?> and <([x position v] of [player v]) > (mouse x)>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n        change [x v] by (-1.5)\n        switch costume to (player2 v)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching (platforms v)?> then\n        change y by (1)\n        if <touching (platforms v)?> then\n            change y by (1)\n            if <touching (platforms v)?> then\n                change y by (1)\n                if <touching (platforms v)?> then\n                    change y by (1)\n                    if <touching (platforms v)?> then\n                        change y by (1)\n                        if <touching (platforms v)?> then\n                            change y by (1)\n                            if <touching (platforms v)?> then\n                                change y by (0)\n                                scroll x\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ([y position v] of [player v])>>> then\n                                    set [y v] to [11]\n                                    if <([abs v] of (X) ) = (X)> then\n                                        set [x v] to [-8]\n                                    else\n                                        set [x v] to [8]\n                                    end\n                                else\n                                    set [x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Y)\n    if <touching (platforms v)?> then\n        scroll y\n        if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ([y position v] of [player v])>>> and <(Y) < [0]>> then\n            set [y v] to [13]\n        else\n            set [y v] to [0]\n        end\n    end\n    if <<(x position) > [240]> and <not <(level) > [11]>>> then\n        broadcast (finish v)\n        set [y v] to [0]\n        set [x v] to [0]\n        wait (0.25) seconds\n        change [level v] by (1)\n        go to x: (-210) y: (-70)\n    else\n        point in direction (90)\n    end\n    if <touching (spikes v)?> then\n        set [hurts v] to [1]\n        broadcast (hurt v)\n        start sound [Crunch v]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        wait (.1) seconds\n        go to x: (-210) y: (-70)\n        clear graphic effects\n        wait (.1) seconds\n        switch costume to (player1 v)\n        set [x v] to [0]\n        set [y v] to [0]\n        set [hurts v] to [0]\n    end\n    if <touching (bouncer v)?> then\n        set [y v] to [20]\n    end\nend\n\ndefine scroll x\nrepeat until <not <touching (platforms v)?>>\n    if <(X) > [0]> then\n        change x by (-1)\n    else\n        change x by (1)\n    end\nend\n\ndefine scroll y\nrepeat until <not <touching (platforms v)?>>\n    if <(Y) > [0]> then\n        change y by (-1)\n    else\n        change y by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<key (s v) pressed?> and <not <([costume # v] of [platforms v]) = [16]>>> and <not <(level) > [11]>>> then\n        change [level v] by (1)\n        broadcast (finish v)\n        set [y v] to [0]\n        set [x v] to [0]\n        wait (0.25) seconds\n        go to x: (-210) y: (-70)\n        wait until <not <key (s v) pressed?>>\n    else\n        point in direction (90)\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\n\nwhen I receive [level3 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [level4 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [level6 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [level5 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [level1 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [level2 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [level8 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [level9 v]\ngo to x: (-210) y: (-70)\n\nwhen I receive [level7 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [level10 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [level11 v]\ngo to x: (-210) y: (-64)\n\nwhen I receive [ending v]\ngo to x: (-210) y: (-64)\n\nwhen flag clicked\nreset timer\nforever\n    if <key (r v) pressed?> then\n        go to x: (-220) y: (-64)\n    end\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (15)\nend\ndelete this clone\n\nwhen flag clicked\nrepeat until <(level) = [12]>\n    set [time v] to (timer)\nend\n\n@Platforms\n\nwhen I receive [finish v]\nwait (0.25) seconds\nnext costume\n\nwhen flag clicked\nshow\nswitch costume to (level 1 v)\ngo to x: (0) y: (-10)\n\nwhen I receive [level1 v]\nswitch costume to (level 1 v)\n\nwhen I receive [level2 v]\nswitch costume to (level 2 v)\n\nwhen I receive [level4 v]\nswitch costume to (level 4 v)\n\nwhen I receive [level5 v]\nswitch costume to (level 5 v)\n\nwhen I receive [level7 v]\nswitch costume to (level 7 v)\n\nwhen I receive [level6 v]\nswitch costume to (level 6 v)\n\nwhen I receive [level3 v]\nswitch costume to (level 3 v)\n\nwhen I receive [level8 v]\nswitch costume to (level 8 v)\n\nwhen I receive [level9 v]\nswitch costume to (level 9 v)\n\nwhen I receive [level11 v]\nswitch costume to (level 11 v)\n\nwhen I receive [ending v]\nswitch costume to (you win! v)\n\nwhen I receive [level10 v]\nswitch costume to (level 10 v)\n\n@Spikes\n\nwhen flag clicked\ngo [backward v] (1) layers\nhide\nswitch costume to (s l 2 v)\nset size to (95) %\nforever\n    if <(level) = [1]> then\n        switch costume to (s l 2 v)\n        set size to (95) %\n        hide\n    end\n    if <(level) = [2]> then\n        show\n        go to x: (50) y: (15)\n    end\n    if <(level) = [3]> then\n        set size to (80) %\n        show\n        switch costume to (s l 3 v)\n        go to x: (80) y: (170)\n    end\n    if <(level) = [4]> then\n        set size to (80) %\n        show\n        switch costume to (s l 4 v)\n        go to x: (80) y: (170)\n    end\n    if <(level) = [5]> then\n        set size to (100) %\n        show\n        switch costume to (s l 5 v)\n        go to x: (90) y: (29)\n    end\n    if <(level) = [6]> then\n        set size to (100) %\n        show\n        switch costume to (s l 6 v)\n        go to x: (90) y: (29)\n    end\n    if <(level) = [7]> then\n        set size to (100) %\n        show\n        switch costume to (s l 7 v)\n        go to x: (0) y: (0)\n    end\n    if <(level) = [8]> then\n        set size to (100) %\n        show\n        switch costume to (s l 8 v)\n        go to x: (0) y: (0)\n    end\n    if <(level) = [9]> then\n        set size to (100) %\n        show\n        switch costume to (s l 9 v)\n        go to x: (0) y: (0)\n    end\n    if <(level) = [10]> then\n        set size to (100) %\n        show\n        switch costume to (s l 10 v)\n        go to x: (0) y: (0)\n    end\n    if <(level) = [11]> then\n        set size to (100) %\n        show\n        switch costume to (s l 11 v)\n        go to x: (0) y: (0)\n    end\n    if <(level) = [12]> then\n        go to [back v] layer\n        set size to (100) %\n        show\n        switch costume to (you win! v)\n        go to x: (0) y: (0)\n    end\nend\n\nwhen I receive [level1 v]\nhide\n\nwhen I receive [level2 v]\nswitch costume to (s l 2 v)\n\nwhen I receive [level3 v]\nswitch costume to (s l 3 v)\n\nwhen I receive [level4 v]\nswitch costume to (s l 4 v)\n\nwhen I receive [level5 v]\nswitch costume to (s l 5 v)\n\nwhen I receive [level6 v]\nswitch costume to (s l 6 v)\n\nwhen I receive [level7 v]\nswitch costume to (s l 7 v)\n\nwhen I receive [level8 v]\nswitch costume to (s l 8 v)\n\nwhen I receive [level9 v]\nswitch costume to (s l 9 v)\n\nwhen I receive [level10 v]\nswitch costume to (s l 10 v)\n\nwhen I receive [level11 v]\nswitch costume to (s l 11 v)\n\nwhen I receive [ending v]\nswitch costume to (you win! v)\n\n@bouncer\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [back v] layer\nhide\nforever\n    if <(level) = [5]> then\n        show\n        go to x: (-50) y: (10)\n    end\n    if <(level) = [6]> then\n        show\n        go to x: (-150) y: (10)\n    end\n    if <(level) = [7]> then\n        show\n        go to x: (-150) y: (10)\n    end\n    if <(level) = [8]> then\n        show\n        go to x: (-175) y: (10)\n    end\n    if <(level) = [9]> then\n        hide\n    end\n    if <(level) = [10]> then\n        hide\n    end\n    if <(level) = [11]> then\n        show\n        go to x: (-150) y: (10)\n    end\n    if <(level) = [12]> then\n        hide\n    end\nend\n\nwhen I receive [level1 v]\nhide\n\nwhen I receive [level2 v]\nhide\n\nwhen I receive [level3 v]\nhide\n\nwhen I receive [level4 v]\nhide\n\nwhen I receive [level5 v]\nshow\ngo to x: (-50) y: (10)\n\nwhen I receive [level6 v]\nshow\ngo to x: (-150) y: (10)\n\nwhen I receive [level7 v]\nshow\ngo to x: (-150) y: (10)\n\nwhen I receive [level8 v]\nshow\ngo to x: (-175) y: (10)\n\nwhen I receive [level9 v]\nhide\n\nwhen I receive [level10 v]\nhide\n\nwhen I receive [level11 v]\nshow\ngo to x: (-150) y: (10)\n\nwhen flag clicked\nset volume to (20) %\nforever\n    if <touching (player v)?> then\n        start sound [Boing v]\n        repeat (2)\n            next costume\n            wait (0.05) seconds\n        end\n        switch costume to (costume2 v)\n        wait (0.05) seconds\n        switch costume to (costume1 v)\n        wait (0.05) seconds\n        wait until <not <touching (player v)?>>\n    end\nend\n\n@finish\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [finish v]\nset volume to (20) %\nstart sound [Connect v]\ngo to x: (0) y: (0)\nshow\nchange [ghost v] effect by (-100)\nwait (0.1) seconds\nrepeat (100)\n    change [ghost v] effect by (2.5)\nend\nhide\n\n@clouds\n\nwhen flag clicked\nforever\n    set [cn v] to (pick random (1) to (2))\n    create clone of (_myself_ v)\n    wait (pick random (8) to (14)) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nswitch costume to (pick random (1) to (8))\nif <(cn) = [1]> then\n    go to x: (240) y: (pick random (30) to (100))\n    repeat until <[240] > (x position)>\n        change x by (-1)\n    end\n    wait (0.5) seconds\n    delete this clone\nend\nif <(cn) = [2]> then\n    go to x: (-240) y: (pick random (30) to (100))\n    repeat until <[240] < (x position)>\n        change x by (1)\n    end\n    wait (0.5) seconds\n    delete this clone\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nset size to (50) %\nwait (0) seconds\nshow\nrepeat (220)\n    change size by (1.8)\n    change [ghost v] effect by (1.8)\nend\nhide\n\n@Sprite2\n\nwhen flag clicked\ngo to [back v] layer\nshow\ngo [forward v] (10) layers\nrepeat (100)\n    change [ghost v] effect by (2)\nend\nhide\n\n@menu\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (menu v)\nshow\n\nwhen this sprite clicked\nbroadcast (menu v)\nswitch costume to (menu opened v)\n\nwhen I receive [menu hide v]\nswitch costume to (menu v)\n\n@Sprite3\n\nwhen flag clicked\nswitch costume to (on v)\nhide\n\nwhen I receive [menu v]\nshow\nbroadcast (show music v)\n\nwhen this sprite clicked\nnext costume\n\nwhen I receive [show music v]\nforever\n    if <(costume [name v]) = [on]> then\n        broadcast (on v)\n    end\n    if <(costume [name v]) = [off]> then\n        broadcast (off v)\n    end\nend\n\nwhen I receive [menu hide v]\nhide\n\n@Sprite4\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [menu v]\nshow\n\nwhen I receive [menu hide v]\nhide\n\nwhen this sprite clicked\nnext costume\nbroadcast (levels v)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [1]> then\n        if <key (1 v) pressed?> then\n            set [level v] to [1]\n            broadcast (level1 v)\n        end\n        if <key (2 v) pressed?> then\n            set [level v] to [2]\n            broadcast (Level2 v)\n        end\n        if <key (3 v) pressed?> then\n            set [level v] to [3]\n            broadcast (Level3 v)\n        end\n        if <key (4 v) pressed?> then\n            set [level v] to [4]\n            broadcast (Level4 v)\n        end\n        if <key (5 v) pressed?> then\n            set [level v] to [5]\n            broadcast (Level5 v)\n        end\n        if <key (6 v) pressed?> then\n            set [level v] to [6]\n            broadcast (Level6 v)\n        end\n        if <key (7 v) pressed?> then\n            set [level v] to [7]\n            broadcast (level7 v)\n        end\n        if <key (8 v) pressed?> then\n            set [level v] to [8]\n            broadcast (level8 v)\n        end\n        if <key (9 v) pressed?> then\n            set [level v] to [9]\n            broadcast (level9 v)\n        end\n        if <key (0 v) pressed?> then\n            set [level v] to [10]\n            broadcast (level10 v)\n        end\n        if <key (l v) pressed?> then\n            set [level v] to [11]\n            broadcast (level11 v)\n        end\n        if <key (e v) pressed?> then\n            set [level v] to [12]\n            broadcast (ending v)\n        end\n    end\n    if <not <(costume [number v]) = [1]>> then\n        point in direction (90)\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen I receive [menu v]\nshow\n\nwhen this sprite clicked\nbroadcast (menu hide v)\n\nwhen I receive [menu hide v]\nhide\n\n@Sprite6\n\nwhen flag clicked\nhide\nhide variable [time v]\nswitch costume to (show timer v)\nforever\n    go to x: (0) y: (208)\nend\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    broadcast (timer show v)\nend\nif <(costume [number v]) = [2]> then\n    broadcast (timer hide v)\nend\n\nwhen I receive [timer hide v]\nhide variable [time v]\nswitch costume to (show timer v)\n\nwhen I receive [timer show v]\nshow variable [time v]\nswitch costume to (hide timer v)\n\nwhen I receive [menu v]\nshow\n\nwhen I receive [menu hide v]\nhide\n\n