Ninja Platformer 2

Instructions: Click or press for next slide\nStudio link https://scratch.mit.edu/studios/30901220\nDEADLINE IS FEB 13

@Stage\n\nwhen flag clicked\nwait (8) seconds\nforever\n    play sound [Best Day of My Life v] until done\nend\n\n@Easy\n\nwhen flag clicked\nhide\n\nset [level v] to [85]\n\nchange [level v] by (1)\n\nchange [level v] by (-1)\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\n@Lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    repeat (30)\n        change y by (-0.4)\n    end\n    repeat (30)\n        change y by (0.4)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\n@Player\n\nwhen flag clicked\nset [level v] to [1]\ngo to [front v] layer\nhide\n\nwhen I receive [skip v]\ngo to x: (-190) y: (50)\nchange [level v] by (1)\n\nwhen I receive [restart v]\nset [xs v] to [0]\nset [ys v] to [0]\ngo to x: (-190) y: (50)\n\nwhen flag clicked\nset size to (100) %\nshow\nset [signal v] to [disactivated]\npoint in direction (90)\ngo to x: (-190) y: (20)\nset [xs v] to [0]\nset [ys v] to [0]\nforever\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n        change [xs v] by (1.5)\n        switch costume to (right v)\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 [xs v] by (-1.5)\n        switch costume to (left v)\n    end\n    if <<<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        switch costume to (upright v)\n    end\n    if <<<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n        switch costume to (upleft v)\n    end\n    if <not <<key (right arrow v) pressed?> or <<key (left arrow v) pressed?> or <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (a v) pressed?> or <<key (d v) pressed?> or <<<mouse down?> and <(mouse x) > (x position)>> or <<mouse down?> and <(mouse x) < (x position)>>>>>>>>>> then\n        switch costume to (normal v)\n    end\n    if <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>>> then\n        switch costume to (down v)\n    end\n    change x by (Xs)\n    if <touching (easy v)?> then\n        change x by ((Xs) * (-1))\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            if <(Xs) > [0]> then\n                set [xs v] to [-15]\n                set [ys v] to [10]\n            else\n                set [xs v] to [15]\n                set [ys v] to [10]\n            end\n        else\n            set [xs v] to [0]\n        end\n    else\n        set [xs v] to ((Xs) * (0.8))\n    end\n    change y by (Ys)\n    if <touching (easy v)?> then\n        change y by ((Ys) * (-1))\n        set [ys v] to [0]\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n            switch costume to (player - up v)\n            if <(Jumping) = [yes]> then\n                set [ys v] to [12]\n                set [jumping v] to [no]\n            end\n        end\n    else\n        change [ys v] by (-1)\n        set [jumping v] to [yes]\n    end\n    if <(Level) = [21]> then\n        if <(y position) < [-170]> then\n            change [level v] by (1)\n        end\n    else\n        if <(Level) = [26]> then\n            if <[167] < (y position)> then\n                change [level v] by (1)\n            end\n        else\n            if <(x position) > [239]> then\n                set size to (100) %\n                change [level v] by (1)\n                go to x: (-190) y: (20)\n                set [xs v] to [0]\n                set [ys v] to [0]\n            end\n        end\n    end\n    if <<<touching (spikes v)?> or <(y position) < [-178]>> or <<touching (arrow v)?> or <<touching (saws v)?> or <<touching (enemy v)?> or <touching (lava v)?>>>>> then\n        set size to (100) %\n        set [xs v] to [0]\n        set [ys v] to [0]\n        go to x: (-190) y: (50)\n    end\n    if <touching (trampoline v)?> then\n        set [ys v] to [20]\n    end\n    if <touching (water v)?> then\n        set [ys v] to [-1]\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [ys v] to [5]\n        end\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            set [ys v] to [-5]\n        end\n    end\n    if <touching (speed ups v)?> then\n        set [xs v] to [20]\n    end\n    if <touching (back ups v)?> then\n        set [xs v] to [-20]\n    end\n    if <touching (small become v)?> then\n        set size to (50) %\n    end\n    if <touching (large become v)?> then\n        set size to (100) %\n    end\nend\n\nwhen flag clicked\nswitch costume to (normal v)\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (clone v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-5)\nend\ndelete this clone\n\nwait (0.2) seconds\n\nset [ghost v] effect to (20)\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (1 v)\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\nwait (1) seconds\nshow\n\n@Sprite2\n\nwhen flag clicked\nhide\nclear graphic effects\nreset timer\nwait (0) seconds\nstart sound [Steve Hartz - Never Get Old \[NCS Release\] v]\nswitch costume to (bg v)\ncreate clone of (_myself_ v)\nrepeat (3)\n    switch costume to (square2 v)\n    set [:d v] to [3]\n    create clone of (_myself_ v)\n    wait (.1) seconds\n    switch costume to (square v)\n    set [:d v] to [2]\n    create clone of (_myself_ v)\n    wait (.1) seconds\nend\nwait (.6) seconds\ncreate particle thingys\nswitch costume to (hi v)\ncreate clone of (_myself_ v)\nwait (.07) seconds\nswitch costume to (hi2 v)\ncreate clone of (_myself_ v)\nwait (.07) seconds\nswitch costume to (hi3 v)\ncreate clone of (_myself_ v)\nwait (.07) seconds\nswitch costume to (hi4 v)\ncreate clone of (_myself_ v)\nwait (.07) seconds\nswitch costume to (hi5 v)\ncreate clone of (_myself_ v)\nwait (1.2) seconds\nswitch costume to (screen v)\ncreate clone of (_myself_ v)\nwait (.15) seconds\nswitch costume to (screen2 v)\ncreate clone of (_myself_ v)\nwait (0.5) seconds\npoo\nswitch costume to (why v)\ncreate clone of (_myself_ v)\nwait (1.5) seconds\nswitch costume to (wipe v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [name v]) = [Bg]> then\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (bg v)\n    set size to (100) %\n    show\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    repeat (25)\n        change [ghost v] effect by (-4)\n    end\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [Square]?> then\n    switch costume to (hax v)\n    go to x: (-100000000000) y: (0)\n    point in direction (90)\n    set size to (0) %\n    show\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    switch costume to (:D)\n    forever\n        switch costume to (hax v)\n        change [ghost v] effect by (-7)\n        change x by (((0) - (x position)) / (10))\n        turn right (4) degrees\n        change size by ((size) / (8))\n        switch costume to (:D)\n    end\nend\n\ndefine haha lol\nrepeat (25)\n    set [x v] to ((((100) - (size)) * (0.1)) + ((x) * (0.8)))\n    change size by (x)\n    change [ghost v] effect by (-7)\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [hi]?> then\n    go to x: (0) y: (0)\n    point in direction (90)\n    set size to (300) %\n    show\n    set [momentum v] to [0]\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (100)\n    go to [front v] layer\n    switch costume to (costume [name v])\n    haha lol\n    repeat (5)\n        change [ghost v] effect by (2)\n        change [momentum v] by (1)\n        change y by (momentum)\n        change size by (-2)\n    end\n    forever\n        change [ghost v] effect by (4)\n        change [momentum v] by (-1)\n        change y by (momentum)\n        change size by (-2)\n    end\nend\n\ndefine create particle thingys\nrepeat (10)\n    switch costume to (pick random (10) to (13))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [part]?> then\n    go to (random position v)\n    point in direction (pick random (-180) to (180))\n    set size to (pick random (70) to (130)) %\n    show\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (100)\n    go to [front v] layer\n    set [momentum v] to [0]\n    switch costume to (costume [name v])\n    glide (25) secs to (random position v)\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [part]?> then\n    repeat (pick random (5) to (15))\n        change [ghost v] effect by (-5)\n    end\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [screen]?> then\n    go to x: (0) y: (500)\n    point in direction (90)\n    set size to (100) %\n    show\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    switch costume to (costume [name v])\n    forever\n        change [ghost v] effect by (-10)\n        change y by (((0) - (y position)) / (9))\n    end\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [circle]> then\n    set size to (pick random (50) to (100)) %\n    point in direction (pick random (-180) to (180))\n    switch costume to (circle v)\n    go to [front v] layer\n    set [ghost v] effect to (pick random (0) to (50))\n    set [x v] to (pick random (-15) to (15))\n    set [y v] to (pick random (-10) to (10))\n    show\n    go to x: (0) y: (0)\n    forever\n        switch costume to (costume1 v)\n        move (x) steps\n        change y by (y)\n        change [y v] by (pick random (0.0) to (0.4))\n        change [x v] by (((0) - (x)) / (12))\n        switch costume to (circle v)\n    end\nend\n\ndefine poo\nrepeat (70)\n    switch costume to (circle v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [why]?> then\n    go to x: (0) y: (0)\n    point in direction (90)\n    set size to (0) %\n    show\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (0)\n    go to [front v] layer\n    switch costume to (costume [name v])\n    haha lol\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [why]> then\n    forever\n        point in direction ((([cos v] of ((timer) * (175)) ) * (5)) + (90))\n        set y to ((([cos v] of ((timer) * (100)) ) * (20)) + (0))\n    end\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [Wipe]?> then\n    go to x: (500) y: (0)\n    point in direction (90)\n    set size to (100) %\n    show\n    set [ghost v] effect to (100)\n    set [momentum v] to [0]\n    go to [front v] layer\n    switch costume to (wipe v)\n    repeat (45)\n        change [ghost v] effect by (-5)\n        change x by (((-1) - (x position)) / (9))\n    end\n    set [intro end v] to [1]\n    switch costume to (hax v)\n    set size to (100) %\n    switch costume to (wipe2 v)\n    repeat (100)\n        change [ghost v] effect by (3)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [intro end v] to [0]\n\nwhen I start as a clone\nforever\n    if <<not < (costume [name v]) contains [wipe]?>> and <(Intro End) = [1]>> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nif < (costume [name v]) contains [part]?> then\n    set [momentum v] to (pick random (-4) to (4))\n    forever\n        turn right (momentum) degrees\n    end\nend\n\n