The Final Storm || A Platformer                       #games

Instructions: Our third part in the series is finally here Everyone! -Hope you Enjoy :D\nStory - Our little cube has to face natural disasters to reach its home/shelter. \n200 Follower Contest! - https://scratch.mit.edu/projects/403530602/\n-------------------------------------------------------------------------\nControls:Arrow Keys,Tap and drag

@Stage\n\nwhen flag clicked\nforever\n    play sound [Wanderlust A Travel Music Album by gunnarolla v] until done\n    wait (1) seconds\n    play sound [The Misty Mountains Cold - The Hobbit v] until done\nend\n\n@Levels\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [end]> then\n        broadcast (estop v)\n    end\nend\n\nwhen flag clicked\nshow\n\nhide\nwait (1) seconds\n\nwhen flag clicked\nwait (1) seconds\nshow\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume1]> then\n        broadcast (sandier v)\n    else\n        broadcast (Bluer v)\n    end\nend\n\n\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume10]> then\n        broadcast (master v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume18]> then\n        broadcast (no rain v)\n    end\nend\n\n@Words!\n\nwhen I receive [next level v]\ngo to [front v] layer\nnext costume\n\nwhen flag clicked\ngo to x: (-10) y: (-50)\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nwait (1) seconds\nshow\n\n@Nature\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\n\nwhen flag clicked\nwait (1) seconds\nshow\n\nhide\n\n@Danger\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nwait (1) seconds\nshow\n\n@Danger2\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nwait (1) seconds\nshow\n\n@Danger3\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nwait (1) seconds\nshow\n\nwhen flag clicked\nforever\n    turn right (5) degrees\nend\n\n@Danger4\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nwait (1) seconds\nshow\n\nwhen flag clicked\nforever\n    go to x: (2) y: (-58)\n    glide (0.3) secs to x: (2) y: (-100)\n    wait (0.8) seconds\n    glide (0.6) secs to x: (2) y: (-58)\nend\n\n@Backdrop\n\nwhen flag clicked\nset size to (100) %\ngo to [back v] layer\nforever\n    set y to (([y position v] of [player v]) * (-0.5))\n    set x to (([x position v] of [player v]) * (-0.07))\nend\n\n@ur mom\n\nwhen flag clicked\nshow\nclear graphic effects\nforever\n    go to (player v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (20)\n    change size by (-6)\n    change [ghost v] effect by (8)\nend\ndelete this clone\n\nwhen I receive [bluer v]\nswitch costume to (costume2 v)\n\nwhen I receive [sandier v]\nswitch costume to (costume1 v)\n\n@Player\n\nwhen I receive [estop v]\nhide\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [next level v]\nset [yv v] to [0]\nset [xv v] to [0]\ngo to x: (-200) y: (0)\nset [ghost v] effect to (0)\n\nwhen flag clicked\npoint in direction (90)\nset [xvel v] to [0]\nset [yvel v] to [0]\nforever\n    set size to (size) %\n    set [size v] to [100]\n    show\n    set rotation style [all around v]\n    if <<<mouse down?> and <(x position) > (mouse x)>> or <key (left arrow v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    if <<<mouse down?> and <(x position) < (mouse x)>> or <key (right arrow v) pressed?>> then\n        change [xv v] by (1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (levels v)?> then\n        change y by (1)\n        if <touching (levels v)?> then\n            change y by (1)\n            if <touching (levels v)?> then\n                change y by (1)\n                if <touching (levels v)?> then\n                    change y by (1)\n                    if <touching (levels v)?> then\n                        change y by (1)\n                        if <touching (levels v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-7]\n                                else\n                                    set [xv v] to [7]\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 y by (-1)\n    if <touching (levels v)?> then\n        if <<<mouse down?> and <(y position) < (mouse y)>> or <key (up arrow v) pressed?>> then\n            set [yv v] to [17]\n        end\n    end\n    change y by (1)\n    change [yv v] by (-1)\n    set [yv v] to ((Yv) * (0.99))\n    change y by (Yv)\n    if <touching (levels v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    hide variable [xv v]\n    if <(x position) > [230]> then\n        broadcast (next level v)\n    end\n    if <(y position) < [-170]> then\n        go to x: (-200) y: (0)\n    end\n    if touching\n    quicksand\n    Saws\nend\n\nwhen flag clicked\nwait (1) seconds\ngo to x: (-200) y: (0)\n\ndefine if touching\nif <<touching (danger v)?> or <touching (danger4 v)?>> then\n    broadcast (Red v)\n    repeat (10)\n        turn right (5) degrees\n        change [size v] by (-10)\n        set size to (size) %\n    end\n    set [yv v] to [0]\n    set [xv v] to [0]\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (-200) y: (0)\n    point in direction (90)\nend\nif <touching (bounce v)?> then\n    set [yv v] to [20]\nend\nif <touching (speed v)?> then\n    set [xv v] to [21]\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nturn right (5) degrees\n\ndefine quicksand\nif <touching (danger2 v)?> then\n    broadcast (Red v)\n    repeat (10)\n        change y by (-1)\n        change [size v] by (-10)\n        set size to (size) %\n    end\n    set [yv v] to [0]\n    set [xv v] to [0]\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (-200) y: (0)\n    point in direction (90)\nend\nif <touching (bounce v)?> then\n    set [yv v] to [20]\nend\nif <touching (speed v)?> then\n    set [xv v] to [21]\nend\n\nwhen I receive [sandier v]\nswitch costume to (costume1 v)\n\ndefine Saws\nif <<touching (danger3 v)?> or <touching (danger4 v)?>> then\n    broadcast (Red v)\n    repeat (10)\n        change y by (-0.5)\n        change [size v] by (-10)\n        set size to (size) %\n    end\n    set [yv v] to [0]\n    set [xv v] to [0]\n    set size to (100) %\n    set [ghost v] effect to (0)\n    go to x: (-200) y: (0)\n    point in direction (90)\nend\nif <touching (bounce v)?> then\n    set [yv v] to [20]\nend\nif <touching (speed v)?> then\n    set [xv v] to [21]\nend\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-6)\n    change [ghost v] effect by (8)\nend\ndelete this clone\n\nwhen I receive [bluer v]\nswitch costume to (costume2 v)\n\nwhen I receive [sandier v]\nswitch costume to (costume1 v)\n\n@Thumbnail\n\nwhen flag clicked\ngo to [front v] layer\nshow\nwait (1) seconds\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\n@Skip\n\nwhen I receive [estop v]\nhide\n\nwhen flag clicked\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (-5)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (next level v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen flag clicked\nwait (1) seconds\nshow\n\n@Rain\n\nwhen flag clicked\nshow\nforever\n    repeat (10)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\n    go to [front v] layer\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (3))\ngo to x: (pick random (-240) to (240)) y: (184)\nglide (pick random (0.005) to (2)) secs to x: (x position) y: (-110)\ndelete this clone\n\nwhen I receive [no rain v]\nhide\n\n@clouds\n\nwhen flag clicked\nhide\nforever\n    wait (pick random (2.5) to (3.5)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo [backward v] (1) layers\nset size to (pick random (50) to (70)) %\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (pick random (30) to (45))\nset [cloud side v] to (pick random (1) to (2))\nif <(Cloud side) = [1]> then\n    go to x: (246) y: (pick random (140) to (80))\n    repeat until <(x position) < [-243]>\n        change x by ((0) - (pick random (0.5) to (2)))\n    end\nelse\n    go to x: (-246) y: (pick random (140) to (80))\n    repeat until <(x position) > [243]>\n        change x by (pick random (0.5) to (2))\n    end\nend\ndelete this clone\n\nwhen I receive [no rain v]\nhide\n\n@Matser\n\nwhen I start as a clone\nrepeat (400)\n    change size by (-6)\n    change [ghost v] effect by (4)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [master v]\nshow\nset [ghost v] effect to (10)\nforever\n    go to (player v)\n    wait (0.3) seconds\nend\n\nwhen I receive [no rain v]\nhide\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\n