Generic Blue A 100% Pen Platformer

Instructions: Openly Resharing. \nControls just the normal platformers controls.

@Stage\n\n@Pen Platformer Engine\n\ndefine draw square x (x) y (y) size (size)\npen up\ngo to x: ((x) - (size)) y: ((y) + (size))\npen down\ngo to x: ((x) + (size)) y: ((y) + (size))\ngo to x: ((x) + (size)) y: ((y) - (size))\ngo to x: ((x) - (size)) y: ((y) - (size))\ngo to x: ((x) - (size)) y: ((y) + (size))\npen up\ngo to x: (x) y: (y)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [volume v] to [100]\nset [level v] to [1]\ndelete all of [times v]\nhide variable [timer v]\nhide variable [☁ highscore v]\nforever\n    add (timer) to [times v]\n    reset timer\n    set [player x v] to [0]\n    set [player y v] to [35]\n    set [scroll x v] to [200]\n    set [scroll y v] to [35]\n    set [in air v] to [0]\n    set [speed x v] to [0]\n    set [speed y v] to [0]\n    set [life v] to [1]\n    set [touching lava v] to [0]\n    set [touching platform v] to [0]\n    repeat until <not <(Life) = [1]>>\n        Render + Move\n    end\n    if <(Life) = [Next Level]> then\n        change [level v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Jim Yosef & Anna Yvette - Linked \[NCS Release\] v] until done\nend\n\ndefine Move <left> <right> <up> Walk Speed (walk speed) Jump Height (jump height) Friction (friction) Maximum Fall Speed (maximum fall speed) Fall Acceleration (fall acceleration) Scrolling Smoothness (scrolling smoothness) Player X Minimum (player x minimum) Scroll X minimum (scroll x minimum) Scroll Y minimum (scroll y minimum)\nif <(Level) < [4]> then\n    replace item (length of [times v]) of [times v] with (timer)\nend\nset pen color to (#003bff)\nif <left> then\n    change [speed x v] by ((walk speed) * (-1))\nend\nif <right> then\n    change [speed x v] by (walk speed)\nend\nif <up> then\n    if <(In Air) < [4]> then\n        set [speed y v] to (jump height)\n    end\nend\nTouching Bouncy\nif <(Touching Bouncy) = [1]> then\n    set [speed y v] to ((jump height) * (1.5))\nend\nif <(Speed Y) > ((maximum fall speed) * (-1))> then\n    change [speed y v] by ((fall acceleration) * (-1))\nend\nChange Player Y by (Speed Y)\nset [speed x v] to ((Speed X) * (friction))\nChange Player X by (Speed X) <up> ((walk speed) * (8))\nchange [scroll x v] by (((Player X) - (Scroll X)) / (scrolling smoothness))\nchange [scroll y v] by (((Player Y) - (Scroll Y)) / (scrolling smoothness))\nif <(Player X) < (player x minimum)> then\n    set [player x v] to (player x minimum)\n    set [speed x v] to [0]\nend\nif <(Player Y) < [-180]> then\n    set [life v] to [OOF]\nend\nTouching Lava\nif <(Touching Lava) = [1]> then\n    set [life v] to [OOF]\nend\nTouching Win\nif <(Touching Win) = [1]> then\n    set [life v] to [Next Level]\nend\nif <(Scroll X) < (scroll x minimum)> then\n    set [scroll x v] to (scroll x minimum)\nend\nif <(Scroll Y) < (scroll y minimum)> then\n    set [scroll y v] to (scroll y minimum)\nend\nset [# v] to [0]\nrepeat (25)\n    change [# v] by (1)\n    draw square x ((Player X) - (Scroll X)) y ((Player Y) - (Scroll Y)) size (#)\nend\nset volume to (Volume) %\n\ndefine add platform x1 y1 x2 y2 (x1) (y1) (x2) (y2)\nadd (x1) to [platform v]\nadd (y1) to [platform v]\nadd (x2) to [platform v]\nadd (y2) to [platform v]\npen up\ngo to x (x1) y (y1)\npen down\ngo to x (x2) y (y1)\ngo to x (x2) y (y2)\ngo to x (x1) y (y2)\ngo to x (x1) y (y1)\n\ndefine go to x (x) y (y)\ngo to x: ((x) - (Scroll X)) y: ((y) - (Scroll Y))\n\ndefine Change Player Y by (y)\nchange [player y v] by (y)\nchange [in air v] by (1)\nTouching Platform\nif <(Touching Platform) = [1]> then\n    repeat until <(Touching Platform) = [0]>\n        if <(Speed Y) > [0]> then\n            change [player y v] by (-1)\n        else\n            if <(Speed Y) < [0]> then\n                change [player y v] by (1)\n                set [in air v] to [0]\n            else\n                if <(Speed Y) = [0]> then\n                    change [player y v] by (1)\n                end\n            end\n        end\n        Touching Platform\n    end\n    set [speed y v] to [0]\nend\n\ndefine Touching Platform\nset [touching platform v] to [0]\nset [block check v] to [1]\nrepeat ((length of [platform v]) / (4))\n    if < and <<<(Player Y) < (item ((Block Check) + (1)) of [platform v])> and <(Player Y) > (item ((Block Check) + (3)) of [platform v])>> or <<<((Player Y) - (25)) < (item ((Block Check) + (1)) of [platform v])> and <((Player Y) + (-25)) > (item ((Block Check) + (3)) of [platform v])>> or <<((Player Y) + (25)) > (item ((Block Check) + (3)) of [platform v])> and <((Player Y) + (25)) < (item ((Block Check) + (1)) of [platform v])>>>>> then\n        set [touching platform v] to [1]\n    end\n    change [block check v] by (4)\nend\n\ndefine Change Player X by (x) <up> (push power)\nchange [player x v] by (x)\nTouching Platform\nif <(Touching Platform) = [1]> then\n    repeat until <(Touching Platform) = [0]>\n        if <(Speed X) > [0]> then\n            change [player x v] by (-1)\n        else\n            if <(Speed X) < [0]> then\n                change [player x v] by (1)\n            end\n        end\n        Touching Platform\n    end\n    if <up> then\n        if <(Speed X) > [0]> then\n            set [speed x v] to ((push power) * (-1))\n        else\n            if <(Speed X) < [0]> then\n                set [speed x v] to (push power)\n            end\n        end\n        set [in air v] to [0]\n    else\n        set [speed x v] to [0]\n    end\nend\n\ndefine Render + Move\ndelete all of [platform v]\ndelete all of [lava v]\ndelete all of [bouncy v]\ndelete all of [win v]\nswitch costume to (blank v)\nset size to (108000) %\nswitch costume to (dot\(pls dont complain i forced to do this\) v)\nhide\nerase all\npen up\ngo to x: (0) y: (0)\nset pen color to (#f5f5f5)\nset pen size to (7)\ngo to x: ((-215) - (((Scroll X) + ((timer) * (-50))) mod (50))) y: ((155) - (((Scroll Y) + ((timer) * (-50))) mod (-50)))\nrepeat (11)\n    set x to ((-215) - (((Scroll X) + ((timer) * (-50))) mod (50)))\n    repeat (11)\n        draw square x (x position) y (y position) size [25]\n        change x by (50)\n    end\n    change y by (-50)\nend\npen up\nDraw Level\nMove <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < ((Player X) - (Scroll X))>>> <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > ((Player X) - (Scroll X))>>> <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > ((Player Y) - (Scroll Y))>>> Walk Speed [2] Jump Height [16] Friction [0.85] Maximum Fall Speed [14] Fall Acceleration [2] Scrolling Smoothness [10] Player X Minimum [-10] Scroll X minimum [200] Scroll Y minimum [0]\n\ndefine Touching Lava\nset [touching lava v] to [0]\nset [block check v] to [1]\nrepeat ((length of [lava v]) / (4))\n    if < and <<<(Player Y) < (item ((Block Check) + (1)) of [lava v])> and <(Player Y) > (item ((Block Check) + (3)) of [lava v])>> or <<<((Player Y) - (25)) < (item ((Block Check) + (1)) of [lava v])> and <((Player Y) + (-25)) > (item ((Block Check) + (3)) of [lava v])>> or <<((Player Y) + (25)) > (item ((Block Check) + (3)) of [lava v])> and <((Player Y) + (25)) < (item ((Block Check) + (1)) of [lava v])>>>>> then\n        set [touching lava v] to [1]\n    end\n    change [block check v] by (4)\nend\n\ndefine add lava x1 y1 x2 y2 (x1) (y1) (x2) (y2)\nadd (x1) to [lava v]\nadd (y1) to [lava v]\nadd (x2) to [lava v]\nadd (y2) to [lava v]\npen up\ngo to x (x1) y (y1)\npen down\ngo to x (x2) y (y1)\ngo to x (x2) y (y2)\ngo to x (x1) y (y2)\ngo to x (x1) y (y1)\n\ndefine add win block x1 y1 x2 y2 (x1) (y1) (x2) (y2)\nadd (x1) to [win v]\nadd (y1) to [win v]\nadd (x2) to [win v]\nadd (y2) to [win v]\npen up\ngo to x (x1) y (y1)\npen down\ngo to x (x2) y (y1)\ngo to x (x2) y (y2)\ngo to x (x1) y (y2)\ngo to x (x1) y (y1)\n\ndefine add bounce x1 y1 x2 y2 (x1) (y1) (x2) (y2)\nadd (x1) to [bouncy v]\nadd (y1) to [bouncy v]\nadd (x2) to [bouncy v]\nadd (y2) to [bouncy v]\npen up\ngo to x (x1) y (y1)\npen down\ngo to x (x2) y (y1)\ngo to x (x2) y (y2)\ngo to x (x1) y (y2)\ngo to x (x1) y (y1)\n\ndefine Touching Win\nset [touching win v] to [0]\nset [block check v] to [1]\nrepeat ((length of [win v]) / (4))\n    if < and <<<(Player Y) < (item ((Block Check) + (1)) of [win v])> and <(Player Y) > (item ((Block Check) + (3)) of [win v])>> or <<<((Player Y) - (25)) < (item ((Block Check) + (1)) of [win v])> and <((Player Y) + (-25)) > (item ((Block Check) + (3)) of [win v])>> or <<((Player Y) + (25)) > (item ((Block Check) + (3)) of [win v])> and <((Player Y) + (25)) < (item ((Block Check) + (1)) of [win v])>>>>> then\n        set [touching win v] to [1]\n    end\n    change [block check v] by (4)\nend\n\ndefine Touching Bouncy\nset [touching bouncy v] to [0]\nset [block check v] to [1]\nrepeat ((length of [bouncy v]) / (4))\n    if < and <<<(Player Y) < (item ((Block Check) + (1)) of [bouncy v])> and <(Player Y) > (item ((Block Check) + (3)) of [bouncy v])>> or <<<((Player Y) - (25)) < (item ((Block Check) + (1)) of [bouncy v])> and <((Player Y) + (-25)) > (item ((Block Check) + (3)) of [bouncy v])>> or <<((Player Y) + (25)) > (item ((Block Check) + (3)) of [bouncy v])> and <((Player Y) + (25)) < (item ((Block Check) + (1)) of [bouncy v])>>>>> then\n        set [touching bouncy v] to [1]\n    end\n    change [block check v] by (4)\nend\n\ndefine Draw Level\nif <(Level) = [1]> then\n    set pen color to (#ff0000)\n    add lava x1 y1 x2 y2 [300] [140] [470] [70]\n    add lava x1 y1 x2 y2 [700] [-50] [780] [-100]\n    set pen color to (#1dff00)\n    add platform x1 y1 x2 y2 [-50] [10] [200] [-180]\n    add platform x1 y1 x2 y2 [-50] [240] [200] [140]\n    add platform x1 y1 x2 y2 [330] [240] [470] [145]\n    add platform x1 y1 x2 y2 [470] [-100] [1000] [-180]\n    add platform x1 y1 x2 y2 [1000] [100] [1250] [50]\n    set pen color to (#0090ff)\n    add bounce x1 y1 x2 y2 [470] [240] [500] [-100]\n    set pen color to (#fff600)\n    add bounce x1 y1 x2 y2 [950] [-50] [1000] [-100]\n    set pen color to (#00b6ff)\n    add win block x1 y1 x2 y2 [1200] [150] [1250] [100]\nelse\n    if <(Level) = [2]> then\n        set pen color to (#ff0000)\n        add lava x1 y1 x2 y2 [205] ((-130) + (([sin v] of ((timer) * (300)) ) * (20))) [350] [-180]\n        add lava x1 y1 x2 y2 [455] ((-130) + (([sin v] of ((timer) * (300)) ) * (20))) [1000] [-180]\n        set [# v] to [850]\n        repeat (4)\n            add lava x1 y1 x2 y2 (#) [305] ((#) + (50)) [275]\n            change [# v] by (-200)\n        end\n        set pen color to (#1dff00)\n        add platform x1 y1 x2 y2 [-50] [-100] [200] [-180]\n        add platform x1 y1 x2 y2 [-50] [270] [1000] [150]\n        add platform x1 y1 x2 y2 [355] [-100] [450] [-180]\n        add platform x1 y1 x2 y2 ((600) + (([sin v] of ((timer) * (40)) ) * (150))) [-100] ((675) + (([sin v] of ((timer) * (40)) ) * (150))) [-175]\n        add platform x1 y1 x2 y2 [1005] [-100] [1220] [-175]\n        set pen color to (#fff600)\n        add bounce x1 y1 x2 y2 [1020] [50] [1200] [-25]\n        add bounce x1 y1 x2 y2 [1020] [250] [1200] [175]\n        set pen color to (#00b6ff)\n        add win block x1 y1 x2 y2 [50] [305] [100] [275]\n    else\n        if <(Level) = [3]> then\n            set pen color to (#ff0000)\n            add lava x1 y1 x2 y2 [1400] ((-130) + (([sin v] of ((timer) * (300)) ) * (20))) [1600] [-180]\n            add lava x1 y1 x2 y2 [1900] (([sin v] of ((timer) * (300)) ) * (20)) [2000] [-50]\n            add lava x1 y1 x2 y2 [2000] [650] ((2030) + (([sin v] of ((timer) * (300)) ) * (20))) [600]\n            add lava x1 y1 x2 y2 [1000] [910] [2000] [840]\n            set [# v] to [1700]\n            repeat (5)\n                add lava x1 y1 x2 y2 (#) ((730) + (([sin v] of ((timer) * (300)) ) * (20))) ((#) + (50)) [700]\n                change [# v] by (-200)\n            end\n            set pen color to (#1dff00)\n            add platform x1 y1 x2 y2 [-50] [-100] [200] [-180]\n            add platform x1 y1 x2 y2 [1100] [-100] [1400] [-180]\n            add platform x1 y1 x2 y2 [1600] [-100] [1700] [-180]\n            add platform x1 y1 x2 y2 [1800] [30] [1900] [-50]\n            add platform x1 y1 x2 y2 [2000] [30] [2100] [-50]\n            add platform x1 y1 x2 y2 [2200] [600] [2400] [-180]\n            add platform x1 y1 x2 y2 [-50] [700] [2000] [600]\n            add platform x1 y1 x2 y2 [1000] [900] [2000] [840]\n            set pen color to (#fff600)\n            add bounce x1 y1 x2 y2 [300] [80] [400] [0]\n            add bounce x1 y1 x2 y2 [500] [180] [600] [100]\n            add bounce x1 y1 x2 y2 [700] [280] [800] [200]\n            add bounce x1 y1 x2 y2 [900] [380] [1000] [300]\n            add bounce x1 y1 x2 y2 [1100] [480] [1200] [400]\n            set pen color to (#00b6ff)\n            add win block x1 y1 x2 y2 [600] [900] [700] [800]\n        else\n            if <(Level) = [4]> then\n                set pen color to (#1dff00)\n                add platform x1 y1 x2 y2 [-50] [-100] [200] [-180]\n                add platform x1 y1 x2 y2 [200] [100] [300] [-180]\n                add platform x1 y1 x2 y2 [-50] [100] [300] [50]\n            end\n        end\n    end\nend\n\ndefine Sum up time\nset [timer v] to [0]\nrepeat (length of [times v])\n    change [timer v] by (item (1) of [times v])\n    delete (1) of [times v]\nend\n\nwhen flag clicked\nwait until <(Level) = [4]>\nSum up time\nif <(Timer) < (☁ Highscore)> then\n    set [☁ highscore v] to (Timer)\nend\nshow variable [timer v]\nshow variable [☁ highscore v]\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n