Natureformer - 90% Pen platformer

Instructions: So, finally I finished this pen platformer. This platformer is only 70% Pen because I use touching blocks. \nIMPORTANT IMFORMATION:\n\nTHIS IS MY FIRST PEN PROJECT\n\nIf this gets 200 likes and more than 150 faves, I make more levels. \nSo like this.\n\n-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.\nMove with arrows or WASD. Mobile will come later.

@Stage\n\nwhen flag clicked\nforever\n    play sound [Vexento - Digital Kiss.mp3 v] until done\nend\n\n@pen platformer\n\nwhen I receive [green flag v]\ngo to x: (-180) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    erase all\n    set [player_x_position v] to (x position)\n    set [player_y_position v] to (y position)\n    draw level collision\n    go to x: (player_x_position) y: (player_y_position)\n    Platformer physics\n    set [player_x_position v] to (x position)\n    set [player_y_position v] to (y position)\n    draw player\n    go to x: (player_x_position) y: (player_y_position)\nend\n\ndefine Platformer physics\nchange [yv v] by (-1)\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by (-1)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (1)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\nif <touching color (#3dff12)?> then\n    change y by (1)\nend\nif <touching color (#3dff12)?> then\n    change y by (1)\nend\nif <touching color (#3dff12)?> then\n    change y by (1)\nend\nif <touching color (#3dff12)?> then\n    change y by (1)\nend\nif <touching color (#3dff12)?> then\n    change y by (-4)\n    change x by ((Xv) * (-1))\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [yv v] to [15]\n        if <(Xv) > [0]> then\n            set [xv v] to [-10]\n        else\n            set [xv v] to [10]\n        end\n    end\nend\nchange y by (Yv)\nif <touching color (#3dff12)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching color (#3dff12)?>> then\n    set [yv v] to [15]\nend\nchange y by (1)\nif <touching color (#ff0000)?> then\n    go to x: (-180) y: (0)\nend\nif <(y position) < [-180]> then\n    go to x: (-180) y: (0)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nbroadcast (green flag v)\n\ndefine draw line from (x1) (y1) to (x2) (y2)\ngo to x: (x1) y: (y1)\npen down\ngo to x: (x2) y: (y2)\npen up\n\ndefine draw level collision\nif <(level) = [1]> then\n    draw sky\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    set pen color to (#394e00)\n    set pen size to (60)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [230] [-130]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    Ihavenonameforthisblock\nend\nif <(level) = [2]> then\n    draw sky\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    set pen size to (70)\n    draw line from [0] [-130] to [0] [80]\n    set pen color to (#394e00)\n    set pen size to (50)\n    draw line from [0] [-130] to [0] [80]\n    set pen size to (60)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [-30] [-130]\n    draw line from [30] [-130] to [225] [-130]\n    set pen color to (#3dff12)\n    set pen size to (16)\n    draw line from [-160] [-130] to [-160] [-120]\n    draw line from [-100] [-150] to [-100] [-120]\n    draw line from [80] [-140] to [80] [-120]\n    draw line from [160] [-170] to [160] [-120]\nend\nif <(level) = [3]> then\n    draw sky\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    set pen color to (#ff0000)\n    draw line from [-50] [-120] to [50] [-120]\n    set pen color to (#394e00)\n    set pen size to (50)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [230] [-130]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    Ihavenonameforthisblock\nend\nif <(level) = [4]> then\n    draw sky\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    set pen color to (#ff0000)\n    draw line from [-100] [-120] to [-30] [-120]\n    draw line from [50] [-120] to [120] [-120]\n    set pen color to (#394e00)\n    set pen size to (50)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [230] [-130]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    set pen color to (#3dff12)\n    set pen size to (16)\n    draw line from [-160] [-150] to [-160] [-120]\n    draw line from [20] [-140] to [20] [-120]\n    draw line from [160] [-170] to [160] [-120]\nend\nif <(level) = [5]> then\n    draw sky\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    set pen size to (70)\n    draw line from [0] [-130] to [0] [80]\n    set pen color to (#ff0000)\n    set pen size to (32)\n    draw line from [40] [-120] to [200] [-120]\n    set pen color to (#394e00)\n    set pen size to (50)\n    draw line from [0] [-130] to [0] [80]\n    set pen size to (60)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [-30] [-130]\n    draw line from [30] [-130] to [225] [-130]\n    set pen color to (#3dff12)\n    set pen size to (16)\n    draw line from [-160] [-150] to [-160] [-120]\n    draw line from [-40] [-140] to [-40] [-120]\n    draw line from [220] [-170] to [220] [-125]\nend\nif <(level) = [6]> then\n    draw sky\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    draw line from [-10] [-20] to [10] [-20]\n    set pen color to (#ff0000)\n    set pen size to (32)\n    draw line from [-150] [-120] to [200] [-120]\n    set pen color to (#394e00)\n    set pen size to (50)\n    set pen size to (60)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [230] [-130]\n    set pen color to (#3dff12)\n    set pen size to (16)\n    draw line from [-180] [-150] to [-180] [-120]\n    set pen color to (#ff0000)\n    draw line from [-40] [-140] to [-40] [-120]\n    draw line from [60] [-160] to [60] [-120]\n    draw line from [120] [-130] to [120] [-120]\nend\nif <(level) = [7]> then\n    draw sky\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    draw line from [-30] [-20] to [-10] [-20]\n    draw line from [100] [-180] to [100] [120]\n    set pen color to (#ff0000)\n    set pen size to (32)\n    draw line from [-150] [-120] to [200] [-120]\n    set pen color to (#394e00)\n    set pen size to (50)\n    set pen size to (60)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [230] [-130]\n    set pen color to (#3dff12)\n    set pen size to (16)\n    draw line from [-180] [-150] to [-180] [-120]\n    set pen color to (#ff0000)\n    draw line from [-40] [-140] to [-40] [-120]\n    draw line from [60] [-160] to [60] [-120]\n    draw line from [120] [-130] to [120] [-120]\nend\nif <(level) = [8]> then\n    draw sky\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    draw line from [-120] [-180] to [-120] [70]\n    draw line from [80] [-180] to [80] [70]\n    draw line from [-20] [200] to [-20] [-20]\n    draw line from [180] [200] to [180] [-20]\n    set pen color to (#394e00)\n    set pen size to (50)\n    set pen size to (60)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [230] [-130]\n    Ihavenonameforthisblock\nend\nif <(level) = [9]> then\n    draw sky\n    set pen color to (#ff0000)\n    set pen size to (18)\n    draw line from [-150] [-100] to [200] [-100]\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    draw line from [230] [-180] to [230] [-20]\n    draw line from [230] [80] to [230] [200]\n    draw line from [-50] [-30] to [-50] [-30]\n    draw line from [80] [-20] to [80] [-20]\n    set pen color to (#394e00)\n    set pen size to (50)\n    set pen size to (60)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [230] [-130]\n    Ihavenonameforthisblock\nend\nif <(level) = [10]> then\n    draw sky\n    set pen color to (#1d00ff)\n    set pen size to (50)\n    draw player at [-120] [15] and size [40]\n    set pen size to (70)\n    draw line from [-120] [90] to [-120] [90]\n    set pen color to (#de6a6a)\n    set pen size to (18)\n    draw line from [] [] to [-50] [70]\n    draw line from [50] [70] to [] []\n    draw line from [-50] [70] to [-30] [100]\n    draw line from [50] [70] to [30] [100]\n    draw line from [30] [100] to [0] [70]\n    draw line from [-30] [100] to [0] [70]\n    set pen color to (#e1ff78)\n    draw line from [150] [] to [120] [80]\n    draw line from [90] [] to [120] [80]\n    draw line from [150] [0] to [80] [50]\n    draw line from [80] [50] to [160] [50]\n    draw line from [160] [50] to [90] []\n    set pen color to (#3dff12)\n    set pen size to (32)\n    draw line from [-225] [-120] to [225] [-120]\n    set pen size to (70)\n    draw line from [230] [-180] to [230] [200]\n    set pen color to (#394e00)\n    set pen size to (50)\n    set pen size to (60)\n    draw line from [-225] [-150] to [225] [-150]\n    set pen color to (#263500)\n    set pen size to (40)\n    draw line from [-225] [-200] to [-30] [-170]\n    draw line from [-30] [-170] to [225] [-200]\n    set pen color to (#23a008)\n    set pen size to (18)\n    draw line from [-230] [-130] to [230] [-130]\n    Ihavenonameforthisblock\nend\n\ndefine draw player at (center x) (center y) and size (side length)\ngo to x: ((center x) + ((side length) / (2))) y: ((center y) + ((side length) / (2)))\npen down\ngo to x: ((center x) + ((side length) / (-2))) y: ((center y) + ((side length) / (2)))\ngo to x: ((center x) + ((side length) / (-2))) y: ((center y) + ((side length) / (-2)))\ngo to x: ((center x) + ((side length) / (2))) y: ((center y) + ((side length) / (-2)))\ngo to x: ((center x) + ((side length) / (2))) y: ((center y) + ((side length) / (2)))\npen up\n\ndefine draw player\nset pen color to (#cecece)\nset pen size to (19)\ndraw player at (player_x_position) (player_y_position) and size [20]\n\nwhen flag clicked\nset [level v] to [1]\nrepeat until <(level) = [10]>\n    if <(x position) > [230]> then\n        go to x: (-180) y: (0)\n        change [level v] by (1)\n    end\nend\n\nforever\n\ndefine reset player\nset [player_x_position v] to [0]\nset [player_y_position v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\n\nreset player\n\ngo to x: (-180) y: (0)\n\nset [level v] to [10]\n\ndefine Ihavenonameforthisblock\nset pen color to (#3dff12)\nset pen size to (16)\ndraw line from [-160] [-130] to [-160] [-120]\ndraw line from [-100] [-150] to [-100] [-120]\ndraw line from [80] [-140] to [80] [-120]\ndraw line from [160] [-170] to [160] [-120]\n\ndraw line from [-10] [-160] to [-10] [-120]\n\nIhavenonameforthisblock\n\ndraw line from [-100] [-150] to [-100] [-120]\n\nIhavenonameforthisblock\n\nIhavenonameforthisblock\n\ndefine draw sky\nset pen color to (#45a2ff)\nset pen size to (300)\ndraw line from [-240] [-50] to [240] [-50]\ndraw line from [-240] [0] to [240] [0]\ndraw line from [-240] [50] to [240] [50]\ndraw line from [-240] [150] to [240] [150]\ndraw line from [-240] [200] to [240] [150]\n\n@penplatformer_thumbnail\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n