Saving the Platformers - A Platformer (Part 2)              #games #animations    

Instructions: Hello Everyone!\nWell, Looks like part two is here!\n\nIf you have not seen part one then DO NOT PLAY THIS, Part 1: https://scratch.mit.edu/projects/426349955\n\nIf there is lag: Close all your other tabs, refresh this page, and click the flag a bunch of times :D\n\nAsk on my profile to join this game's fanclub! - https://scratch.mit.edu/studios/27583199\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nInstructions:\n-Jump on enemies to kill them (they can only be killed while on the ground)\n-arrow keys to move\n-NO ADVERTISING PLEASE PLEASE PLEASE!!!!\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nCredits:\n@portishead7 for the character art!\n@yotacopaco for the rest!\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nMusic:\nIntro music - Life is a Dream by The Cords 1954\nAnimation Music - Lord of the Rings and Palpitations\nGame Music - Predator from purple-planet.com\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n\nOk now you need to stop scrolling\n\n\n\n\n\n\n\n\n\n\n\n\n\ni said stop...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ncome on play the game...\n\n\n\n\n\n\n\n\ncome on play the game...\n\n\n\n\n\n\n\n\n\n\n\nif you scroll down anymore....\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nSTOP!!!!!!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n     ------------------------NO MORE------------------------\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n---------------------------ROAD CLOSED---------------------------\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nFine this is the end...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nOk, so there is one secret in the game, can you find it? Do not look inside the project ok? :D\n#savetheplatformers\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<============  Go play the game :D

@Stage\n\nwhen I receive [message1 v]\nwait (1) seconds\nset volume to (60) %\nrepeat until <([costume # v] of [ground v]) = [9]>\n    play sound [blank2 v] until done\n    play sound [blank v] until done\nend\n\nwhen I receive [message1 v]\nswitch backdrop to (1 v)\nforever\n    if <([costume # v] of [ground v]) = [7]> then\n        switch backdrop to (3 v)\n    end\nend\n\nwhen I receive [were back... v]\nwait (1) seconds\nset volume to (60) %\nforever\n    play sound [blank v] until done\n    play sound [blank2 v] until done\nend\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nhide\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen I receive [message1 v]\nshow\n\nwhen I receive [message1 v]\nforever\n    if <([costume # v] of [ground v]) = [9]> then\n        if <touching (text v)?> then\n            if <(Move?) = [yes]> then\n                broadcast (Lab Animation v)\n            else\n                broadcast (Were back... v)\n            end\n        end\n    end\nend\n\nwhen I receive [were back... v]\nshow\n\nwhen I receive [lab animation v]\nhide\n\n@Player\n\nchange x by ((x) * (-1))\n\nchange y by (-4)\n\nset [y v] to [15]\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (mad v)\nhide\nforever\n    if <(Move?) = [no]> then\n        if <([costume # v] of [ground v]) = [1]> then\n            repeat (400)\n                go to x: (14) y: (-70)\n            end\n        end\n    end\nend\n\nwhen [r v] key pressed\nbroadcast (Restart v)\n\nwhen I receive [next level v]\nbroadcast (Restart v)\n\nwhen I receive [restart v]\ngo to x: (-220) y: (-10)\npoint in direction (90)\nset [y v] to [0]\nset [x v] to [0]\n\nwhen I receive [message1 v]\nshow\nforever\n    if <<(x position) > [230]> and <touching (_edge_ v)?>> then\n        broadcast (Next level v)\n    end\n    if <<touching (spikes v)?> or <<<<<touching (lava v)?> or <touching (door v)?>> or <touching (fly v)?>> or <touching (upspikes v)?>> or <<(y position) < [-170]> and <touching (_edge_ v)?>>>> then\n        broadcast (Restart v)\n    end\n    if <touching (bounce v)?> then\n        set [y v] to [20]\n    end\nend\n\nchange [y v] by (-1)\n\nwhen flag clicked\nforever\n    Move\nend\n\ndefine Move\ngo to [front v] layer\n\nwhen I receive [message1 v]\nbroadcast (Restart v)\nswitch costume to (costume1 v)\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    go to [front v] layer\n    if <touching (ladders v)?> then\n        set [y v] to [0]\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [y v] to [8]\n        end\n        if <<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            set [y v] to [-8]\n        end\n    else\n        change [y v] by (-1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (2)\n        if <touching (ground v)?> then\n            change y by (2)\n            if <touching (ground v)?> then\n                change y by (2)\n                if <touching (ground v)?> then\n                    change y by (2)\n                    if <touching (ground v)?> then\n                        change y by (2)\n                        if <touching (ground v)?> then\n                            change y by (-4)\n                            change x by ((x) * (-1))\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <([abs v] of (x) ) = (x)> then\n                                    set [x v] to [-10]\n                                else\n                                    set [x v] to [10]\n                                end\n                                set [y v] to [15]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (ground v)?>> then\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nwhen I receive [were back... v]\nshow\ngo to x: (-220) y: (-50)\n\nwhen I receive [happy v]\nswitch costume to (happy v)\n\nwhen I receive [lab animation v]\nhide\n\n@Tn\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Spikes\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I start as a clone\npoint in direction (90)\nswitch costume to (level 10 v)\nforever\n    show\n    go to [back v] layer\n    turn right (10) degrees\nend\n\nwhen I receive [restart v]\nif  then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [2]> then\n    Glide of clone [190] [-180] [170] [190]\nend\nif <([costume # v] of [ground v]) = [3]> then\n    Glide of clone [200] [-100] [200] [200]\nend\nif <([costume # v] of [ground v]) = [4]> then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [5]> then\n    Glide of clone [50] [-180] [50] [150]\n    Glide of clone [-50] [-180] [-50] [150]\nend\nif <([costume # v] of [ground v]) = [6]> then\n    Glide of clone [-90] [-120] [20] [-120]\nend\nif <([costume # v] of [ground v]) = [7]> then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [8]> then\n    Glide of clone [70] [-100] [70] [200]\nend\nif <([costume # v] of [ground v]) = [9]> then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [10]> then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [11]> then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [12]> then\n    delete this clone\nend\n\nwhen I start as a clone\npoint in direction (90)\nswitch costume to (level 10 v)\nforever\n    go to x: (a) y: (b)\n    repeat until <<(round (x position)) = (c)> and <(round (y position)) = (d)>>\n        change x by (((c) - (x position)) / (12))\n        change y by (((d) - (y position)) / (12))\n    end\n    repeat until <<(round (x position)) = (a)> and <(round (y position)) = (b)>>\n        change x by (((a) - (x position)) / (12))\n        change y by (((b) - (y position)) / (12))\n    end\nend\n\ndefine Glide of clone (a) (b) (c) (d)\nset [a v] to (a)\nset [b v] to (b)\nset [c v] to (c)\nset [d v] to (d)\ncreate clone of (_myself_ v)\n\nwhen I receive [message1 v]\nshow\n\nwhen flag clicked\nforever\n    switch costume to ([costume # v] of [ground v])\n    clear graphic effects\n    set size to (100) %\n    go to x: (0) y: (0)\nend\n\n@Text\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nshow\ngo to [back v] layer\nforever\n    go to x: (0) y: (0)\n    switch costume to ([costume # v] of [ground v])\nend\n\nwhen I receive [lab animation v]\nhide\n\nwhen I receive [were back... v]\nshow\n\n@Clouds\n\nwhen I start as a clone\nshow\nswitch costume to (cloud hitbox v)\ngo to x: (240) y: (pick random (10) to (150))\nset [my costume v] to (pick random (1) to (2))\nswitch costume to (My costume)\nset [ghost v] effect to (pick random (50) to (70))\nrepeat (96)\n    switch costume to (cloud hitbox v)\n    change x by (-5)\n    switch costume to (My costume)\nend\ndelete this clone\n\nwhen I receive [message1 v]\nforever\n    if <(backdrop [number v]) = [1]> then\n        create clone of (_myself_ v)\n    end\n    wait (pick random (2) to (4)) seconds\nend\n\n@Enemies\n\nwhen I receive [restart v]\ndelete this clone\n\ndefine Clone (x) (y)\ngo to x: (x) y: (y)\nset rotation style [all around v]\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\npoint in direction (90)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    turn right (5) degrees\nend\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    turn right (5) degrees\nend\nhide\n\nwhen I receive [restart v]\nhide\nif  then\n    delete this clone\nend\nif <([costume # v] of [ground v]) = [1]> then\nif <([costume # v] of [ground v]) = [2]> then\nif <([costume # v] of [ground v]) = [3]> then\n    Clone [110] [50]\nend\nif <([costume # v] of [ground v]) = [4]> then\nif <([costume # v] of [ground v]) = [5]> then\n    Clone [200] [-80]\nend\nif <([costume # v] of [ground v]) = [6]> then\n    Clone [200] [107]\nend\nif <([costume # v] of [ground v]) = [7]> then\n    Clone [200] [-80]\n    Clone [200] [-80]\nend\nif <([costume # v] of [ground v]) = [8]> then\n    Clone [150] [100]\nend\nif <([costume # v] of [ground v]) = [9]> then\nif <([costume # v] of [ground v]) = [10]> then\n    Clone [218] [120]\n    Clone [70] [-50]\nend\nif <([costume # v] of [ground v]) = [11]> then\nif <([costume # v] of [ground v]) = [12]> then\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    set rotation style [left-right v]\n    clear graphic effects\n    set size to (9) %\n    show\n    set [enemyx v] to [0]\n    set [enemyy v] to [0]\n    go to [front v] layer\n    forever\n        change [enemyy v] by (-1)\n        if <([x position v] of [player v]) < ((x position) - (10))> then\n            change [enemyx v] by (-0.4)\n            point in direction (-90)\n        end\n        if <((x position) - (-10)) < ([x position v] of [player v])> then\n            change [enemyx v] by (0.4)\n            point in direction (90)\n        end\n        set [enemyx v] to ((Enemyx) * (0.9))\n        change x by (Enemyx)\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((Enemyx) * (-1))\n            if <(y position) < ([y position v] of [player v])> then\n                set [enemyy v] to [10]\n                if <([abs v] of (x) ) = (x)> then\n                    set [enemyx v] to [-10]\n                else\n                    set [enemyx v] to [10]\n                end\n            else\n                set [enemyx v] to [0]\n            end\n        end\n        change y by (Enemyy)\n        if <touching (ground v)?> then\n            change y by ((Enemyy) - ((Enemyy) * (2)))\n            set [enemyy v] to [0]\n        end\n        change y by (-1)\n        if <<((y position) - (-120)) < ([y position v] of [player v])> and <touching (ground v)?>> then\n            set [enemyy v] to [14]\n        end\n        if <<touching (ground v)?> and <<touching (player v)?> and <(([y position v] of [player v]) - (10)) > (y position)>>> then\n            set [y v] to [15]\n            repeat (10)\n                change [ghost v] effect by (10)\n                change [enemyy v] by (1)\n            end\n            delete this clone\n        end\n        change y by (1)\n        switch costume to (costume3 v)\n        create clone of (_myself_ v)\n        switch costume to (costume2 v)\n        if <touching (player v)?> then\n            broadcast (Restart v)\n        end\n        if <touching (ladders v)?> then\n            if <([y position v] of [player v]) > (y position)> then\n                set [enemyy v] to [6]\n            else\n                set [enemyy v] to [-6]\n            end\n        end\n        if <touching (bounce v)?> then\n            set [enemyy v] to [20]\n        end\n    end\nelse\n    show\n    clear graphic effects\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [amount v] to [1]\nset [speed v] to [1]\n\nwait (1) seconds\n\nwhen flag clicked\nhide\n\n@SKIP\n\nwhen this sprite clicked\nif <not <([costume # v] of [ground v]) = [12]>> then\n    broadcast (Next level v)\nend\n\nwhen I receive [message1 v]\nshow\npoint in direction (90)\ngo to [front v] layer\nturn left (15) degrees\nforever\n    repeat (15)\n        turn left (-2) degrees\n    end\n    wait (0.1) seconds\n    repeat (15)\n        turn left (2) degrees\n    end\n    wait (0.1) seconds\nend\n\nwhen I receive [lab animation v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [were back... v]\nshow\n\n@Sun\n\nwhen flag clicked\nhide\nforever\n    if <([costume # v] of [ground v]) = [7]> then\n        hide\n    end\nend\n\nwhen I receive [message1 v]\nrepeat until <([costume # v] of [ground v]) = [7]>\n    go to [back v] layer\n    show\n    go to x: (218) y: (160)\n    set size to (140) %\n    forever\n        repeat (40)\n            change size by (0.6)\n        end\n        repeat (40)\n            change size by (-0.6)\n        end\n    end\nend\n\n@Lava\n\nwhen I start as a clone\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (60)\ngo to [back v] layer\nrepeat until <(homecoming) = [1]>\n    set [time v] to [2]\n    switch costume to ([costume # v] of [ground v])\n    repeat (10)\n        switch costume to ([costume # v] of [ground v])\n        move (1) steps\n        change y by (time)\n    end\n    repeat (10)\n        change y by ((time) * (-1))\n        move (-1) steps\n        switch costume to ([costume # v] of [ground v])\n    end\nend\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [message1 v]\nrepeat (3)\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\nforever\n    clear graphic effects\n    go to x: (0) y: (0)\n    switch costume to ([costume # v] of [ground v])\nend\n\n@UpSpikes\n\nwhen flag clicked\nforever\n    switch costume to ([costume # v] of [ground v])\n    clear graphic effects\n    set size to (100) %\n    go to x: (0) y: (0)\n    glide (0.2) secs to x: (0) y: (-40)\n    wait (0.5) seconds\n    glide (0.4) secs to x: (0) y: (0)\nend\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [message1 v]\nshow\n\n@Animation\n\nwhen I receive [message1 v]\nhide\n\nwhen I receive [portishead7 intro done v]\nstart sound [LOTR v]\nswitch backdrop to (oof v)\nset volume to (100) %\nshow\nswitch costume to (prevous v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nswitch costume to (normal v)\ngo to x: (-350) y: (-270)\nclear graphic effects\nset size to (100) %\nrepeat (50)\n    move (5) steps\nend\nswitch costume to (noooooooo v)\npoint in direction (90)\nwait (4) seconds\nswitch costume to (sad speech 2 v)\nwait (4) seconds\nswitch costume to (sad speech v)\nwait (4) seconds\nswitch costume to (angry v)\nrepeat (50)\n    move (5) steps\nend\nset [ghost v] effect to (100)\nwait (1.5) seconds\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nswitch costume to (and so... v)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (3) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\n    change volume by (-5)\nend\nstop all sounds\nbroadcast (message1 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [lab animation v]\ngo to [front v] layer\ngo [forward v] (200000) layers\nstop all sounds\nstart sound [Palpitations  v]\nswitch backdrop to (lab talk v)\nset volume to (100) %\nshow\nswitch costume to (lab entry v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (5) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nswitch costume to (angry v)\ngo to x: (-350) y: (-270)\nclear graphic effects\nset size to (100) %\nrepeat (50)\n    move (5) steps\nend\nswitch costume to (well i... v)\npoint in direction (90)\nwait (4) seconds\nswitch costume to (ha ha ha v)\nwait (4) seconds\nswitch backdrop to (lab buddy v)\nswitch costume to (buddy v)\nrepeat (25)\n    move (-2) steps\nend\nswitch costume to (b talk v)\nwait (2) seconds\nswitch backdrop to (lab buddy2 v)\nswitch costume to (bad guy... v)\ngo to x: (87) y: (-45)\npoint in direction (90)\nrepeat (25)\n    move (2) steps\nend\nset [ghost v] effect to (100)\nwait (1.5) seconds\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nswitch costume to (your friend v)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (3) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\n    change volume by (-5)\nend\nstop all sounds\nswitch backdrop to (3 v)\nset [move? v] to [no]\nbroadcast (Were back... v)\n\n@bounce\n\nwhen I start as a clone\ngo to [front v] layer\ngo [backward v] (5) layers\nforever\n    show\n    if <touching (player v)?> then\n        start sound [Big Boing v]\n        set [y v] to [20]\n        switch costume to (costume1 v)\n        repeat (2)\n            next costume\n        end\n        repeat (2)\n            switch costume to ((costume [number v]) - (1))\n        end\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [next level v]\ndelete this clone\n\nwhen flag clicked\nhide\ndelete this clone\n\nwhen I receive [message1 v]\nwait until <([costume # v] of [ground v]) = [4]>\ngo to x: (-50) y: (-84)\ncreate clone of (_myself_ v)\nwait until <([costume # v] of [ground v]) = [6]>\ngo to x: (80) y: (-80)\ncreate clone of (_myself_ v)\n\nwait until <([costume # v] of [ground v]) = [8]>\ngo to x: (80) y: (-80)\ncreate clone of (_myself_ v)\nwait until <([costume # v] of [ground v]) = [10]>\ngo to x: (80) y: (-80)\ncreate clone of (_myself_ v)\n\n@Character\n\nwhen flag clicked\nset [move? v] to [yes]\nset [clone? v] to [0]\nhide\ndelete (all) of [items: v]\ndelete (all) of [errands: v]\n\nwhen I receive [message1 v]\nforever\n    hide\n    if <([costume # v] of [ground v]) = [1]> then\n        switch costume to (oof v)\n        go to [front v] layer\n        go [backward v] (10) layers\n        point in direction (-90)\n        go to x: (100) y: (-69)\n        show\n        if <touching (player v)?> then\n            if <<key (space v) pressed?> or <mouse down?>> then\n                set [move? v] to [no]\n                switch costume to (secret v)\n                say [ Hey! Don't wake me up, I'm suppose to be dead...] for (5) seconds\n                say [ It's all part of the act!] for (2) seconds\n                say [Well since you bothered me, comment "Red Diamond"] for (5) seconds\n                wait (0.7) seconds\n                set [move? v] to [yes]\n            end\n        end\n    end\n    if <([costume # v] of [ground v]) = [10]> then\n        hide\n        switch costume to (buddy v)\n        go to [front v] layer\n        go [backward v] (10) layers\n        point in direction (-90)\n        go to x: (-250) y: (-69)\n        show\n        if <touching (player v)?> then\n            if <<key (space v) pressed?> or <mouse down?>> then\n                set [move? v] to [no]\n                switch costume to (buddy talk v)\n                say [ You survived!] for (4) seconds\n                say [ We thought you wouldn't come back for us!] for (4) seconds\n                say [ Thank you for coming! The others are a few rooms ahead...] for (5) seconds\n                wait (0.7) seconds\n                set [move? v] to [yes]\n            end\n        end\n    end\n    if <([costume # v] of [ground v]) = [12]> then\n        hide\n        switch costume to (buddy v)\n        go to [front v] layer\n        go [backward v] (10) layers\n        point in direction (-90)\n        go to x: (0) y: (-75)\n        show\n        if <touching (player v)?> then\n            if <<key (space v) pressed?> or <mouse down?>> then\n                set [move? v] to [no]\n                switch costume to (buddy talk v)\n                say [ That was a tough trip my friend.] for (4) seconds\n                say [  I am glad I found you before I was caught in the factory.] for (5) seconds\n                say [ We believe in you, just remember that. ] for (5) seconds\n                say [Now lets get prepared to fight the Phantom Cube...] for (6) seconds\n                say [Yup that's his name... ] for (4) seconds\n                broadcast (Happy v)\n                wait (0.7) seconds\n                set [move? v] to [yes]\n            end\n        end\n    end\nend\n\nwhen I receive [lab animation v]\nhide\n\nwhen I receive [were back... v]\nshow\n\n@Intro\n\nwhen flag clicked\nstart sound [Sh-Boom Cars v]\nswitch costume to (costume1 v)\nshow\nrepeat (79)\n    next costume\n    wait (.08) seconds\nend\nhide\nbroadcast (portishead7 intro done v)\n\n@Key\n\nwhen I receive [message1 v]\nforever\n    if <([costume # v] of [ground v]) = [2]> then\n        hide\n    end\n    if <([costume # v] of [ground v]) = [3]> then\n        hide\n    end\n    if <([costume # v] of [ground v]) = [4]> then\n        hide\n    end\n    if <([costume # v] of [ground v]) = [5]> then\n        show\n        go to x: (-76) y: (100)\n    end\n    if <([costume # v] of [ground v]) = [6]> then\n        show\n        go to x: (-100) y: (150)\n    end\n    if <([costume # v] of [ground v]) = [7]> then\n        hide\n    end\n    if <([costume # v] of [ground v]) = [8]> then\n        show\n        go to x: (-30) y: (135)\n    end\n    if <([costume # v] of [ground v]) = [9]> then\n        show\n        go to x: (170) y: (-60)\n    end\n    if <([costume # v] of [ground v]) = [10]> then\n        show\n        go to x: (0) y: (100)\n    end\n    if <([costume # v] of [ground v]) = [11]> then\n        show\n        go to x: (100) y: (150)\n    end\n    if <([costume # v] of [ground v]) = [12]> then\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\nforever\n    next costume\n    wait (0) seconds\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n        broadcast (Open v)\n    end\nend\n\nwhen I receive [restart v]\nset [ghost v] effect to (0)\n\n@Door\n\nwhen I receive [message1 v]\nshow\nforever\n    switch costume to ([costume # v] of [ground v])\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [restart v]\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [open v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\n@Res\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nif <not <([costume # v] of [ground v]) = [10]>> then\n    broadcast (Restart v)\nend\n\nwhen I receive [message1 v]\nshow\ngo to x: (134) y: (-155)\npoint in direction (90)\ngo to [front v] layer\nturn left (15) degrees\nforever\n    repeat (15)\n        turn left (-2) degrees\n    end\n    wait (0.1) seconds\n    repeat (15)\n        turn left (2) degrees\n    end\n    wait (0.1) seconds\nend\n\nwhen I receive [lab animation v]\nhide\n\nwhen I receive [were back... v]\nshow\n\n