Appel platformer (Read notes)

Instructions: Spam the flag. You already know the movement keys, Jump on enemies to squish them. space to change gravity, and I'm sure you already know how to crouch.\nYes, all levels are possible.\n\n\n\n\nTags: #games #all

@Stage\n\n@level\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [zzzzzzzoooooooooooooooooiiiiiiiiiinnnnnnkkkk v]\nnext costume\n\nwhen flag clicked\nforever\n    set [level v] to (costume [number v])\nend\n\n@player\n\nwhen flag clicked\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <(mode) = [0]> then\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (1)\n        end\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (-1)\n        end\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <touching color (#4dbd3e)?> then\n            change y by (1)\n            if <touching color (#4dbd3e)?> then\n                change y by (1)\n                if <touching color (#4dbd3e)?> then\n                    change y by (1)\n                    if <touching color (#4dbd3e)?> then\n                        change y by (1)\n                        if <touching color (#4dbd3e)?> then\n                            change y by (1)\n                            if <touching color (#4dbd3e)?> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [-5]\n                                    else\n                                        set [xv v] to [5]\n                                    end\n                                    set [yv v] to [10]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [yv v] by (-1)\n        change y by (Yv)\n        if <touching color (#4dbd3e)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        if <touching color (#4dbd3e)?> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [yv v] to [15]\n            end\n        end\n        change y by (1)\n    end\nend\n\nwhen flag clicked\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <(mode) = [1]> then\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            change [xv v] by (-1)\n        end\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [xv v] by (1)\n        end\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <touching color (#4dbd3e)?> then\n            change y by (-1)\n            if <touching color (#4dbd3e)?> then\n                change y by (-1)\n                if <touching color (#4dbd3e)?> then\n                    change y by (-1)\n                    if <touching color (#4dbd3e)?> then\n                        change y by (-1)\n                        if <touching color (#4dbd3e)?> then\n                            change y by (-1)\n                            if <touching color (#4dbd3e)?> then\n                                change x by ((Xv) * (-1))\n                                change y by (5)\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    if <(Xv) > [0]> then\n                                        set [xv v] to [5]\n                                    else\n                                        set [xv v] to [-5]\n                                    end\n                                    set [yv v] to [-10]\n                                else\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [yv v] by (1)\n        change y by (Yv)\n        if <touching color (#4dbd3e)?> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        if <touching color (#4dbd3e)?> then\n            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                set [yv v] to [-15]\n            end\n        end\n        change y by (1)\n    end\nend\n\nwhen flag clicked\nset [mode v] to [0]\n\nwhen [space v] key pressed\nif <(mode) = [0]> then\n    set [mode v] to [1]\nelse\n    set [mode v] to [0]\nend\n\nwhen flag clicked\ngo to x: (-199) y: (-57)\n\nwhen flag clicked\nforever\n    if <<not <color (#ffff20) is touching (#4e4e4e)?>> and <touching (enemy ai v)?>> then\n        broadcast (aaaaaaa v)\n        go to x: (-209) y: (-54)\n    end\nend\n\nwhen I receive [zzzzzzzoooooooooooooooooiiiiiiiiiinnnnnnkkkk v]\ngo to x: (-199) y: (-57)\n\nwhen flag clicked\nforever\n    if <touching color (#c2c2dd)?> then\n        go to x: (-199) y: (-54)\n        set [mode v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\n@Enemy AI\n\nwhen flag clicked\ngo to x: (213) y: (-80)\nset [x-vel v] to [0]\nforever\n    change y by (my variable)\n    change [my variable v] by (-1)\n    change y by (-1)\n    if <touching color (#4dbd3e)?> then\n        set [my variable v] to ((my variable) - ((my variable) * (2)))\n        set [my variable v] to [0]\n    end\n    change y by (1)\n    if <<touching color (#4dbd3e)?> or <(x position) < ([x position v] of [player v])>> then\n        change [x-vel v] by (0.5)\n        switch costume to (right v)\n    else\n        if <<not <touching color (#4dbd3e)?>> or <([x position v] of [player v]) < (x position)>> then\n            change [x-vel v] by (-0.5)\n        end\n    end\n    set [x-vel v] to ((0.9) * (x-vel))\n    change x by (x-vel)\n    if <touching color (#4dbd3e)?> then\n        change x by ((0) - (x-vel))\n        set [my variable v] to [4]\n        change y by (4)\n    end\nend\n\nwhen flag clicked\nset [x v] to (x position)\nset [y v] to (y position)\nforever\n    if <touching color (#4dbd3e)?> then\n        go to x: (X) y: (Y)\n    else\n        set [x v] to (x position)\n        set [y v] to (y position)\n    end\nend\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nswitch costume to (right v)\n\nwhen flag clicked\nforever\n    if <<touching (player v)?> and <color (#4e4e4e) is touching (#ffff20)?>> then\n        stop [other scripts in sprite v]\n        broadcast (owwwwww v)\n        switch costume to (costume1 v)\n        wait (1) seconds\n        hide\n    end\nend\n\nwhen flag clicked\nswitch costume to (right v)\ngo to x: (199) y: (-43)\n\nwhen I receive [aaaaaaa v]\ngo to x: (210) y: (-66)\n\nwhen I receive [zzzzzzzoooooooooooooooooiiiiiiiiiinnnnnnkkkk v]\ngo to x: (199) y: (-43)\nshow\nswitch costume to (right v)\nset [x-vel v] to [0]\nif <not <(level) = [6]>> then\n    forever\n        change y by (my variable)\n        change [my variable v] by (-1)\n        change y by (-1)\n        if <touching color (#4dbd3e)?> then\n            set [my variable v] to ((my variable) - ((my variable) * (2)))\n            set [my variable v] to [0]\n        end\n        change y by (1)\n        if <<touching color (#4dbd3e)?> or <(x position) < ([x position v] of [player v])>> then\n            change [x-vel v] by (0.5)\n            switch costume to (right v)\n        else\n            if <<not <touching color (#4dbd3e)?>> or <([x position v] of [player v]) < (x position)>> then\n                change [x-vel v] by (-0.5)\n            end\n        end\n        set [x-vel v] to ((0.9) * (x-vel))\n        change x by (x-vel)\n        if <touching color (#4dbd3e)?> then\n            change x by ((0) - (x-vel))\n            set [my variable v] to [4]\n            change y by (4)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        hide\n    end\nend\n\nwhen I receive [owwwwww v]\nforever\n    if <<(level) = [7]> or <(level) = [8]>> then\n        hide\n    end\nend\n\n@END\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        broadcast (zzzzzzzoooooooooooooooooiiiiiiiiiinnnnnnkkkk v)\n    end\nend\n\n@Sprite1\n\n@Sprite2\n\n@Sprite3\n\nwhen flag clicked\nhide\n\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\n\n