Grey's Mission (Platformer + animation) PART 3


@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop4 v)\n\nwhen I receive [menu v]\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [cutscene v]\nswitch backdrop to (backdrop5 v)\n\nwhen I receive [start game v]\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [next level v]\nif <([costume # v] of [sprite4 v]) = [9]> then\n    switch backdrop to (backdrop6 v)\nend\n\n@Sprite3\n\nwhen flag clicked\ngo to [front v] layer\nset [brightness v] effect to (0)\ngo to x: (0) y: (0)\nset size to (80) %\nhide\n\nwhen I receive [cutscene v]\ngo to x: (52) y: (-36)\nset [ghost v] effect to (100)\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nswitch costume to (costume1 v)\nbroadcast (text v)\n\nwhen I receive [bounce v]\ngo to x: (52) y: (-36)\nswitch costume to (costume1 v)\nglide (0.2) secs to x: (52) y: (-46)\nswitch costume to (costume2 v)\nglide (0.2) secs to x: (52) y: (-36)\n\nwhen I receive [end cutscene v]\ngo to x: (52) y: (-36)\nset [ghost v] effect to (100)\nshow\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nswitch costume to (costume1 v)\nbroadcast (Start game v)\n\nwhen I receive [start game v]\nhide\n\nwhen flag clicked\nset volume to (20) %\nforever\n    play sound [Short piece of relaxing music Taste of colors.mp3 v] until done\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nset volume to (50) %\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nshow\ngo to [front v] layer\nset rotation style [left-right v]\npoint in direction (90)\nset size to (100) %\nforever\n    go to (sprite2 v)\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        switch costume to (costume2 v)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        switch costume to (costume2 v)\n    end\n    if <not <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <key (up arrow v) pressed?>>> then\n        switch costume to (costume1 v)\n    end\n    if <key (up arrow v) pressed?> then\n        switch costume to (costume3 v)\n    end\n    if <<key (space v) pressed?> and <(db?) = [1]>> then\n        switch costume to (costume4 v)\n        point in direction (90)\n        set rotation style [all around v]\n        repeat (24)\n            go to (sprite2 v)\n            turn right (15) degrees\n        end\n        set rotation style [left-right v]\n    end\nend\n\nwhen I receive [in v]\n\nwhen I receive [next level v]\nset size to (100) %\n\nset size to (100) %\nswitch costume to (costume4 v)\nrepeat (10)\n    change size by (-10)\nend\n\ngo to [front v] layer\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\n@Sprite2\n\nwhen I receive [start game v]\nshow\nset [ghost v] effect to (100)\ngo to x: (-220) y: (-90)\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <(stop) = [0]> then\n        change [yv v] by (-0.5)\n        if <key (left arrow v) pressed?> then\n            change [xv v] by (-1)\n        end\n        if <key (right arrow v) pressed?> then\n            change [xv v] by (1)\n        end\n        set [xv v] to ((XV) * (0.9))\n        change x by (XV)\n        if <touching (sprite4 v)?> then\n            change y by (1)\n            if <touching (sprite4 v)?> then\n                change y by (1)\n                if <touching (sprite4 v)?> then\n                    change y by (1)\n                    if <touching (sprite4 v)?> then\n                        change y by (1)\n                        if <touching (sprite4 v)?> then\n                            change y by (1)\n                            if <touching (sprite4 v)?> then\n                                change y by (1)\n                                if <touching (sprite4 v)?> then\n                                    change y by (-6)\n                                    if <key (up arrow v) pressed?> then\n                                        set [yv v] to [7]\n                                        if <(XV) > [0]> then\n                                            set [xv v] to [-10]\n                                        else\n                                            set [xv v] to [10]\n                                        end\n                                    else\n                                        change x by ((XV) * (-1))\n                                        set [xv v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (YV)\n        if <touching (sprite4 v)?> then\n            change y by ((YV) * (-1))\n            set [yv v] to [0]\n            set [db? v] to [0]\n        end\n        change y by (-0.5)\n        if <<touching (sprite4 v)?> and <key (up arrow v) pressed?>> then\n            set [yv v] to [7]\n            set [db? v] to [1]\n        end\n        if <<key (space v) pressed?> and <(db?) = [1]>> then\n            set [yv v] to [8]\n            set [db? v] to [0]\n        end\n        change y by (0.5)\n    end\n    if <touching (sprite6 v)?> then\n        go to (sprite6 v)\n    end\n    if <<touching (sprite12 v)?> or <touching (sprite13 v)?>> then\n        go to x: (-220) y: (-90)\n        set [stop v] to [0]\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\n    if <key (r v) pressed?> then\n        go to x: (-220) y: (-90)\n        set [stop v] to [0]\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\nend\n\nwhen flag clicked\n\nchange [yv v] by (3)\n\nwhen I receive [next level v]\ngo to x: (-220) y: (-90)\nset [stop v] to [0]\nset [yv v] to [0]\nset [xv v] to [0]\n\nif <touching color (#ffff00)?> then\nend\n\nwait (1) seconds\n\nwhen flag clicked\nhide\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\n@Sprite4\n\nwhen I receive [start game v]\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nset [stop v] to [0]\nshow\n\nwhen I receive [next level v]\nnext costume\nset [stop v] to [0]\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\n@Sprite5\n\nwhen flag clicked\nshow\nset [ghost v] effect to (99)\ngo to x: (0) y: (0)\nset size to (1) %\nrepeat (99)\n    change [ghost v] effect by (-1)\n    change size by (1)\nend\nrepeat (99)\n    change [ghost v] effect by (1)\n    change size by (1)\nend\nbroadcast (logo v)\n\nwhen I receive [start game v]\nhide\n\n@Sprite12\n\nwhen flag clicked\nhide\nerase all\n\nforever\nend\n\nset [bounce v] to []\n\nrepeat (10)\nend\nrepeat (10)\nend\n\nchange y by (bounce)\n\nset [bounce v] to ((bounce) * (0.9))\n\nwhen backdrop switches to [5 v]\n\nwhen I start as a clone\n\nchange x by (10)\n\nset x to (0)\n\nset y to (-68)\n\nset y to (-68)\n\nforever\n    wait (0.05) seconds\n    next costume\nend\n\nset [bounce v] to [6]\n\ngo to x: (17) y: (-85)\n\nglide (1) secs to x: (200) y: (-39)\n\nwhen backdrop switches to [5 v]\n\nforever\n    if <touching (staff v)?> then\n        hide\n        broadcast (meep v)\n        broadcast (staff back v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen I receive [start game v]\nwait (0.1) seconds\nhide\nwait until <([costume # v] of [sprite4 v]) = [4]>\nshow\nforever\n    glide (1) secs to x: (-100) y: (-110)\n    glide (1) secs to x: (39) y: (-110)\n    glide (1) secs to x: (200) y: (-110)\n    glide (1) secs to x: (39) y: (-110)\nend\n\nwhen I receive [start game v]\nwait (0.1) seconds\nwait until <([costume # v] of [sprite4 v]) = [4]>\nshow\ngo to x: (34) y: (-39)\nswitch costume to (costume1 v)\nforever\n    wait (0.05) seconds\n    next costume\nend\n\nforever\n    glide (1) secs to x: (-100) y: (-39)\n    glide (1) secs to x: (39) y: (-39)\n    glide (1) secs to x: (200) y: (-39)\n    glide (1) secs to x: (39) y: (-39)\nend\n\nwhen I receive [start game v]\n\nwhen backdrop switches to [5 v]\n\nwhen I receive [next level v]\nwait until <([costume # v] of [sprite4 v]) = [5]>\nhide\nstop [other scripts in sprite v]\n\n@staff\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\n\nwhen I receive [staff back v]\n\ngo to x: (200) y: (100)\n\nif  then\nend\n\nif <<touching (sprite7 v)?> or <touching (sprite9 v)?>> then\n    repeat (15)\n        turn right (15) degrees\n        change x by ((([x position v] of [sprite4 v]) - (x position)) / (5))\n        change y by ((([y position v] of [sprite4 v]) - (y position)) / (5))\n    end\nend\n\nrepeat (15)\n    turn right (15) degrees\n    change x by ((([x position v] of [sprite4 v]) - (x position)) / (5))\n    change y by ((([y position v] of [sprite4 v]) - (y position)) / (5))\nend\n\nset [shoot v] to [0]\n\nwhen flag clicked\n\nif  then\nend\n\nif <mouse down?> then\n    if <(shoot) = [0]> then\n        set [shoot v] to [1]\n        repeat (30)\n            point towards (mouse-pointer v)\n            move (10) steps\n        end\n        set [shoot v] to [0]\n    end\n    if <(shoot) = [1]> then\n        repeat (15)\n            turn right (15) degrees\n            change x by ((([x position v] of [sprite4 v]) - (x position)) / (5))\n            change y by ((([y position v] of [sprite4 v]) - (y position)) / (5))\n        end\n    end\n    point in direction (90)\n    set [shoot v] to [0]\nend\n\nwhen I receive [start game v]\nshow\npoint in direction (90)\ngo to x: (200) y: (100)\ngo to [front v] layer\nswitch costume to (costume1 v)\nset [shoot v] to [0]\nforever\n    if <(shoot) = [0]> then\n        if <([direction v] of [sprite1 v]) = [90]> then\n            change x by (((([x position v] of [sprite1 v]) - (x position)) - (20)) / (5))\n            set size to (100) %\n            change y by ((([y position v] of [sprite1 v]) - (y position)) / (5))\n        end\n        if <([direction v] of [sprite1 v]) = [-90]> then\n            change x by (((([x position v] of [sprite1 v]) - (x position)) + (20)) / (5))\n            set size to (100) %\n            change y by ((([y position v] of [sprite1 v]) - (y position)) / (5))\n        end\n    end\nend\n\n@Sprite6\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nwait (1) seconds\nshow\ngo to x: (207) y: (-102)\nset [stop v] to [0]\nset [ghost v] effect to (100)\nset size to (25) %\nforever\n    if <touching (sprite2 v)?> then\n        wait (0.05) seconds\n        set [stop v] to [1]\n    end\n    if <not <<<([costume # v] of [sprite4 v]) = [3]> or <([costume # v] of [sprite4 v]) = [4]>> or <([costume # v] of [sprite4 v]) = [8]>>> then\n        go to x: (207) y: (-102)\n    end\n    if <<<([costume # v] of [sprite4 v]) = [3]> or <([costume # v] of [sprite4 v]) = [4]>> or <([costume # v] of [sprite4 v]) = [8]>> then\n        go to x: (207) y: (150)\n    end\nend\n\nforever\nend\n\nnext costume\n\nswitch costume to (costume9 v)\nrepeat (8)\n    switch costume to ((costume [number v]) - (1))\n    wait (0.1) seconds\nend\nbroadcast (in v)\n\nif <<([costume # v] of [sprite4 v]) = [1]> or <([costume # v] of [sprite4 v]) = [2]>> then\n    go to x: (207) y: (-102)\nend\nif <([costume # v] of [sprite4 v]) = [3]> then\n    go to x: (207) y: (150)\nend\n\nif <not <<([costume # v] of [sprite4 v]) = [3]> or <([costume # v] of [sprite4 v]) = [4]>>> then\n    go to x: (207) y: (-102)\nend\nif <<([costume # v] of [sprite4 v]) = [3]> or <([costume # v] of [sprite4 v]) = [4]>> then\n    go to x: (207) y: (150)\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nwhen I receive [logo v]\nshow\nset [ghost v] effect to (99)\ngo to x: (0) y: (0)\nset size to (1) %\nrepeat (99)\n    wait (0.05) seconds\n    change [ghost v] effect by (-1)\n    change size by (1)\nend\nrepeat (99)\n    wait (0.05) seconds\n    change [ghost v] effect by (1)\n    change size by (1)\nend\nbroadcast (menu v)\n\nwhen I receive [menu v]\ngo to x: (0) y: (98)\nset size to (150) %\n\nwhen I receive [start game v]\nhide\n\n@Sprite8\n\nwhen I receive [menu v]\ngo to [front v] layer\ngo to x: (0) y: (-25)\nshow\nset [ghost v] effect to (100)\nset size to (150) %\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nrepeat until <<touching (mouse-pointer v)?> and <mouse down?>>\n    if <touching (mouse-pointer v)?> then\n        set size to (200) %\n    else\n        set size to (150) %\n    end\nend\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nbroadcast (cutscene v)\nstop [this script v]\n\nbroadcast (oof v)\n\nwhen flag clicked\nhide\n\nwait until \n\n@Sprite9\n\ndefine Type []\nset x to (-230)\nset [letter v] to (letter (1) of (x))\nswitch costume to (letter (1) of (x))\nset [# v] to [1]\nrepeat (length of (x))\n    stamp\n    change x by (10)\n    change [# v] by (1)\n    switch costume to (letter (#) of (x))\nend\n\nwhen [space v] key pressed\n\ndefine Next line\nchange y by (-20)\n\nNext line\n\nwhen I receive [text v]\nset [brightness v] effect to (100)\nset size to (110) %\ngo to x: (-220) y: (160)\nerase all\nType [did you recieve my orders?]\nNext line\nType [i gave you a mission.]\nNext line\nType [have you fullfilled your mission duties yet?]\nwait (5) seconds\nbroadcast (bounce v)\nset [brightness v] effect to (100)\nset size to (110) %\ngo to x: (-220) y: (160)\nerase all\nType [good.]\nNext line\nType [return home please.]\nNext line\nType [that staff is going to be needed.]\nhide\nwait (5) seconds\nbroadcast (end cutscene v)\nerase all\n\nwhen flag clicked\n\n@Sprite10\n\nwhen flag clicked\nhide\n\nwhen I receive [start game v]\nwait (1) seconds\nshow\ngo to x: (207) y: (-102)\nset [stop v] to [0]\nswitch costume to (costume9 v)\nforever\n    if <<(stop) = [1]> and <touching (sprite1 v)?>> then\n        wait (0.05) seconds\n        set [stop v] to [1]\n        switch costume to (costume9 v)\n        repeat (8)\n            switch costume to ((costume [number v]) - (1))\n            wait (0.1) seconds\n        end\n        broadcast (in v)\n        wait (1) seconds\n        set [stop v] to [0]\n        switch costume to (costume9 v)\n    end\n    if <<(stop) = [1]> and <not <touching (sprite1 v)?>>> then\n        set [stop v] to [0]\n    end\n    if <not <<<([costume # v] of [sprite4 v]) = [3]> or <([costume # v] of [sprite4 v]) = [4]>> or <([costume # v] of [sprite4 v]) = [8]>>> then\n        show\n        go to x: (207) y: (-102)\n    end\n    if <<<([costume # v] of [sprite4 v]) = [3]> or <([costume # v] of [sprite4 v]) = [4]>> or <([costume # v] of [sprite4 v]) = [8]>> then\n        show\n        go to x: (207) y: (150)\n    end\n    if <([costume # v] of [sprite4 v]) = [10]> then\n        broadcast (end v)\n        stop [this script v]\n    end\nend\n\nforever\nend\n\nnext costume\n\nset [stop v] to [0]\n\nbroadcast (in v)\n\nwait (1) seconds\n\nbroadcast (next level v)\n\ngo to x: (10) y: (-102)\n\n@Sprite11\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [start game v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [in v]\ngo to [front v] layer\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (next level v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nbroadcast (next level v)\n\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (next level v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nbroadcast (next level v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [start game v]\ngo to [front v] layer\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [end v]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nbroadcast (final cutscene v)\n\n@Sprite13\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I receive [start game v]\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nset [stop v] to [0]\nshow\n\nwhen I receive [next level v]\nnext costume\nset [stop v] to [0]\n\n@Sprite14\n\nforever\nend\n\nforever\nend\n\nwhen I receive [final cutscene v]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (3) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nnext costume\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nrepeat (3)\n    wait (3) seconds\n    next costume\nend\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nnext costume\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nrepeat (14)\n    wait (0.05) seconds\n    next costume\nend\nwait (1) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nnext costume\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait (1) seconds\nrepeat (2)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    next costume\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (2) seconds\nend\nstop all sounds\nstart sound [DJ Striden - Lunar \[Video Game\] by DJ Striden.mp3 v]\nrepeat (5)\n    wait (0.05) seconds\n    next costume\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nnext costume\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nnext costume\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (9)\n    wait (0.05) seconds\n    next costume\nend\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nnext costume\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (3) seconds\nnext costume\nwait (2) seconds\nrepeat (2)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    next costume\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (1) seconds\nend\nwait (1) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nnext costume\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nwait (2) seconds\nnext costume\nwait (2) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nnext costume\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nstop [all v]\n\nwait (3) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nnext costume\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nrepeat (3)\n    wait (3) seconds\n    next costume\nend\n\nrepeat (14)\nend\n\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nnext costume\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nnext costume\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\n\nwait (3) seconds\nnext costume\nwait (2) seconds\nrepeat (2)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    next costume\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (1) seconds\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nset [ghost v] effect to (100)\nhide\n\n@Sprite15\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I receive [start game v]\nswitch costume to (1 v)\ngo to x: (0) y: (0)\nset [stop v] to [0]\nshow\n\nwhen I receive [next level v]\nnext costume\nset [stop v] to [0]\n\n