Generic - a platformer

Instructions: Welcome to generic, a platformer. \n\nDouble click the flag!!\n\nMy July project!\n-Arrow keys to move\n-WASD keys to move\n-Mobile to move(huh? Does that make sense?)\n-Generic\n-Is the instruction above a instruction?\n-N to skip\n-B to go back\nLove, Fave and Follow!

@Stage\n\nwhen flag clicked\nforever\n    play sound [JJD - Aeon.mp3 v] until done\nend\n\n@Super Generic Player\n\nwhen I receive [begin! v]\ngo to x: (-190) y: (-88)\nset [x vel v] to [0]\nset [y vel v] to [0]\nset [level v] to [1]\nforever\n    platform physics (13) (-1) (0.8) (1.8) (15) (25)\n    if <<touching (generic end v)?> or <key (n v) pressed?>> then\n        go to x: (-190) y: (-88)\n        change [level v] by (1)\n        wait until <not <key (n v) pressed?>>\n    end\n    if <<touching (generic spikes v)?> or <touching (generic spinny things v)?>> then\n        go to x: (-190) y: (-88)\n    end\n    if <touching (generic bouncy v)?> then\n        set [y vel v] to [25]\n    end\n    if <<key (b v) pressed?> and <(LEVEL) > [1]>> then\n        go to x: (-190) y: (-88)\n        change [level v] by (-1)\n        wait until <not <key (b v) pressed?>>\n    end\nend\n\ndefine platform physics (jump height) (gravity) (friction) (movement speed) (wall jump vm) (wall jump hm)\nchange y by (y vel)\nif <touching (generic ground v)?> then\n    repeat ([abs v] of (y vel) )\n        if <touching (generic ground v)?> then\n            change y by ((-1) * (([abs v] of (y vel) ) / (y vel)))\n        end\n    end\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (15))>>> and <not <(y vel) > [0]>>> then\n        set [y vel v] to (jump height)\n    else\n        set [y vel v] to [0]\n    end\nelse\n    change [y vel v] by (gravity)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [x vel v] by (movement speed)\n    switch costume to (costume1 v)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n    change [x vel v] by ((-1) * (movement speed))\n    switch costume to (costume2 v)\nend\nchange x by (x vel)\nif <touching (generic ground v)?> then\n    repeat (([abs v] of (x vel) ) + (1))\n        if <touching (generic ground v)?> then\n            change y by (1)\n        end\n    end\n    if <touching (generic ground v)?> then\n        repeat (([abs v] of (x vel) ) + (1))\n            change y by (-1)\n        end\n        repeat ([ceiling v] of ([abs v] of (x vel) ) )\n            if <touching (generic ground v)?> then\n                change x by ((-1) * (([abs v] of (x vel) ) / (x vel)))\n            end\n        end\n        if <<<mouse down?> and <(mouse y) > ((y position) + (15))>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            if <(x vel) < [0]> then\n                set [x vel v] to [0]\n                if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n                    set [x vel v] to (wall jump hm)\n                    set [y vel v] to (wall jump vm)\n                end\n            else\n                set [x vel v] to [0]\n                if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n                    set [x vel v] to ((-1) * (wall jump hm))\n                    set [y vel v] to (wall jump vm)\n                end\n            end\n        end\n    end\nend\nset [x vel v] to ((x vel) * (friction))\n\n@Talk about Generic platformers\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nwait until <mouse down?>\nbroadcast (begin! v)\nforever\n    switch costume to ((LEVEL) + (1))\nend\n\n@Generic Ground\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\nend\n\n@Generic spikes\n\nwhen flag clicked\nset [speed v] to [0]\nrepeat (20)\n    change [speed v] by (1)\n    wait (0.01) seconds\nend\nforever\n    repeat (40)\n        change [speed v] by (1)\n        wait (0.01) seconds\n    end\n    repeat (40)\n        change [speed v] by (-1)\n        wait (0.01) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    turn right (speed) degrees\nend\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [4]> then\n        show\n    else\n        hide\n    end\nend\n\n@generic spinny things\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\nend\n\n@generic end\n\nwhen flag clicked\nshow\nset size to (100) %\nforever\n    repeat (10)\n        change size by (1)\n    end\n    repeat (10)\n        change size by (-1)\n    end\nend\n\nwhen I receive [begin! v]\nwait (0.01) seconds\nforever\n    turn right (5) degrees\n    if <(LEVEL) = [7]> then\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\n@generic bouncy\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\nend\n\n@love, fave, follow\n\nwhen I receive [begin! v]\nwait (1) seconds\nwait until <(LEVEL) = [7]>\ngo to x: (-125) y: (-50)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\ngo to x: (0) y: (-50)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\ngo to x: (125) y: (-50)\nswitch costume to (costume3 v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\npoint in direction (90)\nshow\nforever\n    wait (1) seconds\n    repeat (12)\n        turn right (30) degrees\n    end\nend\n\n@thumnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n@Generic cloud\n\nwhen flag clicked\nhide\ndelete this clone\n\nwhen I receive [begin! v]\nforever\n    create clone of (_myself_ v)\n    wait (pick random (2) to (3)) seconds\nend\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (3))\ngo to x: (240) y: (pick random (110) to (130))\nset [x v] to (pick random (-1.5) to (-3))\nrepeat until <[-235] > (x position)>\n    change x by (x)\nend\nrepeat (50)\n    change [ghost v] effect by (2)\nend\ndelete this clone\n\n