MANDALORIAN PLATFORMER (#all#games)

Instructions: -------------------------------------------------------------comment #baby #yoda \nUse arrows or WASD keys to control\nenjoy and click the star and heart \nHave fun\nFollow @codekrish_67

@Stage\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@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@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@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@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@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 [Spunk 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@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@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@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@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@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@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@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@Intro3\n\nwhen I start as a clone\nif <(costume [number v]) = [10]> then\n    show\n    set [xx v] to (pick random (-5) to (5))\n    set [yy v] to (pick random (-4) to (3))\n    set size to (0) %\n    set [ss v] to (pick random (5) to (11))\n    repeat (10)\n        change x by (Xx)\n        change y by (Yy)\n        change [yy v] by (0.05)\n        turn right (Yy) degrees\n        change size by (Ss)\n    end\n    repeat until <touching (_edge_ v)?>\n        change x by (Xx)\n        change y by (Yy)\n        change [yy v] by (0.05)\n        turn right (Yy) degrees\n    end\n    repeat (10)\n        change x by (Xx)\n        change y by (Yy)\n        change [yy v] by (0.05)\n        change [ghost v] effect by (10)\n        turn right (Yy) degrees\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset volume to (100) %\nstart sound [Au5 - Follow You ft v]\nhide\nset [intro# v] to [0]\nrepeat (5)\n    set y to (250)\n    set x to (-200)\n    switch costume to (costume2 v)\n    set [brightness v] effect to (-20)\n    point in direction (45)\n    repeat (7)\n        set y to (250)\n        create clone of (_myself_ v)\n        change x by (75)\n    end\n    set y to (-250)\n    set x to (210)\n    set [brightness v] effect to (0)\n    switch costume to (costume2 v)\n    point in direction (90)\n    repeat (7)\n        set size to (0) %\n        create clone of (_myself_ v)\n        change x by (-75)\n    end\nend\nset y to (250)\nset x to (-200)\nswitch costume to (costume3 v)\nset [brightness v] effect to (0)\npoint in direction (45)\nrepeat (7)\n    create clone of (_myself_ v)\n    change x by (75)\nend\nset x to (0)\nset y to (0)\nswitch costume to (costume7 v)\nrepeat (3)\n    create clone of (_myself_ v)\n    next costume\n    wait (0.05) seconds\nend\nswitch costume to (buum v)\nrepeat (50)\n    create clone of (_myself_ v)\nend\nwait (0) seconds\nset y to (-100)\nswitch costume to (font v)\ncreate clone of (_myself_ v)\nwait (2) seconds\nset y to (250)\nset x to (-200)\nswitch costume to (costume1 v)\nset [brightness v] effect to (-20)\npoint in direction (45)\nrepeat (7)\n    set x to (-200)\n    create clone of (_myself_ v)\n    change y by (-75)\nend\nbroadcast (intro v)\nhide\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (7)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [7]> then\n    show\n    go to [front v] layer\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\n    wait (1) seconds\n    broadcast (Up v)\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [8]> then\n    go to [front v] layer\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [9]> then\n    show\n    go to [front v] layer\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [5]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (30)\n        set [i v] to (((I) * (0.1)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\n    wait (3.6) seconds\n    repeat (30)\n        change y by ((y position) / (2))\n        change size by (((0) - (size)) / (15))\n        change [ghost v] effect by (4)\n    end\nend\n\nwhen I receive [up v]\nif <<(costume [number v]) < [10]> and <(costume [number v]) > [6]>> then\n    repeat (50)\n        set [i v] to (((I) * (0.1)) + (((50) - (y position)) / (5)))\n        change y by (I)\n        change size by (((70) - (size)) / (5))\n    end\n    repeat (30)\n        set [i v] to (((I) * (0.6)) + (((-) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\n    repeat (30)\n        change y by (((y position) + (3)) / (3))\n        change size by (-1)\n        change [ghost v] effect by (4)\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [11]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    repeat (50)\n        set [i v] to (((I) * (0.8)) + (((0) - (y position)) / (5)))\n        change y by (I)\n        change size by (((100) - (size)) / (5))\n    end\n    repeat (50)\n        set [i v] to (((I) * (0.8)) + (((-100) - (y position)) / (5)))\n        change y by (I)\n        change size by (((0) - (size)) / (5))\n        change [ghost v] effect by (5)\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    show\n    set size to (0) %\n    point in direction (90)\n    set x to (-300)\n    repeat (50)\n        set [i v] to (((I) * (0.1)) + (((0) - (x position)) / (8)))\n        change x by (I)\n        change size by (((100) - (size)) / (5))\n        go to [front v] layer\n    end\n    broadcast (Intro over v)\n    repeat (30)\n        change x by (((x position) - (1)) / (3))\n        change [ghost v] effect by (4)\n    end\nend\n\nwhen I receive [intro over v]\nif <(costume [number v]) > [2]> then\n    delete this clone\nend\n\nwhen I receive [intro over v]\nrepeat (100)\n    change volume by (-1)\nend\n\nwhen I receive [delete all v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\n\n@Sprite1\n\nwhen flag clicked\nforever\n    point in direction ((([sin v] of ((timer) * (1000)) ) * (4)) + (90))\nend\n\nwhen flag clicked\nhide\nswitch costume to (on v)\ngo to x: (202) y: (138)\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\nshow\n\nwhen flag clicked\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\nplay sound [The Mandalorian Theme v] until done\n\n