Scrolling Platformer V1.1

Instructions: Hello! This project is another one of my platformers!\n\n★★★★★★★★★★★★★★★★★★★★★★★★★\n\nMy other Platformer: https://scratch.mit.edu/projects/482595168\n\nNew Game:\nhttps://scratch.mit.edu/projects/526208042/\n\n★★★★★★★★★★★★★★★★★★★★★★★★★\n\nUpdate - None Yet.\n\n★★★★★★★★★★★★★★★★★★★★★★★★★\n\n[Arrow Keys] Move and Jump\n\nAvoid hitting spikes and touch the portal at the end.\n\n★★★★★★★★★★★★★★★★★★★★★★★★★\n\nThis project was just meant for Scratch Design Studio "Colorless"\n\n★★★★★★★★★★★★★★★★★★★★★★★★★\n\n@TomatoSauce531 for code, art and thumbnail!\n@cs2860999 for inspiration!\nMusic: Overworld Theme - New Super Mario Bros\n\n★★★★★★★★★★★★★★★★★★★★★★★★★\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nDon't Scroll Down\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nI told you not to scroll down.

@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (Scroll-X)) (join [,] ((mouse y) + (Scroll-Y))))\n\n@⠀\n\n@Player\n\nwhen flag clicked\nbroadcast (Green Flag v)\nbroadcast (Play Game v)\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Set Up v) and wait\n    Game On\n    repeat until <(Exit) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(Exit) = [win]> then\n        Win!\n    else\n        Death\n    end\nend\n\ndefine Game On\nset [x v] to [0]\nset [y v] to [0]\nset [scroll-x v] to [0]\nset [scroll-y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\ngo to [front v] layer\nshow\n\ndefine Tick\nswitch backdrop to (1 v)\nswitch costume to (player 1 v)\nif <key (up arrow v) pressed?> then\n    if <(In air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nif <key (left arrow v) pressed?> then\n    Change Player x by [-8]\nend\nif <key (right arrow v) pressed?> then\n    Change Player x by [8]\nend\nChange Player y by (sy)\nPosition\nTest - Die\nset [scroll-x v] to (x)\nif <(Scroll-X) < [0]> then\n    set [scroll-x v] to [0]\nend\nchange [scroll-y v] by (round (((y) - (Scroll-Y)) / (10)))\nif <(Scroll-Y) < [0]> then\n    set [scroll-y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <not <touching (platforms v)?>> then\n    repeat (17)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <key (up arrow v) pressed?> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Death\nset [exit v] to []\nrepeat (2)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Position\ngo to x: ((x) - (Scroll-X)) y: ((y) - (Scroll-Y))\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\n    change [deaths v] by (1)\nend\n\ndefine Win!\nif <touching (exit v)?> then\n    repeat (50)\n        point towards (exit v)\n        turn right (65) degrees\n        move ((distance to [exit v]) / (2)) steps\n        change size by (-1)\n        change [ghost v] effect by (2)\n    end\n    wait (1) seconds\n    hide\n    broadcast (Win! v) and wait\nend\n\nwhen I receive [win! v]\nset [score v] to (round (((10000) / ((Deaths) + (1))) - (Time)))\nswitch backdrop to (2 v)\nstop [all v]\n\nwhen I receive [green flag v]\ngo to [front v] layer\nhide\nset [deaths v] to [0]\nset [time v] to [0]\nset [score v] to [N/A]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [tick v]\nPOSITION ((x) - (Scroll-X)) ((y) - (Scroll-Y))\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nCLONE AT X: [420] Y: [0]\nCLONE AT X: [350] Y: [0]\nCLONE AT X: [600] Y: [0]\nCLONE AT X: [485] Y: [0]\nCLONE AT X: [600] Y: [0]\nCLONE AT X: [450] Y: [0]\nCLONE AT X: [425] Y: [0]\nCLONE AT X: [435] Y: [100]\nCLONE AT X: [460] Y: [0]\nCLONE AT X: [400] Y: [0]\nCLONE AT X: [700] Y: [0]\nCLONE AT X: [700] Y: [0]\nCLONE AT X: [800] Y: [0]\nCLONE AT X: [550] Y: [0]\nCLONE AT X: [700] Y: [0]\nCLONE AT X: [810] Y: [0]\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine CLONE AT X: (x) Y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\ndefine POSITION (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [win! v]\nhide\n\nwhen I receive [win! v]\nhide\n\n@Danger\n\nwhen I receive [green flag v]\ngo to [front v] layer\nhide\n\nwhen I receive [tick v]\nposition ((x) - (Scroll-X)) ((y) - (Scroll-Y))\n\nwhen I receive [set up v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nClone at x: [500] Y: [80]\nClone at x: [0] Y: [0]\nClone at x: [1240] Y: [-50]\nClone at x: [1860] Y: [0]\nClone at x: [2290] Y: [-10]\nClone at x: [2845] Y: [45]\nClone at x: [0] Y: [0]\nClone at x: [3440] Y: [140]\nClone at x: [0] Y: [0]\nClone at x: [0] Y: [0]\nClone at x: [5285] Y: [70]\nClone at x: [0] Y: [0]\nClone at x: [5935] Y: [56]\nClone at x: [0] Y: [0]\nClone at x: [6740] Y: [55]\nClone at x: [7310] Y: [45]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) Y: (y)\ncreate clone of (_myself_ v)\nset [x v] to (x)\nset [y v] to (y)\nnext costume\n\nwhen I receive [win! v]\nhide\n\nwhen I receive [win! v]\nhide\n\n@Exit\n\nwhen I receive [green flag v]\nhide variable [mouse v]\nhide\n\nwhen I receive [tick v]\nposition ((Finish-X) - (Scroll-X)) ((Finish-Y) - (Scroll-Y))\nif <<(costume [number v]) = [1]> and <touching (player v)?>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [set up v]\nhide\nset [finish-x v] to [0]\nset [finish-y v] to [0]\nswitch costume to (level 1 1 v)\nClone at x: [9145] Y: [5]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) Y: (y)\ncreate clone of (_myself_ v)\nset [finish-x v] to (x)\nset [finish-y v] to (y)\nnext costume\n\nwhen I receive [win! v]\ngo to [front v] layer\nhide\n\nwhen I receive [win! v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\n@Music\n\nwhen flag clicked\nforever\n    play sound [Overworld Theme - New Super Mario Bros v] until done\nend\n\n