Goomba's Quest: A platformer
@Stage\n\nwhen I receive [next level v]\nnext backdrop\nchange [level v] by (1)\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nset [level v] to [1]\n\nwhen flag clicked\nforever\n    if <(Level) < [13]> then\n        play sound [01-super-mario-bros.mp3 v] until done\n    end\nend\n\nset [level v] to [16]\n\n@goomba\n\nwhen flag clicked\ngo to x: (-212) y: (-104)\nshow\nswitch costume to (goomba2 v)\nforever\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> and <not <touching color (#003fff)?>>> then\n        change x by (-5)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> and <not <touching color (#003fff)?>>> then\n        change x by (5)\n    end\n    if <touching color (#cb4f0f)?> then\n        set y to (-104)\n        set [yvel v] to [0]\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            change [yvel v] by (11)\n        end\n        if <<key (space v) pressed?> and <not <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n            change [yvel v] by (22)\n        end\n    else\n        if <<touching (sprite2 v)?> or <touching (sprite4 v)?>> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                change [yvel v] by (2)\n            end\n            if <touching color (#ffff99)?> then\n            else\n                change [yvel v] by (-0.75)\n            end\n        else\n            set [air v] to [4]\n            change [yvel v] by (-1)\n        end\n    end\n    change y by (Yvel)\n    if <(x position) > [250]> then\n        if <(Level) < [17]> then\n            broadcast (Next Level v)\n            go to x: (-212) y: (-104)\n        end\n    end\n    if <(y position) > [186]> then\n        set y to (185)\n    end\n    if <<touching color (#ff0000)?> or <touching (bowza v)?>> then\n        broadcast (Lose Life v)\n    end\nend\n\nwhen flag clicked\nset [deaths v] to [0]\nforever\n    if <<touching (sprite2 v)?> or <touching (sprite4 v)?>> then\n        wait (1) seconds\n        change [air v] by (-1)\n    end\nend\n\nwhen I receive [lose life v]\ngo to x: (-212) y: (-104)\nchange [deaths v] by (1)\n\nwhen flag clicked\nforever\n    wait (0.3) seconds\n    if <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n        next costume\n    end\nend\n\nbroadcast (Next Level v)\n\n@Sprite1\n\nwhen flag clicked\nwait (1) seconds\nforever\n    hide\n    if <(Level) = [6]> then\n        wait (0.5) seconds\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [10]> then\n        wait (0.25) seconds\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [14]> then\n        wait (0.2) seconds\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [15]> then\n        wait (0.2) seconds\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [16]> then\n        wait (0.25) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nshow\ngo to x: (227) y: (pick random (-113) to (173))\nif <(Level) = [16]> then\n    set x to (25)\nend\nforever\n    turn left (4) degrees\n    change x by (-5)\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\n    if <touching (goomba v)?> then\n        broadcast (Lose Life v)\n        delete this clone\n    end\n    if <(Level) = [7]> then\n        delete this clone\n    end\n    if <(Level) = [11]> then\n        delete this clone\n    end\n    if <(Level) = [17]> then\n        delete this clone\n    end\nend\n\nset [level v] to [16]\n\n@Sprite2\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (50)\nforever\n    if <<(Level) = [8]> or <(Level) = [9]>> then\n        show\n    else\n        hide\n    end\nend\n\n@bowza\n\nwhen flag clicked\nhide\ngo to x: (111) y: (-65)\nforever\n    if <(Level) = [16]> then\n        show\n        if <touching color (#cb4f0f)?> then\n            set y to (-63)\n            wait (3) seconds\n            change [bowser v] by (15)\n        else\n            change [bowser v] by (-0.5)\n        end\n        change y by (BOWSER)\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) > [12]> then\n        stop all sounds\n        play sound [10-king-koopa-s-castle.mp3 v] until done\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [17]> then\n        forever\n            hide\n        end\n    end\nend\n\n@toad\n\nwhen flag clicked\nset [music done? v] to [0]\nforever\n    if <(Level) = [17]> then\n        stop all sounds\n        broadcast (play v)\n        wait until <(music done?) = [1]>\n    end\nend\n\nwhen flag clicked\nhide\nhide\ngo [backward v] (1000000) layers\nhide\nforever\n    if <(Level) = [17]> then\n        show\n        say [Thank You Goomba! The Spell has been Reversed!] for (5) seconds\n        wait until <[2] < [1]>\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <[17] > (Level)> then\n        hide\n    end\nend\n\nforever\nend\n\nrepeat (16)\n    broadcast (Next Level v)\nend\n\nforever\nend\n\nwhen I receive [play v]\nplay sound [12-world-clear.mp3 v] until done\nset [music done? v] to [1]\n\nstop [all v]\n\n@Sprite3\n\nwhen flag clicked\nshow variable [deaths v]\nhide\n\nshow\nhide variable [deaths v]\n\n
Arrow keys to move, rest of instructions are in game.\nMy first platformer! Yay!\nPlease notify me of any glitches!\nThere are 4 worlds with 4 levels each (16 levels)\nAll levels are possible (yes, even 4-3)\nUnfortunately there is a glitch that I have no idea how to fix, it will not play the ending music :( if you could please help by remixing and fixing it I will put you in the credits and add the music :) win win right?