Sky - A Platformer (Work In Progress)

Instructions: Arrow keys, get to the blue as fast as possible!\n\nCheck out my new platformer!\nhttps://scratch.mit.edu/projects/434832032/\n\nCheck out this short animation!\nhttps://scratch.mit.edu/projects/433397330/\n\nCheck out my new project! scratch.mit.edu/projects/432740019/\n\nPLEASE JOIN MY PFP CONTEST https://scratch.mit.edu/projects/432938084/\n\nCHECK OUT MY YOUTUBE CHANNEL!\nhttps://www.youtube.com/channel/UCWI5wHLnR5f6fVd3MNEDFtg?

@Stage\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    play sound [TheFatRat - Unity v] until done\nend\n\n@Blank\n\n@Player\n\ndefine Circle (x) (y)\nset pen color to (#037fd8)\npen down\ngo to x: ((x) + (5)) y: ((y) + (5))\ngo to x: ((x) + (-5)) y: ((y) + (5))\ngo to x: ((x) + (-5)) y: ((y) + (-5))\ngo to x: ((x) + (5)) y: ((y) + (-5))\ngo to x: ((x) + (5)) y: ((y) + (5))\npen up\ngo to x: (x) y: (y)\n\ndefine Line (x) (y) (x2) (y2) (size)\nset pen size to (size)\ngo to x: ((x) - (scroll x)) y: ((y) - (scroll y))\npen down\ngo to x: ((x2) - (scroll x)) y: ((y2) - (scroll y))\npen up\n\ndefine floor\nif <(level) = [1]> then\n    set pen color to (#29ff00)\n    Line [-240] [-180] [240] [-180] [16]\n    Line [240] [-180] [240] [0] [16]\n    Line [-240] [-180] [-240] [0] [16]\n    set pen color to (#0015ff)\n    Line [240] [0] [300] [0] [16]\n    set [border size v] to [19]\nend\nif <(level) = [2]> then\n    set pen color to (#29ff00)\n    Line [-240] [-180] [240] [-180] [16]\n    Line [-0] [-50] [75] [-50] [16]\n    Line [-90] [480] [0] [480] [16]\n    set pen color to (#ff00e9)\n    Line [-100] [50] [-175] [50] [16]\n    set pen color to (#ff00e9)\n    Line [-100] [225] [-175] [225] [16]\n    set pen color to (#0015ff)\n    Line [0] [480] [0] [550] [16]\n    set [border size v] to [19]\nend\nif <(level) = [3]> then\n    set pen color to (#29ff00)\n    Line [-4] [-180] [-4] [0] [16]\n    set pen color to (#ff0000)\n    Line [0] [-180] [0] [25] [16]\n    Line [75] [-180] [75] [25] [16]\n    set pen color to (#29ff00)\n    Line [-240] [-180] [240] [-180] [16]\n    set pen color to (#ff00e9)\n    Line [0] [-170] [75] [-170] [16]\n    set pen color to (#0015ff)\n    Line [345] [-80] [345] [-160] [16]\nend\nif <(level) = [4]> then\n    set pen color to (#29ff00)\n    Line [-240] [-180] [240] [-180] [16]\n    set pen color to (#65ff00)\n    Line [-50] [-180] [50] [-180] [16]\n    set pen color to (#ff0000)\n    Line [100] [-180] [100] [-170] [0.25]\n    set pen color to (#0015ff)\n    Line [400] [-180] [400] [-160] [16]\n    set pen color to (#ff0000)\n    Line [425] [-180] [425] [-130] [16]\n    set pen color to (#ff0000)\n    Line [375] [-180] [375] [-130] [16]\n    set pen color to (#ff0000)\n    Line [375] [-180] [425] [-180] [16]\n    set pen color to (#ff00e9)\n    Line [215] [-170] [240] [-170] [16]\nend\nif <(level) = [5]> then\n    set pen color to (#29ff00)\n    Line [-240] [-180] [240] [-180] [16]\n    set pen color to (#ff00e9)\n    Line [-500] [-170] [-475] [-170] [16]\n    set pen color to (#ff00e9)\n    Line [-500] [0] [-475] [0] [16]\n    set pen color to (#ff00e9)\n    Line [-500] [170] [-475] [170] [16]\n    set pen color to (#ff00e9)\n    Line [-500] [340] [-475] [340] [16]\n    set pen color to (#0015ff)\n    Line [-500] [510] [-475] [510] [16]\nend\nif <(level) = [6]> then\n    set [border size v] to [30]\n    set pen color to (#29ff00)\n    Line [-240] [-180] [240] [-180] [16]\n    set pen color to (#ff00ae)\n    Line [350] [-60] [350] [-60] [30]\n    set pen color to (#0015ff)\n    Line [-175] [250] [-125] [250] [16]\nend\n\ndefine physics\nchange [y v] by (-1)\nchange y by (Y)\nif <touching color (#28ff00)?> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-1)\nif <touching color (#28ff00)?> then\n    if <key (up arrow v) pressed?> then\n        set [y v] to [15]\n    end\nend\nchange y by (1)\nif <key (left arrow v) pressed?> then\n    change [x v] by (-1)\nend\nif <key (right arrow v) pressed?> then\n    change [x v] by (1)\nend\nset [x v] to ((X) * (0.9))\nchange x by (X)\nif <touching color (#28ff00)?> then\n    change x by ((X) * (-2))\n    if <key (up arrow v) pressed?> then\n        if <(X) > [0]> then\n            set [x v] to [-10]\n        else\n            set [x v] to [10]\n        end\n        set [y v] to [15]\n    else\n        set [x v] to [0]\n    end\nend\nif <touching color (#ff00e9)?> then\n    set [y v] to [24]\nend\nif <touching color (#0014ff)?> then\n    set [scroll x v] to [-150]\n    set [scroll y v] to [0]\n    set [x v] to [0]\n    set [y v] to [0]\n    set [px v] to [0]\n    set [py v] to [0]\n    change [level v] by (1)\nend\nif <touching color (#ff0000)?> then\n    set [scroll x v] to [-150]\n    set [scroll y v] to [0]\n    set [x v] to [0]\n    set [y v] to [0]\n    set [px v] to [0]\n    set [py v] to [0]\nend\nif <touching color (#ff00ae)?> then\n    set [scroll x v] to [-150]\n    set [scroll y v] to [300]\n    set [x v] to [0]\n    set [y v] to [0]\n    set [px v] to [0]\n    set [py v] to [0]\nend\nchange [scroll x v] by (x position)\nchange [scroll y v] by (y position)\ngo to x: (0) y: (0)\nchange [scroll x v] by (x position)\nchange [scroll y v] by (y position)\ngo to x: (0) y: (0)\n\ndefine border line (x) (y) (x2) (y2) (size)\nset pen color to (#00b6ff)\nset pen size to (size)\ngo to x: (x) y: (y)\npen down\ngo to x: (x2) y: (y2)\npen up\n\ndefine border\nborder line [240] [180] [240] [-180] (border size)\nborder line [240] [-180] [-240] [-180] (border size)\nborder line [-240] [-180] [-240] [180] (border size)\nborder line [-240] [180] [240] [180] (border size)\n\nwhen I receive [end intro v]\nset [level v] to [1]\nset [scroll x v] to [-150]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [px v] to [0]\nset [py v] to [0]\nhide\nforever\n    erase all\n    set pen color to (#00b6ff)\n    set pen size to (9999999999999999999999999999999999999999999999999999999)\n    pen down\n    pen up\n    floor\n    go to x: (PX) y: (PY)\n    physics\n    set [px v] to (x position)\n    set [py v] to (y position)\n    set pen size to (12)\n    Circle (PX) (PY)\n    if <(scroll y) < [-450]> then\n        set [scroll x v] to [-150]\n        set [scroll y v] to [0]\n        set [x v] to [0]\n        set [y v] to [0]\n        set [px v] to [0]\n        set [py v] to [0]\n    end\n    border\nend\n\nCircle [90] [90]\n\npen up\n\nset pen color to (#29ff00)\n\nwhen flag clicked\nbroadcast (end intro v)\n\n@TN\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n