The Simpsons Platformer

Instructions: The Simpsons Platformer    @ILoveHotDogz\n=====================================\nRun through Springfield and don't touch spikes!\n=====================================\nHope you enjoy!\n=====================================\nFollow me @ILoveHotDogz 

@Stage\n\n@Bart Simpson\n\nwhen flag clicked\nshow\nset [y v] to [0]\nswitch costume to (mike v)\ngo to [front v] layer\nset rotation style [left-right v]\ngo to x: (-215) y: (90)\nforever\n    change [y v] by (-0.5)\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <<touching (ground v)?> or <touching (moving platforms v)?>> then\n        change y by (1)\n    end\n    change y by (y)\n    if <<touching (ground v)?> or <touching (moving platforms v)?>> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-0.5)\n    if <<touching (ground v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>>>> then\n        set [y v] to [10]\n    end\n    if <<touching (ground v)?> or <touching (moving platforms v)?>> then\n        change y by (1)\n        if <<touching (ground v)?> or <touching (moving platforms v)?>> then\n            change y by (1)\n            if <<touching (ground v)?> or <touching (moving platforms v)?>> then\n                change y by (1)\n                if <<touching (ground v)?> or <touching (moving platforms v)?>> then\n                    change y by (1)\n                    if <<touching (ground v)?> or <touching (moving platforms v)?>> then\n                        change y by (1)\n                        if <<touching (ground v)?> or <touching (moving platforms v)?>> then\n                            change y by (-6)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>>> then\n                                set [y v] to [10]\n                                if <(x) > [0]> then\n                                    set [x v] to [-10]\n                                else\n                                    set [x v] to [10]\n                                end\n                            else\n                                change x by ((x) * (-1))\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <(x position) > [239]> then\n        broadcast (next v)\n        go to x: (-215) y: (25)\n    end\n    if <touching (obstaclezzz v)?> then\n        broadcast (die v)\n        go to x: (-215) y: (25)\n    end\n    if <touching (trampoline v)?> then\n        set [y v] to [12.5]\n    end\nend\n\nwhen flag clicked\nset size to (80) %\n\nwhen I start as a clone\nswitch costume to (fantasia2 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-10)\nend\ndelete this clone\n\nwhen I receive [restart v]\ngo to x: (-215) y: (90)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen I receive [next v]\ngo to x: (-215) y: (90)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\nforever\n    if <touching color (#00ff69)?> then\n        set [y v] to [15]\n        wait (1) seconds\n    end\nend\n\ncreate clone of (_myself_ v)\n\n@Obstaclezzz\n\nwhen flag clicked\nswitch costume to (fantasia1 v)\nforever\n    go to (ground v)\n    switch costume to ([costume # v] of [ground v])\nend\n\n@ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nswitch costume to (fantasia1 v)\n\nwhen I receive [next v]\nnext costume\n\n@thumb\n\nwhen flag clicked\nforever\n    play sound [the-simpsons-theme-song v] until done\nend\n\nwhen flag clicked\nchange [ghost v] effect by (100)\ngo to [front v] layer\nhide\n\n@Restart\n\nwhen flag clicked\ngo to x: (-100) y: (-160)\nshow\nwait (0.01) seconds\ngo to [front v] layer\nshow\nforever\n    point in direction ((([sin v] of ((timer) * (300)) ) * (10)) + (90))\nend\n\nwhen this sprite clicked\nbroadcast (Restart v)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (120) %\n    else\n        set size to (100) %\n    end\nend\n\n@Music\n\nwhen flag clicked\nset [track v] to [1]\nshow\nforever\n    if <(Track) = [1]> then\n        play sound [The Simpsons Theme Tune v] until done\n    end\nend\n\nif <(Track) = [2]> then\n    play sound [Pixel Version v] until done\nend\n\nwhen I receive [hideforinstructions v]\nhide\n\nwhen I receive [runmaingame v]\nshow\n\nset [track v] to [1]\n\nplay sound [Ending v] until done\n\nif <(Track) = [3]> then\nif <(Track) > [3]> then\n    set [track v] to [1]\nend\n\n