Golden Platformer

Instructions: Use Arrow Keys to move. Light yellow is bad. Enjoy!\n///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////        ///       //////////////////////////////////////////////////////////\n/////        ///       //////////////////////////////////////////////////////////\n//////        /        ////////////                //////////////////////////////\n/////////           /////////////          ///          /////////////////////////\n///////////       ////////////           //////           ///////////////////////\n///////////       //////////////           ///         //////////////////////////\n///////////       ///////////////////            ////////////////////////////////\n///////////       ///////////////////////////////////////////////////////////////\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

@Stage\n\n@Sprite2\n\nwhen flag clicked\nhide\nwait (0.5) seconds\nshow\ngo to x: (-186) y: (-79)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        set rotation style [left-right v]\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((xv) * (0.9))\n    change x by (xv)\n    if <touching color (#a6981e)?> then\n        change y by (1)\n        if <touching color (#a6981e)?> then\n            change y by (1)\n            if <touching color (#a6981e)?> then\n                change y by (1)\n                if <touching color (#a6981e)?> then\n                    change y by (1)\n                    if <touching color (#a6981e)?> then\n                        change y by (1)\n                        if <touching color (#a6981e)?> then\n                            change x by ((xv) * (-1))\n                            change y by (-5)\n                            if <key (right 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 [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 color (#a6981e)?> then\n        change y by ((yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#a6981e)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching color (#fff27f)?> then\n        go to x: (-186) y: (-79)\n        change [restarts v] by (1)\n    end\n    if <touching color (#ffe600)?> then\n        broadcast (next lvl v)\n        go to x: (-186) y: (-79)\n    end\n    if <touching color (#ff9400)?> then\n        go to x: (160) y: (-86)\n        wait (0.2) seconds\n        move (30) steps\n    end\n    if <touching color (#ffff00)?> then\n        broadcast (stats board v)\n        hide\n    end\nend\n\ngo to x: (0) y: (0)\n\nwhen flag clicked\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume6 v)\n        wait (0.2) seconds\n        switch costume to (costume4 v)\n        wait (0.2) seconds\n        switch costume to (costume5 v)\n        wait (0.2) seconds\n        switch costume to (costume4 v)\n        wait (0.2) seconds\n    else\n        switch costume to (costume3 v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n        wait (0.2) seconds\n        switch costume to (costume2 v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n        wait (0.2) seconds\n    end\nend\n\nwhen I receive [next lvl v]\nnext backdrop\n\nwhen backdrop switches to [backdrop8 v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    if <<key (space v) pressed?> and <(backdrop [number v]) = [7]>> then\n        go to x: (-39) y: (-65)\n        show\n        wait until <not <(backdrop [number v]) = [7]>>\n        hide\n    else\n        hide\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n