90% Pen Mobile Platformer 

Instructions: Can we get 300 loves and 300 favorites??\nWelcome!\n- 15 levels\n- To proceed to the next level, go to the spinning purple box \n- WASD or Arrow Keys to move if you are on a computer\n- If you are on a mobile device tap on the left and right sides of the screen to move. To jump and to drop down, tap on the top and bottom of the screen\n- Press space or tap on the player to turn on and off the music (turning off the music may help with any lag)\n- Try to complete it in the least amount of time\n- Comment your score!\n- Have fun :)\n\nPlease love, favorite, and follow!\n\nP.S. My best score is 46 seconds. Can you beat it?

@Stage\n\nwhen [c v] key pressed\nshow variable [coordinates xy v]\nset [coordinates xy v] to (join (mouse x) (join [, ] (mouse y)))\nwait until <not <key (c v) pressed?>>\nhide variable [coordinates xy v]\n\nwhen flag clicked\nerase all\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [begin v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [go v]\nforever\n    play sound [Zig Zag v] until done\nend\n\nwhen I receive [go v]\nset volume to (100) %\nforever\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> or <key (space v) pressed?>> then\n        if <(music?) = [1]> then\n            set volume to (100) %\n        else\n            set volume to (0) %\n        end\n        wait until <not <<<mouse down?> and <touching (mouse-pointer v)?>> or <key (space v) pressed?>>>\n    end\nend\n\nforever\n    play sound [bensound-adventure v] until done\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nforever\n    show\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    switch costume to (costume1 v)\nend\n\nwhen I receive [game v]\nreset timer\n\nwhen [timer v] > (0.05)\nhide variable [level v]\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nshow\nclear graphic effects\ngo to x: (0) y: (0)\nforever\n    if <(Level) = [15]> then\n        switch costume to (costume3 v)\n    else\n        if <(Level) = [16]> then\n            switch costume to (costume2 v)\n        else\n            delete this clone\n        end\n    end\n    show\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [15]> then\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\n@Flash\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nhide\n\nwhen I receive [flash v]\ngo to [front v] layer\nswitch costume to (white v)\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nset [ghost v] effect to (0)\nbroadcast (Show v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [start v]\ngo to [front v] layer\nstart sound [Low Whoosh v]\nswitch costume to (white v)\nshow\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nset [ghost v] effect to (0)\nbroadcast (Begin v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nset [ghost v] effect to (100)\nhide\n\n@Comet\n\nwhen flag clicked\nset [comet v] to [1]\nswitch costume to (comet v)\nhide\nwait (0.5) seconds\nstart sound [Car Passing v]\nwait (0.5) seconds\nshow\ngo to [front v] layer\ngo to x: (200) y: (100)\nset size to (0) %\nrepeat (25)\n    if <(Comet) < [10]> then\n        change [comet v] by ((Comet) * (1.01))\n    else\n        set [comet v] to [10]\n    end\n    change x by ((0) - (Comet))\n    change y by ((0) - ((Comet) / (2)))\n    change size by ((Comet) / (3))\nend\nbroadcast (Flash v)\nrepeat (6)\n    if <(Comet) < [10]> then\n        change [comet v] by ((Comet) * (1.0000001))\n    else\n        set [comet v] to [10]\n    end\n    change x by ((0) - (Comet))\n    change y by ((0) - ((Comet) / (2)))\n    change size by ((Comet) / (3))\nend\nhide\ngo to [back v] layer\n\nwhen I receive [show v]\nshow\nstart sound [Boom Cloud v]\ngo to [back v] layer\nswitch costume to (cometblazer v)\ngo to x: (0) y: (0)\nwait (3) seconds\nbroadcast (Start v)\nwait (1) seconds\nbroadcast (Go v)\nhide\n\nwhen I receive [begin v]\nhide\n\n@Everything Else\n\nwhen flag clicked\nset [music? v] to [1]\nhide variable [level v]\nhide\n\ndefine Render Level\nerase all\nRender Sky\nRender Ground\nif <(Level) = [1]> then\n    Render End [180] [-100]\n    stop [this script v]\nelse\n    if <(Level) = [2]> then\n        Render Platform: 1x [0] 1y [-200] 2x [0] 2y [100] Type [ground]\n        Render Platform: 1x [0] 1y [100] 2x [100] 2y [100] Type [ground]\n        Render End [80] [-100]\n        stop [this script v]\n    else\n        if <(Level) = [3]> then\n            Render Platform: 1x [0] 1y [-150] 2x [0] 2y [0] Type [ground]\n            Render Platform: 1x [20] 1y [-130] 2x [150] 2y [-130] Type [lava]\n            Render End [180] [-80]\n            stop [this script v]\n        else\n            if <(Level) = [4]> then\n                Render Platform: 1x [-100] 1y [-40] 2x [100] 2y [-40] Type [ground]\n                Render Platform: 1x [-100] 1y [-130] 2x [100] 2y [-130] Type [lava]\n                Render Platform: 1x [0] 1y [-20] 2x [30] 2y [-20] Type [lava]\n                Render End [150] [-100]\n                stop [this script v]\n            else\n                if <(Level) = [5]> then\n                    Render Platform: 1x [0] 1y [-130] 2x [0] 2y [0] Type [bouncepad]\n                    Render Platform: 1x [-300] 1y [60] 2x [-120] 2y [60] Type [ground]\n                    Render End [-200] [110]\n                    stop [this script v]\n                else\n                    if <(Level) = [6]> then\n                        Render Platform: 1x [50] 1y [-134] 2x [100] 2y [-120] Type [bouncepad]\n                        Render Platform: 1x [190] 1y [40] 2x [190] 2y [-140] Type [ground]\n                        Render Platform: 1x [170] 1y [40] 2x [170] 2y [-140] Type [ground]\n                        Render Platform: 1x [210] 1y [40] 2x [210] 2y [-140] Type [ground]\n                        Render Platform: 1x [230] 1y [40] 2x [230] 2y [-140] Type [ground]\n                        Render Platform: 1x [150] 1y [45] 2x [300] 2y [45] Type [ground]\n                        Render Platform: 1x [150] 1y [45] 2x [150] 2y [-140] Type [lava]\n                        Render End [200] [95]\n                        stop [this script v]\n                    else\n                        if <(Level) = [7]> then\n                            Render Platform: 1x [-100] 1y [45] 2x [-100] 2y [-130] Type [lava]\n                            Render Platform: 1x [0] 1y [45] 2x [0] 2y [-130] Type [lava]\n                            Render Platform: 1x [100] 1y [45] 2x [100] 2y [-130] Type [lava]\n                            Render Platform: 1x [-200] 1y [-130] 2x [200] 2y [-130] Type [bounce]\n                            Render End [180] [-80]\n                            stop [this script v]\n                        else\n                            if <(Level) = [8]> then\n                                Render Platform: 1x [20] 1y [-130] 2x [0] 2y [-130] Type [lava]\n                                Render Platform: 1x [-80] 1y [-130] 2x [-100] 2y [-130] Type [lava]\n                                Render Platform: 1x [-300] 1y [150] 2x [300] 2y [150] Type [ground]\n                                Render Platform: 1x [142] 1y [-139] 2x [2] 2y [150] Type [gravity]\n                                Render End [-180] [90]\n                                stop [this script v]\n                            else\n                                if <(Level) = [9]> then\n                                    Render Platform: 1x [-200] 1y [60] 2x [100] 2y [60] Type [ground]\n                                    Render Platform: 1x [-80] 1y [80] 2x [-30] 2y [80] Type [lava]\n                                    Render Elevator [120]\n                                    Render End [-180] [110]\n                                    stop [this script v]\n                                else\n                                    if <(Level) = [10]> then\n                                        Render Platform: 1x [-100] 1y [-200] 2x [-100] 2y [100] Type [ground]\n                                        Render Platform: 1x [-20] 1y [200] 2x [-20] 2y [-70] Type [lava]\n                                        Render Platform: 1x [60] 1y [-200] 2x [60] 2y [100] Type [ground]\n                                        Render Platform: 1x [140] 1y [200] 2x [140] 2y [-70] Type [lava]\n                                        Render End [200] [-100]\n                                        stop [this script v]\n                                    else\n                                        if <(Level) = [11]> then\n                                            Render Platform: 1x [120] 1y [-130] 2x [120] 2y [100] Type [lava]\n                                            Render Platform: 1x [-100] 1y [-60] 2x [100] 2y [-60] Type [platform]\n                                            Render Platform: 1x [-100] 1y [20] 2x [100] 2y [20] Type [platform]\n                                            Render Platform: 1x [-100] 1y [100] 2x [200] 2y [100] Type [platform]\n                                            Render End [180] [-100]\n                                            stop [this script v]\n                                        else\n                                            if <(Level) = [12]> then\n                                                Render Platform: 1x [-140] 1y [30] 2x [-140] 2y [-20] Type [ground]\n                                                Render Platform: 1x [-110 ] 1y [35] 2x [-110] 2y [80] Type [lava]\n                                                Render Platform: 1x [-10] 1y [35] 2x [-10] 2y [80] Type [lava]\n                                                Render Platform: 1x [90] 1y [35] 2x [90] 2y [80] Type [lava]\n                                                Render Platform: 1x [-300] 1y [30] 2x [150] 2y [30] Type [ground]\n                                                Render Platform: 1x [-120] 1y [10] 2x [150] 2y [10] Type [lava]\n                                                Render Platform: 1x [-80] 1y [-130] 2x [0] 2y [0] Type [bouncepad]\n                                                Render Platform: 1x [30] 1y [-130] 2x [0] 2y [0] Type [bouncepad]\n                                                Render Elevator [180]\n                                                Render End [-190] [85]\n                                                stop [this script v]\n                                            else\n                                                if <(Level) = [13]> then\n                                                    set [size v] to [0]\n                                                    Render Platform: 1x [-90] 1y [-130] 2x [300] 2y [-130] Type [lava]\n                                                    Render Platform: 1x [-90] 1y [-110] 2x [300] 2y [-110] Type [lava]\n                                                    Render Platform: 1x [-90] 1y [-90] 2x [300] 2y [-90] Type [lava]\n                                                    Render Platform: 1x [-100] 1y [0] 2x [-100] 2y [-200] Type [ground]\n                                                    set [size v] to [1]\n                                                    Render Platform: 1x [50] 1y [0] 2x [50] 2y [0] Type [ground]\n                                                    set [size v] to [0]\n                                                    Render Platform: 1x [150] 1y [80] 2x [300] 2y [80] Type [ground]\n                                                    Render End [200] [130]\n                                                    stop [this script v]\n                                                else\n                                                    if <(Level) = [14]> then\n                                                        set [size v] to [0]\n                                                        Render Platform: 1x [-70] 1y [-150] 2x [0] 2y [60] Type [ground]\n                                                        Render Platform: 1x [0] 1y [60] 2x [70] 2y [-150] Type [ground]\n                                                        Render Platform: 1x [-20] 1y [-150] 2x [-20] 2y [0] Type [ground]\n                                                        Render Platform: 1x [30] 1y [-150] 2x [20] 2y [0] Type [ground]\n                                                        Render End [180] [-100]\n                                                        stop [this script v]\n                                                    else\n                                                        if <(Level) = [15]> then\n                                                            Render Platform: 1x [-130] 1y [80] 2x [-130] 2y [-130] Type [lava]\n                                                            Render Platform: 1x [-180] 1y [-130] 2x [-230] 2y [200] Type [gravity]\n                                                            Render Platform: 1x [ -5] 1y [92] 2x [50] 2y [-100] Type [gravity]\n                                                            Render Platform: 1x [-230] 1y [90] 2x [-0] 2y [90] Type [platform]\n                                                            Render Platform: 1x [-130] 1y [160] 2x [-100] 2y [160] Type [lava]\n                                                            Render Platform: 1x [20] 1y [300] 2x [20] 2y [0] Type [lava]\n                                                            Render Platform: 1x [-90] 1y [70] 2x [0] 2y [0] Type [bouncepad]\n                                                            Render Platform: 1x [130] 1y [100] 2x [130] 2y [0] Type [lava]\n                                                            Render Platform: 1x [20] 1y [-70] 2x [20] 2y [-130] Type [lava]\n                                                            Render Platform: 1x [20] 1y [20] 2x [130] 2y [20] Type [lava]\n                                                            Render Platform: 1x [-115] 1y [-65 ] 2x [20] 2y [-65] Type [platform]\n                                                            Render Platform: 1x [-115] 1y [0] 2x [140] 2y [0] Type [platform]\n                                                            Render Platform: 1x [115] 1y [-130] 2x [115] 2y [-130] Type [lava]\n                                                            Render Platform: 1x [110] 1y [110] 2x [160] 2y [110] Type [ground]\n                                                            Render Elevator [190]\n                                                            Render Platform: 1x [-300] 1y [200] 2x [300] 2y [200] Type [ground]\n                                                            Render End [75] [70]\n                                                            stop [this script v]\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nstop [this script v]\n\ndefine Move <right> <left> <up> <down>\nPosition\nif <right> then\n    change [xvel v] by (2)\nend\nif <left> then\n    change [xvel v] by (-2)\nend\nset [xvel v] to ((Xvel) * (0.8))\nif <(gravity) = [down]> then\n    change x by (round (Xvel))\n    change [x v] by (round (Xvel))\nelse\n    change x by ((round (Xvel)) * (-1))\n    change [x v] by ((round (Xvel)) * (-1))\nend\nTouch Wall <up>\nif <(Yvel) < [-20]> then\n    set [yvel v] to [-20]\nelse\n    change [yvel v] by (-2)\nend\nchange [falling v] by (1)\nif <(gravity) = [down]> then\n    change y by (Yvel)\n    change [y v] by (Yvel)\nelse\n    change y by ((Yvel) * (-1))\n    change [y v] by ((Yvel) * (-1))\nend\nTouch Ground <up> <down>\nif <touching color (#a400a7)?> then\n    start sound [Connect v]\n    change [level v] by (1)\n    Reset\n    Position\n    wait until <not <touching color (#a400a7)?>>\nend\nDetect miscellaneous\n\ndefine Reset\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [dead? v] to [0]\nset [falling v] to [6]\nset [x v] to [-180]\nset [y v] to [0]\nset [gravity v] to [down]\nset [size v] to [0]\nset rotation style [don't rotate v]\nreset timer\ngo to [back v] layer\nclear graphic effects\nset size to (50) %\nshow\nset [ghost v] effect to (100)\nclear sound effects\nPosition\n\ndefine Touch Wall <up?>\nrepeat (10)\n    if <touching color (#29ff00)?> then\n        if <(gravity) = [down]> then\n            change y by (1)\n            change [y v] by (1)\n        else\n            change y by (-1)\n            change [y v] by (-1)\n        end\n    end\nend\nif <touching color (#29ff00)?> then\n    change x by ((round (Xvel)) * (-1))\n    change [x v] by ((round (Xvel)) * (-1))\n    if <(gravity) = [down]> then\n        change y by (-10)\n        change [y v] by (-10)\n    else\n        change y by (10)\n        change [y v] by (10)\n    end\n    if <up?> then\n        if <(Xvel) > [0]> then\n            set [xvel v] to [-10]\n        else\n            set [xvel v] to [10]\n        end\n        set [yvel v] to [16]\n    else\n        set [xvel v] to [0]\n    end\nend\nDetect Death\n\ndefine Touch Ground <up> <down>\nif <(Yvel) > [0]> then\n    repeat until <not <touching color (#29ff00)?>>\n        if <(gravity) = [down]> then\n            set [yvel v] to [0]\n            change y by (-2)\n            change [y v] by (-2)\n        else\n            set [yvel v] to [0]\n            change y by (2)\n            change [y v] by (2)\n        end\n    end\nelse\n    repeat until <not <touching color (#29ff00)?>>\n        if <(gravity) = [down]> then\n            set [yvel v] to [0]\n            set [falling v] to [0]\n            change y by (2)\n            change [y v] by (2)\n        else\n            set [yvel v] to [0]\n            set [falling v] to [0]\n            change y by (-2)\n            change [y v] by (-2)\n        end\n    end\n    if <<not <down>> and <(touching platform) = [0]>> then\n        repeat until <not <<touching color (#ff66bf)?> and <(touching platform) = [0]>>>\n            if <(gravity) = [down]> then\n                set [yvel v] to [0]\n                set [falling v] to [0]\n                change y by (2)\n                change [y v] by (2)\n            else\n                set [yvel v] to [0]\n                set [falling v] to [0]\n                change y by (-2)\n                change [y v] by (-2)\n            end\n        end\n    end\nend\nif <<<up> and <not <down>>> and <<(falling) < [5]> or <touching color (#29ff00)?>>> then\n    start sound [Jump v]\n    set [yvel v] to [15]\nend\nDetect Death\n\ndefine Render Ground\nset pen size to (40)\nset pen color to (#2aff00)\ngo to x: (-300) y: (-160)\npen down\ngo to x: (300) y: (-160)\npen up\n\ndefine Render Platform: 1x (1x) 1y (1y) 2x (2x) 2y (2y) Type (type)\nif <<(Level) = [14]> or <(Level) = [2]>> then\n    set pen size to (50)\nelse\n    set pen size to (20)\nend\nif <(type) = [ground]> then\n    set pen color to (#2aff00)\n    if <<(Level) = [13]> and <(size) = [1]>> then\n        set pen size to (5)\n    end\nelse\n    if <(type) = [platform]> then\n        set pen color to (#ff66bf)\n    else\n        if <(type) = [bounce]> then\n            set pen color to (#ff7b00)\n        else\n            if <(type) = [bouncepad]> then\n                set pen color to (#ff7b00)\n                go to x: (1x) y: (1y)\n                pen down\n                change x by (30)\n                pen up\n                stop [this script v]\n            else\n                if <(type) = [gravity]> then\n                    set pen color to (#ffd000)\n                    go to x: (1x) y: (1y)\n                    pen down\n                    change y by (30)\n                    pen up\n                    go to x: (2x) y: (2y)\n                    set pen color to (#c7ff00)\n                    pen down\n                    change y by (-30)\n                    pen up\n                    stop [this script v]\n                else\n                    if <(type) = [lava]> then\n                        set pen color to (#ff0000)\n                    else\n                        set pen color to (#000000)\n                    end\n                end\n            end\n        end\n    end\nend\ngo to x: (1x) y: (1y)\npen down\ngo to x: (2x) y: (2y)\npen up\n\ndefine Render Sky\nset pen color to (#0083ff)\nset pen size to (20)\ngo to x: (-300) y: (200)\npen down\nrepeat (100)\n    change x by (600)\n    change y by (-3)\n    change pen (color v) by (-0.1)\n    change x by (-600)\n    change y by (-2)\nend\npen up\n\ndefine Position\ngo to x: (x) y: (y)\nset [x v] to (x position)\nset [y v] to (y position)\nset pen color to (#e4dd16)\nchange pen (color v) by ((timer) * (30))\nset pen size to (30)\npen down\npen up\n\ndefine Render End (x) (y)\nset pen color to (#a300a6)\nset pen size to (8)\ngo to x: (x) y: (y)\npoint in direction (((timer) * (300)) mod (360))\nmove (20) steps\nturn right (-90) degrees\nmove (20) steps\npen down\nrepeat (4)\n    turn left (90) degrees\n    move (40) steps\nend\npen up\n\ngo to x: (x) y: (y)\n\ndefine Detect Death\nif <touching color (#ff0000)?> then\n    start sound [Oops v]\n    Reset\n    wait until <not <touching color (#ff0000)?>>\nend\n\ndefine Render Elevator (x)\nset pen size to (50)\nset pen color to (#4831b9)\ngo to x: (x) y: (-300)\npen down\nchange y by (600)\npen up\n\ndefine Detect miscellaneous\nif <touching color (#ff7b00)?> then\n    start sound [Drum Boing v]\n    set [yvel v] to [30]\nend\nif <touching color (#ffd000)?> then\n    start sound [Zoop v]\n    set [gravity v] to [up]\nend\nif <touching color (#c6ff00)?> then\n    start sound [Zoop v]\n    set [gravity v] to [down]\nend\nif <touching color (#4730b9)?> then\n    set [yvel v] to [5]\nend\n\ndefine Last Level Text\ngo to x: (-225) y: (160)\nset pen color to (#000000)\nset pen size to (1)\nL\nA\n\ndefine L\n\ndefine A\npen down\nrepeat (font size)\n    change x by (1)\n    change y by (3)\nend\nrepeat ((font size) / (2))\n    change x by (1)\n    change y by (-3)\nend\nrepeat ((font size) / (2))\n    change x by (-2)\nend\npen up\nrepeat ((font size) / (2))\n    change x by (2)\nend\npen down\nrepeat ((font size) / (2))\n    change x by (1)\n    change y by (-3)\nend\npen up\n\ndefine S\n\ndefine T\n\ndefine E\n\ndefine V\n\nS\nT\n\nL\nE\nV\nE\nL\n\n\n\nwhen I receive [begin v]\nerase all\nset [level v] to [1]\nReset\nRender Level\n\nwhen I receive [go v]\nforever\n    if <touching color (#29ff00)?> then\n        set [yvel v] to [0]\n    end\nend\n\nwhen I receive [go v]\nforever\n    if <touching color (#ff66be)?> then\n        change [touching platform v] by (1)\n    else\n        set [touching platform v] to [0]\n    end\nend\n\nwhen I receive [go v]\nshow variable [level v]\nforever\n    broadcast (Game v)\n    Render Level\n    Move <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > [50]>>> <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <[-50] > (mouse x)>>> <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [50]>>> <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <[-50] > (mouse y)>>>\nend\n\nwhen I receive [go v]\nset [timer v] to [0]\nforever\n    change [timer v] by (0.035)\nend\n\nwhen I receive [go v]\nset [stopwatch v] to [0]\nrepeat until <(Level) = [16]>\n    wait (1) seconds\n    change [stopwatch v] by (1)\nend\nsay (join [Your time is ] (join (stopwatch) [ seconds])) for (5) seconds\nstop [this script v]\n\nwhen I receive [go v]\nset volume to (100) %\nforever\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> or <key (space v) pressed?>> then\n        if <(music?) = [1]> then\n            set [music? v] to [0]\n            set volume to (0) %\n        else\n            set [music? v] to [1]\n            set volume to (100) %\n        end\n        wait until <not <<<mouse down?> and <touching (mouse-pointer v)?>> or <key (space v) pressed?>>>\n    end\nend\n\n