Starry platformer!

Instructions: Arrow keys to move! R to reset! Watch out for spikes and don’t fall into the void!\n\nCoding by me!\n\nTags:\n~#Platformer#Enjoy#Games#Scratch#Rainbowsaurus#Love#Follow#Fave~\n\nMy newest game:  https://scratch.mit.edu/projects/552014817

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\nwait (16) seconds\nnext backdrop\n\n@No feet phil\n\ndefine set up\ngo to x: (-200) y: (0)\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\n\ndefine reset\ngo to x: (-200) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\n\ndefine left right\nchange [xv v] by (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>)\nset [xv v] to ((xv) * (0.9))\nchange x by (xv)\n\ndefine wall/slope detection\nrepeat (5)\n    change y by <touching (platform v)?>\nend\nif <touching (platform v)?> then\n    change x by ((xv) * (-1))\n    change y by (-5)\n    if <key (up arrow v) pressed?> then\n        if <(xv) > [0]> then\n            set [xv v] to [-5]\n        else\n            set [xv v] to [5]\n        end\n        set [yv v] to [12]\n    else\n        set [xv v] to [0]\n    end\nend\n\ndefine ground/ceiling detection\nif <touching (platform v)?> then\n    change y by ((yv) * (-1))\n    set [yv v] to [0]\nend\n\ndefine (jump height)\n\ndefine up and down movement (jump height)\nground/ceiling detection\nchange y by (-1)\nif <<key (up arrow v) pressed?> and <touching (platform v)?>> then\n    set [yv v] to ((jump height) + (4))\nelse\n    if <<key (up arrow v) pressed?> and <touching (jump v)?>> then\n        set [yv v] to ((jump height) + (2))\n        broadcast (jumpuse v)\n    end\nend\nchange y by (1)\n\ndefine main game loop\nleft right\nwall/slope detection\nchange [yv v] by (-1)\nchange y by (yv)\nup and down movement [14]\nif <(x position) > [235]> then\n    reset\n    change [level v] by (1)\n    broadcast (rest v)\nend\nif <key (r v) pressed?> then\n    reset\nend\nif <<(y position) < [-178]> or <<touching color (#4fe5b5)?> or <touching (dangers v)?>>> then\n    reset\nend\ncreate clone of (_myself_ v)\n\nwhen flag clicked\npoint in direction (90)\nset rotation style [left-right v]\nset up\nforever\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n    end\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n    end\n    main game loop\nend\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-1)\n    change [ghost v] effect by (10)\n    change [color v] effect by (40)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    play sound [Fire by bubblebee3 v] until done\nend\n\nwhen flag clicked\nhide\nwait (16) seconds\ngo to x: (-200) y: (0)\nset [level v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nshow\n\nwhen flag clicked\nhide variable [level v]\nwait (16) seconds\nshow variable [level v]\n\n@Platform\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\nwait (16) seconds\nshow\n\n@dangers\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\nwait (16) seconds\nshow\n\n@Sprite4\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (150) %\n    else\n        if <not <touching (mouse-pointer v)?>> then\n            set size to (100) %\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    point in direction ((([sin v] of ((timer) * (500)) ) * (5)) + (90))\nend\n\nwhen this sprite clicked\nsay [Arrow keys to move! R to reset! Watch out for spikes and don't fall into the void!] for (12) seconds\n\nwhen flag clicked\nhide\nwait (16) seconds\nshow\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@Sprite3\n\nwhen flag clicked\nforever\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nrepeat (100)\n    set rotation style [all around v]\n    turn right (15) degrees\nend\nrepeat (100)\n    point in direction ((([sin v] of ((timer) * (500)) ) * (5)) + (90))\nend\nbroadcast (message1 v)\nhide\n\n@Sprite2\n\nwhen flag clicked\nshow\ngo to [back v] layer\nset size to (10) %\nrepeat (50)\n    change size by (10)\nend\nhide\n\n@Sprite5\n\nwhen flag clicked\nrepeat (100)\n    wait (0.05) seconds\n    create clone of (_myself_ v)\nend\nhide\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (pick random (10) to (50))\nset size to (pick random (10) to (20)) %\ngo to x: (250) y: (pick random (-180) to (180))\nglide (pick random (2) to (6)) secs to x: (-220) y: (pick random (-180) to (180))\nhide\ndelete this clone\n\n@Sprite6\n\nwhen flag clicked\nrepeat (100)\n    wait (0.05) seconds\n    create clone of (_myself_ v)\nend\nhide\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (pick random (10) to (50))\nset size to (pick random (10) to (20)) %\ngo to x: (250) y: (pick random (-180) to (180))\nglide (pick random (2) to (6)) secs to x: (-220) y: (pick random (-180) to (180))\nhide\ndelete this clone\n\n@jump\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nhide\nwait (16) seconds\nshow\n\nwhen I receive [jumpuse v]\nhide\nwait (3) seconds\nshow\n\nwhen I receive [rest v]\nshow\n\n