Rainbow - A Platformer

Instructions: Use the arrows to move.\nAvoid the white spikes.\nLike.\nFavorite.\nFollow.

@Stage\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        set [color v] effect to (0)\n    else\n        change [color v] effect by (.5)\n    end\nend\n\n@Player\n\nwhen flag clicked\nhide\nwait (1) seconds\nshow\nswitch costume to (costume1 v)\ngo to x: (-220) y: (15)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    set [xv v] to ((xv) * (0.9))\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to (costume1 v)\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to (costume2 v)\n        change [xv v] by (-1)\n    end\n    change x by (xv)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change x by ((xv) * (-1))\n                            change y by (-5)\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 (level v)?> then\n        change y by ((yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (level v)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [12]\n        end\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    if <(x position) > [237]> then\n        go to x: (-237) y: (-100)\n        change [level v] by (1)\n    end\n    if <touching (spikes v)?> then\n        go to x: (-237) y: (-100)\n    end\nend\n\nwhen flag clicked\n\nwhen I start as a clone\nset [ghost v] effect to (50)\nrepeat (10)\n    change [ghost v] effect by (7)\n    change size by (-5)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    change [color v] effect by (.5)\n    create clone of (_myself_ v)\n    if <key (r v) pressed?> then\n        go to x: (-237) y: (-100)\n        next backdrop\n        wait (1) seconds\n    end\nend\n\n@Level\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (costume1 v)\nforever\n    go to x: (0) y: (0)\n    switch costume to (level)\n    if <(level) = [10]> then\n        set [color v] effect to (0)\n    else\n        change [color v] effect by (.5)\n    end\nend\n\n@Glow\n\nwhen flag clicked\nhide\nwait (1) seconds\nshow\nforever\n    change [color v] effect by (.5)\n    go to (player v)\n    go to [front v] layer\n    set [brightness v] effect to (50)\n    set [ghost v] effect to (50)\nend\n\n@Spikes\n\nwhen flag clicked\nset [level v] to [1]\nswitch costume to (costume1 v)\nforever\n    go to x: (0) y: (0)\n    switch costume to (level)\n    go to [back v] layer\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nwait (.5) seconds\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\n\n