Ninja Platformer
@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [Imagine Dragons - Believer v] until done\nend\n\nwhen flag clicked\nforever\n    set [volume v] to (volume)\nend\n\nwhen flag clicked\nset [volume v] to [100]\n\n@Levels\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\n@Spikes\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@Bounce\n\ndefine Clone at (x pos) (y pos)\ngo to x: (x pos) y: (y pos)\ncreate clone of (_myself_ v)\n\nwhen I receive [next level v]\nif  then\n    delete this clone\nend\nif <(Level) = [2]> then\n    Clone at [-107] [-21]\nend\n\nwhen I start as a clone\nforever\n    show\n    if <touching (player v)?> then\n        switch costume to (crouch v)\n    else\n        switch costume to (idle v)\n    end\nend\n\nwhen flag clicked\nhide\n\n@Lava\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    repeat (10)\n        change [tide v] by (1)\n    end\n    repeat (20)\n        change [tide v] by (-1)\n    end\n    repeat (10)\n        change [tide v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    set y to (Tide)\n    switch costume to (Level)\nend\n\n@Sword\n\nwhen flag clicked\nhide\ngo to x: (4) y: (128)\nhide\nswitch costume to (1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (Sword v)\n    end\nend\n\nwhen I receive [sword v]\nforever\n    go to (player v)\n    if <key (right arrow v) pressed?> then\n        change x by (1)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        change x by (-1)\n        set rotation style [left-right v]\n        point in direction (-90)\n    end\nend\n\nwhen flag clicked\nwait until <touching (player v)?>\nforever\n    go to [front v] layer\n    repeat (1)\n        if <key (space v) pressed?> then\n            switch costume to (1 v)\n            wait (0.001) seconds\n            switch costume to (2 v)\n            wait (0.001) seconds\n            switch costume to (3 v)\n            wait (0.001) seconds\n            switch costume to (4 v)\n            wait (0.001) seconds\n            switch costume to (5 v)\n            wait (0.001) seconds\n            switch costume to (6 v)\n            wait (0.001) seconds\n            switch costume to (7 v)\n            wait (0.001) seconds\n            switch costume to (8 v)\n            wait (0.05) seconds\n            switch costume to (1 v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [2]> then\n        show\n    end\nend\n\n@Enemy\n\nwhen flag clicked\ngo to x: (223) y: (94)\nset [x-vel v] to [0]\nforever\n    if <(Level) = [4]> then\n        change y by (y-vel)\n        change [y-vel v] by (-1)\n        change y by (-1)\n        if <touching (levels v)?> then\n            set [y-vel v] to ((y-vel) - ((y-vel) * (2)))\n            set [y-vel v] to [0]\n        end\n        change y by (1)\n        if <<touching (levels v)?> or <(x position) < ([x position v] of [player v])>> then\n            change [x-vel v] by (0.5)\n        else\n            if <<not <touching (levels v)?>> or <([x position v] of [player v]) < (x position)>> then\n                change [x-vel v] by (-0.5)\n            end\n        end\n        set [x-vel v] to ((0.9) * (x-vel))\n        change x by (x-vel)\n        if <touching (levels v)?> then\n            change x by ((0) - (x-vel))\n            set [y-vel v] to [4]\n            change y by (4)\n        end\n        if <touching (player v)?> then\n            broadcast (Restart v)\n        end\n        if <touching color (#989898)?> then\n            broadcast (ninja died v)\n        end\n    end\nend\n\nwhen flag clicked\nset [x v] to (x position)\nset [y v] to (y position)\nforever\n    if <touching (levels v)?> then\n        go to x: (X) y: (Y)\n    else\n        set [x v] to (x position)\n        set [y v] to (y position)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\nforever\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <touching (levels v)?> then\n        change y by (-4)\n        change x by ((x-vel) * (-4))\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (spikes v)?> then\n        broadcast (reset ai v)\n    end\nend\n\nwhen I receive [restart v]\ngo to x: (223) y: (94)\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        show\n    end\nend\n\nwhen I receive [ninja died v]\nforever\n    hide\nend\n\nwhen I receive [reset ai v]\ngo to x: (223) y: (94)\n\n@Sprite1\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\ngo to [front v] layer\n\nwhen I receive [sword v]\nswitch costume to (costume2 v)\n\nwhen I receive [start v]\nshow\n\n@Boss\n\ndefine Restart\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (165) y: (39)\n\ndefine Phisyics\nif <(x position) < ([x position v] of [player v])> then\n    change [x v] by (2)\nend\nif <([x position v] of [player v]) < (x position)> then\n    change [x v] by (-2)\nend\nchange x by (x)\nif <touching (levels v)?> then\n    change x by ((x) * (-1))\n    if <((y position) - (25)) < ([y position v] of [player v])> then\n        if <(x) > [0]> then\n            set [x v] to [-10]\n            set [y v] to [10]\n        else\n            set [x v] to [10]\n            set [y v] to [10]\n        end\n    else\n        set [x v] to [0]\n    end\nelse\n    set [x v] to ((x) * (0.8))\nend\nchange y by (y)\nif <touching (levels v)?> then\n    change y by ((y) * (-1))\n    set [y v] to [0]\n    if <key (up arrow v) pressed?> then\n        if <(Jumping?) = [y]> then\n            set [y v] to [12]\n            set [jumping? v] to [n]\n        end\n    end\nelse\n    change [y v] by (-1)\n    set [jumping? v] to [y]\nend\n\nwhen flag clicked\ngo to x: (215) y: (40)\nRestart\nset [level v] to [1]\nforever\n    if <(Boss Health) = [0]> then\n        stop [other scripts in sprite v]\n    end\nend\n\nwhen I receive [restart danger! v]\nRestart\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\n    if <(Level) = [7]> then\n        Phisyics\n        show\n        show\n        if <touching color (#989898)?> then\n            change [boss health v] by (-10)\n        end\n    end\nend\n\nwhen flag clicked\nset [boss health v] to [100]\nforever\n    if <touching (player v)?> then\n        broadcast (Restart v)\n    end\n    if <(Boss Health) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [restart v]\ngo to x: (165) y: (39)\n\nwhen flag clicked\nset [boss health v] to [100]\nforever\n    if <(Boss Health) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nset [boss health v] to [100]\nforever\n    if <(Boss Health) = [0]> then\n        hide\n    end\nend\n\n@Sprite2\n\nwhen I receive [restart v]\ngo to x: (215) y: (0)\n\nwhen flag clicked\nhide\nset [boss health v] to [100]\nforever\n    if <(Boss Health) = [100]> then\n        switch costume to (costume1 v)\n    end\n    if <(Boss Health) = [90]> then\n        switch costume to (costume2 v)\n    end\n    if <(Boss Health) = [70]> then\n        switch costume to (costume3 v)\n    end\n    if <(Boss Health) = [60]> then\n        switch costume to (costume4 v)\n    end\n    if <(Boss Health) = [50]> then\n        switch costume to (costume5 v)\n    end\n    if <(Boss Health) = [30]> then\n        switch costume to (costume6 v)\n    end\n    if <(Boss Health) = [20]> then\n        switch costume to (costume7 v)\n    end\n    if <(Boss Health) = [10]> then\n        switch costume to (costume7 v)\n    end\n    if <(Boss Health) = [5]> then\n        switch costume to (costume8 v)\n    end\n    if <(Boss Health) = [0]> then\n        switch costume to (costume9 v)\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: (([x position v] of [boss v]) + (5)) y: (([y position v] of [boss v]) + (60))\n    if <(Level) = [7]> then\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Boss Health) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Boss Health) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Boss Health) = [0]> then\n        hide\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [7]> then\n        show\n    end\n    if <(Boss Health) = [0]> then\n        hide\n    end\nend\n\n@like fav and follow\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\nhide\ngo to x: (68) y: (54)\nforever\n    if <(Level) = [8]> then\n        show\n    end\nend\n\n@Notification\n\nwhen flag clicked\nhide\ngo to x: (150) y: (50)\nforever\n    wait (pick random (4) to (10)) seconds\n    show\n    repeat (6)\n        change y by (-10)\n    end\n    wait (1) seconds\n    repeat (6)\n        change y by (10)\n    end\n    hide\nend\n\n@Notification2\n\nwhen flag clicked\nhide\ngo to x: (-150) y: (50)\nforever\n    wait (pick random (4) to (10)) seconds\n    show\n    repeat (6)\n        change y by (-10)\n    end\n    wait (1) seconds\n    repeat (6)\n        change y by (10)\n    end\n    hide\nend\n\n@Sprite4\n\nwhen flag clicked\nforever\n    switch costume to (Level)\nend\n\n@thumbnail\n\nwhen I receive [start v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\nshow\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen I receive [intro done v]\ngo to [front v] layer\nshow\nforever\n    set size to (100) %\nend\n\nwhen flag clicked\nforever\n    point in direction (90)\n    if <touching (mouse-pointer v)?> then\n        set size to (200) %\n    else\n        set size to (150) %\n    end\n    if <mouse down?> then\n        broadcast (start v)\n    end\n    change [color v] effect by (5)\nend\n\nwhen I receive [start v]\nhide\n\n@Sprite6\n\nwhen flag clicked\nhide\ngo to x: (475) y: (0)\n\nwhen I receive [next level v]\nshow\ngo to x: (475) y: (0)\nrepeat (100)\n    go [forward v] (999999999999) layers\n    change x by (-10)\nend\nhide\n\n@Sprite7\n\nwhen flag clicked\nhide\nwait (4) seconds\nrepeat (10)\n    go to [front v] layer\n    hide\n    wait (0.05) seconds\n    show\nend\nshow\n\nwhen flag clicked\nwait (5) seconds\nrepeat (2)\n    go to [front v] layer\n    repeat (10)\n        go to [front v] layer\n        change [mosaic v] effect by (5)\n    end\n    go to [front v] layer\n    wait (0.05) seconds\n    go to [front v] layer\n    repeat (10)\n        go to [front v] layer\n        change [mosaic v] effect by (-5)\n    end\nend\n\nwhen I receive [intro done v]\nhide\n\n@Sprite8\n\nwhen flag clicked\nhide\nwait (4) seconds\nrepeat (10)\n    go to [front v] layer\n    hide\n    wait (0.05) seconds\n    show\nend\nshow\n\nwhen flag clicked\nwait (5) seconds\nrepeat (2)\n    go to [front v] layer\n    repeat (10)\n        go to [front v] layer\n        change [mosaic v] effect by (5)\n    end\n    wait (0.05) seconds\n    go to [front v] layer\n    repeat (10)\n        go to [front v] layer\n        change [mosaic v] effect by (-5)\n    end\nend\n\nwhen I receive [intro done v]\nhide\n\n@Sprite9\n\nwhen flag clicked\nhide\nwait (4) seconds\nrepeat (10)\n    hide\n    wait (0.05) seconds\n    show\nend\nshow\nshow\n\nwhen flag clicked\nwait (5) seconds\nrepeat (2)\n    go to [front v] layer\n    go to [front v] layer\n    repeat (10)\n        go to [front v] layer\n        change [mosaic v] effect by (5)\n    end\n    wait (0.05) seconds\n    repeat (10)\n        go to [front v] layer\n        change [mosaic v] effect by (-5)\n    end\nend\n\nwhen I receive [intro done v]\nhide\n\n@Sprite10\n\nwhen flag clicked\nhide\ngo to [front v] layer\nwait (4) seconds\nrepeat (10)\n    go to [front v] layer\n    hide\n    wait (0.05) seconds\n    show\nend\nshow\n\nwhen flag clicked\nwait (5) seconds\nrepeat (2)\n    go to [front v] layer\n    repeat (10)\n        go to [front v] layer\n        change [mosaic v] effect by (5)\n    end\n    go to [front v] layer\n    wait (0.05) seconds\n    go to [front v] layer\n    repeat (10)\n        go to [front v] layer\n        change [mosaic v] effect by (-5)\n    end\nend\n\nwhen I receive [intro done v]\nhide\n\n@Sprite11\n\nwhen flag clicked\nshow\n\nwhen I receive [intro done v]\nhide\n\n@HeroOfWar\n\nwhen flag clicked\npoint in direction (90)\nhide\ngo to [front v] layer\ngo to x: (-350) y: (9)\nwait (1) seconds\nshow\nrepeat (48)\n    change x by (7)\nend\n\nwhen flag clicked\nwait (1) seconds\nrepeat (48)\n    turn right (15) degrees\nend\n\nwhen flag clicked\nwait (4) seconds\nrepeat (2)\n    repeat (25)\n        change [ghost v] effect by (10)\n    end\n    wait (0.5) seconds\n    repeat (25)\n        change [ghost v] effect by (-10)\n    end\nend\nbroadcast (Intro done v)\nhide\n\n@Confetti\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nclear graphic effects\npoint in direction (90)\nswitch costume to (pick random (1) to (6))\nset size to (pick random (50) to (150)) %\nset [brightness v] effect to (pick random (-25) to (25))\ngo to [front v] layer\nshow\nset [s v] to (pick random (1) to (2))\nif <(S) = [1]> then\n    go to x: (-240) y: (-1000)\n    set [v v] to (pick random (5) to (10))\n    set [d v] to [5]\nelse\n    if <(S) = [2]> then\n        set [v v] to (pick random (-5) to (-10))\n        go to x: (240) y: (-1000)\n        set [d v] to [-5]\n    end\nend\nset [i v] to (pick random (15) to (30))\nchange y by (I)\nrepeat until <(y position) < [-179]>\n    turn right (D) degrees\n    change [ghost v] effect by (2)\n    change y by (I)\n    change [i v] by (-1)\n    change x by (V)\n    set [v v] to ((V) * (.995))\nend\ndelete this clone\n\nwhen flag clicked\nhide\nforever\n    if <(Level) = [8]> then\n        create clone of (_myself_ v)\n    end\nend\n\n@Player\n\nwhen flag clicked\ngo to [back v] layer\nset [direction of player v] to [90]\npoint in direction (90)\nbroadcast (Restart v)\nset [level v] to [1]\nforever\n    if <key (left arrow v) pressed?> then\n        set [direction of player v] to [-90]\n        change [xvel v] by (-1)\n        set rotation style [left-right v]\n        point in direction (-90)\n    end\n    if <key (right arrow v) pressed?> then\n        set [direction of player v] to [90]\n        change [xvel v] by (1)\n        point in direction (90)\n    end\n    set [xvel v] to ((xvel) * (0.9))\n    change x by (xvel)\n    if <touching (levels v)?> then\n        change y by (1)\n    end\n    if <<touching (levels v)?> or <touching (sprite3 v)?>> then\n        change y by (1)\n    end\n    if <<touching (levels v)?> or <touching (sprite3 v)?>> then\n        change y by (1)\n    end\n    if <<touching (levels v)?> or <touching (sprite3 v)?>> then\n        change y by (1)\n    end\n    if <<touching (levels v)?> or <touching (sprite3 v)?>> then\n        change y by (-4)\n        change x by ((xvel) * (-1))\n        if <key (up arrow v) pressed?> then\n            if <(xvel) > [ 0]> then\n                set [xvel v] to [-10]\n            else\n                set [xvel v] to [10]\n            end\n            set [y vel v] to [15]\n        else\n            set [xvel v] to [0]\n        end\n    end\n    change [y vel v] by (-1)\n    change y by (y vel)\n    if <<touching (levels v)?> or <touching (sprite3 v)?>> then\n        change y by ((y vel) - ((y vel) * (2)))\n        set [y vel v] to [0]\n    end\n    change y by (-1)\n    if <<touching (levels v)?> and <key (up arrow v) pressed?>> then\n        set [y vel v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (Next Level v) and wait\n        change [level v] by (1)\n    end\n    if <touching (spikes v)?> then\n        broadcast (Restart v)\n    end\n    if <touching (bounce v)?> then\n        set [y vel v] to [19]\n    end\n    if <touching (lava v)?> then\n        broadcast (Restart v)\n    end\nend\n\nwhen I receive [next level v]\nbroadcast (Restart v)\n\nwhen I receive [restart v]\nset [xvel v] to [0]\nset [y vel v] to [0]\ngo to x: (-203) y: (65)\n\n
WHAT!!! 1.6k+ view and 222 likes and 195 faves \nHello Guys. HeroOfWar here. This is a Ninja Platformer .\nPress Space to  use Sword.\nUse arrow keys to move . Hope you enjoy it. It actually took a lot of time for making this . Plz like fav and follow me . Plz write how times did you die in the comments ..