monoton || a mobile platformer

Instructions: WASD, arrow keys / press x to skip a level\n\n\nsorry for the easy levels\n

@Stage\n\n@player\n\ndefine engine\nif <(x position) > [220]> then\n    broadcast (go in v)\n    wait (1) seconds\n    go to x: (-200) y: (-139)\n    change [level v] by (1)\nend\nif <<(y position) < [-170]> or <<touching (spikes v)?> or <touching (moving spikes v)?>>> then\n    broadcast (2 v)\n    go to x: (-200) y: (-139)\n    start sound [Bonk v]\n    set [vx v] to [0]\n    set [vy v] to [0]\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(mouse x) > (x position)> and <mouse down?>>> then\n    change [vx v] by (1)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(x position) > (mouse x)> and <mouse down?>>> then\n    change [vx v] by (-1)\nend\nset [vx v] to ((vx) * (0.84))\nchange x by (vx)\nif <touching (hitbox v)?> then\n    change y by (-2)\n    if <touching (hitbox v)?> then\n        change y by (1)\n        if <touching (hitbox v)?> then\n            change y by (1)\n            if <touching (hitbox v)?> then\n                change y by (1)\n                if <touching (hitbox v)?> then\n                    change y by (1)\n                    if <touching (hitbox v)?> then\n                        change y by (1)\n                        if <touching (hitbox v)?> then\n                            change y by (-5)\n                            change x by ((-1) * (vx))\n                            if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > (y position)> and <mouse down?>>> and <not <(vx) = [0]>>> then\n                                set [m v] to [walljump]\n                                set [vy v] to [8]\n                                set [vx v] to (((vx) / ([abs v] of (vx) )) * (-8))\n                            else\n                                set [m v] to [wallslide]\n                                set [vx v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (2)\nend\nchange y by (-3)\nif <touching (hitbox v)?> then\n    if <(vy) = [-3]> then\n        if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n            set [m v] to [run]\n        else\n            if <([abs v] of (vx) ) > [.1]> then\n                set [m v] to [slide]\n            else\n                set [m v] to [stand]\n            end\n        end\n    end\n    if <<<<(mouse y) > (y position)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> and <not <touching color (#ffac39)?>>> then\n        set [m v] to [jump]\n        set [vy v] to [8]\n    end\nend\nif <<<<(m) = [jump]> or <(m) = [walljump]>> and <(vy) < [0]>> or <<<(m) = [run]> or <(m) = [slide]>> and <(vy) < [-3]>>> then\n    set [m v] to [fall]\nend\nchange y by (3)\nif <(vy) > [-15]> then\n    change [vy v] by (-0.5)\nend\nchange y by (-2)\nif <not <touching (hitbox v)?>> then\n    change y by (-1)\n    if <not <touching (hitbox v)?>> then\n        change y by (-1)\n        if <not <touching (hitbox v)?>> then\n            change y by (-1)\n            if <not <touching (hitbox v)?>> then\n                change y by (-1)\n                if <not <touching (hitbox v)?>> then\n                    change y by (-1)\n                    if <not <touching (hitbox v)?>> then\n                        change y by (5)\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (2)\nchange y by (vy)\nif <touching (hitbox v)?> then\n    change y by (-2)\n    if <touching (hitbox v)?> then\n        change y by ((-1) * (vy))\n        set [vy v] to [-3]\n    end\n    change y by (2)\nend\nif <touching (trampoline v)?> then\n    set [vy v] to [15]\nend\n\nclones\n\nwhen I receive [redinchoose v]\nset [color v] effect to (0)\n\nwhen I receive [blue v]\nset [color v] effect to (100)\n\nwhen I receive [darkblue v]\nset [color v] effect to (120)\n\nwhen I receive [darkgreen v]\nset [color v] effect to (70)\n\nwhen I receive [green v]\nset [color v] effect to (40)\n\nwhen I receive [orange v]\nset [color v] effect to (30)\n\nwhen I receive [red v]\nset [color v] effect to (0)\n\nwhen I receive [yellow v]\nset [color v] effect to (30)\n\nwhen I receive [blueinchoose v]\nset [color v] effect to (100)\n\nwhen I receive [orange v]\nset [color v] effect to (20)\n\nwhen I receive [darkblueinchoose v]\nset [color v] effect to (120)\n\nwhen I receive [darkgreeninchoose v]\nset [color v] effect to (70)\n\nwhen I receive [orangeinchoose v]\nset [color v] effect to (20)\n\nwhen I receive [yellowinchoose v]\nset [color v] effect to (30)\n\nwhen I receive [greeninchoose v]\nset [color v] effect to (40)\n\nwhen I receive [start v]\nstop all sounds\nset volume to (75) %\nplay sound [OMFG - Hello v] until done\n\nwhen flag clicked\nhide\n\nwhen I receive [to start v]\ngo to x: (-200) y: (-100)\n\ndefine clones\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [back v] layer\nset size to (150) %\nset [ghost v] effect to (50)\nwait (0.1) seconds\nrepeat (10)\n    go to [back v] layer\n    change size by (-10)\n    change [ghost v] effect by (6)\nend\ndelete this clone\n\nturn right (15) degrees\n\nif <touching color (#c3ff36)?> then\n    set [vy v] to [-3]\nend\nif <[-230] > (x position)> then\n    set x to (-230)\nend\n\nwhen I receive [start v]\nset size to (150) %\ngo to x: (-200) y: (-139)\nset [vx v] to [0]\nset [vy v] to [0]\nshow\nforever\n    if <(level) = [12]> then\n        hide\n    else\n        engine\n    end\nend\n\n@thumbnail\n\nwhen flag clicked\nswitch costume to (kostüm2 v)\nset size to (100) %\nswitch costume to (thumbnail v)\nforever\n    show\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    switch costume to (thumbnail v)\n    go to [front v] layer\n    if <<key (x v) pressed?> and <not <(level) > [11]>>> then\n        set [level v] to ((level) + (1))\n        wait until <not <key (x v) pressed?>>\n        set [vx v] to [0]\n        set [vy v] to [0]\n        broadcast (to start v)\n    end\nend\n\n@black\n\nwhen I receive [go in v]\nset [brightness v] effect to (4)\ngo to x: (-465) y: (0)\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\nrepeat until <([abs v] of (x position) ) < [2]>\n    change x by (((0) - (x position)) / (6))\nend\nset x to (0)\ngo to x: (0) y: (0)\nbroadcast (to start v)\nrepeat (32)\n    change x by (((465) - (x position)) / (8))\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nhide\n\n@Intro\n\nwhen flag clicked\nstart sound [Zaza - Be Together v]\nset volume to (75) %\nset size to (100) %\npoint in direction (90)\ncreate clone of (_myself_ v)\nswitch costume to (d v)\nshow\nset [ghost v] effect to (100)\ngo to x: (-180) y: (0)\nrepeat (9)\n    change x by ((5) - ((x position) * (0.2)))\n    change [ghost v] effect by (-10)\n    wait (0.03) seconds\nend\ngo to x: (0) y: (0)\nswitch costume to (logo v)\nwait (3) seconds\nrepeat (100)\n    turn right ((3.45) - ((direction) * (0.2))) degrees\n    change size by ((-2) - ((size) / (5)))\n    change [ghost v] effect by (10)\n    change volume by (-1)\nend\nhide\npoint in direction (90)\nbroadcast (start v)\n\nwhen I start as a clone\nswitch costume to (n v)\nshow\nset [ghost v] effect to (100)\ngo to x: (180) y: (0)\nrepeat (9)\n    change x by ((-5) - ((x position) * (0.2)))\n    change [ghost v] effect by (-10)\n    wait (0.03) seconds\nend\ngo to x: (0) y: (0)\ndelete this clone\n\n@outro\n\nwhen flag clicked\nset [level v] to [1]\nhide\nwait until <(level) = [12]>\nstop all sounds\nshow\nstart sound [Zaza - Be Together v]\nset volume to (100) %\nset size to (100) %\npoint in direction (90)\nswitch costume to (n v)\ncreate clone of (_myself_ v)\nswitch costume to (d v)\nshow\nset [ghost v] effect to (100)\ngo to x: (-180) y: (0)\nrepeat (9)\n    change x by ((5) - ((x position) * (0.2)))\n    change [ghost v] effect by (-10)\n    wait (0.03) seconds\nend\ngo to x: (0) y: (0)\nswitch costume to (logo v)\nwait (2) seconds\nrepeat (10)\n    change y by ((5) - ((y position) * (0.2)))\n    change [ghost v] effect by (-10)\n    wait (0.03) seconds\nend\nwait (1) seconds\nswitch costume to (luv fav fuloe v)\ncreate clone of (_myself_ v)\nswitch costume to (logo v)\nwait (1) seconds\nforever\n    set size to ((100) + ((10) * ([cos v] of (((timer) - (1)) * (200)) ))) %\n    point in direction ((90) + ((15) * ([cos v] of (((timer) - (2)) * (275)) )))\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [n]> then\n    switch costume to (n v)\n    show\n    set [ghost v] effect to (100)\n    go to x: (180) y: (0)\n    repeat (9)\n        change x by ((-5) - ((x position) * (0.2)))\n        change [ghost v] effect by (-10)\n        wait (0.03) seconds\n    end\n    go to x: (0) y: (0)\n    delete this clone\nend\nif <(costume [number v]) = [4]> then\n    go to x: (0) y: (-50)\n    repeat (10)\n        change y by ((5) - ((y position) * (0.2)))\n        change [ghost v] effect by (-10)\n        wait (0.03) seconds\n    end\n    wait (1) seconds\n    forever\n        set size to ((75) + ((10) * ([cos v] of (((timer) - (1)) * (200)) ))) %\n        point in direction ((90) + ((15) * ([cos v] of (((timer) - (2)) * (275)) )))\n    end\nend\n\n@hitbox\n\nwhen flag clicked\nset [ghost v] effect to (0)\nshow\ngo to x: (0) y: (-2)\nset [level v] to [1]\nset size to (100) %\nforever\n    switch costume to ((level) + (1))\n    if <(level) = [12]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-2)\nset [done? v] to [0]\nset [level v] to [1]\nset size to (100) %\n\nwhen I receive [menu v]\nswitch costume to (0 v)\n\nwhen I receive [start v]\nshow\n\n@moving spikes\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [done? v] to [0]\nset [level v] to [1]\nset size to (100) %\n\nwhen I receive [menu v]\nswitch costume to (0 v)\n\nwhen I receive [start v]\ngo to x: (-125) y: (150)\nhide\nwait until <(level) = [8]>\nshow\nhide\nrepeat (10)\n    create clone of (_myself_ v)\n    change x by (25)\n    wait (0.1) seconds\nend\n\nwhen I start as a clone\nshow\nforever\n    if <not <(level) = [8]>> then\n        hide\n    else\n        show\n        repeat (25)\n            change y by (((y position) + (-130)) / (-5))\n            if <not <(level) = [8]>> then\n                hide\n            else\n            end\n        end\n        wait (1) seconds\n        repeat (25)\n            change y by (((y position) + (150)) / (-5))\n            if <not <(level) = [8]>> then\n                hide\n            end\n        end\n    end\nend\n\n@spikes\n\nwhen flag clicked\nset [ghost v] effect to (0)\nshow\ngo to x: (0) y: (-2)\nset [level v] to [1]\nset size to (100) %\nforever\n    switch costume to ((level) + (1))\n    if <(level) = [12]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-2)\nset [done? v] to [0]\nset [level v] to [1]\nset size to (100) %\n\nwhen I receive [menu v]\nswitch costume to (0 v)\n\nwhen I receive [start v]\nshow\n\n@trampoline\n\nwhen flag clicked\nset [ghost v] effect to (0)\nshow\ngo to x: (0) y: (-2)\nset [level v] to [1]\nset size to (100) %\nforever\n    switch costume to ((level) + (1))\n    if <(level) = [12]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-2)\nset [done? v] to [0]\nset [level v] to [1]\nset size to (100) %\n\nwhen I receive [menu v]\nswitch costume to (0 v)\n\nwhen I receive [start v]\nshow\n\n