Nature a platformer  |  -Lukioud-

Instructions: Nature a platformer\nby -Lukioud-\nFollow @CMlukian\nNEW GAME !! https://scratch.mit.edu/projects/834954328/\n\nMove to the right to get access to new level :)\nDodge the Spike ;)

@Stage\n\n@Player\n\nwhen flag clicked\nshow variable [timer v]\nreset timer\nshow\nswitch costume to (costume1 v)\ngo to x: (-193) y: (-45)\nset [ghost v] effect to (0)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [x v] by (1.5)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1.5)\n    end\n    set [x v] to ((X) * (.9))\n    change x by (X)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        if <touching (level v)?> then\n                            change x by ((X) * (-1))\n                            change x by (-5)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> 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 [10]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                        change y by (1)\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching (level v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (level v)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            change [y v] by (12)\n        end\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        set [y v] to [0]\n        set [x v] to [0]\n        go to x: (-193) y: (-45)\n        broadcast (New costume v)\n    end\n    if <touching (spikes v)?> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [ghost v] effect to (0)\n        set [x v] to [0]\n        set [y v] to [0]\n        go to x: (-193) y: (-45)\n    end\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    set [timer v] to (timer)\nend\n\nwhen I start as a clone\nrepeat (20)\n    change size by (-2)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    play sound [nepal-rien-dspecial-instrumental \(1\) v] until done\nend\n\n@Level\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [new costume v]\nnext costume\n\n@Spikes\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [new costume v]\nnext costume\n\n@Thumbnail \n\nwhen flag clicked\nhide\n\n