Space - A Platformer

Instructions: Your lost in space and you must find your rocket to get home safely. Can you beat all 24 levels?\n\nINSTRUCTIONS:\nWASD or ↑↓→← to move\nR to respawn  \nRed, Falling into the endless void, and using "R"\nOrange is bouncy while Blue is slippery\n\nCREDIT:\nThanks to @haniamatuszyk @Cheese1134 @s-swrichter for some coding and to cooltext.com for some text. Almost all coding done by me, all art done by me :) \n\nNOTES:\nThis is my first project on this account there will be many more projects coming. ALL levels are possible comment your time and deaths. The stars were made to be used as a platform so they might either mess you up or help you. If you find any bugs tell me so I can fix it. If it's to hard, tell me what levels to make easier. Plz Love, Fav, Comment, Follow me and Enjoy :D 

@Stage\n\nwhen I receive [start v]\nswitch backdrop to (homescreen v)\n\nwhen I receive [gamestart v]\nswitch backdrop to (blank v)\n\nwhen I receive [gamend v]\nswitch backdrop to (earthscreen v)\n\nwhen I receive [time/score v]\nswitch backdrop to (time/death v)\n\n@YaBoi\n\nwhen flag clicked\ngo to [front v] layer\nset size to (80) %\nset [deaths v] to [0]\nset [time v] to [0]\nswitch backdrop to (blank v)\ngo to x: (-190) y: (-73)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-0.75)\n        switch costume to (left v)\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (0.75)\n        switch costume to (right v)\n    end\n    set [xv v] to ((xv) * (0.85))\n    change x by (xv)\n    if <touching color (#767676)?> then\n        change y by (-2)\n        if <touching color (#767676)?> then\n            change y by (1)\n            if <touching color (#767676)?> then\n                change y by (1)\n                if <touching color (#767676)?> then\n                    change y by (1)\n                    if <touching color (#767676)?> then\n                        change y by (1)\n                        if <touching color (#767676)?> then\n                            change y by (1)\n                            if <touching color (#767676)?> then\n                                change y by (-5)\n                                change x by ((-1) * (xv))\n                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <not <(xv) = [0]>>> then\n                                    set [mode v] to [walljump]\n                                    set [yv v] to [8]\n                                    set [xv v] to (((xv) / ([abs v] of (xv) )) * (-10))\n                                else\n                                    set [mode v] to [wallslide]\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (2)\n    end\n    change y by (-3)\n    if <touching color (#767676)?> then\n        if <(yv) = [-3]> then\n            if <<key (a v) pressed?> or <<key (d v) pressed?> or <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>>>> then\n                set [mode v] to [run]\n            else\n                if <([abs v] of (xv) ) > [.1]> then\n                    set [mode v] to [skid]\n                else\n                    set [mode v] to [stand]\n                end\n            end\n        end\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [mode v] to [jump]\n            set [yv v] to [7]\n        end\n    end\n    if <<<<(mode) = [jump]> or <(mode) = [walljump]>> and <(yv) < [0]>> or <<<(mode) = [run]> or <(mode) = [skid]>> and <(yv) < [-3]>>> then\n        set [mode v] to [fall]\n    end\n    change y by (3)\n    if <(yv) > [-15]> then\n        change [yv v] by (-0.5)\n    end\n    change y by (-2)\n    if <not <touching color (#767676)?>> then\n        change y by (-1)\n        if <not <touching color (#767676)?>> then\n            change y by (-1)\n            if <not <touching color (#767676)?>> then\n                change y by (-1)\n                if <not <touching color (#767676)?>> then\n                    change y by (-1)\n                    if <not <touching color (#767676)?>> then\n                        change y by (-1)\n                        if <not <touching color (#767676)?>> then\n                            change y by (5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\n    change y by (yv)\n    if <touching color (#767676)?> then\n        change y by (-2)\n        if <touching color (#767676)?> then\n            change y by ((-1) * (yv))\n            set [yv v] to [-3]\n        end\n        change y by (2)\n    end\n    if <touching color (#ff8a00)?> then\n        set [yv v] to [10]\n    end\n    if <touching color (#0061ff)?> then\n        set [xv v] to [15]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [gamestart v]\ngo to x: (-190) y: (-73)\nswitch costume to (right v)\nshow\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        change [deaths v] by (1)\n        wait (0.01) seconds\n        go to x: (-190) y: (0)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        switch costume to (right v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (death v)?> then\n        change [deaths v] by (1)\n        wait (0.02) seconds\n        go to x: (-190) y: (0)\n        switch costume to (right v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        change [deaths v] by (1)\n        wait (0.1) seconds\n        go to x: (-190) y: (0)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        switch costume to (right v)\n    end\nend\n\nwhen flag clicked\nset [gamend v] to [0]\nforever\n    if <touching (rocket v)?> then\n        set [gamend v] to [1]\n        broadcast (Gamend v)\n        repeat (100)\n            change [ghost v] effect by (5)\n        end\n        hide\n    end\nend\n\nwhen I receive [gamestart v]\nforever\n    repeat until <(Gamend) = [1]>\n        change [time v] by (1)\n        wait (1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<touching (_edge_ v)?> and <(x position) > [220]>> and <touching color (#282828)?>> then\n        broadcast (NewLevel v)\n        go to x: (-190) y: (-73)\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (nextlevel v)?> then\n        wait (0.01) seconds\n        broadcast (NewLevel v)\n        go to x: (-190) y: (-73)\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\nend\n\nset [xv v] to [0]\nset [yv v] to [0]\n\n@Stars\n\nwhen flag clicked\nhide\nforever\n    switch costume to (pick random (1) to (2))\n    create clone of (_myself_ v)\n    wait (pick random (0.1) to (0.03)) seconds\nend\n\nwhen I start as a clone\ngo [backward v] (100) layers\nset size to (100) %\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\ngo to (random position v)\nshow\nrepeat (10)\n    change [ghost v] effect by (-7)\n    change [brightness v] effect by (10)\n    change size by (-1)\nend\nwait (0.2) seconds\ndelete this clone\n\n@Background\n\nwhen flag clicked\nswitch costume to (1 v)\nforever\n    if <(costume [name v]) = [8]> then\n        broadcast (Moving; v)\n    end\n    if <(costume [name v]) = [9]> then\n        broadcast (UnMoving; v)\n    end\n    if <(costume [name v]) = [16]> then\n        broadcast (Moving;2 v)\n    end\n    if <(costume [name v]) = [17]> then\n        broadcast (UnMoving;2 v)\n        broadcast (Rain/On v)\n    end\n    if <(costume [name v]) = [18]> then\n        broadcast (Rain/Off v)\n        broadcast (Moving;3 v)\n    end\n    if <(costume [name v]) = [19]> then\n        broadcast (UnMoving;3 v)\n    end\n    if <(costume [name v]) = [25]> then\n        broadcast (Rocket v)\n        set [rocket:undoscript v] to [1]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [gamestart v]\nset [ghost v] effect to (0)\nset size to (100) %\nswitch costume to (1 v)\ngo to x: (-44) y: (-26)\nshow\n\nwhen I receive [newlevel v]\nnext costume\n\nwhen I receive [gamend v]\nrepeat (100)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Death\n\nwhen flag clicked\nhide\n\nwhen I receive [gamestart v]\nset size to (100) %\ngo to x: (5) y: (-22)\nshow\n\nwhen I receive [rocket v]\nhide\n\n@Thumbnail\n\nwhen flag clicked\nshow\nset size to (100) %\ngo to x: (1) y: (10)\nwait (0.1) seconds\nhide\nbroadcast (Start v)\n\n@Play Button\n\nwhen I receive [start v]\nswitch costume to (play:naw v)\ngo to x: (4) y: (-28)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (play:ya v)\n    else\n        switch costume to (play:naw v)\n    end\nend\n\nwhen flag clicked\nset size to (100) %\nhide\n\nwhen this sprite clicked\nbroadcast (Gamestart v)\nhide\n\n@Music\n\nwhen flag clicked\nset size to (100) %\nhide\n\nwhen I receive [start v]\nswitch costume to (music v)\ngo to x: (191) y: (-194)\nshow\n\nwhen this sprite clicked\nnext costume\nforever\n    if <(costume [name v]) = [Music]> then\n        play sound (pick random (1) to (21)) until done\n        set [scriptchange v] to [1]\n    else\n        stop all sounds\n        set [scriptchange v] to [1]\n    end\nend\n\nwhen I receive [gamestart v]\nhide\n\nwhen flag clicked\nset [scriptchange v] to [0]\nplay sound (pick random (1) to (21)) until done\nbroadcast (Music:FIX v) and wait\n\nwhen I receive [music:fix v]\nif <(ScriptChange) = [1]> then\n    stop [this script v]\nend\nforever\n    if <(costume [name v]) = [Music]> then\n        play sound (pick random (1) to (21)) until done\n    else\n        stop all sounds\n    end\nend\n\n@Oof\n\nwhen flag clicked\nset [moving; v] to [0]\n\nwhen I receive [unmoving; v]\nset [moving; v] to [0]\n\nwhen flag clicked\ngo to [front v] layer\nset size to (100) %\ngo to x: (6) y: (-20)\nhide\nforever\n    glide (1) secs to x: (6) y: (-20)\n    glide (1) secs to x: (6) y: (20)\nend\n\nwhen I receive [moving; v]\nset [moving; v] to [1]\n\nwhen flag clicked\nforever\n    if <(Moving;) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@Moving\n\nwhen flag clicked\nset size to (100) %\ngo to x: (74) y: (-3)\nhide\nforever\n    glide (2) secs to x: (252) y: (-3)\n    glide (2) secs to x: (74) y: (-3)\nend\n\nwhen I receive [moving;2 v]\nset [moving;2 v] to [1]\n\nwhen flag clicked\nset [moving;2 v] to [0]\n\nwhen I receive [unmoving;2 v]\nset [moving;2 v] to [0]\n\nwhen flag clicked\nforever\n    if <(Moving;2) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@Lava Rain\n\nwhen flag clicked\nset [fireing var. v] to [0]\nhide\nforever\n    if <(LavaRain) = [1]> then\n        hide\n        wait (0.4) seconds\n        create clone of (_myself_ v)\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nset [fireing var. v] to (pick random (1) to (8))\nif <(fireing var.) = [1]> then\n    show\n    go to x: (31) y: (129)\n    repeat until <<touching color (#767676)?> or <touching (moving2 v)?>>\n        change y by (-3)\n    end\n    delete this clone\nend\nif <(fireing var.) = [2]> then\n    show\n    go to x: (60) y: (129)\n    repeat until <<touching color (#767676)?> or <touching (moving2 v)?>>\n        change y by (-3)\n    end\n    delete this clone\nend\nif <(fireing var.) = [3]> then\n    show\n    go to x: (89) y: (129)\n    repeat until <<touching color (#767676)?> or <touching (moving2 v)?>>\n        change y by (-3)\n    end\n    delete this clone\nend\nif <(fireing var.) = [4]> then\n    show\n    go to x: (118) y: (129)\n    repeat until <<touching color (#767676)?> or <touching (moving2 v)?>>\n        change y by (-3)\n    end\n    delete this clone\nend\nif <(fireing var.) = [5]> then\n    show\n    go to x: (147) y: (129)\n    repeat until <<touching color (#767676)?> or <touching (moving2 v)?>>\n        change y by (-3)\n    end\n    delete this clone\nend\nif <(fireing var.) = [6]> then\n    show\n    go to x: (176) y: (129)\n    repeat until <<touching color (#767676)?> or <touching (moving2 v)?>>\n        change y by (-3)\n    end\n    delete this clone\nend\nif <(fireing var.) = [7]> then\n    show\n    go to x: (205) y: (129)\n    repeat until <<touching color (#767676)?> or <touching (moving2 v)?>>\n        change y by (-3)\n    end\n    delete this clone\nend\nif <(fireing var.) = [8]> then\n    show\n    go to x: (234) y: (129)\n    repeat until <<touching color (#767676)?> or <touching (moving2 v)?>>\n        change y by (-3)\n    end\n    delete this clone\nend\ndelete this clone\n\nwhen flag clicked\nset [lavarain v] to [0]\nset size to (100) %\ngo to x: (147) y: (-45)\n\nwhen I receive [rain/off v]\nset [lavarain v] to [0]\n\nwhen I receive [rain/on v]\nset [lavarain v] to [1]\n\n@Moving2\n\nwhen I receive [unmoving;3 v]\nset [moving;3 v] to [0]\n\nwhen flag clicked\nset [moving;3 v] to [0]\n\nwhen I receive [moving;3 v]\nset [moving;3 v] to [1]\n\nwhen flag clicked\nforever\n    if <(Moving;3) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset size to (100) %\ngo to x: (214) y: (20)\nhide\nforever\n    glide (2.5) secs to x: (10) y: (20)\n    glide (2.5) secs to x: (214) y: (20)\nend\n\n@Moving3\n\nwhen I receive [unmoving;3 v]\nset [moving;3 v] to [0]\n\nwhen flag clicked\nset [moving;3 v] to [0]\n\nwhen I receive [moving;3 v]\nset [moving;3 v] to [1]\n\nwhen flag clicked\nforever\n    if <(Moving;3) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset size to (100) %\ngo to x: (-1100) y: (10)\nhide\nforever\n    glide (2.5) secs to x: (40) y: (10)\n    glide (2.5) secs to x: (-110) y: (10)\nend\n\n@Rocket\n\nwhen flag clicked\nhide\n\nwhen I receive [rocket v]\nshow\n\nwhen I receive [gamend v]\nrepeat (25)\n    turn right (2) degrees\n    wait (0.0001) seconds\nend\nglide (2) secs to x: (125) y: (14)\nrepeat (100)\n    change [ghost v] effect by (5)\nend\nhide\nbroadcast (Time/Score v)\n\nwhen I receive [gamend v]\nforever\n    switch costume to (rocket2 v)\n    change size by (1.5)\n    wait (0.1) seconds\n    switch costume to (rocket3 v)\n    change size by (1.5)\n    wait (0.1) seconds\n    switch costume to (rocket4 v)\n    change size by (1.5)\n    wait (0.1) seconds\nend\n\nwhen I receive [gamend v]\nset size to (70) %\npoint in direction (90)\nset [ghost v] effect to (0)\ngo to x: (-173) y: (-211)\nstart sound [Rocket v]\n\nwhen flag clicked\nset [rocket:undoscript v] to [0]\nset [ghost v] effect to (0)\nswitch costume to (rocket v)\nset size to (100) %\ngo to x: (51) y: (-44)\npoint in direction (90)\nif <(Rocket:UndoScript) = [1]> then\n    stop [this script v]\nend\n\n@Time/Deaths\n\nwhen I receive [time/score v]\nshow\nDisplay text (join (join (letter (1) of (Time)) (letter (2) of (Time))) (letter (3) of (Time))) X: (-78) Y: (24)\nDisplay text (Deaths) X: (-60) Y: (-60)\n\ndefine Display text (text) X: (x) Y: (y)\nshow\nset [onletter v] to [0]\nset [y v] to [0]\ngo to x: (x) y: (y)\nrepeat (length of (text))\n    wait (0.01) seconds\n    change [onletter v] by (1)\n    if <not <(letter (OnLetter) of (text)) = [ ]>> then\n        switch costume to (letter (OnLetter) of (text))\n        create clone of (_myself_ v)\n        change x by (20)\n    else\n        change x by (20)\n    end\n    if <<<(OnLetter) = [23]> or <(OnLetter) = [46]>> or <<(OnLetter) = [69]> or <(OnLetter) = [82]>>> then\n        change [y v] by (20)\n        set x to (x)\n        set y to ((y) - (Y))\n    end\nend\nhide\n\nwhen flag clicked\nhide\n\n@NextLevel\n\nwhen flag clicked\nhide\n\nwhen I receive [gamestart v]\nset size to (100) %\ngo to [back v] layer\ngo to x: (180) y: (8)\nshow\n\nwhen I receive [rocket v]\nhide\n\n