Future | A Platformer

Instructions: W A S D - To Move\n\nStory: The Space Gang from 2028 decided to ruin the time machine so they went to the past, but why? you'll know it later...\n\nHe he, The 300TH LOVER - Me (Yereyen he he)\n300TH FAVER - idk who it is?

@Stage\n\nwhen flag clicked\nforever\n    play sound [TheFatRat - Xenogenesis \(mp3jerk.com\).mp3 v] until done\nend\n\n@Thumbnail\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@LAG\n\nwhen flag clicked\nbroadcast (Begin v)\n\n@Level\n\nwhen flag clicked\nforever\n    switch costume to (Level)\n    go to x: (0) y: (0)\nend\n\nwhen I receive [bruh v]\nset [level v] to [1]\n\n@Player\n\ndefine Reset the setup\nset size to (80) %\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [idk y v] to [0]\ngo to x: (-200) y: (0)\nclear graphic effects\npoint in direction (90)\nshow\n\ndefine death\nset [idk y v] to [1]\nrepeat (25)\n    change size by (-5)\n    change [ghost v] effect by (5)\nend\nReset the setup\n\nwhen I receive [run the platformer v]\nset [level v] to [1]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nrepeat (10)\n    change size by (-5)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [run the platformer v]\nforever\n    if <<[235] < (x position)> and <(idk y) = [0]>> then\n        broadcast (Next level please? v)\n        change [level v] by (1)\n        Reset the setup\n    end\nend\n\nwhen I receive [run the platformer v]\nset size to (80) %\nset [idk y v] to [0]\nset [level v] to [1]\nReset the setup\nforever\n    if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <(idk y) = [0]>> then\n        change [x velocity v] by (2)\n    end\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <(idk y) = [0]>> then\n        change [x velocity v] by (-2)\n    end\n    set [x velocity v] to ((X velocity) * (0.8))\n    change x by (X velocity)\n    if <touching (level v)?> then\n        change y by (2)\n        if <touching (level v)?> then\n            change y by (2)\n            if <touching (level v)?> then\n                change y by (2)\n                if <touching (level v)?> then\n                    change y by (2)\n                    if <touching (level v)?> then\n                        change y by (2)\n                        if <touching (level v)?> then\n                            change x by ((X velocity) * (-2))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n                                if <(X velocity) > [0]> then\n                                    set [x velocity v] to [-5]\n                                else\n                                    set [x velocity v] to [5]\n                                end\n                                set [y velocity v] to [13]\n                            else\n                                set [x velocity v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y velocity v] by (-0.8)\n    change y by (Y velocity)\n    if <touching (level v)?> then\n        change y by ((Y velocity) * (-1))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    if <touching (level v)?> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n            set [y velocity v] to [12]\n        end\n    end\n    change y by (1)\n    if <touching (danger v)?> then\n        death\n    end\n    if <(y position) < [-178]> then\n        death\n    end\nend\n\nwhen I receive [run the platformer v]\nforever\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        switch costume to (right v)\n    end\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n        switch costume to (left v)\n    end\n    if <<<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        switch costume to (up-left v)\n    end\n    if <<<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        switch costume to (up-right v)\n    end\n    if <not <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (a v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>>>>>>>> then\n        switch costume to (default v)\n    end\nend\n\nwhen I receive [begin v]\nbroadcast (Run the platformer v)\nhide\n\n@Danger\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nset [level v] to [10]\n\n@Background\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\nset [level v] to [9]\n\n@Text\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\n@Button\n\nwhen flag clicked\nswitch costume to (btn v)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (-20)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nshow\n\nwhen this sprite clicked\n\nchange [level v] by (2)\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(Love) = [1]> and <(Favorite) = [1]>>> then\n        wait (pick random (30) to (40)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\n