~IMPALED~ {a platformer}

Instructions: OMG 700+ LOVES!!!!!!!!!!!!!! THANKS!!!!!!!!!!!!!!!!\n~IMPALED~-a platformer-\n~BY @Pixel-Lemon\n~ARROW KEYS OR TOUCHSCREEN TO MOVE\n~AVOID SPIKES\n~WALL JUMP\n~LOVE AND FAVE

@Stage\n\n@Thumbnail\n\nwhen I receive [startgame v]\nwait (0.01) seconds\nshow\ngo to x: (0) y: (0)\nwait (3) seconds\nrepeat (30)\n    change [ghost v] effect by (30)\nend\n\nwhen flag clicked\nhide\n\n@Level\n\nwhen I receive [startgame v]\nwait (3.01) seconds\nforever\n    show\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\n@INTRO\n\nwhen flag clicked\nforever\n    play sound [TheFatRat & JJD - Prelude \(VIP Edit\) v] until done\nend\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to ( v)\nrepeat (90)\n    next costume\nend\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (10)\nend\nbroadcast (StartGame v)\n\n@Obstacles\n\nwhen flag clicked\nhide\n\nwhen I receive [startgame v]\nwait (3.01) seconds\nforever\n    show\n    switch costume to (Level)\nend\n\n@Jump Pads\n\nwhen I receive [startgame v]\nwait (3.01) seconds\nswitch costume to (costume1 v)\nforever\n    show\nend\n\nwhen flag clicked\nhide\n\n@detector\n\nwhen flag clicked\nhide\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (0.5) seconds\nshow\ngo to x: (0) y: (-100)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [loved__ v] to [1]\n            end\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [faved___ v] to [1]\n            end\n        end\n    end\nend\n\n@Player\n\ndefine Place Player: (x) (y) Set Size To: (size)\ngo to x: (x) y: (y)\nset size to (60) %\n\ndefine Gravity, Platform Detection, Physics....\nforever\n    change [y v] by (-1)\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> then\n            set [y v] to [17]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (level v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <((mouse y) - (y position)) > [50]>>> and <touching (level v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <<<touching (obstacles v)?> or <(y position) < [-175]>> or <key (r v) pressed?>> then\n        Place Player: [-173] [-122] Set Size To: [40]\n    end\n    if <(x position) > [230]> then\n        change [level v] by (1)\n        Place Player: [-173] [-122] Set Size To: [40]\n    end\n    if <touching color (#fff27b)?> then\n        set [y v] to [20]\n    end\nend\n\nwhen I receive [startgame v]\nwait (3.01) seconds\nset [level v] to [1]\nshow\nPlace Player: [-173] [-122] Set Size To: [40]\nhide variable [y v]\nhide variable [x v]\nset [y v] to [0]\nset [x v] to [0]\nforever\n    Gravity, Platform Detection, Physics....\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [startgame v]\nforever\n    play sound [TheFatRat & JJD - Prelude \(VIP Edit\) v] until done\nend\n\n@Effect\n\nwhen I receive [end v]\nhide\nstop all sounds\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nshow\nset size to (60) %\nrepeat (20)\n    change [ghost v] effect by (10)\n    change size by (-3)\nend\ndelete this clone\n\nwhen I receive [startgame v]\nwait (3.01) seconds\nforever\n    show\n    go to (player v)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\n