Lava Rising (A platformer game)
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [finished intro v]\nswitch backdrop to (backdrop1 v)\n\n@Avoid the lava sprite\n\nwhen flag clicked\nset rotation style [left-right v]\n\nwhen [right arrow v] key pressed\npoint in direction (90)\n\nwhen [left arrow v] key pressed\npoint in direction (-90)\n\nwhen I receive [restart v]\nchange [health v] by (-10)\nchange [fails v] by (1)\ngo to x: (-213) y: (146)\n\nwhen flag clicked\nset [health v] to [100]\nhide\n\nwhen I receive [finished intro v]\nshow\n\nwhen I receive [finished intro v]\nforever\n    if <(y position) < [-170]> then\n        broadcast (restart v)\n    end\nend\n\nwhen I receive [finished intro v]\ngo to x: (-213) y: (146)\nset [y v] to [0]\nset [x v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (2)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-2)\n    end\n    set [x v] to ((x) * (0.8))\n    change x by (x)\n    if <touching (platform v)?> then\n        change y by (1)\n        if <touching (platform v)?> then\n            change y by (1)\n            if <touching (platform v)?> then\n                change y by (1)\n                if <touching (platform v)?> then\n                    change y by (1)\n                    if <touching (platform v)?> then\n                        change y by (1)\n                        if <touching (platform v)?> then\n                            change y by (-3)\n                            change x by ((x) * (-1))\n                            if <key (up arrow v) pressed?> then\n                                set [y v] to [9]\n                                if <(x) > [0]> then\n                                    set [x v] to [-20]\n                                else\n                                    set [x v] to [20]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching (platform v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (platform v)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [9]\n        end\n    else\n        change [y v] by (-0.4)\n    end\nend\n\nwhen I receive [finished intro v]\nforever\n    if <(x position) > [220]> then\n        go to x: (-213) y: (146)\n        broadcast (next level v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Health) = [0]> then\n        broadcast (game over v)\n        wait (0.01) seconds\n        stop [all v]\n    end\nend\n\n@Text\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [finished intro v]\nshow\n\nwhen I receive [next level v]\nif <not <(costume [number v]) = [17]>> then\n    next costume\nend\n\n@Platform\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [finished intro v]\nshow\n\nwhen flag clicked\nshow list [people who beat the game v]\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nif <not <(costume [number v]) = [17]>> then\n    next costume\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [17]> then\n        broadcast (hide lava v)\n        broadcast (show game finished v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [17]> then\n        if <(Fails) < (☁ Least amount of fails)> then\n            set [☁ least amount of fails v] to (Fails)\n        end\n    end\nend\n\nwhen [6 v] key pressed\nhide list [people who beat the game v]\n\nwhen [7 v] key pressed\nshow list [people who beat the game v]\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [17]> then\n        if <not <[people who beat the game v] contains (username)?>> then\n            add (username) to [people who beat the game v]\n        end\n    end\nend\n\n@lava\n\nwhen flag clicked\ngo to x: (0) y: (-999)\n\nwhen I receive [finished intro v]\nrepeat until <(Game over?) = [end]>\n    change y by (0.096)\nend\n\nwhen flag clicked\nset [game over? v] to [0]\n\nwhen flag clicked\nset [ghost v] effect to (12)\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [fails v] to [0]\nhide\n\nwhen I receive [finished intro v]\nshow\n\nwhen I receive [hide lava v]\nswitch costume to (costume2 v)\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [finished intro v]\nforever\n    if <<touching (avoid the lava sprite v)?> and <(costume [number v]) = [1]>> then\n        broadcast (restart v)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [game over v]\nshow\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (4) y: (0)\nhide\n\n@intro\n\nwhen flag clicked\ngo to x: (-240) y: (0)\npoint in direction (90)\nset [ghost v] effect to (0)\nshow\nrepeat (45)\n    change x by (((0) - (x position)) / (7))\nend\nrepeat (70)\n    change [ghost v] effect by (([sin v] of ((timer) * (500)) ) * (5))\nend\nset [ghost v] effect to (0)\nrepeat (45)\n    change x by (((200) - (x position)) / (7))\nend\nhide\nbroadcast (Finished intro v)\n\n
The new game is out!!! Play it here: https://scratch.mit.edu/projects/303683447/\n\n✦✦✦✦✦ Lava Rising ✦✦✦✦✦✦✦✦\nFollow  @Game_M-A-K-E-R  for more...\n150 views, 26 loves and 20 favorites in less than 1 day!!! Thank you so much for all the support! \n\nUse the arrow keys to move, try to get out of the valley fast or the lava will cover you!\nIt is hard but not impossible. This project is still a work in progress. Post any feedback in the comments and I will try to make the changes!\n\nPress 6 to see people who beat the game and 7 to hide the list\n\n@games @platformers  @Game_M-A-K-E-R 