The moon || a mobile platformer

Instructions:                           ◆ Pumpkin Dash ◆\n                        ◆ Platformer ◆\n\n>> Note that this game is SUPER glitchy\n>> Minimalistic I guess...\n>> 840+ blocks\n>> 20+ hours of work\n>> The only reason I wasn't able to do the score is a cloning reason. It will not show for some reason. If you can help me, please do!\n\n                        ◆ Instructions ◆\n\n>> Press any key or click to jump\n>> Avoid spikes!\n\n                           ◆ Credits ◆\n\n>> @leo889 for the EPIC intro!\n>> @griffpatch for the scrolling engine\n>> @icmy123 for the ground\n>> @-SparkyBlue101- for most of the background\n\n                           ◆ Music ◆\n\n>> From @crystalkeeper7 (idk what it's called)\n\n                            ◆ Tags ◆\n#all #games #halloween #pumpkin #laggy #glitchy #I #don't #know #why #leo889 #spooktober #haveagreatspooktoberwhileeatingretsandhonkingairhorns #airhorns4life #Ieatratswhilehonkingairhorns\n\n\n\n\n\n\n\n\n#rats4life :>

@Stage\n\nwhen flag clicked\nswitch backdrop to (sky v)\nset volume to (100) %\nstart sound [Intro Music v]\nwait (13) seconds\nrepeat (50)\n    change volume by (-2)\nend\n\nwhen I receive [start v]\nstop all sounds\nstop [other scripts in sprite v]\nforever\n    play sound [Ninja Music v] until done\n    if <(level) = [26]> then\n        switch backdrop to (secret v)\n    end\nend\n\n@Red Ninja\n\ndefine Reset Level\ngo to x: (-180) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nset [turn v] to [0]\npoint in direction (90)\nshow\n\nwhen I receive [play game v]\nforever\n    if <touching (lava v)?> then\n        change [y v] by (-0.3)\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n            change [y v] by (2)\n        end\n        set [y v] to ((y) * (.9))\n    end\nend\n\nwhen flag clicked\nset [level v] to [1]\nset [which ninja? v] to [1]\nset [equipped? v] to [0]\nset [level deaths v] to [0]\nhide\n\nwhen I receive [play game v]\nbroadcast (Next v)\nReset Level\nforever\n    if <(equipped?) > [1]> then\n        set [equipped? v] to [0]\n    end\n    if <(jump boost on/off) > [1]> then\n        set [jump boost on/off v] to [0]\n    end\n    if <(which ninja?) = [1]> then\n        show\n        if <key (r v) pressed?> then\n            Reset Level\n            broadcast (Next v)\n        end\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            change [x v] by (.9)\n            change [turn v] by (.9)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            change [x v] by (-.9)\n            change [turn v] by (-.9)\n        end\n        set [x v] to ((x) * (.9))\n        change x by (x)\n        set [turn v] to ((turn) * (.9))\n        turn right (turn) degrees\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change [x v] by (((x) * (-1)) - (turn))\n                                change x by ((turn) * (-1))\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [y v] by (-0.8)\n        change y by (y)\n        if <touching (level v)?> then\n            change y by ((y) * (-1))\n            set [y 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                if <(equipped?) = [1]> then\n                    set [y v] to [15]\n                else\n                    set [y v] to [12]\n                end\n            end\n        end\n        change y by (1)\n        if <<<touching (spikes v)?> or <<touching (long grass v)?> or <touching (water v)?>>> or <(y position) < [-188]>> then\n            change [level deaths v] by (1)\n            broadcast (Die v)\n        end\n    else\n        hide\n        point in direction (90)\n        set [x v] to [0]\n        set [y v] to [0]\n        set [turn v] to [0]\n        set [equipped? v] to [0]\n        set [jump boost on/off v] to [0]\n        if <(which ninja?) = [2]> then\n            go to x: ([x position v] of [green ninja v]) y: ([y position v] of [green ninja v])\n        else\n            if <(shrink boost on/off) = [0]> then\n                go to x: ([x position v] of [blue ninja v]) y: ([y position v] of [blue ninja v])\n            else\n                go to x: ([x position v] of [blue ninja v]) y: (([y position v] of [blue ninja v]) + (20))\n            end\n        end\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <(x position) > [253]> then\n        go to x: (-255) y: (y position)\n        change [level v] by (1)\n        set [level deaths v] to [0]\n        broadcast (Next v)\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <(which ninja?) = [1]> then\n        if <key (space v) pressed?> then\n            broadcast (Jump Boost v)\n            wait until <not <key (space v) pressed?>>\n        end\n    end\nend\n\nwhen I receive [die v]\nset [death x v] to (x position)\nset [death y v] to (y position)\nReset Level\nstop [this script v]\n\nwhen I receive [jump boost v]\nchange [equipped? v] by (1)\nchange [jump boost on/off v] by (1)\n\nwhen I receive [play game v]\nforever\n    if <key (s v) pressed?> then\n        broadcast (Skip v)\n    end\nend\n\nwhen I receive [skip v]\nif <(allowed to skip) = [1]> then\n    change [level v] by (1)\n    set [level deaths v] to [0]\n    Reset Level\n    broadcast (Next v)\n    wait until <not <key (s v) pressed?>>\nend\n\n@Green Ninja\n\ndefine Reset Level\ngo to x: (-180) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nset [turn v] to [0]\npoint in direction (90)\nshow\n\nwhen I receive [play game v]\nset [equipped? v] to [0]\nReset Level\nforever\n    if <(equipped?) > [1]> then\n        set [equipped? v] to [0]\n    end\n    if <(speed boost on/off) > [1]> then\n        set [speed boost on/off v] to [0]\n    end\n    if <(which ninja?) = [2]> then\n        show\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            if <(equipped?) = [1]> then\n                change [x v] by (1.3)\n                change [turn v] by (1.3)\n            else\n                change [x v] by (.9)\n                change [turn v] by (.9)\n            end\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            if <(equipped?) = [1]> then\n                change [x v] by (-1.3)\n                change [turn v] by (-1.3)\n            else\n                change [x v] by (-.9)\n                change [turn v] by (-.9)\n            end\n        end\n        set [x v] to ((x) * (.9))\n        change x by (x)\n        set [turn v] to ((turn) * (.9))\n        turn right (turn) degrees\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change [x v] by (((x) * (-1)) - (turn))\n                                change x by ((turn) * (-1))\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [y v] by (-0.8)\n        change y by (y)\n        if <touching (level v)?> then\n            change y by ((y) * (-1))\n            set [y 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 v] to [12]\n            end\n        end\n        change y by (1)\n        if <<<touching (spikes v)?> or <<touching (lava v)?> or <touching (water v)?>>> or <(y position) < [-188]>> then\n            change [level deaths v] by (1)\n            broadcast (Die v)\n        end\n    else\n        hide\n        point in direction (90)\n        set [x v] to [0]\n        set [y v] to [0]\n        set [turn v] to [0]\n        set [equipped? v] to [0]\n        set [speed boost on/off v] to [0]\n        if <(which ninja?) = [1]> then\n            go to x: ([x position v] of [red ninja v]) y: ([y position v] of [red ninja v])\n        else\n            if <(shrink boost on/off) = [0]> then\n                go to x: ([x position v] of [blue ninja v]) y: ([y position v] of [blue ninja v])\n            else\n                go to x: ([x position v] of [blue ninja v]) y: (([y position v] of [blue ninja v]) + (20))\n            end\n        end\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <(x position) > [253]> then\n        go to x: (-255) y: (y position)\n        change [level v] by (1)\n        set [level deaths v] to [0]\n        broadcast (Next v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nforever\n    if <(which ninja?) = [2]> then\n        if <key (space v) pressed?> then\n            broadcast (Speed Boost v)\n            wait until <not <key (space v) pressed?>>\n        end\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <touching (long grass v)?> then\n        change [y v] by (-0.3)\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n            change [y v] by (2)\n        end\n        set [y v] to ((y) * (.9))\n    end\nend\n\nwhen I receive [die v]\nset [death x v] to (x position)\nset [death y v] to (y position)\nReset Level\nstop [this script v]\n\nwhen I receive [speed boost v]\nchange [equipped? v] by (1)\nchange [speed boost on/off v] by (1)\n\nwhen I receive [skip v]\nif <(allowed to skip) = [1]> then\n    Reset Level\nend\n\n@Blue Ninja\n\ndefine Reset Level\ngo to x: (-180) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nset [turn v] to [0]\npoint in direction (90)\nshow\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nset size to (80) %\nset [equipped? v] to [0]\nReset Level\nforever\n    if <(equipped?) > [1]> then\n        change y by (10)\n        set size to (80) %\n        set [equipped? v] to [0]\n    end\n    if <(shrink boost on/off) > [1]> then\n        set [shrink boost on/off v] to [0]\n    end\n    if <(which ninja?) = [3]> then\n        show\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            if <(shrink boost on/off) = [0]> then\n                change [x v] by (.9)\n                change [turn v] by (.9)\n            else\n                change [x v] by (.7)\n                change [turn v] by (.7)\n            end\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            if <(shrink boost on/off) = [0]> then\n                change [x v] by (-.9)\n                change [turn v] by (-.9)\n            else\n                change [x v] by (-.7)\n                change [turn v] by (-.7)\n            end\n        end\n        set [x v] to ((x) * (.9))\n        change x by (x)\n        set [turn v] to ((turn) * (.9))\n        turn right (turn) degrees\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change [x v] by (((x) * (-1)) - (turn))\n                                change x by ((turn) * (-1))\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [y v] by (-0.8)\n        change y by (y)\n        if <touching (level v)?> then\n            change y by ((y) * (-1))\n            set [y 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 v] to [12]\n            end\n        end\n        change y by (1)\n        if <(shrink boost on/off) = [0]> then\n            if <<<touching (spikes v)?> or <<touching (lava v)?> or <touching (long grass v)?>>> or <(y position) < [-188]>> then\n                change [level deaths v] by (1)\n                broadcast (Die v)\n            end\n        else\n            if <<<touching (spikes v)?> or <<touching (lava v)?> or <touching (long grass v)?>>> or <(y position) < [-177]>> then\n                change [level deaths v] by (1)\n                broadcast (Die v)\n            end\n        end\n    else\n        hide\n        set size to (80) %\n        point in direction (90)\n        set [x v] to [0]\n        set [y v] to [0]\n        set [turn v] to [0]\n        set [equipped? v] to [0]\n        set [shrink boost on/off v] to [0]\n        if <(which ninja?) = [1]> then\n            go to x: ([x position v] of [red ninja v]) y: ([y position v] of [red ninja v])\n        else\n            go to x: ([x position v] of [green ninja v]) y: ([y position v] of [green ninja v])\n        end\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <(which ninja?) = [3]> then\n        if <key (space v) pressed?> then\n            broadcast (Shrink v)\n            wait until <not <key (space v) pressed?>>\n        end\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <(shrink boost on/off) = [0]> then\n        if <(x position) > [253]> then\n            go to x: (-255) y: (y position)\n            change [level v] by (1)\n            set [level deaths v] to [0]\n            broadcast (Next v)\n        end\n    else\n        if <(x position) > [236]> then\n            go to x: (-238) y: (y position)\n            change [level v] by (1)\n            set [level deaths v] to [0]\n            broadcast (Next v)\n        end\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <touching (water v)?> then\n        change [y v] by (-0.3)\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>> then\n            change [y v] by (2)\n        end\n        set [y v] to ((y) * (.9))\n    end\nend\n\nwhen I receive [die v]\nset [death x v] to (x position)\nset [death y v] to (y position)\nReset Level\nstop [this script v]\n\nwhen I receive [play game v]\nforever\n    if <(shrink boost on/off) = [0]> then\n        set size to (80) %\n    else\n        set size to (35) %\n    end\nend\n\nwhen I receive [shrink v]\nchange [equipped? v] by (1)\nchange [shrink boost on/off v] by (1)\n\nwhen I receive [skip v]\nif <(allowed to skip) = [1]> then\n    Reset Level\nend\n\n@Level\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\ngo [backward v] (5) layers\nforever\n    switch costume to (level)\nend\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\ngo to [back v] layer\nforever\n    switch costume to (level)\nend\n\n@Words\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    switch costume to (level)\nend\n\n@Skip\n\nwhen I receive [next v]\nhide\ngo to [front v] layer\nset [level deaths v] to [0]\nset [allowed to skip v] to [0]\nforever\n    if <not <(level) = [26]>> then\n        if <(level deaths) > [4]> then\n            show\n            set [allowed to skip v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@Particles\n\nwhen flag clicked\nhide\nset [is clone? v] to []\n\nwhen I receive [die v]\nstart sound [Punch Sound Effect v]\nif <not <(is clone?) = [1]>> then\n    repeat (2)\n        Particles\n    end\nend\n\nwhen I start as a clone\nif <(which ninja?) = [1]> then\n    switch costume to (pick random (1) to (3))\nelse\n    if <(which ninja?) = [2]> then\n        switch costume to (pick random (4) to (6))\n    else\n        switch costume to (pick random (7) to (9))\n    end\nend\nset [ghost v] effect to (0)\nset [color v] effect to (pick random (-5) to (5))\nset [brightness v] effect to (pick random (-20) to (0))\nset [is clone? v] to [1]\ngo to x: (death x) y: (death y)\nshow\nset [x v] to (pick random (-10) to (10))\nset [y v] to (pick random (5) to (30))\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    change [y v] by (-2)\n    set [x v] to ((x) * (0.9))\n    set [y v] to ((y) * (0.9))\n    change x by (x)\n    change y by (y)\n    set x to ((x position) + (pick random (shake) to ((shake) - ((shake) * (2)))))\n    set y to ((y position) + (pick random (shake) to ((shake) - ((shake) * (2)))))\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (1)\n                                if <touching (level v)?> then\n                                    change y by (1)\n                                    if <touching (level v)?> then\n                                        change y by (1)\n                                        if <touching (level v)?> then\n                                            change y by (1)\n                                            if <touching (level v)?> then\n                                                change y by (1)\n                                                if <touching (level v)?> then\n                                                    change y by (1)\n                                                else\n                                                    change y by (-1)\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\ndefine Particles\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\n@Slime Particles\n\nwhen flag clicked\nhide\nset [is clone? v] to []\n\nwhen I receive [slime die v]\nstart sound [Punch Sound Effect v]\nif <not <(is clone?) = [1]>> then\n    repeat (2)\n        Particles\n    end\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (2))\nset [ghost v] effect to (0)\nset [color v] effect to (pick random (-5) to (5))\nset [brightness v] effect to (pick random (-20) to (0))\nset [is clone? v] to [1]\ngo to x: (slime death x) y: (slime death y)\nshow\nset [x v] to (pick random (-10) to (10))\nset [y v] to (pick random (5) to (30))\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    change [y v] by (-2)\n    set [x v] to ((x) * (0.9))\n    set [y v] to ((y) * (0.9))\n    change x by (x)\n    change y by (y)\n    set x to ((x position) + (pick random (shake) to ((shake) - ((shake) * (2)))))\n    set y to ((y position) + (pick random (shake) to ((shake) - ((shake) * (2)))))\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (1)\n                            if <touching (level v)?> then\n                                change y by (1)\n                                if <touching (level v)?> then\n                                    change y by (1)\n                                    if <touching (level v)?> then\n                                        change y by (1)\n                                        if <touching (level v)?> then\n                                            change y by (1)\n                                            if <touching (level v)?> then\n                                                change y by (1)\n                                                if <touching (level v)?> then\n                                                    change y by (1)\n                                                else\n                                                    change y by (-1)\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\ndefine Particles\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\n@Change Explosion\n\nwhen flag clicked\nhide\n\nwhen I receive [switch v]\nstart sound [BOOM!!!!! v]\nswitch costume to (exploding a v)\nshow\nset size to (500) %\ngo to x: ([x position v] of [red ninja v]) y: ([y position v] of [red ninja v])\nrepeat (13)\n    next costume\n    wait (0.00000001) seconds\nend\nhide\nstop [this script v]\n\n@Switch Ninja\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nforever\n    if <(which ninja?) > [3]> then\n        set [which ninja? v] to [1]\n    end\nend\n\nwhen I receive [play game v]\nset [switch in progress v] to [0]\nshow\ngo to [front v] layer\ngo to x: (195) y: (-145)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n        if <mouse down?> then\n            if <(switch in progress) = [0]> then\n                set [switch in progress v] to [1]\n                broadcast (Switch v)\n                change [which ninja? v] by (1)\n                wait until <not <mouse down?>>\n                set [switch in progress v] to [0]\n            end\n        end\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <key (z v) pressed?> then\n        if <(switch in progress) = [0]> then\n            set [switch in progress v] to [1]\n            broadcast (Switch v)\n            change [which ninja? v] by (1)\n            wait until <not <key (z v) pressed?>>\n            set [switch in progress v] to [0]\n        end\n    end\nend\n\n@Attack\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\ngo to [front v] layer\ngo to x: (110) y: (-140)\nforever\n    if <(sword) = [1]> then\n        show\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (10)\n            if <mouse down?> then\n                if <(attack in progress) = [0]> then\n                    broadcast (Attack v)\n                    wait until <not <mouse down?>>\n                end\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    else\n        hide\n    end\nend\n\n@Jump Boost On/Off\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ngo to [front v] layer\ngo [backward v] (3) layers\ngo to x: (-170) y: (-155)\nset [jump boost on/off v] to [0]\nforever\n    if <(which ninja?) = [1]> then\n        show\n        switch costume to (jump boost on/off)\n    else\n        hide\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <(which ninja?) = [1]> then\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (10)\n            if <mouse down?> then\n                broadcast (Jump Boost v)\n                wait until <not <mouse down?>>\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\n@Speed Boost On/Off\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ngo to [front v] layer\ngo [backward v] (2) layers\ngo to x: (-170) y: (-155)\nset [speed boost on/off v] to [0]\nforever\n    if <(which ninja?) = [2]> then\n        show\n        switch costume to (speed boost on/off)\n    else\n        hide\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <(which ninja?) = [2]> then\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (10)\n            if <mouse down?> then\n                broadcast (Speed Boost v)\n                wait until <not <mouse down?>>\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\n@Shrink Boost On/Off\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ngo to [front v] layer\ngo to x: (-170) y: (-155)\nset [shrink boost on/off v] to [0]\nforever\n    if <(which ninja?) = [3]> then\n        show\n        switch costume to (shrink boost on/off)\n    else\n        hide\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <(which ninja?) = [3]> then\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (10)\n            if <mouse down?> then\n                broadcast (Shrink v)\n                wait until <not <mouse down?>>\n            end\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\n@Sword\n\nwhen flag clicked\nset [attack in progress v] to [0]\nset [direction of sword v] to [right]\nset [sword v] to [0]\npoint in direction (90)\nset size to (88) %\nhide\n\nwhen I receive [play game v]\nhide\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nwait until <(level) > [14]>\nshow\nforever\n    repeat (10)\n        change y by (.5)\n    end\n    repeat (10)\n        change y by (-.5)\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <<touching (red ninja v)?> or <<touching (green ninja v)?> or <touching (blue ninja v)?>>> then\n        broadcast (Sword v)\n    end\nend\n\nwhen I receive [sword v]\nshow\nset [sword v] to [1]\nstop [other scripts in sprite v]\nforever\n    if <(which ninja?) = [1]> then\n        go to (red ninja v)\n    else\n        if <(which ninja?) = [2]> then\n            go to (green ninja v)\n        else\n            go to (blue ninja v)\n        end\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<<mouse down?> and <(mouse x) > (x position)>> and <(brightness on?) = [0]>>> then\n        if <(attack in progress) = [0]> then\n            switch costume to (1 v)\n            set [direction of sword v] to [right]\n        else\n            set [direction of sword v] to [right]\n        end\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<<mouse down?> and <(mouse x) < (x position)>> and <(brightness on?) = [0]>>> then\n        if <(attack in progress) = [0]> then\n            switch costume to (9 v)\n            set [direction of sword v] to [left]\n        else\n            set [direction of sword v] to [left]\n        end\n    end\n    if <(shrink boost on/off) = [1]> then\n        set size to (40) %\n    else\n        set size to (80) %\n    end\nend\n\nwhen [t v] key pressed\nif <(attack in progress) = [0]> then\n    broadcast (Attack v)\nend\n\nwhen I receive [play game v]\nforever\n    if <(level) > [15]> then\n        broadcast (Sword v)\n    end\nend\n\nwhen I receive [attack v]\nif <(sword) = [1]> then\n    if <(attack in progress) = [0]> then\n        set [attack in progress v] to [1]\n        if <(attack in progress) = [1]> then\n            repeat (7)\n                next costume\n            end\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n        end\n        if <(direction of sword) = [right]> then\n            switch costume to (1 v)\n        else\n            switch costume to (9 v)\n        end\n        set [attack in progress v] to [0]\n        set [ghost v] effect to (0)\n        wait until <not <key (t v) pressed?>>\n    end\nend\n\n@Enemy\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I start as a clone\nshow\nset [x v] to [0]\nset [y v] to [0]\nset rotation style [left-right v]\nrepeat until <<touching (sword v)?> or <(y position) < [-184]>>\n    change [y v] by (-1)\n    if <([x position v] of [red ninja v]) < (x position)> then\n        point in direction (90)\n        change [x v] by (-.6)\n    else\n        change [x v] by (.6)\n        point in direction (-90)\n    end\n    set [x v] to ((x) * (.9))\n    change x by (x)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (-4)\n                        change x by ((x) * (-1))\n                        if <([y position v] of [red ninja v]) > ((y position) + (5))> then\n                            set [y v] to [8]\n                            if <([abs v] of (x) ) = (x)> then\n                                set [x v] to [-5]\n                            else\n                                set [x v] to [5]\n                            end\n                        else\n                            set [x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching (level v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<([y position v] of [red ninja v]) > ((y position) + (5))> and <touching (level v)?>> then\n        set [y v] to [12]\n    end\n    change y by (1)\n    if <<touching (red ninja v)?> or <<touching (green ninja v)?> or <touching (blue ninja v)?>>> then\n        change [level deaths v] by (1)\n        broadcast (Die v)\n    end\nend\nset [slime death x v] to (x position)\nset [slime death y v] to (y position)\nbroadcast (Slime Die v)\ndelete this clone\n\ndefine Clone at (x) (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I receive [next v]\nbroadcast (Delete Clones v) and wait\nif <(level) = [16]> then\n    Clone at [135] [0]\nelse\n    if <(level) = [17]> then\n        Clone at [60] [-30]\n    else\n        if <(level) = [19]> then\n            Clone at [175] [110]\n        else\n            if <(level) = [21]> then\n                Clone at [60] [60]\n            else\n                if <(level) = [22]> then\n                    Clone at [15] [35]\n                else\n                    if <(level) = [23]> then\n                        Clone at [0] [60]\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [die v]\nbroadcast (Delete Clones v) and wait\nif <(level) = [16]> then\n    Clone at [135] [0]\nelse\n    if <(level) = [17]> then\n        Clone at [60] [-30]\n    else\n        if <(level) = [19]> then\n            Clone at [175] [110]\n        else\n            if <(level) = [21]> then\n                Clone at [60] [60]\n            else\n                if <(level) = [22]> then\n                    Clone at [15] [35]\n                else\n                    if <(level) = [23]> then\n                        Clone at [0] [60]\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Lava\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\nforever\n    go to [back v] layer\n    switch costume to (level)\nend\n\n@Long Grass\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\nforever\n    go to [back v] layer\n    switch costume to (level)\nend\n\n@Water\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\nforever\n    go to [back v] layer\n    switch costume to (level)\nend\n\n@Play Button\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to [back v] layer\ngo [forward v] (1) layers\nshow\ngo to x: (0) y: (-100)\nforever\n    if <touching (mouse-pointer v)?> then\n        point in direction ((90) + (([cos v] of (effect) ) * (7)))\n        set [brightness v] effect to (10)\n        change [effect v] by (11)\n        if <mouse down?> then\n            start sound [Wood Tap v]\n            broadcast (Play Game v)\n            hide\n            stop [this script v]\n        end\n    else\n        point in direction (90)\n        set [brightness v] effect to (0)\n    end\nend\n\nhide\nbroadcast (Play Game v)\n\n@Background\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nshow\ngo to [back v] layer\nforever\n    set size to (100) %\n    set x to ((mouse x) / (30))\n    set y to ((mouse y) / (30))\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nhide\n\n@Falling Items\n\nwhen flag clicked\nrepeat (200)\n    create clone of (_myself_ v)\nend\nbroadcast (End of Falling v)\n\nwhen I start as a clone\nshow\nswitch costume to (pick random (1) to (3))\ngo to x: (pick random (-140) to (140)) y: (184)\nrepeat until <(y position) < [-180]>\n    change y by (-30)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> or <mouse down?>> then\n        broadcast (Start v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nrepeat (1)\n    delete this clone\nend\nstop [other scripts in sprite v]\nstop [this script v]\n\n@Logo\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\ngo to x: (0) y: (30)\nset size to (140) %\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\nwhen I receive [end of falling v]\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (125)\n    set y to ((([cos v] of ((effect) * (2)) ) * (10)) + (25))\n    point in direction ((90) + (([cos v] of (effect) ) * (3)))\n    change [effect v] by (11)\nend\nwait (0.5) seconds\nbroadcast (Start v)\n\n@Screen\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\ngo to [back v] layer\nshow\n\n@Name\n\nwhen I receive [start v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [end of falling v]\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\ngo to x: (0) y: (-100)\nset size to (140) %\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n@TN\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Blank\n\n