The Ninja Squad 2 || A Mobile Friendly Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (intro v)\n\nwhen I receive [start v]\nswitch backdrop to (sky v)\nbroadcast (Play Game v)\nstop all sounds\nforever\n    set volume to (100) %\n    play sound [Ninja Music v] until done\nend\n\nwhen I receive [play game v]\nwait until <(level) > [18]>\nswitch backdrop to (mount jc_progold v)\n\nwhen I receive [black ninja v]\nswitch backdrop to (mount jc_progold v)\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 [level deaths v] to [0]\nset [equipped? 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 [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 [die v]\nif <(which ninja?) = [1]> then\n    set [death x v] to (x position)\n    set [death y v] to (y position)\n    Reset Level\n    stop [this script v]\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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 [speed boost v]\nchange [equipped? v] by (1)\nchange [speed boost on/off v] by (1)\n\nwhen I receive [die v]\nif <(which ninja?) = [2]> then\n    set [death x v] to (x position)\n    set [death y v] to (y position)\n    Reset Level\n    stop [this script v]\nend\n\nwhen I receive [skip v]\nif <(allowed to skip) = [1]> then\n    Reset Level\nend\n\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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]\nif <(which ninja?) = [3]> then\n    set [death x v] to (x position)\n    set [death y v] to (y position)\n    Reset Level\n    stop [this script v]\nend\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\n@Black Ninja\n\nwhen I receive [black ninja v]\nforever\n    if <<<touching (lava v)?> or <touching (long grass v)?>> or <<touching (water v)?> or <touching (darkness 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\nhide\n\nwhen I receive [black ninja v]\nset [black level v] to [1]\nbroadcast (Next v)\nReset Level\nhide\nforever\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 (black level v)?> then\n        change y by (1)\n        if <touching (black level v)?> then\n            change y by (1)\n            if <touching (black level v)?> then\n                change y by (1)\n                if <touching (black level v)?> then\n                    change y by (1)\n                    if <touching (black level v)?> then\n                        change y by (1)\n                        if <touching (black 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 (black 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 (black 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 (black spikes v)?> or <(y position) < [-188]>> or <touching (light v)?>> then\n        change [level deaths v] by (1)\n        broadcast (Black Die v)\n    end\nend\n\nwhen I receive [black ninja v]\nforever\n    if <(x position) > [253]> then\n        go to x: (-255) y: (y position)\n        change [black level v] by (1)\n        set [level deaths v] to [0]\n        broadcast (Next v)\n    end\nend\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 [black die v]\nset [black death x v] to (x position)\nset [black death y v] to (y position)\nReset Level\nstop [this script v]\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\n@Black Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [black ninja v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\ngo [backward v] (5) layers\nset [black level v] to [1]\nforever\n    switch costume to (black level)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Black Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [black ninja v]\nshow\ngo to [back v] layer\nforever\n    switch costume to (black level)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Black Words\n\nwhen flag clicked\nhide\n\nwhen I receive [black ninja v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    switch costume to (black level)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@End Portal\n\nwhen flag clicked\nhide\n\nwhen I receive [black ninja v]\nwait until <(black level) = [10]>\nshow\nrepeat until <touching (black ninja v)?>\n    broadcast (Turn v)\nend\nbroadcast (End v)\n\nwhen I receive [turn v]\nforever\n    repeat (5)\n        turn right (15) degrees\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\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 <<(level) < [21]> and <(black?) = [0]>> 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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\n@Black Particles\n\nwhen flag clicked\nhide\nset [is clone? v] to []\n\nwhen I receive [black 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: (black death x) y: (black 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 (black 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 (black level v)?> then\n        change y by (1)\n        if <touching (black level v)?> then\n            change y by (1)\n            if <touching (black level v)?> then\n                change y by (1)\n                if <touching (black level v)?> then\n                    change y by (1)\n                    if <touching (black level v)?> then\n                        change y by (1)\n                        if <touching (black level v)?> then\n                            change y by (1)\n                            if <touching (black level v)?> then\n                                change y by (1)\n                                if <touching (black level v)?> then\n                                    change y by (1)\n                                    if <touching (black level v)?> then\n                                        change y by (1)\n                                        if <touching (black level v)?> then\n                                            change y by (1)\n                                            if <touching (black level v)?> then\n                                                change y by (1)\n                                                if <touching (black 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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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)?> or <touching (black 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)?> or <touching (black level v)?>> then\n        change y by (1)\n        if <<touching (level v)?> or <touching (black level v)?>> then\n            change y by (1)\n            if <<touching (level v)?> or <touching (black level v)?>> then\n                change y by (1)\n                if <<touching (level v)?> or <touching (black level v)?>> then\n                    change y by (1)\n                    if <<touching (level v)?> or <touching (black level v)?>> then\n                        change y by (1)\n                        if <<touching (level v)?> or <touching (black level v)?>> then\n                            change y by (1)\n                            if <<touching (level v)?> or <touching (black level v)?>> then\n                                change y by (1)\n                                if <<touching (level v)?> or <touching (black level v)?>> then\n                                    change y by (1)\n                                    if <<touching (level v)?> or <touching (black level v)?>> then\n                                        change y by (1)\n                                        if <<touching (level v)?> or <touching (black level v)?>> then\n                                            change y by (1)\n                                            if <<touching (level v)?> or <touching (black level v)?>> then\n                                                change y by (1)\n                                                if <<touching (level v)?> or <touching (black 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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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 <(cutscene?) = [0]> 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\n    end\nend\n\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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 <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\nend\n\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\n@Throw\n\nwhen flag clicked\nhide\n\nwhen I receive [black ninja v]\nshow\ngo to [front v] layer\ngo to x: (195) y: (-140)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n        if <mouse down?> then\n            if <(throw in progress) = [0]> then\n                broadcast (Throw v)\n                wait until <not <mouse down?>>\n            end\n        end\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\n@Sword\n\nwhen flag clicked\nset [direction of sword v] to [right]\npoint in direction (90)\nset size to (88) %\nhide\n\nwhen I receive [play game v]\nshow\nswitch costume to (1 v)\nforever\n    broadcast (Sword v)\nend\n\nwhen I receive [sword 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\nif <(black ninja on?) = [0]> then\nelse\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            if <(which ninja?) = [3]> then\n                go to (blue ninja v)\n            else\n                go to (black ninja v)\n            end\n        end\n    end\nend\n\nwhen [t v] key pressed\nif <(cutscene?) = [0]> then\n    if <(attack in progress) = [0]> then\n        broadcast (Attack v) and wait\n    end\nend\n\nwhen I receive [attack v]\nset [attack in progress v] to [1]\nif <(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\nend\nif <(direction of sword) = [right]> then\n    switch costume to (1 v)\nelse\n    switch costume to (9 v)\nend\nset [attack in progress v] to [0]\nset [ghost v] effect to (0)\nwait until <not <key (t v) pressed?>>\n\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\n@Ninja Star\n\nwhen I receive [black ninja v]\nshow\nset [black? v] to [1]\nforever\n    broadcast (Star v)\nend\n\nwhen flag clicked\nset [black? v] to [0]\nset [throw in progress v] to [0]\nhide\n\nwhen I receive [star v]\nforever\n    if <(throw in progress) = [0]> then\n        go to x: (([x position v] of [black ninja v]) + (5)) y: (([y position v] of [black ninja v]) - (5))\n    end\nend\n\nwhen [f v] key pressed\nif <(throw in progress) = [0]> then\n    if <(black?) = [1]> then\n        broadcast (Throw v)\n    end\nend\n\nwhen I receive [throw v]\nset [throw in progress v] to [1]\nrepeat until <<touching (_edge_ v)?> or <touching (black level v)?>>\n    change x by (10)\n    turn right (15) degrees\nend\nset [throw in progress v] to [0]\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Collect Star\n\nwhen I receive [play game v]\nhide\ngo to x: (-15) y: (0)\nwait until <(level) > [20]>\nshow\nbroadcast (Move v)\nwait until <<touching (red ninja v)?> or <<touching (green ninja v)?> or <touching (blue ninja v)?>>>\nstop [other scripts in sprite v]\nhide\nbroadcast (Cutscene v)\n\nwhen I receive [move v]\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 [stop v]\nstop [other scripts in sprite v]\nhide\n\n@Enemy\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) = [3]> then\n    Clone at [55] [75]\nelse\n    if <(level) = [10]> then\n        Clone at [0] [60]\n    else\n        if <(level) = [16]> then\n            Clone at [60] [0]\n        end\n    end\nend\n\nwhen I receive [die v]\nbroadcast (Delete Clones v) and wait\nif <(level) = [3]> then\n    Clone at [55] [75]\nelse\n    if <(level) = [10]> then\n        Clone at [0] [60]\n    else\n        if <(level) = [16]> then\n            Clone at [60] [0]\n        end\n    end\nend\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        change [x v] by (-.6)\n        point in direction (90)\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\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\n@Black Enemy\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 <(black level) = [2]> then\n    Clone at [0] [40]\nelse\n    if <(black level) = [5]> then\n        Clone at [10] [25]\n        Clone at [70] [25]\n        Clone at [130] [25]\n    else\n        if <(black level) = [7]> then\n            Clone at [15] [-50]\n            Clone at [80] [-50]\n        else\n            if <(black level) = [8]> then\n                Clone at [5] [100]\n            else\n                if <(black level) = [9]> then\n                    Clone at [145] [-45]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [black die v]\nbroadcast (Delete Clones v) and wait\nif <(black level) = [2]> then\n    Clone at [0] [40]\nelse\n    if <(black level) = [5]> then\n        Clone at [10] [25]\n        Clone at [70] [25]\n        Clone at [130] [25]\n    else\n        if <(black level) = [7]> then\n            Clone at [15] [-50]\n            Clone at [80] [-50]\n        else\n            if <(black level) = [8]> then\n                Clone at [5] [100]\n            else\n                if <(black level) = [9]> then\n                    Clone at [145] [-45]\n                end\n            end\n        end\n    end\nend\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 (ninja star v)?> or <(y position) < [-184]>>\n    change [y v] by (-1)\n    if <([x position v] of [black ninja v]) < (x position)> then\n        change [x v] by (-.6)\n        point in direction (90)\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 (black level v)?> then\n        change y by (1)\n        if <touching (black level v)?> then\n            change y by (1)\n            if <touching (black level v)?> then\n                change y by (1)\n                if <touching (black level v)?> then\n                    change y by (1)\n                    if <touching (black level v)?> then\n                        change y by (-4)\n                        change x by ((x) * (-1))\n                        if <([x position v] of [black 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 (black level v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<([x position v] of [black ninja v]) > ((y position) + (5))> and <touching (black level v)?>> then\n        set [y v] to [12]\n    end\n    change y by (1)\n    if <touching (black ninja v)?> then\n        change [level deaths v] by (1)\n        broadcast (Black 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\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [black ninja v]\nshow\nforever\n    go to [back v] layer\n    switch costume to ((black level) + (21))\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [black ninja v]\nshow\nforever\n    go to [back v] layer\n    switch costume to ((black level) + (21))\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [black ninja v]\nshow\nforever\n    go to [back v] layer\n    switch costume to ((black level) + (21))\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nhide\n\n@Darkness\n\nwhen flag clicked\nhide\n\nwhen I receive [black ninja v]\nshow\nforever\n    go to [back v] layer\n    switch costume to (black level)\nend\n\n@Light\n\nwhen flag clicked\nhide\n\nwhen I receive [black ninja v]\nshow\nforever\n    go to [back v] layer\n    switch costume to (black level)\nend\n\n@Cutscene\n\nwhen I receive [cutscene v]\nset [cutscene? v] to [1]\nswitch backdrop to (mount jc_progold v)\nshow\nset [brightness v] effect to (-100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nbroadcast (Stop v)\nwait (0.5) seconds\nnext costume\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nwait until <mouse down?>\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nnext costume\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nwait until <mouse down?>\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nnext costume\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nwait until <mouse down?>\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nnext costume\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nwait until <mouse down?>\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nnext costume\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nwait until <mouse down?>\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nnext costume\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nwait until <mouse down?>\nrepeat (20)\n    change [brightness v] effect by (-5)\nend\nwait (0.5) seconds\nbroadcast (Black Ninja v)\nhide\n\nwhen flag clicked\nhide\nset [cutscene? v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (black v)\nset [ghost v] effect to (100)\n\nwhen I receive [play game v]\nrepeat (10)\n    go to [front v] layer\nend\n\n@End\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [end v]\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\n@Intro\n\nwhen I receive [kill clones!!!!! v]\nrepeat (1)\n    delete this clone\nend\n\ndefine Colour: (colour) Brightness: (brightness) Transparency: (transparency)\nset [colour v] to (colour)\nset [brightness v] to (brightness)\nset [transparency v] to (transparency)\nset [color v] effect to (Colour)\nset [brightness v] effect to (Brightness)\nset [ghost v] effect to (Transparency)\n\nwhen flag clicked\nset [clone v] to []\ngo to x: (0) y: (0)\nhide\nwait (1) seconds\nrepeat (3)\n    Clone Sprite ID [Circles] # [1]\n    wait (0.1) seconds\nend\nwait (0.1) seconds\nClone Sprite ID [Particles] # [15]\nwait (0.5) seconds\nClone Sprite ID [Logo] # [1]\nwait (2) seconds\nClone Sprite ID [Name] # [15]\nwait (0.5) seconds\nClone Sprite ID [Particles] # [15]\nwait (0.5) seconds\nClone Sprite ID [Particles] # [15]\nwait (0.7) seconds\nbroadcast (2nd Phase v)\n\ndefine Clone Sprite ID (id) # (#)\nset [clone v] to (id)\nrepeat (#)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(Clone) = [Circles]> then\n    x: [0] y: [0] sz: [20] dir: [90] spd: [1]\n    Colour: [0] Brightness: [0] Transparency: [0]\n    show\n    repeat until <(round (size)) = [1000]>\n        switch costume to (dot v)\n        x: [0] y: [0] sz: [1000] dir: [90] spd: [10]\n        switch costume to (circles v)\n    end\n    go [backward v] (234567) layers\nend\n\nwhen I start as a clone\nif <(Clone) = [Particles]> then\n    x: [0] y: [0] sz: [100] dir: [90] spd: [1]\n    Colour: [0] Brightness: [0] Transparency: [0]\n    show\n    go to [front v] layer\n    switch costume to (particle v)\n    show\n    set [x v] to (pick random (-15) to (15))\n    set [y v] to (pick random (20) to (30))\n    repeat 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    end\n    delete this clone\nend\n\ndefine x: (x) y: (y) sz: (sz) dir: (dir) spd: (spd)\nchange x by (((round (x)) - (round (x position))) / (spd))\nchange y by (((round (y)) - (round (y position))) / (spd))\nchange size by (((round (sz)) - (round (size))) / (spd))\nturn right (((round (dir)) - (round (direction))) / (spd)) degrees\n\nwhen I start as a clone\nif <(Clone) = [Logo]> then\n    set [logo y v] to [0]\n    x: [0] y: [0] sz: [2] dir: [90] spd: [1]\n    Colour: [0] Brightness: [0] Transparency: [0]\n    show\n    go to [front v] layer\n    switch costume to (logo v)\n    Grow to size [100]\n    wait (1.5) seconds\n    repeat until <touching (_edge_ v)?>\n        change [logo y v] by (-2)\n        set [logo y v] to ((logo y) * (0.9))\n        change y by (logo y)\n    end\n    go to x: (0) y: (0)\n    x: [0] y: [0] sz: [2] dir: [90] spd: [1]\n    Grow to size [100]\n    wait (1) seconds\n    repeat until <touching (_edge_ v)?>\n        change [logo y v] by (-2)\n        set [logo y v] to ((logo y) * (0.9))\n        change y by (logo y)\n    end\n    go to x: (0) y: (0)\n    x: [0] y: [0] sz: [2] dir: [90] spd: [1]\n    Grow to size [100]\n    wait (1) seconds\nend\n\ndefine Grow to size (size)\nset [bounce v] to [0]\nrepeat until <([abs v] of (((0.85) * (Bounce)) + (((size) - (size)) / (8))) ) < [0.05]>\n    set [bounce v] to (((0.85) * (Bounce)) + (((size) - (size)) / (8)))\n    change size by (Bounce)\nend\n\nwhen I start as a clone\nif <(Clone) = [Logo]> then\n    x: [0] y: [0] sz: [2] dir: [90] spd: [1]\n    Colour: [0] Brightness: [0] Transparency: [0]\n    repeat (20)\n        turn right (18) degrees\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Name]> then\n    x: [0] y: [-100] sz: [100] dir: [90] spd: [1]\n    Colour: [0] Brightness: [0] Transparency: [100]\n    show\n    go to [front v] layer\n    switch costume to (name v)\n    repeat (50)\n        change [ghost v] effect by (-2)\n    end\nend\n\ndefine Shoot line (degree) (start)\nset [rotation v] to (start)\nrepeat ((360) / (degree))\n    Clone Sprite ID [Shoot line] # [1]\n    change [rotation v] by (degree)\nend\n\nwhen I start as a clone\nif <(Clone) = [Shoot line]> then\n    set [val v] to [20]\n    switch costume to (name v)\n    go to [front v] layer\n    go [backward v] (2) layers\n    show\n    Colour: (Colour) Brightness: (Brightness) Transparency: (pick random (0) to (10))\n    x: (x) y: (y) sz: [0] dir: (Rotation) spd: [1]\n    repeat until <(val) < [2]>\n        set [val v] to ((val) * (0.9))\n        switch costume to (((val) * (-0.4)) + (-3))\n        Size [100] spd [5]\n        move (val) steps\n    end\n    repeat (10)\n        set [val v] to ((val) * (0.9))\n        switch costume to (((val) * (-0.4)) + (-3))\n        Size [100] spd [1]\n        move ((val) * (0.2)) steps\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I receive [2nd phase v]\nClone Sprite ID [Background] # [1]\nforever\n    set [colour v] to (pick random (70) to (100))\n    set [brightness v] to [-20]\n    Shoot line [90] (Rotation)\n    change [rotation v] by (25)\n    wait (0.1) seconds\n    set [colour v] to (pick random (20) to (50))\n    set [brightness v] to [10]\n    Shoot line [90] (Rotation)\n    change [rotation v] by (25)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nset volume to (100) %\nplay sound [Intro v] until done\nbroadcast (KILL CLONES!!!!! v)\nstop [other scripts in sprite v]\nbroadcast (Start v)\n\nwhen flag clicked\nwait (9.5) seconds\nrepeat (50)\n    change volume by (-2)\nend\n\nwhen I start as a clone\nif <(Clone) = [Background]> then\n    x: [0] y: [0] sz: [30] dir: [40] spd: [1]\n    Colour: [0] Brightness: [0] Transparency: [0]\n    point in direction (90)\n    set size to (50) %\n    show\n    go to [front v] layer\n    switch costume to (background v)\n    Grow to size [80]\n    wait (0.5) seconds\n    glide (0.2) secs to x: (0) y: (323)\n    hide\n    wait (0.5) seconds\nend\n\ndefine Size (size) spd (spd)\nchange size by (((round (sz)) - (round (size))) / (spd))\n\nwhen flag clicked\nforever\n    if <mouse down?> then\n        broadcast (Start v)\n    end\nend\n\nwhen I receive [start v]\nrepeat (1)\n    delete this clone\nend\nstop [other scripts in sprite v]\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
ㅤㅤ★★★★★ The Ninja Squad 2 ★★★★★\nㅤㅤㅤㅤㅤㅤㅤby @JC_ProGold\n\nSkip the intro by clicking on the mouse.\n\nThe three ninjas decided to go on an adventure. However, as they went on, they found dead monster bodies and went to investigate. It lead them to a Mount JC_ProGold where they discovered something very powerful.\n\nAbilities:\nRed: Can jump high and is resistant to lava\nGreen: Can move fast and is resistant to long grass\nBlue: Can shrink and is resistant to water\n\nControls:\n\n~ RED, GREEN AND BLUE NINJAS ~\n➜Reset Level - Press 'r'\n➜Skip Level if it is allowed - Press 's'\n\n➜Move and jump - Arrow keys, WASD or use the mouse pointer\n➜Switch ninja - Click the 'switch button' or press 'z'\n\n# These abilities are not always on, you have to turn them on\n➜Turn on or off special ability - Space bar or click the icon on the bottom left \n\n➜Use sword - Press 't' or click the 'attack button' \n\n~ BLACK NINJA ~\n#You are resistant to lava, grass, water and darkness.\n#Light and spikes kill you (and enemies)\n\n➜Reset Level - Press 'r'\n\n➜Move and jump - Arrow keys, WASD or use the mouse pointer\n\n➜Use Ninja Star - Press 'f' or click the throw button