Ninja Adventure >> A Platformer #All #Games 
@Stage\n\n@player\n\ndefine Platformer Physics (speed) (friction) (jump height)\nchange [y vel v] by (-1)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x vel v] by (speed)\n    switch costume to (costume1 v)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x vel v] by ((speed) * (-1))\n    switch costume to (costume2 v)\nend\nset [x vel v] to ((X vel) * (friction))\nchange x by (X vel)\nset [slope v] to [0]\nif <touching (level v)?> then\n    repeat until <<not <touching (level v)?>> or <(slope) = [-8]>>\n        change [slope v] by (-1)\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change y by (slope)\n    repeat until <not <touching (level v)?>>\n        change x by ((([abs v] of (X vel) ) / (X vel)) * (-1))\n    end\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        if <(X vel) > [0]> then\n            set [x vel v] to [-12]\n        else\n            set [x vel v] to [12]\n        end\n        set [y vel v] to [12]\n    else\n        set [x vel v] to [0]\n    end\nend\nchange y by (Y vel)\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        change y by ((([abs v] of (Y vel) ) / (Y vel)) * (-1))\n    end\n    set [y vel v] to [0]\nend\nchange y by (-1)\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <touching (level v)?>> then\n    set [y vel v] to (jump height)\nend\nchange y by (1)\n\nwhen flag clicked\n\nwhen flag clicked\nset [level v] to [1]\nhide\n\nwhen I receive [end v]\ngo to x: (-160) y: (-16)\npoint in direction (90)\n\nwhen I receive [end v]\nchange [level v] by (1)\n\nwhen flag clicked\nwait (6.78) seconds\nshow\ngo to [front v] layer\nset size to (80) %\nset [level v] to [1]\nset [x vel v] to [0]\nset [y vel v] to [0]\nswitch costume to (costume1 v)\ngo to x: (-160) y: (-16)\npoint in direction (90)\nforever\n    Platformer Physics [1] [0.9] [13]\n    if <<<<touching (danger v)?> or <touching (laser v)?>> or <touching (enemy v)?>> or <touching (red enemy v)?>> then\n        set size to (80) %\n        set [ghost v] effect to (0)\n        repeat (8)\n            change size by (-10)\n        end\n        set size to (80) %\n        go to x: (-198) y: (-10)\n        point in direction (90)\n    end\n    if <touching (trampoline v)?> then\n        set [y vel v] to [20]\n    end\n    if <touching (water v)?> then\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            change [y vel v] by (-1)\n        else\n            change [y vel v] by (1)\n        end\n    end\nend\n\nrepeat (30)\n    change x by (-4)\n    turn left (15) degrees\n    change y by (2)\nend\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\n@level\n\nwhen flag clicked\nwait (6.78) seconds\nshow\ngo to x: (-2) y: (6)\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nnext costume\n\nwhen flag clicked\nhide\n\n@volume button\n\nwhen flag clicked\nhide\nswitch costume to (on v)\ngo to x: (210) y: (155)\nforever\n    if <(costume [number v]) = [1]> then\n        set volume to (100) %\n    else\n        if <(costume [number v]) = [2]> then\n            set volume to (0) %\n        end\n    end\n    if <touching (mouse-pointer v)?> then\n        set size to (125) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen this sprite clicked\nnext costume\n\nwhen flag clicked\nforever\n    point in direction ((([sin v] of ((timer) * (1000)) ) * (4)) + (90))\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nwait (6.78) seconds\nshow\nforever\n    play sound [K-391 - Summertime v] until done\nend\n\n@dust\n\nwhen I start as a clone\nshow\ngo to (player v)\nchange y by (-25)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    point in direction (90)\nelse\n    point in direction (-90)\nend\nmove (5) steps\nforever\n    move (-1) steps\n    change y by (0.25)\nend\n\nwhen I start as a clone\nrepeat (15)\n    change [ghost v] effect by (6)\nend\ndelete this clone\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nwait (0.05) seconds\nswitch costume to (costume2 v)\nwait (0.05) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [intro v]\nhide\nset size to (80) %\nforever\n    create clone of (_myself_ v)\n    wait (0.1) seconds\nend\n\n@end\n\nwhen I receive [intro v]\nshow\ngo to x: (136) y: (-4)\ngo to [back v] layer\nforever\n    if <touching (player v)?> then\n        broadcast (end v)\n    end\nend\n\nwhen flag clicked\nhide\n\n@danger\n\nwhen flag clicked\nhide\ngo to x: (-2) y: (6)\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nshow\ngo to [back v] layer\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume5]> then\n        go to x: (-2) y: (-94)\n        go to [back v] layer\n        point in direction (90)\n        set [direction saw v] to [15]\n        repeat until <(direction saw) = [-15]>\n            turn right (direction saw) degrees\n            change [direction saw v] by (-0.25)\n        end\n        repeat until <(direction saw) = [15]>\n            turn right (direction saw) degrees\n            change [direction saw v] by (0.25)\n        end\n    end\nend\n\nrepeat until <(costume [name v]) = [costume5]>\n\npoint in direction (90)\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume6]> then\n        go to [back v] layer\n        glide (0.75) secs to x: (-2) y: (-4)\n        glide (0.75) secs to x: (-2) y: (6)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [12]> then\n        go to [back v] layer\n        go to x: (-2) y: (-4)\n        point in direction (90)\n        repeat (45)\n            change y by (8)\n        end\n        point in direction (-90)\n        repeat (45)\n            change y by (-8)\n        end\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <<<<<<not <(costume [number v]) = [6]>> and <not <(costume [number v]) = [11]>>> and <not <(costume [number v]) = [12]>>> and <not <(costume [number v]) = [5]>>> and <not <(costume [number v]) = [14]>>> and <not <(costume [number v]) = [15]>>> then\n        point in direction (90)\n        go to [back v] layer\n        glide (0.75) secs to x: (-2) y: (-4)\n        glide (0.75) secs to x: (-2) y: (6)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume6]> then\n        point in direction (90)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [14]> then\n        point in direction (90)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [costume5]> then\n        go to x: (-2) y: (-94)\n    end\nend\n\n@text\n\nwhen flag clicked\nhide\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen I receive [end v]\nnext costume\n\nwhen flag clicked\nwait (6.78) seconds\nshow\n\n@laser\n\nwhen flag clicked\ngo to x: (36) y: (28)\npoint in direction (90)\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [7]> then\n        show\n        go to [front v] layer\n        show\n        wait (2) seconds\n        hide\n        wait (2) seconds\n    end\nend\n\n@sword\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (80) %\ngo to x: (0) y: (0)\npoint in direction (90)\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [8]> then\n        show\n        set y to ((([sin v] of ((200) * (timer)) ) * (5)) + (-30))\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        broadcast (sword v)\n        go to [front v] layer\n        go to (player v)\n        point in direction ([direction v] of [player v])\n    end\nend\n\nwhen [space v] key pressed\nif <<<<<<(level) = [8]> or <(level) = [9]>> or <(level) = [10]>> or <(level) = [11]>> or <(level) = [12]>> or <(level) = [13]>> then\n    go to [front v] layer\n    switch costume to (costume1 v)\n    start sound [knife slash sound effect v]\n    repeat (7)\n        next costume\n    end\n    repeat (5)\n        change [ghost v] effect by (20)\n    end\n    switch costume to (costume1 v)\n    set [ghost v] effect to (0)\n    wait until <not <key (space v) pressed?>>\nend\n\nwhen I receive [sword v]\nforever\n    go to [front v] layer\n    go to (player v)\n    point in direction ([direction v] of [player v])\nend\n\n@enemy\n\nwhen flag clicked\ngo to x: (182) y: (-69)\nhide\nswitch costume to (enemy right v)\npoint in direction (90)\nset size to (80) %\nforever\n    if <<<(level) = [9]> and <not <touching (sword v)?>>> or <<(level) = [13]> and <not <touching (sword v)?>>>> then\n        wait (1) seconds\n        set [ghost v] effect to (0)\n        show\n        switch costume to (enemy left v)\n        glide (3) secs to x: (-169) y: (-69)\n        switch costume to (enemy right v)\n        glide (3) secs to x: (181) y: (-69)\n    end\nend\n\nwhen I receive [end v]\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        hide\n    end\nend\n\nwhen flag clicked\nwait until <not <touching (sword v)?>>\nforever\n    if <touching (sword v)?> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        hide\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nshow\ngo to x: (8) y: (5)\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Trampoline\n\nwhen flag clicked\ngo to x: (-2) y: (5)\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <(level) = [10]> then\n        show\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        repeat (4)\n            wait (0.02) seconds\n            next costume\n        end\n        start sound [Mario Jump - Gaming Sound Effect \(HD\) v]\n        wait (0.02) seconds\n        switch costume to (costume3 v)\n        wait (0.02) seconds\n        switch costume to (costume2 v)\n        wait (0.02) seconds\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    if <(level) = [11]> then\n        hide\n    end\nend\n\n@water\n\nwhen flag clicked\ngo to x: (36) y: (28)\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [11]> then\n        go to [back v] layer\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [12]> then\n        hide\n    end\nend\n\n@red enemy\n\nwhen flag clicked\ngo to x: (182) y: (-69)\nhide\nswitch costume to (enemy right v)\npoint in direction (90)\nset size to (80) %\nforever\n    if <<<(level) = [9]> and <not <touching (sword v)?>>> or <<(level) = [13]> and <not <touching (sword v)?>>>> then\n        wait (2) seconds\n        set [ghost v] effect to (0)\n        show\n        switch costume to (enemy left v)\n        glide (3) secs to x: (-169) y: (-69)\n        switch costume to (enemy right v)\n        glide (3) secs to x: (181) y: (-69)\n    end\nend\n\nwhen I receive [end v]\n\nwhen flag clicked\nforever\n    if <(level) = [10]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [22]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(level) = [25]> then\n        hide\n    end\nend\n\nwhen flag clicked\nwait until <not <touching (sword v)?>>\nforever\n    if <touching (sword v)?> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        hide\n    end\nend\n\n@Intro\n\nwhen I start as a clone\nif <(Clone) = [Shockwave]> then\n    clear graphic effects\n    Frame Animation x (X) y (Y) sz [100] dir (Rotation) spd [1]\n    Set effects: color [0] brightness [0] transparency [0]\n    set [v v] to [1]\n    go to [front v] layer\n    switch costume to (checker shockwave 1 v)\n    show\n    repeat until <[21] < (V)>\n        switch costume to (blank v)\n        change size by (((500) - (size)) / (5))\n        switch costume to (V)\n        change [v v] by (((22) - (V)) / (5))\n    end\n    repeat (10)\n        switch costume to (blank v)\n        change [ghost v] effect by (10)\n        change size by (((500) - (size)) / (5))\n        switch costume to (V)\n        change [v v] by (((22) - (V)) / (5))\n    end\n    delete this clone\nend\n\ndefine Shockwave\nset [rotation v] to [0]\nSet x [0] y [0]\nClone Sprite ID [Shockwave] # [1]\nset [rotation v] to [180]\nSet x [0] y [0]\nClone Sprite ID [Shockwave] # [1]\nwait (0.15) seconds\nset [rotation v] to [-90]\nSet x [0] y [0]\nClone Sprite ID [Shockwave] # [1]\nset [rotation v] to [90]\nSet x [0] y [0]\nClone Sprite ID [Shockwave] # [1]\n\ndefine Clone Sprite ID (id) # (#)\nset [clone v] to (id)\nrepeat (#)\n    create clone of (_myself_ v)\nend\n\ndefine Frame Animation x (x) y (y) sz (sz) dir (dir) spd (spd)\nchange x by (((round (x)) - (round (x position))) / (spd))\nchange y by (((round (y)) - (round (y position))) / (spd))\nchange size by (((round (sz)) - (round (size))) / (spd))\nturn right (((round (dir)) - (round (direction))) / (spd)) degrees\n\ndefine Set effects: color (color) brightness (brightness) transparency (transparency)\nset [color v] to (color)\nset [brightness v] to (brightness)\nset [transparency v] to (transparency)\nset [color v] effect to (Color)\nset [brightness v] effect to (Brightness)\nset [ghost v] effect to (Transparency)\n\ndefine Line Explode (degree) with start (start)\nset [rotation v] to (start)\nrepeat ((360) / (degree))\n    Clone Sprite ID [Burst] # [1]\n    change [rotation v] by (degree)\nend\n\ndefine Set x (x) y (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I start as a clone\nif <(Clone) = [Burst]> then\n    set [value 1 v] to [20]\n    switch costume to (logo v)\n    go to [front v] layer\n    go [backward v] (2) layers\n    show\n    Set effects: color (Color) brightness (Brightness) transparency (pick random (0) to (10))\n    Frame Animation x (X) y (Y) sz [0] dir (Rotation) spd [1]\n    repeat until <(Value 1) < [2]>\n        set [value 1 v] to ((Value 1) * (0.9))\n        switch costume to (((Value 1) * (-0.5)) + (34))\n        Frame size [100] spd [5]\n        move ((Value 1) * (1.2)) steps\n    end\n    repeat (10)\n        set [value 1 v] to ((Value 1) * (0.9))\n        switch costume to (((Value 1) * (-0.5)) + (34))\n        Frame size [100] spd [5]\n        move ((Value 1) * (1.2)) steps\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\ndefine Frame size (sz) spd (spd)\nchange size by (((round (sz)) - (round (size))) / (spd))\n\nwhen flag clicked\nhide\nwait (1) seconds\nstart sound [Fate v]\nset [keyframe v] to [0]\nrepeat (3)\n    Clone Sprite ID [First] # [1]\n    wait (0.1) seconds\nend\nwait (0.4) seconds\nClone Sprite ID [Logo] # [1]\nwait (0.1) seconds\nset [rotation v] to [0]\nbroadcast (Listen v)\nrepeat until <(Keyframe) = [1]>\n    go to [front v] layer\n    set [color v] to [120]\n    set [brightness v] to [100]\n    Line Explode [90] with start (Rotation)\n    change [rotation v] by (25)\n    wait (0) seconds\n    set [color v] to [100]\n    set [brightness v] to [-20]\n    Line Explode [90] with start (Rotation)\n    change [rotation v] by (25)\n    wait (0.1) seconds\nend\n\ndefine Diminish Shake at x (x) y (y) spd (spd) shake size (size)\nset [v v] to ([abs v] of (size) )\nrepeat until <[0] = (round (V))>\n    go to x: (pick random ((x) + (V)) to ((x) - (V))) y: (pick random ((y) + (V)) to ((y) - (V)))\n    change [v v] by (((0) - (round (V))) / (spd))\nend\n\nwhen I start as a clone\nif <(Clone) = [First]> then\n    Frame Animation x [0] y [0] sz [20] dir [90] spd [1]\n    Set effects: color [0] brightness [0] transparency [0]\n    show\n    repeat until <[1200] = (round (size))>\n        switch costume to (scaling dot v)\n        Frame Animation x [0] y [0] sz [1200] dir [90] spd [4]\n        switch costume to (first v)\n    end\n    repeat until <(Keyframe) = [1]>\n        go to [back v] layer\n        go [backward v] (52362626) layers\n    end\n    repeat until <[100] = (round (Brightness))>\n        switch costume to (scaling dot v)\n        change [brightness v] by (((100) - (round (Brightness))) / (10))\n        change [transparency v] by (((100) - (round (Transparency))) / (10))\n        change [brightness v] effect by (Brightness)\n        change [ghost v] effect by (Transparency)\n        switch costume to (first v)\n        wait (2) seconds\n        broadcast (intro v)\n        hide\n    end\nend\n\ndefine Bounce 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)\n    go to [front v] layer\nend\n\nwhen I start as a clone\nif <(Clone) = [Logo]> then\n    Frame Animation x [0] y [0] sz [2] dir [90] spd [1]\n    Set effects: color [0] brightness [0] transparency [0]\n    show\n    switch costume to (logo v)\n    Bounce to size [100]\n    repeat until <(Keyframe) = [1]>\n        go to [front v] layer\n        wait (0.4) seconds\n        broadcast (Shock v)\n        Diminish Shake at x [0] y [0] spd [4] shake size [5]\n    end\n    repeat until <[800] = (round (size))>\n        switch costume to (scaling dot v)\n        change [brightness v] by (((100) - (round (Brightness))) / (25))\n        change [transparency v] by (((100) - (round (Transparency))) / (25))\n        change size by (((800) - (round (size))) / (25))\n        change [brightness v] effect by (Brightness)\n        change [ghost v] effect by (Transparency)\n        switch costume to (logo v)\n    end\n    delete this clone\nend\n\nwhen I receive [shock v]\nShockwave\n\nwhen I receive [listen v]\nwait (4) seconds\nset [keyframe v] to [1]\n\n
You are a Ninja and your goal is to be a Ninja master,\nDefeat enemies with swords\nUse the arrow keys or WASD\nAvoid spikes, lava and some amazing dangerous stuffs.\n(You can Wall jump)\nAnd get ready for Ninja Adventure Part 2!!\nWhen you are in the water press down arrow or S to go down.\nPlease don't  False report this, I worked really hard on this :).\n\n= Notes and Credits =\nThank you so much @Will_Wam and @-InfinityCode-\nfor Inspiration\nThank you Youtube for some sounds\nThank you @-InfinityCode for the sword thingy\nArt by me\nThank you @-PandaMC for the spinning saw\nThank you cooltext for thumbnail text\nParticle tutorial by https://www.youtube.com/watch?v=nGMA_W8jKdU\nIntro by @aqury\nThank you @Infinitycode for the spring art idea.