The Ninja Squad 4 || A Mobile Friendly Platformer #games #all

Instructions: ㅤㅤ★★★★★ The Ninja Squad 4 ★★★★★\nㅤㅤㅤㅤㅤㅤㅤby @JC_ProGold\n\nSkip the intro by clicking on the mouse or tapping the space bar.\n\nAt last, after over 1 month of work, this game is out. I know I haven't made a project for a whole month but that is because of school. Make sure to ❤️ and ⭐ if you enjoy this.\n\n★★★ STORY ★★★\nRed, Green, Blue and Black are going on an adventure to find the long lost Castle of Werwell. There is a path which leads the way but it can only be seen with the light from the Light Ninja. Team up with him so that you can the long lost Castle of Werwell...\n\n★★★ CONTROLS ★★★\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➜Switch between weapons (only black) - Space bar or click the icon on the bottom left \n\n➜Use sword - Press 't' or click the 'attack button' \n➜Use star (only black) - Press 'f' or click the 'throw button'\n\n~ LIGHT NINJA ~\n# You are resistant to light\n# Spikes, lava, grass, water and darkness kill you\n\n➜Reset Level - Press 'r'\n\n➜Move and jump - Arrow keys, WASD or use the mouse pointer\n\n➜Use Sword - Press 't' or click the attack button

@Stage\n\nwhen I receive [start v]\nswitch backdrop to (sky v)\nstop all sounds\nforever\n    set volume to (100) %\n    play sound [Ninja Music v] until done\nend\n\nwhen I receive [outro v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nswitch backdrop to (intro 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)?> or <touching (light 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 <touching (darkness 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 <(which ninja?) = [3]> then\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            else\n                go to x: ([x position v] of [black ninja v]) y: ([y position v] of [black ninja v])\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 <(light on?) = [0]> then\n    if <(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?>>\n    end\nend\n\nwhen I receive [light ninja transition 2 v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nset [which ninja? v] to [1]\nset [shrink boost on/off v] to [0]\nstop [other scripts in sprite v]\npoint in direction (90)\nshow\ngo to x: (0) y: (-69)\nwait (1) seconds\nbroadcast (Hello there v)\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 <touching (darkness 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 <(which ninja?) = [3]> then\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            else\n                go to x: ([x position v] of [black ninja v]) y: ([y position v] of [black ninja v])\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)?> or <touching (light 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 <(light on?) = [0]> then\n    if <(allowed to skip) = [1]> then\n        Reset Level\n    end\nend\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\npoint in direction (90)\nshow\ngo to x: (-60) y: (-69)\n\nwhen I receive [light ninja transition 2 v]\nwait (0.5) seconds\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 <touching (darkness 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 <touching (darkness 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            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                go to x: ([x position v] of [black ninja v]) y: ([y position v] of [black ninja v])\n            end\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)?> or <touching (light 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 <(light on?) = [0]> then\n    if <(allowed to skip) = [1]> then\n        Reset Level\n    end\nend\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\npoint in direction (90)\nshow\nset size to (80) %\ngo to x: (-120) y: (-69)\n\nwhen I receive [light ninja transition 2 v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\n@Black Ninja\n\nwhen I receive [play game 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 [play game v]\nReset Level\nhide\nforever\n    if <(which ninja?) = [4]> 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                set [y v] to [12]\n            end\n        end\n        change y by (1)\n        if <<<touching (spikes v)?> or <(y position) < [-188]>> or <touching (light v)?>> 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 [black weapon v] to [sword]\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 <(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\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\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 [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 <(which ninja?) = [4]> then\n        if <key (space v) pressed?> then\n            broadcast (Change Black Weapon v)\n            wait until <not <key (space v) pressed?>>\n        end\n    end\nend\n\nwhen I receive [skip v]\nif <(light on?) = [0]> then\n    if <(allowed to skip) = [1]> then\n        Reset Level\n    end\nend\n\nwhen I receive [light ninja transition 2 v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\npoint in direction (90)\nshow\ngo to x: (-180) y: (-69)\nwait (1) seconds\n\n@Light Ninja\n\nwhen flag clicked\ngo to x: (122) y: (7)\npoint in direction (90)\nset [light on? v] to [0]\nset [light level v] to [1]\nhide\n\nwhen I receive [light ninja v]\nbroadcast (Next v)\nset [light on? v] to [1]\nset [light level v] to [1]\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 (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 <(y position) < [-188]>> or <<<touching (lava v)?> or <touching (long grass v)?>> or <<touching (water v)?> or <touching (darkness v)?>>>> then\n        change [level deaths v] by (1)\n        broadcast (Light Die v)\n    end\nend\n\nwhen I receive [light ninja v]\nforever\n    if <(x position) > [253]> then\n        go to x: (-255) y: (y position)\n        change [light 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 [light die v]\nset [light death x v] to (x position)\nset [light death y v] to (y position)\nReset Level\nstop [this script v]\n\nwhen I receive [play game v]\nhide\nwait (0.1) seconds\nwait until <(level) = [21]>\nshow\nwait until <<([x position v] of [red ninja v]) > [-60]> and <([x position v] of [red ninja v]) < [-30]>>\nbroadcast (Light Ninja Transition v)\nset [black weapon v] to [sword]\nstop [this script v]\n\nwhen I receive [light ninja v]\nforever\n    if <touching (light 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 [skip v]\nif <(light on?) = [1]> then\n    if <(allowed to skip) = [1]> then\n        change [light 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?>>\n    end\nend\n\nwhen I receive [light ninja v]\nforever\n    if <key (s v) pressed?> then\n        broadcast (Skip v)\n    end\nend\n\nwhen I receive [light ninja v]\nwait (0.1) seconds\nwait until <(light level) = [11]>\nstop [other scripts in sprite v]\nswitch backdrop to (castle found v)\nbroadcast (EC v)\nstop [this script v]\n\nwhen I receive [ec v]\ngo to x: (-240) y: (-68)\npoint in direction (90)\nrepeat (24)\n    turn right (15) degrees\n    change x by (5)\nend\nwait (0.5) seconds\nbroadcast (We found it... v)\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] (7) layers\nforever\n    switch costume to (level)\nend\n\nwhen I receive [light ninja v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\ngo [backward v] (6) layers\nforever\n    switch costume to ((light level) + (21))\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\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja v]\nshow\ngo to [back v] layer\nforever\n    switch costume to ((light level) + (21))\nend\n\nwhen I receive [ec 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 [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nforever\n    switch costume to ((light level) + (21))\nend\n\nwhen I receive [ec 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) < [1111111111]> and <not <([costume name v] of [level v]) = [Still Developing]>>> 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        if <(which ninja?) = [3]> then\n            switch costume to (pick random (7) to (9))\n        else\n            switch costume to (pick random (10) to (12))\n        end\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@Light Particles\n\nwhen flag clicked\nhide\nset [is clone? v] to []\n\nwhen I receive [light 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 (3))\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: (light death x) y: (light 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@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 (((monster cost) * (2)) - (1)) to ((monster cost) * (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\ngo to [front v] layer\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?) > [4]> 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\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\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    go to [front v] layer\n    go [backward v] (2) layers\n    if <(black weapon) = [sword]> 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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja v]\nshow\ngo to [front v] layer\ngo to x: (195) y: (-140)\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\n    if <(black weapon) = [sword]> 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\nwhen I receive [ec v]\nstop [other scripts in sprite v]\nhide\n\n@Throw\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    go to [front v] layer\n    if <(black weapon) = [star]> then\n        show\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\n    else\n        hide\n    end\nend\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\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\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\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\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\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\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\n@Weapon button\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ngo to [front v] layer\ngo to x: (-170) y: (-155)\nset [black weapon v] to [sword]\nforever\n    if <(which ninja?) = [4]> then\n        show\n        switch costume to (black weapon)\n    else\n        hide\n    end\nend\n\nwhen I receive [play game v]\nforever\n    if <(which ninja?) = [4]> then\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (10)\n            if <mouse down?> then\n                broadcast (Change Black Weapon 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\nwhen I receive [change black weapon v]\nif <(black weapon) = [sword]> then\n    set [black weapon v] to [star]\nelse\n    set [black weapon v] to [sword]\nend\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\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 (80) %\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            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\n    if <not <(black weapon) = [star]>> then\n        show\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\n    else\n        hide\n    end\nend\n\nwhen [t v] key pressed\nif <not <(black weapon) = [star]>> then\n    if <(cutscene?) = [0]> then\n        if <(attack in progress) = [0]> then\n            broadcast (Attack v) and wait\n        end\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 [light ninja transition 2 v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\n\nwhen I receive [light sword v]\nforever\n    go to (light ninja v)\n    show\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\nend\n\nwhen I receive [light ninja v]\nshow\ngo to [front v] layer\nswitch costume to (1 v)\nforever\n    broadcast (Light Sword v)\nend\n\nwhen I receive [ec v]\nstop [other scripts in sprite v]\nhide\n\n@Ninja Star\n\nwhen I receive [play game 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]\ngo to [front v] layer\nif <(black weapon) = [star]> then\n    show\n    forever\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\n    end\nelse\n    hide\nend\n\nwhen [f v] key pressed\nif <(black weapon) = [star]> then\n    if <(throw in progress) = [0]> then\n        if <(black?) = [1]> then\n            broadcast (Throw v)\n        end\n    end\nend\n\nwhen I receive [throw v]\nset [throw in progress v] to [1]\nrepeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n    change x by (10)\n    turn right (15) degrees\nend\nset [throw in progress v] to [0]\n\n@Enemy\n\nwhen flag clicked\nhide\n\nwhen I receive [next v]\nbroadcast (Delete Clones v) and wait\nif <(level) = [11]> then\n    Clone [100] [-20] [1]\nelse\n    if <(level) = [15]> then\n        Clone [80] [100] [1]\n    else\n        if <(level) = [17]> then\n            Clone [85] [80] [2]\n        else\n            if <(level) = [19]> then\n                Clone [0] [20] [1]\n                Clone [90] [85] [2]\n                Clone [150] [85] [3]\n                Clone [210] [85] [4]\n            else\n                if <(level) = [20]> then\n                    Clone [70] [-45] [3]\n                else\n                    if <(light level) = [5]> then\n                        Clone [95] [90] [4]\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) = [11]> then\n    Clone [100] [-20] [1]\nelse\n    if <(level) = [15]> then\n        Clone [80] [100] [1]\n    else\n        if <(level) = [17]> then\n            Clone [85] [80] [2]\n        else\n            if <(level) = [19]> then\n                Clone [0] [20] [1]\n                Clone [90] [85] [2]\n                Clone [150] [85] [3]\n                Clone [210] [85] [4]\n            else\n                if <(level) = [20]> then\n                    Clone [70] [-45] [3]\n                else\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 (sword v)?> or <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 ((monster speed) * (-1))\n        point in direction (90)\n    else\n        change [x v] by (monster speed)\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 [black ninja v]) > ((y position) + (15))> then\n                            set [y v] to (monster WJ height)\n                            if <([abs v] of (x) ) = (x)> then\n                                set [x v] to ((monster WJ speed) * (-1))\n                            else\n                                set [x v] to (monster WJ speed)\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 [black ninja v]) > ((y position) + (15))> and <touching (level v)?>> then\n        set [y v] to (monster jump height)\n    end\n    change y by (1)\n    if <<<touching (red ninja v)?> or <touching (green ninja v)?>> or <<touching (blue ninja v)?> or <touching (black ninja v)?>>> then\n        change [level deaths v] by (1)\n        broadcast (Die v)\n    end\n    if <touching (light ninja v)?> then\n        change [level deaths v] by (1)\n        broadcast (Light Die v)\n    end\nend\nset [slime death x v] to (x position)\nset [slime death y v] to (y position)\nset [monster cost v] to (costume [number v])\nbroadcast (Slime Die v)\ndelete this clone\n\nwhen I receive [delete clones v]\ndelete this clone\n\ndefine Clone (x) (y) (monster)\ngo to x: (x) y: (y)\nif <(monster) = [1]> then\n    switch costume to (1 v)\n    set [monster speed v] to [.6]\n    set [monster jump height v] to [12]\n    set [monster wj speed v] to [5]\n    set [monster wj height v] to [8]\nelse\n    if <(monster) = [2]> then\n        switch costume to (2 v)\n        set [monster speed v] to [.9]\n        set [monster jump height v] to [12]\n        set [monster wj speed v] to [5]\n        set [monster wj height v] to [8]\n    else\n        if <(monster) = [3]> then\n            switch costume to (3 v)\n            set [monster speed v] to [.6]\n            set [monster jump height v] to [15]\n            set [monster wj speed v] to [5]\n            set [monster wj height v] to [10]\n        else\n            switch costume to (4 v)\n            set [monster speed v] to [.6]\n            set [monster jump height v] to [12]\n            set [monster wj speed v] to [8]\n            set [monster wj height v] to [15]\n        end\n    end\nend\ncreate clone of (_myself_ v)\n\nwhen I receive [light die v]\nbroadcast (Delete Clones v) and wait\nif <(light level) = [5]> then\n    Clone [95] [90] [4]\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja v]\nshow\ngo to [back v] layer\nforever\n    switch costume to ((light level) + (21))\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja v]\nshow\ngo to [back v] layer\nforever\n    switch costume to ((light level) + (21))\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\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja v]\nshow\ngo to [back v] layer\nforever\n    switch costume to ((light level) + (21))\nend\n\n@Darkness\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 [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja v]\nshow\ngo to [back v] layer\nforever\n    switch costume to ((light level) + (21))\nend\n\n@Light\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 [light ninja transition v]\nwait (0.5) seconds\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [light ninja v]\nshow\ngo to [back v] layer\nforever\n    switch costume to ((light level) + (21))\nend\n\n@Text\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (2) layers\nshow\nif <(costume [name v]) = [costume1]> then\n    repeat until <(dialog done?) = [1]>\n        if <(dialog done?) = [2]> then\n            delete this clone\n        end\n    end\n    switch costume to (costume2 v)\n    wait until <(dialog done?) = [2]>\n    wait (0.05) seconds\nend\nwait until <(dialog done?) = [2]>\ndelete this clone\n\ndefine print (text) brightness (brightness) colour (colour) pitch (pitch) and wait (wait)\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nset [brightness v] effect to (brightness)\nset [color v] effect to (colour)\nswitch costume to (a v)\ngo to x: (-215) y: (150)\nset [letter v] to [1]\nset [dialog done? v] to [0]\nset [pitch v] effect to (pitch)\nrepeat (length of (text))\n    switch costume to (letter (letter) of (text))\n    go to [front v] layer\n    if <(letter (letter) of (text)) = [~]> then\n        wait (0.2) seconds\n    else\n        if <(letter (letter) of (text)) = [-]> then\n            set x to (-215)\n            change y by (-15)\n        else\n            if <not <(letter (letter) of (text)) = [ ]>> then\n                create clone of (_myself_ v)\n            end\n            change x by (10)\n            if <<(letter (letter) of (text)) = [i]> or <(letter (letter) of (text)) = [t]>> then\n                change x by (-1)\n            end\n        end\n    end\n    change [letter v] by (1)\n    start sound [Speak v]\n    if <<(letter (letter) of (text)) = [i]> or <(letter (letter) of (text)) = [t]>> then\n        change x by (-2)\n    end\nend\nif <(wait) = []> then\n    set [dialog done? v] to [1]\n    wait until <<key (space v) pressed?> or <mouse down?>>\nelse\n    wait (wait) seconds\nend\nwait (0) seconds\nclear graphic effects\nset [dialog done? v] to [2]\nwait (0.05) seconds\n\nwhen I receive [hello there v]\nprint [Hello there.] brightness [-100] colour [] pitch [-20] and wait []\nprint [Are you the light ninja?] brightness [-100] colour [] pitch [-20] and wait []\nprint [Yes I am.] brightness [-100] colour [] pitch [0] and wait []\nprint [Will you help us find the long-lost castle of Werwell?] brightness [-100] colour [] pitch [-20] and wait []\nprint [Only your light can show the path.] brightness [-100] colour [] pitch [-20] and wait []\nprint [Hmm...] brightness [-100] colour [] pitch [0] and wait []\nprint [Okay,~ you are my family after all XD] brightness [-100] colour [] pitch [0] and wait []\nbroadcast (Light Ninja Transition 2 v)\n\nwhen I receive [stop v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [we found it... v]\nprint [We found it...] brightness [-100] colour [] pitch [-20] and wait []\nprint [THE LONG LOST CASTLE OF WERWELL!!!!!] brightness [-100] colour [] pitch [-20] and wait []\nprint [I don't know what this place has in store- for us...] brightness [-100] colour [] pitch [0] and wait []\nprint [But it probably won't be nice.] brightness [-100] colour [] pitch [-20] and wait []\nbroadcast (Fade Away v)\n\n@Transition\n\nwhen I start as a clone\ngo to [front v] layer\nif <(costume [number v]) = [2]> then\n    show\n    set [ghost v] effect to (0)\n    repeat (18)\n        switch costume to (blank v)\n        change size by ((size) / (4))\n        switch costume to (circle v)\n    end\n    change [done? v] by (1)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [light ninja transition v]\nset [done? v] to [0]\nset [clone id v] to [0]\nwait (0) seconds\nset [brightness v] effect to (20)\nhide\nrepeat (3)\n    create clone of (_myself_ v)\n    change [brightness v] effect by (-10)\n    wait (0.05) seconds\nend\nswitch costume to (circle v)\nset [brightness v] effect to (20)\nrepeat (3)\n    create clone of (_myself_ v)\n    change [brightness v] effect by (-10)\n    wait (0.05) seconds\nend\nwait until <(Done?) = [6]>\n\nwhen flag clicked\nswitch costume to (circle v)\n\nwhen I receive [light ninja transition 2 v]\nset [done? v] to [0]\nset [clone id v] to [0]\nwait (0) seconds\nset [brightness v] effect to (20)\nhide\nrepeat (3)\n    create clone of (_myself_ v)\n    change [brightness v] effect by (-10)\n    wait (0.05) seconds\nend\nswitch costume to (circle v)\nset [brightness v] effect to (20)\nrepeat (3)\n    create clone of (_myself_ v)\n    change [brightness v] effect by (-10)\n    wait (0.05) seconds\nend\nwait until <(Done?) = [6]>\nbroadcast (Light Ninja v)\n\n@Fade Away\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nwhen I receive [fade away v]\nshow\ngo to [front v] layer\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (1) seconds\nhide\nbroadcast (Outro v)\n\n@Title\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to x: (-70) y: (120)\nforever\n    point in direction ((([sin v] of ((timer) * (500)) ) * (7)) + (90))\nend\n\nwhen I receive [play game v]\nstop [other scripts in sprite v]\nhide\n\n@Image\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\n\nwhen I receive [play game v]\nstop [other scripts in sprite v]\nhide\n\n@Button\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to [front v] layer\ngo to x: (-120) y: (-40)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (10)\n        if <mouse down?> then\n            hide\n            broadcast (Play Game v)\n            stop [this script v]\n        end\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@Intro\n\nwhen I start as a clone\nif <(Clone) = [Particles]> then\n    go to x: (0) y: (0)\n    show\n    go to [front v] layer\n    switch costume to (particle v)\n    set size to (100) %\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 Clone Sprite ID (id) # (#)\nset [clone v] to (id)\nrepeat (#)\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\nClone Sprite ID [Back] # [1]\nwait (0.7) seconds\nClone Sprite ID [Dot] # [1]\n\nwhen I start as a clone\nif <(Clone) = [Back]> then\n    show\n    go to [back v] layer\n    switch costume to (back v)\n    forever\n        point in direction ((([cos v] of ((timer) * (100)) ) * (15)) + (90))\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Dot]> then\n    go to x: (0) y: (200)\n    show\n    go to [front v] layer\n    switch costume to (dot v)\n    set [i v] to [-1]\n    repeat (20)\n        change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n        change y by ((I) / (2.5))\n    end\n    repeat (5)\n        switch costume to (nothing v)\n        change size by (((10000) - (size)) / (16))\n        switch costume to (dot v)\n    end\n    wait (0.5) seconds\n    Clone Sprite ID [JC] # [1]\nend\n\nwhen I start as a clone\nif <(Clone) = [JC]> then\n    go to x: (0) y: (0)\n    show\n    go to [front v] layer\n    switch costume to (jc v)\n    set size to (2) %\n    Grow to size [100]\n    wait (0.7) seconds\n    switch costume to (spin1 v)\n    repeat (30)\n        switch costume to ((costume [number v]) + (2))\n        if <(costume [number v]) > [12]> then\n            switch costume to (spin1 v)\n        end\n    end\n    broadcast (Name v)\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) = [J]> then\n    go to x: (-135) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter1 v)\n    Jump to y [-120]\nend\n\ndefine Jump to y (y)\nset [bounce v] to [0]\nrepeat until <([abs v] of (((0.85) * (Bounce)) + (((y) - (y position)) / (8))) ) < [0.05]>\n    set [bounce v] to (((0.85) * (Bounce)) + (((y) - (y position)) / (8)))\n    change y by (Bounce)\nend\n\nwhen I receive [name v]\nrepeat (1)\n    delete this clone\nend\nClone Sprite ID [Ninja] # [1]\nwait (0) seconds\nClone Sprite ID [J] # [1]\nwait (0) seconds\nClone Sprite ID [C] # [1]\nwait (0) seconds\nClone Sprite ID [_] # [1]\nwait (0) seconds\nClone Sprite ID [P] # [1]\nwait (0) seconds\nClone Sprite ID [r] # [1]\nwait (0) seconds\nClone Sprite ID [o1] # [1]\nwait (0) seconds\nClone Sprite ID [G] # [1]\nwait (0) seconds\nClone Sprite ID [o2] # [1]\nwait (0) seconds\nClone Sprite ID [l] # [1]\nwait (0) seconds\nClone Sprite ID [d] # [1]\nwait (1.5) seconds\nClone Sprite ID [Square] # [1]\nwait (0.7) seconds\nClone Sprite ID [Logo] # [1]\n\nwhen I start as a clone\nif <(Clone) = [C]> then\n    go to x: (-105) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter2 v)\n    Jump to y [-120]\nend\n\nwhen I start as a clone\nif <(Clone) = [_]> then\n    go to x: (-75) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter3 v)\n    Jump to y [-120]\nend\n\nwhen I start as a clone\nif <(Clone) = [P]> then\n    go to x: (-45) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter4 v)\n    Jump to y [-120]\nend\n\nwhen I start as a clone\nif <(Clone) = [r]> then\n    go to x: (-15) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter5 v)\n    Jump to y [-120]\nend\n\nwhen I start as a clone\nif <(Clone) = [o1]> then\n    go to x: (15) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter6 v)\n    Jump to y [-120]\nend\n\nwhen I start as a clone\nif <(Clone) = [G]> then\n    go to x: (45) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter7 v)\n    Jump to y [-120]\nend\n\nwhen I start as a clone\nif <(Clone) = [o2]> then\n    go to x: (75) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter8 v)\n    Jump to y [-120]\nend\n\nwhen I start as a clone\nif <(Clone) = [l]> then\n    go to x: (105) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter9 v)\n    Jump to y [-120]\nend\n\nwhen I start as a clone\nif <(Clone) = [d]> then\n    go to x: (135) y: (-130)\n    show\n    set size to (100) %\n    go to [front v] layer\n    switch costume to (letter10 v)\n    Jump to y [-120]\nend\n\nwhen I start as a clone\nif <(Clone) = [Ninja]> then\n    go to x: (0) y: (0)\n    show\n    go to [front v] layer\n    switch costume to (ninja v)\n    set size to (2) %\n    Grow to size [100]\nend\n\nwhen I start as a clone\nif <(Clone) = [Square]> then\n    show\n    go to [front v] layer\n    go to x: (0) y: (1000)\n    switch costume to (square v)\n    Smooth [0] [-370] [100] [90] [0]\nend\n\nwhen I start as a clone\nif <(Clone) = [Logo]> then\n    go to x: (0) y: (0)\n    show\n    go to [front v] layer\n    switch costume to (logo v)\n    set size to (2) %\n    Grow to size [100]\n    wait (0.7) seconds\n    Clone Sprite ID [Particles] # [15]\n    glide (0.1) secs to x: (226) y: (-100)\n    hide\n    wait (1.5) seconds\n    broadcast (Start v)\nend\n\nwhen I start as a clone\nif <(Clone) = [Logo]> then\n    Clone Sprite ID [Particles] # [15]\n    repeat (18)\n        turn right (20) degrees\n    end\nend\n\nwhen I receive [start v]\nstop all sounds\nstop [other scripts in sprite v]\nrepeat (1)\n    delete this clone\nend\n\nwhen flag clicked\nset volume to (100) %\nstart sound [Intro v]\nwait (10) seconds\nrepeat (50)\n    change volume by (-2)\nend\n\ndefine Smooth (x) (y) (s) (d) (g)\nrepeat until <<(round (x position)) = (x)> and <<(round (y position)) = (y)> and <<(round (size)) = (s)> and <(round (direction)) = (d)>>>>\n    change x by (((x) - (x position)) / (5))\n    change y by (((y) - (y position)) / (5))\n    change size by (((s) - (size)) / (5))\n    turn right (((d) - (direction)) / (5)) degrees\n    change [ghost v] effect by (g)\nend\n\nwhen flag clicked\nforever\n    if <<key (space v) pressed?> or <mouse down?>> then\n        stop all sounds\n        broadcast (Start v)\n        stop [this script v]\n    end\nend\n\n@Outro\n\nwhen flag clicked\nhide\nswitch costume to (text v)\nset [ghost v] effect to (100)\n\nwhen I start as a clone\nif <(Clone) = [OC]> then\n    show\n    set [ghost v] effect to (100)\n    go to x: (0) y: (-30)\n    go to [front v] layer\n    switch costume to (oc v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    set [tan v] to [0]\n    forever\n        if <touching (mouse-pointer v)?> then\n            change size by (((150) - (size)) / (2))\n            point in direction (((90) + (([sin v] of ((timer) * (200)) ) * (10))) + ([tan v] of (TAN) ))\n            change [tan v] by (1)\n        else\n            change size by (((100) - (size)) / (2))\n            point in direction (((90) + (([sin v] of ((timer) * (200)) ) * (10))) + ([tan v] of (TAN) ))\n            change [tan v] by (1)\n        end\n    end\nend\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) = [Projects]> then\n    show\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    go to [front v] layer\n    switch costume to (games v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    forever\n        set y to (([sin v] of ((timer) * (300)) ) * (7))\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Name]> then\n    show\n    set [ghost v] effect to (100)\n    go to x: (0) y: (130)\n    go to [front v] layer\n    switch costume to (name v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    forever\n        point in direction ((([sin v] of ((timer) * (500)) ) * (7)) + (90))\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [Back]> then\n    show\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    go to [front v] layer\n    switch costume to (back v)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    forever\n        point in direction ((([cos v] of ((timer) * (100)) ) * (15)) + (90))\n    end\nend\n\nwhen I receive [show v]\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [outro v]\nforever\n    play sound [Outro v] until done\nend\n\nwhen I receive [outro v]\nClone Sprite ID [Back] [1]\nClone Sprite ID [OC] [1]\nClone Sprite ID [Name] [1]\nClone Sprite ID [Projects] [1]\nbroadcast (Show 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