A Long Platformer

Instructions: arrow keys to move.\nRest of instructions in game!\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nALL LEVELS ARE POSSIBLE! - They have all been tested multiple times.\nComment if you completed it all.

@Stage\n\nwhen flag clicked\nset [level v] to [1]\nbroadcast (Start v)\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [backdrop next v]\nchange [level v] by (1)\nnext backdrop\nbroadcast (go to normal v)\n\nwhen flag clicked\nforever\n    if <key (l v) pressed?> then\n        show variable [level v]\n    else\n        hide variable [level v]\n    end\nend\n\n@Player\n\nwhen flag clicked\nhide\ngo to x: (-12) y: (-999)\n\nwhen flag clicked\n\nwhen this sprite clicked\nswitch costume to (costume2 v)\n\nwhen I receive [normal v]\nswitch costume to (normal v)\n\nwhen I receive [red v]\nswitch costume to (red v)\n\nwhen I receive [green v]\nswitch costume to (green v)\n\nwhen I receive [purple v]\nswitch costume to (purple v)\n\nwhen I receive [player color v]\ngo to x: (-117) y: (-145)\npoint in direction (-90)\nshow\n\nwhen flag clicked\nswitch costume to (normal v)\nset [back v] to [0]\n\nwhen I receive [start v]\nhide\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        next costume\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (r v) pressed?> then\n        go to x: (-200) y: (-140)\n    end\nend\n\nwhen I receive [go to normal v]\ngo to x: (-200) y: (-140)\n\nwhen flag clicked\nforever\n    if <touching color (#ff9400)?> then\n        go to x: (216) y: (71)\n    end\nend\n\nwhen flag clicked\nhide\nswitch costume to (normal v)\nforever\n    if <(backdrop [name v]) = [backdrop30]> then\n        switch costume to (normal2 v)\n    else\n        switch costume to (normal v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#006666)?> then\n        go to x: (73) y: (-169)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#666600)?> then\n        go to x: (-51) y: (152)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ffe9cc)?> then\n        go to x: (-197) y: (101)\n    end\nend\n\nwhen I receive [1234567890 v]\nforever\n    if <<touching color (#6600cc)?> or <touching color (#006622)?>> then\n        broadcast (backdrop next v)\n    end\nend\n\nwhen I receive [1234567890 v]\nwait (0.5) seconds\nshow\ngo to x: (-200) y: (-140)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <touching (fan v)?> then\n        set [mode v] to [jump]\n        set [yv v] to [13]\n    end\n    if <<touching color (#cc0099)?> or <touching color (#ffcccc)?>> then\n        set [mode v] to [jump]\n        set [yv v] to [13]\n    end\n    if <<touching color (#003fff)?> or <touching color (#66004c)?>> then\n        if <key (down arrow v) pressed?> then\n            change [yv v] by (-1)\n        else\n            change [yv v] by (1)\n        end\n    end\n    go to [front v] layer\n    if <(back) = [1]> then\n        hide\n        stop [this script v]\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (90)\n        change [xv v] by (-1)\n    end\n    if <key (right arrow v) pressed?> then\n        point in direction (-90)\n        change [xv v] by (1)\n    end\n    if <(x position) > [235]> then\n        broadcast (Next v)\n        set x to (-222)\n        set [level v] to [0]\n        set [yv v] to [0]\n    end\n    if <<(y position) < [-175]> or <<touching color (#ccffff)?> or <touching color (#ff0000)?>>> then\n        go to x: (-200) y: (-140)\n    end\n    if <<(y position) < [-175]> or <touching color (#660000)?>> then\n        go to x: (-200) y: (-140)\n        switch backdrop to (backdrop73 v)\n    end\n    set [xv v] to ((xv) * (0.85))\n    change x by (xv)\n    if <touching color (#000008)?> then\n        change y by (-2)\n        if <touching color (#000008)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (1)\n                        if <touching color (#000008)?> then\n                            change y by (1)\n                            if <touching color (#000008)?> 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 (#000008)?> then\n        if <(yv) = [-3]> then\n            if <<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?> then\n            set [mode v] to [jump]\n            set [yv v] to [9]\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 (#000008)?>> then\n        change y by (-1)\n        if <not <touching color (#000008)?>> then\n            change y by (-1)\n            if <not <touching color (#000008)?>> then\n                change y by (-1)\n                if <not <touching color (#000008)?>> then\n                    change y by (-1)\n                    if <not <touching color (#000008)?>> then\n                        change y by (-1)\n                        if <not <touching color (#000008)?>> 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 (#000008)?> then\n        change y by (-2)\n        if <touching color (#000008)?> then\n            change y by ((-1) * (yv))\n            set [yv v] to [-3]\n        end\n        change y by (2)\n    end\nend\n\nwhen I receive [1234567890 v]\nforever\n    if <touching color (#7f00ff)?> then\n        go to x: (179) y: (168)\n    end\nend\n\nforever\n    if <(y position) > [-10]> then\n        if <(level) = [1]> then\n            broadcast (yo v)\n            stop [this script v]\n        end\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nwait (0.5) seconds\nhide\ngo to x: (-114) y: (2)\n\nwhen flag clicked\nwait (0.1) seconds\nhide\ngo to x: (-114) y: (2)\n\nwhen flag clicked\ngo to x: (-114) y: (2)\nforever\n    set rotation style [don't rotate v]\n    point in direction (90)\n    repeat (100)\n        move (10) steps\n    end\n    point in direction (-90)\n    repeat (100)\n        move (10) steps\n    end\nend\n\nwhen flag clicked\nhide\nforever\nend\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [name v]) = [backdrop13]> then\n        show\n        switch costume to (costume1 v)\n    else\n        if <(backdrop [name v]) = [backdrop14]> then\n            show\n            switch costume to (costume2 v)\n        else\n            if <(backdrop [name v]) = [backdrop18]> then\n                show\n                switch costume to (costume1 v)\n            else\n                if <(backdrop [name v]) = [backdrop34]> then\n                    show\n                    switch costume to (costume1 v)\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nforever\n    move (10) steps\n    if <touching (_edge_ v)?> then\n        turn right (10) degrees\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [name v]) = [backdrop20]> then\n        show\n        switch costume to (costume1 v)\n    else\n        if <(backdrop [name v]) = [backdrop18]> then\n            show\n            switch costume to (costume1 v)\n        else\n            if <(backdrop [name v]) = [backdrop21]> then\n                show\n                switch costume to (costume1 v)\n            else\n                if <(backdrop [name v]) = [backdrop34]> then\n                    show\n                    switch costume to (costume1 v)\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nforever\n    move (10) steps\n    if <touching (_edge_ v)?> then\n        turn right (10) degrees\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [name v]) = [backdrop20]> then\n        show\n        switch costume to (costume1 v)\n    else\n        if <(backdrop [name v]) = [backdrop18]> then\n            show\n            switch costume to (costume1 v)\n        else\n            if <(backdrop [name v]) = [backdrop21]> then\n                show\n                switch costume to (costume1 v)\n            else\n                if <(backdrop [name v]) = [backdrop34]> then\n                    show\n                    switch costume to (costume1 v)\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nforever\n    move (10) steps\n    if <touching (_edge_ v)?> then\n        turn right (10) degrees\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [name v]) = [backdrop20]> then\n        show\n        switch costume to (costume1 v)\n    else\n        if <(backdrop [name v]) = [backdrop18]> then\n            show\n            switch costume to (costume1 v)\n        else\n            if <(backdrop [name v]) = [backdrop21]> then\n                show\n                switch costume to (costume1 v)\n            else\n                if <(backdrop [name v]) = [backdrop34]> then\n                    show\n                    switch costume to (costume1 v)\n                else\n                    if <(backdrop [name v]) = [backdrop31]> then\n                        show\n                        switch costume to (costume1 v)\n                    else\n                        hide\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [name v]) = [backdrop19]> then\n        go to x: (-3) y: (-27)\n        show\n        set size to (100) %\n        switch costume to (costume1 v)\n    else\n        if <(backdrop [name v]) = [backdrop24]> then\n            go to x: (-131) y: (-99)\n            show\n            switch costume to (costume2 v)\n            set size to (50) %\n        else\n            if <(backdrop [name v]) = [backdrop25]> then\n                go to x: (37) y: (-99)\n                show\n                switch costume to (costume2 v)\n                set size to (50) %\n            else\n                if <(backdrop [name v]) = [backdrop34]> then\n                    go to x: (127) y: (26)\n                    switch costume to (costume2 v)\n                    set size to (50) %\n                    show\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    turn left (1.5) degrees\nend\n\nif <(backdrop [name v]) = [backdrop18]> then\n    show\n    switch costume to (costume1 v)\nelse\n    hide\nend\n\n@Sprite6\n\nif <(backdrop [name v]) = [backdrop18]> then\n    show\n    switch costume to (costume1 v)\nelse\n    hide\nend\n\nwhen flag clicked\nforever\n    turn left (1.5) degrees\nend\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [name v]) = [backdrop24]> then\n        go to x: (37) y: (-99)\n        show\n        switch costume to (costume2 v)\n        set size to (50) %\n    else\n        hide\n    end\n    if <(backdrop [name v]) = [backdrop25]> then\n        go to x: (136) y: (44)\n        show\n        switch costume to (costume2 v)\n        set size to (50) %\n    else\n        hide\n    end\nend\n\n@Sprite7\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [name v]) = [backdrop29]> then\n        go to x: (43) y: (-17)\n        switch costume to (costume1 v)\n        set size to (100) %\n        show\n        wait (0.8) seconds\n        hide\n        wait (0.2) seconds\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\nend\n\nif <(backdrop [name v]) = [backdrop25]> then\n    go to x: (136) y: (44)\n    show\n    switch costume to (costume2 v)\n    set size to (50) %\nelse\n    hide\nend\n\n@Sprite8\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [name v]) = [backdrop48]> then\n        go to x: (162) y: (-90)\n        set size to (100) %\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset rotation style [don't rotate v]\nforever\n    glide (1) secs to x: (-131) y: (-82)\n    glide (1) secs to x: (162) y: (-90)\nend\n\nrepeat (10)\n    point in direction (-90)\n    move (10) steps\nend\nrepeat (10)\n    point in direction (90)\n    move (10) steps\nend\n\n@Sprite9\n\nwhen flag clicked\nhide\nforever\n    if <(backdrop [name v]) = [backdrop48]> then\n        set size to (100) %\n        show\n    else\n        hide\n    end\n    if <(backdrop [name v]) = [backdrop50]> then\n        set size to (100) %\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset rotation style [don't rotate v]\nforever\n    glide (5) secs to x: (217) y: (131)\n    glide (5) secs to x: (-136) y: (-80)\nend\n\n@Sprite10\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\n\nwhen I receive [1234567890 v]\nhide\n\n@Sprite11\n\nwhen flag clicked\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nrepeat (10)\n    change size by (10)\n    turn right (5) degrees\n    wait (0.001) seconds\nend\nrepeat (10)\n    change size by (-10)\n    turn left (5) degrees\n    wait (0.001) seconds\nend\nwait (0.5) seconds\nbroadcast (1234567890 v)\nhide\n\n@fan\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [backdrop93]> then\n        go to x: (-66) y: (-163)\n        show\n        broadcast (level 40 fan mode v)\n        stop [this script v]\n    else\n    end\nend\n\nwhen I receive [1234567890 v]\nif <(backdrop [name v]) = [backdrop94]> then\n    hide\n    stop [this script v]\nend\n\nwhen I receive [level 40 fan mode v]\nshow\ncreate clone of (_myself_ v)\n\nwhen I receive [1234567890 v]\nforever\n    if <(backdrop [name v]) = [backdrop92]> then\n        go to x: (6) y: (-167)\n        show\n        stop [this script v]\n    else\n        hide\n    end\nend\n\nhide\n\nwhen flag clicked\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [1234567890 v]\nforever\n    if <(backdrop [name v]) = [backdrop95]> then\n        hide\n    end\nend\n\nwhen I start as a clone\nif <(backdrop [name v]) = [backdrop93]> then\n    turn right (90) degrees\n    go to x: (-120) y: (52)\n    forever\n        next costume\n        wait (0.1) seconds\n        if <(backdrop [name v]) = [backdrop94]> then\n            hide\n            delete this clone\n        end\n    end\nelse\nend\nif <(backdrop [name v]) = [backdrop94]> then\n    show\n    go to x: (4) y: (-173)\n    forever\n        next costume\n        wait (0.1) seconds\n        if <(backdrop [name v]) = [backdrop95]> then\n            hide\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [1234567890 v]\nforever\n    if <(backdrop [name v]) = [backdrop94]> then\n        wait (0.01) seconds\n        show\n        go to x: (-146) y: (-179)\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\n@Sprite12\n\nwhen flag clicked\nhide\n\nwhen I receive [1234567890 v]\nhide\nforever\n    if <(backdrop [name v]) = [backdrop90]> then\n        show\n        go to x: (-131) y: (-129)\n        broadcast (block 1 v)\n    end\nend\n\nwhen I receive [1234567890 v]\nforever\n    if <(backdrop [name v]) = [backdrop91]> then\n        hide\n    end\nend\n\n