Blended - A Platformer

Instructions: a platformer where you can't see your own character!\n\nwasd or arrow keys to move\nit's a very short platformer, i know, i'm sorry\npress number keys to change character and background color\n\n1 = red\n2 = orange\n3 = yellow\n4 = green\n5 = blue\n6 = purple\n7 = pink

@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (color)\nend\n\n@blank\n\n@player\n\nwhen flag clicked\nset [color v] to (pick random (1) to (7))\nforever\n    if <key (1 v) pressed?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.1) seconds\n        end\n        switch costume to (1 v)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.1) seconds\n        end\n    end\n    if <key (2 v) pressed?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.1) seconds\n        end\n        switch costume to (2 v)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.1) seconds\n        end\n    end\n    if <key (3 v) pressed?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.1) seconds\n        end\n        switch costume to (3 v)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.1) seconds\n        end\n    end\n    if <key (4 v) pressed?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.1) seconds\n        end\n        switch costume to (4 v)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.1) seconds\n        end\n    end\n    if <key (5 v) pressed?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.1) seconds\n        end\n        switch costume to (5 v)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.1) seconds\n        end\n    end\n    if <key (6 v) pressed?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.1) seconds\n        end\n        switch costume to (6 v)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.1) seconds\n        end\n    end\n    if <key (7 v) pressed?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.1) seconds\n        end\n        switch costume to (7 v)\n        repeat (10)\n            change [ghost v] effect by (-10)\n            wait (0.1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nset [color v] to (pick random (1) to (7))\nforever\n    if <key (1 v) pressed?> then\n        set [color v] to [1]\n    end\n    if <key (2 v) pressed?> then\n        set [color v] to [2]\n    end\n    if <key (3 v) pressed?> then\n        set [color v] to [3]\n    end\n    if <key (4 v) pressed?> then\n        set [color v] to [4]\n    end\n    if <key (5 v) pressed?> then\n        set [color v] to [5]\n    end\n    if <key (6 v) pressed?> then\n        set [color v] to [6]\n    end\n    if <key (7 v) pressed?> then\n        set [color v] to [7]\n    end\nend\n\nwhen I receive [game start v]\nbroadcast (next level v)\nshow\nset [ghost v] effect to (0)\ngo to x: (-235) y: (0)\nset [level v] to [1]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (ground v)?> then\n        change y by (2)\n        if <touching (ground v)?> then\n            change y by (2)\n            if <touching (ground v)?> then\n                change y by (2)\n                if <touching (ground v)?> then\n                    change y by (2)\n                    if <touching (ground v)?> then\n                        change y by (2)\n                        if <touching (ground v)?> then\n                            change y by (-5)\n                            change x by ((Xv) * (-1))\n                            if <<key (up arrow v) pressed?> or <key (w 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 [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (ground v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        set [yv v] to [15]\n    end\n    change y by (1)\n    if <touching (portal v)?> then\n        go to x: (-235) y: (0)\n        change [level v] by (1)\n        broadcast (next level v)\n    end\n    if <(y position) = [-179]> then\n        broadcast (ded v)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        go to x: (-235) y: (0)\n        set [ghost v] effect to (0)\n    end\n    if <<touching (lava v)?> or <touching (spike v)?>> then\n        broadcast (ded v)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        go to x: (-235) y: (0)\n        set [ghost v] effect to (0)\n    end\n    if <<touching (jump v)?> or <touching (jump2 v)?>> then\n        set [yv v] to [20]\n    end\nend\n\nwhen flag clicked\nbroadcast (Game Start v)\n\nwhen I receive [next level v]\nswitch costume to (black v)\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.1) seconds\nend\nswitch costume to (color)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    wait (0.1) seconds\nend\n\n@color\n\nwhen flag clicked\nset [color v] to (pick random (1) to (7))\nforever\n    if <key (1 v) pressed?> then\n        set [color v] to [1]\n    end\n    if <key (2 v) pressed?> then\n        set [color v] to [2]\n    end\n    if <key (3 v) pressed?> then\n        set [color v] to [3]\n    end\n    if <key (4 v) pressed?> then\n        set [color v] to [4]\n    end\n    if <key (5 v) pressed?> then\n        set [color v] to [5]\n    end\n    if <key (6 v) pressed?> then\n        set [color v] to [6]\n    end\n    if <key (7 v) pressed?> then\n        set [color v] to [7]\n    end\nend\n\n@Ground\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    switch costume to (level)\n    if <(level) = [12]> then\n        repeat (10)\n            change [ghost v] effect by (10)\n            wait (0.01) seconds\n        end\n    end\nend\n\n@Spike\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@Portal\n\n@thumbnail\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\nshow\n\n