STORM PLATFORMER // #Games

Instructions: Use the arrow keys to move your character!\nLead enemies into lava to eliminate them!\n\nThis is a harder version of Simple Platformer. Link in game!\nNO ADVERTISING ALLOWED!!!

@Stage\n\nwhen flag clicked\nforever\n    play sound [065 Doomsday Zone \(1\) v] until done\nend\n\n@thumb\n\nwhen flag clicked\nshow\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nhide\n\nwhen this sprite clicked\nhide\n\n@Sprite\n\ndefine Run Game\nchange [speed y v] by (-1)\nif <<key (a v) pressed?> or <<(Mobile Left?) = [t]> or <key (left arrow v) pressed?>>> then\n    if <key (space v) pressed?> then\n        change [speed x v] by (-2.5)\n    else\n        change [speed x v] by (-2)\n    end\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <(Mobile Right?) = [t]>>> then\n    if <key (space v) pressed?> then\n        change [speed x v] by (2.5)\n    else\n        change [speed x v] by (2)\n    end\nend\nset [speed x v] to ((Speed X) * (0.7))\nchange x by (Speed X)\nif <touching (ground v)?> then\n    change y by (1)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change y by (1)\n                            if <touching (ground v)?> then\n                                change y by (1)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <touching (ground v)?> then\n    change y by (-8)\n    repeat until <not <touching (ground v)?>>\n        change x by ((Speed X) * (-1))\n    end\n    if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <(Mobile Up?) = [t]>>> then\n        start sound [Jump2 v]\n        set [speed y v] to [10]\n        if <(Speed X) < [0]> then\n            set [speed x v] to [16]\n        else\n            set [speed x v] to [-16]\n        end\n    else\n        set [speed x v] to [0]\n    end\nend\nchange y by (Speed Y)\nif <touching (ground v)?> then\n    repeat until <not <touching (ground v)?>>\n        change y by ((Speed Y) * (-1))\n    end\n    set [speed y v] to [0]\nend\nchange y by (-1)\nif <<<key (w v) pressed?> or <<(Mobile Up?) = [t]> or <key (up arrow v) pressed?>>> and <touching (ground v)?>> then\n    start sound [Jump v]\n    set [speed y v] to [14]\nend\nchange y by (1)\n\nwhen flag clicked\nset [speed y v] to [0]\nset [speed x v] to [0]\ngo to x: (-200) y: (0)\nset rotation style [left-right v]\nforever\n    Run Game\nend\n\nwhen I receive [next v]\nchange [color v] effect by (10)\nset [speed x v] to [0]\nset [speed y v] to [0]\ngo to x: (-200) y: (0)\n\nwhen flag clicked\nforever\n    if <touching color (#ff3c3c)?> then\n        broadcast (death v)\n    end\nend\n\nchange [color v] effect by (10)\n\nwhen I receive [death v]\nstart sound [pop v]\nset [speed x v] to [0]\nset [speed y v] to [0]\ngo to x: (-200) y: (0)\n\n@Ground\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next v]\nif <(costume [number v]) = [6]> then\n    if <(☁ WR) > (timer)> then\n        set [☁ wr v] to (timer)\n    end\nend\n\n@Next\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    if <touching (sprite v)?> then\n        start sound [Low Whoosh v]\n        broadcast (next v)\n    end\nend\n\n@danger\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@counter\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nset [timer v] to [10]\nforever\n    if <(timer?) = [t]> then\n        broadcast (timer v)\n        wait (11) seconds\n    else\n        hide\n        stop [other scripts in sprite v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(timer) = [9]> then\n        switch costume to (costume1 v)\n    end\n    if <(timer) = [8]> then\n        switch costume to (costume2 v)\n    end\n    if <(timer) = [7]> then\n        switch costume to (costume4 v)\n    end\n    if <(timer) = [6]> then\n        switch costume to (costume5 v)\n    end\n    if <(timer) = [5]> then\n        switch costume to (costume6 v)\n    end\n    if <(timer) = [4]> then\n        switch costume to (costume7 v)\n    end\n    if <(timer) = [3]> then\n        switch costume to (costume8 v)\n    end\n    if <(timer) = [2]> then\n        switch costume to (costume9 v)\n    end\n    if <(timer) = [1]> then\n        switch costume to (costume10 v)\n    end\nend\n\nwhen I receive [timer v]\nif <(Hard?) = [t]> then\n    repeat (10)\n        wait (0.5) seconds\n        start sound [Clock Ticking v]\n        change [timer v] by (-1)\n    end\n    set [timer v] to [10]\n    broadcast (death v)\nelse\n    repeat (10)\n        wait (1) seconds\n        start sound [Clock Ticking v]\n        change [timer v] by (-1)\n    end\n    set [timer v] to [10]\n    broadcast (death v)\nend\n\n@rain_drops-01\n\nwhen flag clicked\nset rotation style [left-right v]\ngo to [back v] layer\nforever\n    next costume\n    wait (0.01) seconds\nend\n\nwhen flag clicked\nforever\n    play sound [Thunder Storm v] until done\nend\n\n@AD\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow list [copy and paste this into the url v]\ndelete all of [copy and paste this into the url v]\nforever\n    wait (10) seconds\n    next costume\nend\n\nwhen flag clicked\nforever\n    if <touching (sprite v)?> then\n        hide\n    else\n        show\n    end\nend\n\ngo [backward v] (1) layers\n\nwhen this sprite clicked\nhide list [copy and paste this into the url v]\nif <(costume [number v]) = [1]> then\n    add [https://scratch.mit.edu/projects/743239899] to [copy and paste this into the url v]\nend\nif <(costume [number v]) = [2]> then\n    add [https://scratch.mit.edu/projects/757211387] to [copy and paste this into the url v]\nend\nif <(costume [number v]) = [3]> then\n    add [https://scratch.mit.edu/projects/759235031] to [copy and paste this into the url v]\nend\nif <(costume [number v]) = [4]> then\n    add [https://scratch.mit.edu/projects/767804472] to [copy and paste this into the url v]\nend\nif <(costume [number v]) = [5]> then\n    add [https://scratch.mit.edu/projects/766966610] to [copy and paste this into the url v]\nend\nif <(costume [number v]) = [6]> then\n    add [https://scratch.mit.edu/projects/769812768] to [copy and paste this into the url v]\nend\n\nswitch costume to (costume5 v)\n\n@timer button\n\nwhen flag clicked\nset [timer? v] to [t]\nshow\n\nwhen this sprite clicked\nbroadcast (ez v)\nstart sound [pop v]\nset [timer? v] to [f]\nhide\n\nwhen I receive [next v]\nhide\n\nwhen I receive [death v]\n\nwhen I receive [hrd v]\nhide\n\n@hard button\n\nwhen flag clicked\nset [hard? v] to [f]\nshow\n\nwhen this sprite clicked\nbroadcast (hrd v)\nset [hard? v] to [t]\nstart sound [pop v]\nhide\n\nwhen I receive [ez v]\nhide\n\nwhen I receive [next v]\nhide\n\n@enemy\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [next v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nforever\n    point towards (sprite v)\n    if <(Hard?) = [t]> then\n        move (4) steps\n    else\n        move (2) steps\n    end\nend\n\nwhen I receive [next v]\ndelete this clone\n\nwhen I start as a clone\nshow\nforever\n    if <not <touching color (#00c72f)?>> then\n        change y by (-10)\n    end\n    if <<touching color (#ff3c3c)?> or <touching (ad v)?>> then\n        start sound [pop v]\n        delete this clone\n    end\nend\n\nwhen I receive [death v]\ngo to x: (80) y: (0)\n\n@Mobile Button Right\n\nwhen flag clicked\nset [ghost v] effect to (50)\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [mobile right? v] to [t]\n    else\n        set [mobile right? v] to [f]\n    end\nend\n\nwhen [any v] key pressed\nhide\n\n@Mobile Button Left\n\nwhen flag clicked\nset [ghost v] effect to (50)\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [mobile left? v] to [t]\n    else\n        set [mobile left? v] to [f]\n    end\nend\n\nwhen [any v] key pressed\nhide\n\n@Mobile Button Up\n\nwhen flag clicked\nset [ghost v] effect to (50)\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        set [mobile up? v] to [t]\n    else\n        set [mobile up? v] to [f]\n    end\nend\n\nwhen [any v] key pressed\nhide\n\n@Trail\n\nwhen flag clicked\nforever\n    go to (sprite v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-5)\nend\ndelete this clone\n\ngo [forward v] (1) layers\n\nwhen I receive [next v]\nchange [color v] effect by (10)\n\n