Halloween - A platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [2 v] until done\nend\n\n@Sprite2\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    switch costume to (Level)\nend\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (209) y: (153)\nforever\n    set y to ((150) + (([cos v] of (((timer) - (3)) * (400)) ) * (5)))\n    if <(Level) = [12]> then\n        set x to (0)\n    end\nend\n\n@Sprite1\n\nwhen I start as a clone\nrepeat (7)\n    switch costume to (costume2 v)\n    change size by (-4)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\ngo [backward v] (3) layers\nshow\nset size to (45) %\nswitch costume to (middle v)\ngo to x: (-190) y: (50)\nset drag mode [not draggable v]\npoint in direction (90)\nforever\n    create clone of (_myself_ v)\n    set rotation style [left-right v]\n    if <<<mouse down?> and <(x position) > (mouse x)>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        create clone of (_myself_ v)\n        change [x v] by (-1)\n    end\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        create clone of (_myself_ v)\n        change [x v] by (1)\n    end\n    if <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>> then\n        create clone of (_myself_ v)\n    end\n    if <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n        create clone of (_myself_ v)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching (sprite2 v)?> then\n        change y by (1)\n        if <touching (sprite2 v)?> then\n            change y by (1)\n            if <touching (sprite2 v)?> then\n                change y by (1)\n                if <touching (sprite2 v)?> then\n                    change y by (1)\n                    if <touching (sprite2 v)?> then\n                        change y by (1)\n                        if <touching (sprite2 v)?> then\n                            change x by ((X) * (-1))\n                            change y by (-5)\n                            if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                                if <(X) > [0]> then\n                                    set [x v] to [-7]\n                                else\n                                    set [x v] to [7]\n                                end\n                                set [y v] to [14]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <touching (sprite2 v)?> then\n        if <<<mouse down?> and <(y position) < (mouse y)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            set [y v] to [13]\n            point in direction ((Y) * (0.5))\n        end\n    end\n    change y by (1)\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching (sprite2 v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    hide variable [x v]\n    if <<(x position) > [230]> and <not <(Level) = [12]>>> then\n        broadcast (next level v)\n        change [level v] by (1)\n        set [y v] to [0]\n        set [x v] to [0]\n        go to x: (-190) y: (0)\n    end\n    if <<(y position) < [-180]> or <<touching (lava v)?> or <touching (spikes v)?>>> then\n        set [x v] to [0]\n        set [y v] to [0]\n        go to x: (-190) y: (-50)\n    end\nend\n\n@Lava\n\nwhen flag clicked\ngo to x: (32) y: (-146)\ngo to [back v] layer\nhide\nforever\n    if <(Level) = [2]> then\n        show\n        set y to ((-150) + (([cos v] of (((timer) - (3)) * (400)) ) * (5)))\n    else\n        set y to (-146)\n        hide\n    end\nend\n\n@Spikes\n\nwhen flag clicked\nforever\n    if <<(Level) = [3]> or <<(Level) = [4]> or <<(Level) = [5]> or <<(Level) = [6]> or <<(Level) = [8]> or <<(Level) = [9]> or <<(Level) = [10]> or <(Level) = [11]>>>>>>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [3]> then\n        switch costume to (3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        switch costume to (4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [5]> then\n        switch costume to (5 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [6]> then\n        switch costume to (6 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [8]> then\n        switch costume to (8 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [9]> then\n        switch costume to (9 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [10]> then\n        switch costume to (10 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [11]> then\n        switch costume to (11 v)\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [12]> then\n        show\n    end\nend\n\n@Sprite6\n\nwhen flag clicked\ngo to [front v] layer\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n
WASD and arrows to move, or simple just click or tap the screen if you are on mobile!\nPlease follow and fav if you like it!\nWOW! 100 views!!! \nThanks for playing!\nAnd check out my new game, too: https://scratch.mit.edu/projects/583136958\nNice 200 views! \n303 views!\n30 loves! Part 2 coming soon!