90% Pen Platformer V1.4

Instructions: Use arrow keys to move! Like a typical platformer red is bad and purple is bouncy!\n\nOnly 8 levels (for now)\n\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [Spectre~ By Alan Walker v] until done\nend\n\n@Pen\n\nwhen flag clicked\nset [level v] to [1]\npen up\nhide\nerase all\ngo to x: (-232) y: (-171)\nset pen color to (#48df63)\nset pen size to (50)\npen down\ngo to x: (234) y: (-171)\npen up\ngo to x: (1) y: (-171)\npen down\ngo to x: (1) y: (22)\npen up\nset pen color to (#ff1d00)\ngo to x: (32) y: (-147)\npen down\ngo to x: (137) y: (-147)\n\nwhen I receive [next level v]\nchange [level v] by (1)\nif <(level) = [2]> then\n    Level 2\nelse\n    if <(level) = [3]> then\n        level 3\n    else\n        if <(level) = [4]> then\n            level 4\n        else\n            if <(level) = [5]> then\n                level 5\n            else\n                if <(level) = [6]> then\n                    level 6\n                else\n                    if <(level) = [7]> then\n                        level 7\n                    else\n                        if <(level) = [8]> then\n                            level 8\n                        else\n                            broadcast (done v)\n                            erase all\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Level 2\npen up\nerase all\nset pen color to (#48df63)\ngo to x: (-226) y: (-171)\npen down\ngo to x: (223) y: (-168)\npen up\nset pen color to (#ff1d00)\ngo to x: (-5) y: (-158)\npen down\ngo to x: (-5) y: (-81)\npen up\nset pen color to (#ff1d00)\ngo to x: (172) y: (-158)\npen down\ngo to x: (172) y: (-81)\n\ndefine level 3\npen up\nerase all\nset pen color to (#48df63)\ngo to x: (-226) y: (-171)\npen down\ngo to x: (223) y: (-168)\npen up\nset pen color to (#ff1d00)\ngo to x: (-224) y: (113)\npen down\ngo to x: (224) y: (113)\npen up\nset pen color to (#c728e4)\ngo to x: (-114) y: (-168)\npen down\ngo to x: (-34) y: (-168)\npen up\ngo to x: (94) y: (-168)\npen down\ngo to x: (201) y: (-168)\n\ndefine level 4\npen up\nerase all\nset pen color to (#48df63)\ngo to x: (-226) y: (-171)\npen down\ngo to x: (223) y: (-168)\npen up\ngo to x: (-100) y: (-156)\npen down\ngo to x: (-100) y: (44)\npen up\ngo to x: (51) y: (174)\npen down\nset pen color to (#ff1d00)\ngo to x: (51) y: (-13)\ngo to x: (51) y: (90)\ngo to x: (232) y: (90)\npen up\nset pen color to (#c728e4)\ngo to x: (146) y: (-168)\npen down\ngo to x: (236) y: (-168)\n\ndefine level 5\npen up\nerase all\nset pen color to (#48df63)\ngo to x: (-226) y: (-171)\npen down\ngo to x: (223) y: (-168)\nset pen color to (#ff1d00)\ngo to x: (8) y: (-168)\nset pen color to (#c728e4)\ngo to x: (-75) y: (-168)\npen up\n\ndefine level 6\npen up\nerase all\nset pen color to (#48df63)\ngo to x: (-226) y: (-171)\npen down\ngo to x: (223) y: (-168)\npen up\nset pen color to (#ff1d00)\ngo to x: (-5) y: (-158)\npen down\ngo to x: (-5) y: (-81)\npen up\nset pen color to (#ff1d00)\ngo to x: (172) y: (-158)\npen down\ngo to x: (172) y: (-81)\npen up\ngo to x: (33) y: (-171)\npen down\ngo to x: (134) y: (-171)\npen up\ngo to x: (-9) y: (167)\npen down\ngo to x: (-9) y: (121)\npen up\nset pen color to (#c728e4)\ngo to x: (68) y: (-61)\npen down\ngo to x: (93) y: (-61)\npen up\n\ndefine level 7\npen up\nerase all\nset pen color to (#48df63)\ngo to x: (-226) y: (-171)\npen down\ngo to x: (223) y: (-168)\nset pen color to (#ff1d00)\ngo to x: (220) y: (44)\npen up\ngo to x: (35) y: (-89)\nset pen color to (#c728e4)\npen down\nchange x by (10)\npen up\n\ndefine level 8\npen up\nerase all\nset pen color to (#48df63)\ngo to x: (-226) y: (-171)\npen down\ngo to x: (223) y: (-168)\npen up\nset pen color to (#ff1d00)\ngo to x: (-45) y: (161)\npen down\ngo to x: (-45) y: (95)\npen up\ngo to x: (-45) y: (-80)\npen down\ngo to x: (-45) y: (-156)\npen up\nset pen color to (#ff1d00)\ngo to x: (135) y: (161)\npen down\ngo to x: (135) y: (95)\npen up\ngo to x: (135) y: (-80)\npen down\ngo to x: (135) y: (-156)\npen up\ngo to x: (204) y: (-160)\nset pen color to (#c728e4)\npen down\nchange x by (10)\n\n@Player\n\nwhen flag clicked\ngo to x: (-214) y: (115)\nswitch costume to (costume1 v)\nshow\ngo to x: (-177) y: (12)\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    change [y v] by (-1)\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#48df63)?> then\n        change y by (1)\n    end\n    if <touching color (#48df63)?> then\n        change y by (1)\n    end\n    if <touching color (#48df63)?> then\n        change y by (1)\n    end\n    if <touching color (#48df63)?> then\n        change y by (1)\n    end\n    if <touching color (#48df63)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <key (up arrow v) pressed?> then\n            set [y v] to [17]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching color (#48df63)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching color (#48df63)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <touching color (#ff1d00)?> then\n        change [deaths v] by (1)\n        go to x: (-177) y: (12)\n    end\n    if <(x position) > [222]> then\n        go to x: (-217) y: (-20)\n        broadcast (next level v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#c628e4)?> then\n        set [y v] to [20]\n    end\nend\n\nwhen I receive [done v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [done v]\nshow\n\n@Sprite2\n\nwhen flag clicked\nhide\n\n