Ninja Scrolling Platformer
@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join (round ((mouse x) + (SCROLL X))) (join [, ] (round ((mouse y) + (SCROLL Y)))))\nshow variable [mouse v]\n\nwhen [n v] key pressed\nhide variable [mouse v]\n\nwhen I receive [play game v]\nforever\n    play sound [Epic Japanese Music - Shadow Ninja d v] until done\nend\n\n@Blank\n\n@Player\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\ngo [backward v] (5) layers\n\nwhen I receive [play game v]\nset [speed change v] to [2]\nset [ninja coins v] to [0]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\ngo to x: (0) y: (0)\npoint in direction (90)\nset rotation style [all around v]\nif <(LEVEL) = [6]> then\n    switch costume to (player2 v)\nelse\n    switch costume to (player1 v)\nend\nset size to (100) %\nclear graphic effects\nshow\n\ndefine Tick\nif <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n    change [sx v] by ((speed change) * (-1))\nend\nif <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    change [sx v] by (speed change)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange player y by (sy)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (((y) - (SCROLL Y)) / (10))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nturn right ((sx) * (2)) degrees\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nstart sound [hurt v]\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Test - Die\nif <<touching (danger v)?> or <<touching (enemy v)?> or <touching (shuriken enemy v)?>>> then\n    set [exit v] to [die]\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nchange [level v] by (1)\nwait (1) seconds\n\nwhen [r v] key pressed\nset [exit v] to [die]\n\nwhen I receive [play game v]\nwait until \n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    x: [360] y: [0]\n    x: [360] y: [0]\n    x: [360] y: [0]\n    x: [360] y: [0]\n    x: [360] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        x: [360] y: [0]\n        x: [360] y: [100]\n        x: [360] y: [50]\n        x: [360] y: [0]\n        x: [340] y: [0]\n        x: [-100] y: [480]\n        x: [-360] y: [92]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 0 v)\n            x: [360] y: [0]\n            x: [360] y: [0]\n            x: [240] y: [0]\n            x: [0] y: [100]\n            x: [0] y: [100]\n            x: [0] y: [100]\n            x: [100] y: [300]\n            x: [-100] y: [100]\n            x: [-240] y: [100]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 0 v)\n                x: [360] y: [0]\n                x: [360] y: [0]\n                x: [0] y: [240]\n                x: [485] y: [100]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (level 5 1 v)\n                    x: [360] y: [0]\n                    x: [145] y: [145]\n                    x: [145] y: [145]\n                    x: [200] y: [0]\n                    x: [145] y: [-145]\n                    x: [145] y: [-145]\n                    x: [360] y: [0]\n                else\n                    switch costume to (level 6 0 v)\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    go to [back v] layer\n    go [forward v] (3) layers\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    x: [360] y: [0]\n    x: [360] y: [0]\n    x: [360] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        x: [360] y: [0]\n        x: [360] y: [100]\n        x: [360] y: [50]\n        x: [360] y: [0]\n    else\n        if <(LEVEL) = [4]> then\n            switch costume to (level 4 1 v)\n            x: [720] y: [0]\n        else\n            if <(LEVEL) = [5]> then\n                switch costume to (level 5 1 v)\n                x: [1500] y: [-10]\n            else\n                switch costume to (level 3 0 v)\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    go to [back v] layer\n    go [forward v] (2) layers\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Collectables\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound [Collect v]\n    change [collected v] by (1)\n    change [ninja coins v] by (1)\n    if <(COLLECTED) = (COLLECTED MAX)> then\n        broadcast (Open Portal v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [collected max v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nif <(LEVEL) = [1]> then\n    x: [360] y: [0]\n    x: [1880] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        x: [400] y: [104]\n        x: [793] y: [61]\n        x: [1075] y: [165]\n        x: [1552] y: [115]\n        x: [1889] y: [115]\n        x: [1616] y: [354]\n        x: [1711] y: [693]\n        x: [1317] y: [693]\n    else\n        if <(LEVEL) = [3]> then\n            x: [540] y: [140]\n            x: [1000] y: [160]\n            x: [1000] y: [260]\n            x: [1000] y: [360]\n            x: [1000] y: [460]\n            x: [715] y: [850]\n        else\n            if <(LEVEL) = [4]> then\n                x: [843] y: [252]\n                x: [646] y: [466]\n            else\n                if <(LEVEL) = [5]> then\n                    x: [366] y: [42]\n                    x: [750] y: [395]\n                    x: [1500] y: [20]\n                else\n                    set [x v] to [-99999]\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\nturn right (10) degrees\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\nset [x v] to [-99999]\n\nif <not <(x) = [-99999]>> then\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [10]> and <touching (player v)?>> then\n    start sound [Teleport v]\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (closed v)\nif <(LEVEL) = [1]> then\n    x: [2000] y: [20]\nelse\n    if <(LEVEL) = [2]> then\n        x: [1160] y: [706]\n    else\n        if <(LEVEL) = [3]> then\n            x: [500] y: [850]\n        else\n            if <(LEVEL) = [4]> then\n                x: [1425] y: [214]\n            else\n                if <(LEVEL) = [5]> then\n                    x: [1800] y: [5]\n                else\n                    set [x v] to [-99999]\n                end\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nstart sound [Door Creak v]\nswitch costume to (closed v)\nrepeat (10)\n    next costume\nend\n\n@Backdrop\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\nforever\n    go to [back v] layer\n    position (((SCROLL X) * (-0.1)) + (90)) (((SCROLL Y) * (-0.1)) + (70))\n    if <(LEVEL) = [6]> then\n        hide\n        stop [this script v]\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\n\n@Miniaturka\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\nforever\n    go to [front v] layer\n    go [forward v] (10) layers\n    set [ghost v] effect to (100)\nend\n\n@Text\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    x: [360] y: [0]\n    x: [360] y: [0]\n    x: [360] y: [0]\n    x: [360] y: [0]\n    x: [380] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n        else\n            if <(LEVEL) = [6]> then\n                switch costume to (level 6 0 v)\n            else\n                switch costume to (level 4 0 v)\n            end\n        end\n    end\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    go to [back v] layer\n    go [forward v] (1) layers\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Shuriken\n\ndefine x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\ncreate clone of (_myself_ v)\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    go to [front v] layer\nelse\n    hide\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (shuriken2 v)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\nbroadcast (shuriken? v)\n\nwhen I start as a clone\nif <[0] > ([sx v] of [player v])> then\n    set [sx v] to [-8]\nelse\n    set [sx v] to [8]\nend\nswitch costume to (shuriken v)\nshow\ngo to [front v] layer\nrepeat until <<touching (platforms v)?> or <<touching (enemy v)?> or <touching (_edge_ v)?>>>\n    position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n    change [x v] by (sx)\n    turn right (25) degrees\nend\nwait (0.1) seconds\ndelete this clone\n\nwhen I receive [shuriken? v]\nforever\n    if <(weapon) = [1]> then\n        if <key (space v) pressed?> then\n            broadcast (shoot1 v)\n            wait (0.5) seconds\n        end\n    end\nend\n\ngo to (player v)\n\nwait until <not <key (space v) pressed?>>\n\nwhen I receive [shoot1 v]\nif <<(costume [number v]) = [2]> and <(weapon) = [1]>> then\n    start sound [shuriken v]\n    x: ([x v] of [player v]) y: ([y v] of [player v])\n    set [x v] to [-99999]\nend\n\n\n\n@Enemy\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<touching (shuriken v)?> or > then\n    start sound [hurt v]\n    delete this clone\nend\n\nwhen I receive [setup v]\nset rotation style [left-right v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nif <(LEVEL) = [1]> then\n    x: [1500] y: [-35]\nelse\n    if <(LEVEL) = [2]> then\n        x: [1760] y: [210]\n        x: [1536] y: [690]\n    else\n        if <(LEVEL) = [3]> then\n            x: [635] y: [825]\n        else\n            if <(LEVEL) = [4]> then\n                x: [455] y: [-35]\n                x: [896] y: [444]\n            end\n        end\n    end\nend\nset [x v] to [-99999]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    set [hide v] to [1]\nelse\n    hide\n    set [hide v] to [0]\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <(hide) > [0]> then\n        point towards (player v)\n        set [shoot x v] to (x)\n        set [shoot y v] to (y)\n        set [shoot direction v] to (direction)\n        broadcast (Shoot bad Ninja v)\n        wait (2) seconds\n    end\nend\n\n@Shuriken Enemy\n\ndefine x: (x) y: (y)\npoint in direction (shoot direction)\nset [x v] to (x)\nset [y v] to (y)\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\ncreate clone of (_myself_ v)\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    go to [front v] layer\nelse\n    hide\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (shuriken2 v)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I start as a clone\nif <[0] > (direction)> then\n    set [sx v] to [-8]\nelse\n    set [sx v] to [8]\nend\nswitch costume to (shuriken v)\nshow\ngo to [front v] layer\nrepeat until <<touching (platforms v)?> or <<touching (player v)?> or <<touching (_edge_ v)?> or >>>\n    position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n    change [x v] by (sx)\n    turn right (25) degrees\nend\nwait (0.1) seconds\ndelete this clone\n\nwhen I receive [shoot bad ninja v]\nx: (shoot x) y: (shoot y)\nset [x v] to [-99999]\nwait (0.5) seconds\n\nwhen I start as a clone\nforever\n    if <touching (katana v)?> then\n        set [sx v] to ((sx) * (-1))\n        wait until <not <touching (katana v)?>>\n    end\nend\n\n@Shop Button\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ngo to x: (100) y: (150)\nset size to (10) %\nswitch costume to (1 v)\nshow\ngo to [front v] layer\nrepeat (10)\n    change size by (9)\nend\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\n    if <touching (mouse-pointer v)?> then\n        switch costume to (2 v)\n        if <mouse down?> then\n            broadcast (Shop Open v)\n            switch costume to (3 v)\n            wait until <not <mouse down?>>\n            wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n            broadcast (Shop Close v)\n            wait until <not <mouse down?>>\n        end\n    else\n        switch costume to (1 v)\n    end\nend\n\n@Shop Backdrop\n\nwhen flag clicked\nhide\n\nwhen I receive [shop open v]\ngo to x: (100) y: (150)\nset size to (25) %\nswitch costume to (1 v)\nset [ghost v] effect to (10)\nshow\ngo to [front v] layer\ngo [backward v] ((4) + (#1)) layers\nrepeat (10)\n    change size by (8)\n    change y by (-12.2)\n    change x by (-8)\nend\n\nwhen I receive [shop close v]\nrepeat (10)\n    change size by (-8)\n    change y by (11)\n    change x by (8)\nend\nhide\n\n@Shop Backdrop2\n\nwhen flag clicked\nhide\ndelete all of [shop v]\nadd [5] to [shop v]\nadd [10] to [shop v]\nadd [0] to [shop v]\nadd [0] to [shop v]\nadd [0] to [shop v]\nset [#1 v] to [0]\nrepeat (2)\n    change [#1 v] by (1)\n    create clone of (_myself_ v)\nend\nset [#2 v] to [0]\n\nwhen I receive [shop open v]\nif <(#2) > [0]> then\n    go to x: (100) y: (150)\n    switch costume to (0 v)\n    set size to (25) %\n    if <(item (#2) of [shop v]) > [0]> then\n        switch costume to (join (#2) [1])\n    else\n        switch costume to (join (#2) [2])\n    end\n    set [ghost v] effect to (10)\n    show\n    go to [front v] layer\n    go [backward v] (4) layers\n    repeat (10)\n        change size by (8)\n        change y by (-12.2)\n        change x by (-8)\n    end\nend\n\nwhen I receive [shop close v]\nif <(#2) > [0]> then\n    repeat (10)\n        change size by (-8)\n        change y by (12)\n        change x by (8)\n    end\n    hide\nend\n\nwhen I start as a clone\nset [#2 v] to (#1)\nforever\n    if <<(item (#2) of [shop v]) > [0]> and <(size) > [100]>> then\n        if <touching (mouse-pointer v)?> then\n            if <mouse down?> then\n                if <not <(Ninja Coins) < (item (#2) of [shop v])>> then\n                    change [ninja coins v] by ((item (#2) of [shop v]) * (-1))\n                    if <(#2) = [1]> then\n                        change [speed change v] by (0.5)\n                        switch costume to (join (#2) [2])\n                        replace item (#2) of [shop v] with [0]\n                        wait (5) seconds\n                        replace item (#2) of [shop v] with [5]\n                        switch costume to (join (#2) [1])\n                    else\n                        if <(#2) = [2]> then\n                            add [katana] to [weapons v]\n                        else\n                        end\n                        replace item (#2) of [shop v] with [0]\n                        switch costume to (join (#2) [2])\n                    end\n                end\n                wait until <not <mouse down?>>\n            end\n        end\n    end\nend\n\nchange [ninja coins v] by (1)\n\n@collected\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\ngo to [back v] layer\ngo [forward v] (1) layers\nset size to (80) %\ngo to x: (-160) y: (160)\nswitch costume to (1 v)\n\n@collected text\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nset [#collected v] to [0]\nrepeat (5)\n    change [#collected v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [#clone v] to (#collected)\nset size to (80) %\ngo to x: ((-100) + ((#clone) * (16))) y: (160)\nforever\n    if <(length of (Ninja Coins)) > ((#clone) - (1))> then\n        switch costume to (letter (#clone) of (Ninja Coins))\n        show\n        go to [front v] layer\n    else\n        hide\n    end\nend\n\n@weapon\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\ndelete all of [weapons v]\nadd [shuriken] to [weapons v]\nset [weapon v] to [1]\nswitch costume to (weapon)\nshow\ngo to [front v] layer\n\nwhen this sprite clicked\nif <(weapon) = (length of [weapons v])> then\n    set [weapon v] to [1]\nelse\n    change [weapon v] by (1)\nend\nswitch costume to (weapon)\n\nwhen [z v] key pressed\nif <(weapon) = (length of [weapons v])> then\n    set [weapon v] to [1]\nelse\n    change [weapon v] by (1)\nend\nswitch costume to (weapon)\n\n@Katana\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [play game v]\nforever\n    if <(weapon) = [2]> then\n        if <key (space v) pressed?> then\n            broadcast (katana split v) and wait\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [katana split v]\nstart sound [ninja katana v]\ngo to (player v)\npoint in direction (120)\nshow\ngo to [front v] layer\nif <([sx v] of [player v]) > [0]> then\n    switch costume to (3 v)\n    repeat (10)\n        turn right (30) degrees\n    end\nelse\n    switch costume to (4 v)\n    repeat (10)\n        turn left (30) degrees\n    end\nend\nhide\n\nwhen I receive [play game v]\nforever\n    go to (player v)\nend\n\nwhen I receive [shoot1 v]\nif <(weapon) = [2]> then\n    broadcast (katana split v) and wait\nelse\nend\n\n@210\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (shoot1 v)\n\nwhen I receive [play game v]\nshow\ngo to [front v] layer\n\n@time\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nshow\ngo to [back v] layer\ngo [forward v] (1) layers\nset size to (80) %\ngo to x: (-80) y: (-150)\nswitch costume to (11 v)\nset [time v] to [0]\nset [#time v] to [0]\nrepeat (6)\n    change [#time v] by (1)\n    create clone of (_myself_ v)\nend\nreset timer\nrepeat until <(LEVEL) = [6]>\n    set [time v] to (round ((timer) * (100)))\nend\n\nwhen I start as a clone\nset [#clone v] to (#time)\nset size to (80) %\ngo to x: ((-105) + ((#clone) * (18))) y: (-150)\nhide\nforever\n    if <(length of (TIME)) < ((7) - (#clone))> then\n        hide\n    else\n        switch costume to (letter ((#clone) - ((6) - (length of (TIME)))) of (TIME))\n        show\n        go to [front v] layer\n    end\nend\n\n
DON'T ADVERTISE!\nNIE REKLAMUJ SIĘ!\nProponujcie na wyróżnione :)\n\nENG /// POL\n\nENG\nInstructions are in the game (WASD or arrow keys or click to move)\nZ to change weapon (if you bought katana in shop)\nYou can buy speed up more than once but you must wait seconds.\nGood luck!\n\nPOL\nInstrukcje są w grze (WASD lub strzałki lub kliknięcie by się ruszać)\nZ by zmienić broń (jeżeli masz kupioną katanę ze sklepu)\nMożesz kupować speed up więcej niż raz, ale po każdym kupieniu musisz czekać 5 sekund do następnego.\nPowodzenia!\n\n\n#ninja #scrolling #platform #platformer #all #games #katana #shuriken #shurikens #mobilefriendly #mobile #friendly #phone PC #Pytkamencup #Pytkamen #cup #game #gra #gry