Plat of lies (platformer)

Instructions: *Use: ASWD to move or arrow keys. You can jump and fall through platforms.\n*Level skip button in upper right of the screen.\n*Try to escape and retrieve the coveted sugar!\n*4 endings possible.\n*There is a sequel that will be made...\nMy other story platformer: https://scratch.mit.edu/projects/300287278/\n\nI suppose this game has been up long enough for me to disclose the 4 endings.\n\n1. Jumps off cliff (say no at the start)\n2. Jumps in hole and goes inside Eyeguy. (jump in the hole in the woods)\n3. Makes it to Neighbors house and sees portal picture (make it to the end quickly)\n4. Makes it to Neighbors house and finds note. (make it to the end, but take a long time.)\n\nSuggest here to be featured: https://scratch.mit.edu/studios/4228481/ 

@Stage\n\nwhen flag clicked\nset [music? v] to [off]\nswitch backdrop to (m16_eaglenebula v)\n\nwhen I receive [hole1decent v]\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [begin intro v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [portal v]\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [music v]\nforever\n    if <(music?) = [off]> then\n        stop [this script v]\n    else\n        if <(music?) = [on]> then\n            play sound [Final_Fantasy_12_Final_Fantasy_Forest_Medley_OC_ReMix.mp3 v] until done\n        end\n    end\nend\n\nwhen I receive [back v]\nset [music? v] to [off]\nbroadcast (music v)\nstop all sounds\n\nset [music? v] to [on]\n\n@player\n\ndefine get touching <check platform?>\nif <touching (ground v)?> then\n    set [touch v] to [9]\nelse\n    if <<check platform?> and <touching (plat v)?>> then\n        set [touch v] to [1]\n    else\n        set [touch v] to [0]\n    end\nend\n\ndefine set costume\nif <(falling?) < [6]> then\n    change [frame v] by ((1) / (change costume))\n    switch costume to ([floor v] of ((4) + ((frame) mod (6))) )\nelse\n    if <(Yvelocity) > [0]> then\n        switch costume to (jump v)\n    else\n        switch costume to (fall v)\n    end\nend\n\nwhen I receive [next v]\nif <(level) = [2]> then\n    set [canmove v] to [false]\n    go to x: (-187) y: (-86)\n    think [hmmm...] for (2) seconds\n    say [That's strange.] for (2) seconds\n    repeat (8)\n        switch costume to (player2 v)\n        repeat (6)\n            next costume\n            wait (0.03) seconds\n            change x by (5)\n        end\n    end\n    say [I've never seen this before....] for (2) seconds\n    say [Well no time to tarry!] for (2) seconds\n    say [I need sugar!!] for (2) seconds\n    repeat (1)\n        switch costume to (player2 v)\n        repeat (6)\n            next costume\n            wait (0.03) seconds\n            change x by (5)\n        end\n    end\n    start sound [magical.mp3 v]\n    set rotation style [all around v]\n    repeat (75)\n        turn right (15) degrees\n        change y by (6)\n        change x by (1)\n        change y by (-6)\n    end\n    repeat (10)\n        change [pixelate v] effect by (30)\n    end\n    hide\n    broadcast (portal v)\n    clear graphic effects\n    go to x: (-173) y: (23)\n    show\n    glide (2) secs to x: (0) y: (0)\n    wait (1) seconds\n    repeat (50)\n        change size by (-2)\n    end\n    hide\n    set [level v] to [3]\n    broadcast (next for open v)\n    switch backdrop to (backdrop3 v)\n    go to x: (-187) y: (-86)\n    set [ghost v] effect to (100)\n    set size to (100) %\n    show\n    wait (0.5) seconds\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    set [bubbles? v] to [on]\n    broadcast (bubbles v)\n    think [That's weird...] for (2) seconds\n    think [Where am I?] for (2) seconds\n    set rotation style [left-right v]\n    set [canmove v] to [true]\nelse\n    if <(level) = [5]> then\n        set [canmove v] to [false]\n        say [This place is strange...] for (2) seconds\n        say [I just can't seem to find my way...] for (3) seconds\n        broadcast (eyeguy1 v)\n        wait (3) seconds\n        say [Who said that!?] for (2) seconds\n        wait (2.5) seconds\n        say [....] for (1) seconds\n        say [Uh... well hello there.] for (2) seconds\n        wait (10) seconds\n        say [Oh yes please, help me!] for (2) seconds\n        wait (2) seconds\n        say [OK...] for (2) seconds\n        set [canmove v] to [true]\n    else\n        if <(level) = [9]> then\n            say [Is it just me or is this place getting stranger...] for (3) seconds\n        else\n            if <(level) = [10]> then\n                say [You know what...] for (3) seconds\n                say [YOU have been lying to me this whole time!] for (3) seconds\n            else\n                if <(level) = [11]> then\n                    set [cliff v] to [true]\n                    broadcast (cliff v)\n                else\n                    if <(level) = [13]> then\n                        wait (3.5) seconds\n                        say [No!] for (2) seconds\n                        say [And I don't want to talk to you.] for (3) seconds\n                        wait (2) seconds\n                        say [You won't help me, you liar!] for (2) seconds\n                        wait (5) seconds\n                        think [He is obviously lying...] for (2) seconds\n                        think [But I have to pick somewhere...] for (3) seconds\n                    else\n                        if <(level) = [14]> then\n                            say [Well... it does look like the way home...] for (2) seconds\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nset [frame v] to [0]\nset [canmove v] to [true]\nset [falling? v] to [10]\nset [yvelocity v] to [0]\nforever\n    if <(canMove) = [true]> then\n        switch costume to (player2 v)\n        change [yvelocity v] by (-1)\n        change y by (Yvelocity)\n        set [xvelocity v] to ((Xvelocity) * (0.7))\n        touching ground <(Yvelocity) > [0]>\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            change [xvelocity v] by (-1.5)\n            set costume\n        end\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            change [xvelocity v] by (1.5)\n            set costume\n        end\n        if <(Xvelocity) < [-.5]> then\n            walk (-90) (Xvelocity) max step (([ceiling v] of ([abs v] of ((Xvelocity) * (1.3)) ) ) + (1))\n        else\n            if <(Xvelocity) > [.5]> then\n                walk (90) (Xvelocity) max step (([ceiling v] of ([abs v] of ((Xvelocity) * (1.3)) ) ) + (1))\n            end\n        end\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <<(jumpKey) = [0]> and <(falling?) < [3]>> then\n                start sound [Boing Cartoonish.mp3 v]\n                set [yvelocity v] to [14]\n                set [falling? v] to [6]\n                set [jumpkey v] to [1]\n            end\n        else\n            set [jumpkey v] to [0]\n        end\n        if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n            set [in platform v] to [2]\n        end\n        if <touching color (#ffff00)?> then\n            start sound [Wont Start Fart-SoundBible.com-1643093672.mp3 v]\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            go to x: (-222) y: (-84)\n            set [ghost v] effect to (0)\n        end\n        if <touching color (#ff0000)?> then\n            start sound [Jump-SoundBible.com-1007297584.mp3 v]\n            set [yvelocity v] to [17]\n            set [falling? v] to [6]\n        end\n        if <(x position) > [235]> then\n            broadcast (next v)\n            change [level v] by (1)\n            set x to (-222)\n            set y to (y position)\n        end\n    end\nend\n\ndefine touching ground <up>\nget touching \nif <(touch) = [0]> then\n    set [in platform v] to [1]\nelse\n    if <<up> and <(touch) = [1]>> then\n        set [in platform v] to [2]\n    end\nend\nrepeat until <(touch) < (in Platform)>\n    if <up> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [falling? v] to [0]\n    end\n    get touching <not <up>>\n    set [yvelocity v] to [0]\nend\n\nwhen I receive [home v]\nset [canmove v] to [false]\nstart sound [magical.mp3 v]\nset rotation style [all around v]\nrepeat (75)\n    turn right (15) degrees\n    change x by (1)\nend\nrepeat (10)\n    change [pixelate v] effect by (30)\nend\nhide\nbroadcast (next v)\nchange [level v] by (1)\nclear graphic effects\nset rotation style [left-right v]\npoint in direction (90)\nset size to (50) %\ngo to x: (-187) y: (-140)\nshow\nset [canmove v] to [true]\nbroadcast (newcontrols v)\n\ndefine walk (direction) (speed) max step (step)\npoint in direction (direction)\nchange x by (speed)\nset [slope v] to [0]\nget touching <(in Platform) = [1]>\nrepeat until <<(slope) = (step)> or <(touch) = [0]>>\n    change y by (1)\n    change [slope v] by (1)\n    get touching <(in Platform) = [1]>\nend\nif <(slope) = (step)> then\n    change x by ((0) - (step))\n    change y by ((0) - (slope))\n    if <<(touch) = [1]> and <(in Platform) = [1]>> then\n        set [in platform v] to [2]\n        walk (direction) (speed) max step (step)\n        if <(Xvelocity) = [0]> then\n            set [in platform v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nhide\nset [canmove v] to [false]\nset [level v] to [1]\nset size to (100) %\npoint in direction (90)\ngo to [front v] layer\ngo to x: (-187) y: (-86)\nswitch costume to (player2 v)\nset rotation style [left-right v]\n\nwhen I receive [newcontrols v]\nstop [other scripts in sprite v]\nset [frame v] to [0]\nset [canmove v] to [true]\nset [falling? v] to [10]\nset [yvelocity v] to [0]\nforever\n    if <(canMove) = [true]> then\n        switch costume to (player2 v)\n        change [yvelocity v] by (-1)\n        change y by (Yvelocity)\n        set [xvelocity v] to ((Xvelocity) * (0.5))\n        touching ground <(Yvelocity) > [0]>\n        if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n            change [xvelocity v] by (-1.5)\n            set costume\n        end\n        if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n            change [xvelocity v] by (1.5)\n            set costume\n        end\n        if <(Xvelocity) < [-.2]> then\n            walk (-90) (Xvelocity) max step (([ceiling v] of ([abs v] of ((Xvelocity) * (1.3)) ) ) + (1))\n        else\n            if <(Xvelocity) > [.2]> then\n                walk (90) (Xvelocity) max step (([ceiling v] of ([abs v] of ((Xvelocity) * (1.3)) ) ) + (1))\n            end\n        end\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <<(jumpKey) = [0]> and <(falling?) < [3]>> then\n                start sound [Boing Cartoonish.mp3 v]\n                set [yvelocity v] to [10]\n                set [falling? v] to [6]\n                set [jumpkey v] to [1]\n            end\n        else\n            set [jumpkey v] to [0]\n        end\n        if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n            set [in platform v] to [2]\n        end\n        if <touching color (#ffff00)?> then\n            start sound [Wont Start Fart-SoundBible.com-1643093672.mp3 v]\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            go to x: (-222) y: (-84)\n            set [ghost v] effect to (0)\n        end\n        if <touching color (#ff0000)?> then\n            start sound [Jump-SoundBible.com-1007297584.mp3 v]\n            set [yvelocity v] to [14]\n            set [falling? v] to [6]\n        end\n    end\nend\n\nwhen I receive [hole1decent v]\nset [level v] to [0]\nset [canmove v] to [false]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [falling v]\ngo to x: (0) y: (180)\nset [ghost v] effect to (0)\nswitch costume to (fall v)\nglide (3) secs to x: (x position) y: (-180)\nhide\nwait (1) seconds\ngo to x: (0) y: (180)\nshow\nswitch costume to (fall v)\nglide (3) secs to x: (x position) y: (-86)\nset [canmove v] to [true]\n\nwhen I receive [truth v]\nrepeat (17)\n    change size by (-5)\n    change y by (5)\nend\ngo to x: (56) y: (-7)\nset [canmove v] to [false]\n\nwhen I receive [portal v]\nrepeat until <(level) = [3]>\n    turn right (15) degrees\nend\nset [music? v] to [on]\nbroadcast (music v)\n\nwhen I receive [begin intro v]\nset [answer v] to [0]\nshow\nthink [....] for (2) seconds\nthink [It's a real problem...] for (2) seconds\nswitch costume to (player v)\nsay [!] for (1) seconds\nsay [Oh, hello!] for (2) seconds\nsay [Maybe you can help me!] for (2) seconds\nsay [I need to borrow some sugar from my neighbor!] for (4) seconds\nsay [Can you help me get to his house?] for (3) seconds\nbroadcast (question v) and wait\nwait until <<(answer) = [1]> or <(answer) = [2]>>\nif <(answer) = [1]> then\n    say [Jolly good! Let's go!] for (2) seconds\n    broadcast (start v)\nelse\n    say [Oh... I see... ] for (4) seconds\n    say [Then you leave me no choice!] for (3) seconds\n    switch costume to (jump v)\n    glide (1) secs to x: (-61) y: (180)\n    hide\n    broadcast (fall v)\n    wait (1.5) seconds\n    show\n    switch costume to (fall v)\n    start sound [Bomb Dropping.mp3 v]\n    glide (2) secs to x: (2) y: (-180)\n    hide\n    wait (4) seconds\n    broadcast (shake v)\nend\n\nwhen I receive [back v]\nset size to (100) %\nset [canmove v] to [false]\nrepeat (10)\n    change [pixelate v] effect by (30)\nend\nhide\ngo to x: (-187) y: (-86)\nclear graphic effects\nshow\nsay [I can't believe I'm back!] for (2) seconds\nsay [I suppose I should keep going to get my sugar...] for (3) seconds\nsay [But this time... I'll avoid any portals...] for (3) seconds\nrepeat (14)\n    switch costume to (player2 v)\n    repeat (6)\n        next costume\n        wait (0.03) seconds\n        change x by (5)\n    end\nend\nbroadcast (nhouse v)\ngo to x: (-187) y: (-86)\nsay [Ahh... Here we are.] for (2) seconds\nrepeat (10)\n    switch costume to (player2 v)\n    repeat (6)\n        next costume\n        wait (0.03) seconds\n        change x by (5)\n    end\nend\nglide (1) secs to x: (169) y: (-114)\nswitch costume to (player v)\nsay [Thank you for all your help!] for (2) seconds\nsay [I would offer you some... but well...] for (2) seconds\nsay [...you know!] for (2) seconds\nswitch costume to (player2 v)\nif <(timer) < [220]> then\n    say [I'll just ring the doorbell here.] for (3) seconds\n    play sound [gong v] until done\n    wait (1) seconds\n    broadcast (end 4 v) and wait\n    say [Ah yes I am interested in some sugar.] for (3) seconds\n    say [Do you have any?] for (2) seconds\n    broadcast (end 4 2 v) and wait\n    say [What a nice chap.] for (2) seconds\n    say [Although he does seem a bit familiar....] for (4) seconds\n    broadcast (end 4 3 v) and wait\n    say [Hey wait... do I know you?] for (2) seconds\n    broadcast (end 4 4 v) and wait\n    say [!] for (2) seconds\n    say [I know!] for (2) seconds\n    say [You were in my 4th grade class!] for (4) seconds\n    say [Remember me, Rednelsnam?] for (2) seconds\n    broadcast (end 4 5 v) and wait\n    say [Oh fine. Just escaped from a crazy portal world.] for (4) seconds\n    say [And you?] for (2) seconds\n    broadcast (end 4 6 v) and wait\n    say [Sure!  Just lead the way!] for (2) seconds\n    broadcast (end 4 7 v) and wait\n    glide (0.5) secs to x: (216) y: (y position)\n    hide\n    broadcast (end 4 8 v)\nelse\n    say [!] for (2) seconds\n    say [There's a note on the door...] for (2) seconds\n    say [It says...] for (2) seconds\n    say ["Gone to the store to buy sugar."] for (2) seconds\n    set tempo to (40)\n    set instrument to (9 v)\n    play note (52) for (0.5) beats\n    set instrument to (9 v)\n    play note (50) for (0.8) beats\n    set instrument to (9 v)\n    play note (49) for (1.5) beats\n    broadcast (the end 2 v)\n    wait (2) seconds\n    stop [all v]\nend\n\nwhen I receive [cliff v]\nforever\n    if <touching (hole1 v)?> then\n        if <(cliff) = [true]> then\n            set [canmove v] to [false]\n            hide\n            broadcast (cliff dive v)\n            go to x: (-12) y: (144)\n            show\n            say [Uh-oh...] for (0.5) seconds\n            glide (1) secs to x: (x position) y: (-45)\n            start sound [Wont Start Fart-SoundBible.com-1643093672.mp3 v]\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            broadcast (cliff over v)\n            go to x: (-222) y: (-84)\n            set [ghost v] effect to (0)\n            set [canmove v] to [true]\n        end\n    end\nend\n\nwhen I receive [skip v]\nbroadcast (next v)\nchange [level v] by (1)\nset x to (-222)\nset y to (y position)\n\n@ground\n\nwhen flag clicked\nshow\nswitch costume to (ground v)\ngo to x: (-2) y: (-25)\nset [ghost v] effect to (100)\n\nset [ghost v] effect to (100)\n\nwhen I receive [next for open v]\nswitch costume to (ground3 v)\nshow\n\nwhen I receive [hole1decent v]\nswitch costume to (ground16 v)\n\nwhen I receive [back v]\nhide\n\nwhen I receive [next v]\nnext costume\n\n@stage\n\nwhen flag clicked\ngo [backward v] (10) layers\nhide\nswitch costume to (stage v)\ngo to x: (0) y: (0)\n\nwhen I receive [next v]\nnext costume\nshow\n\nwhen I receive [shake v]\nstart sound [Large Thump Or Bump.mp3 v]\nrepeat (5)\n    change y by (-20)\n    wait (0.08) seconds\n    change y by (20)\n    wait (0.08) seconds\nend\nbroadcast (the end v)\nwait (3) seconds\nstop [all v]\n\nwhen I receive [cliff over v]\nswitch costume to (stage11 v)\n\nwhen I receive [next for open v]\nswitch costume to (stage3 v)\nshow\n\nwhen I receive [portal v]\nhide\n\nwhen I receive [fall v]\nswitch costume to (death v)\n\nwhen I receive [begin intro v]\nshow\n\nwhen I receive [cliff dive v]\nswitch costume to (hole1 v)\n\nwhen I receive [hole1decent v]\nhide\n\nwhen I receive [back v]\nswitch costume to (stage2 v)\n\nwhen I receive [nhouse v]\nswitch costume to (house v)\n\n@plat\n\nwhen I receive [next v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [front v] layer\n\nwhen I receive [back v]\nswitch costume to (costume13 v)\n\n@portal\n\nwhen flag clicked\ngo to x: (168) y: (-67)\nhide\n\nwhen I receive [next v]\nif <(level) = [2]> then\n    show\nelse\n    if <(level) = [14]> then\n        show\n        broadcast (portal2 v)\n    else\n        hide\n    end\nend\n\nif  then\nend\n\nwhen I receive [portal v]\nhide\n\ngo to [front v] layer\n\nwhen I receive [home v]\nhide\n\n@portal2\n\nwhen flag clicked\nset size to (100) %\nset [portid v] to [0]\nswitch costume to (costume2 v)\ngo to x: (167) y: (-67)\nhide\nclear graphic effects\n\nwhen I receive [next v]\nif <(level) = [2]> then\n    show\n    forever\n        change [color v] effect by (5)\n    end\nelse\n    if <(level) = [14]> then\n        clear graphic effects\n        go to x: (167) y: (-67)\n        switch costume to (costume4 v)\n        show\n    else\n        hide\n    end\nend\n\ngo to [front v] layer\n\nwhen I receive [portal2 v]\nforever\n    if <touching (player v)?> then\n        start sound [magical.mp3 v]\n        broadcast (home v)\n        wait (2) seconds\n        hide\n    end\nend\n\nwhen I receive [portal v]\nstart sound [Appear.mp3 v]\ngo to x: (0) y: (0)\nswitch costume to (costume3 v)\n\nwhen I receive [next for open v]\nhide\n\nwhen I receive [newcontrols v]\nwait (1) seconds\nset [portid v] to [0]\nrepeat (2)\n    change [portid v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(portID) = [1]> then\n    switch costume to (costume5 v)\n    show\n    set size to (50) %\n    go to x: (-218) y: (-134)\nend\nif <(portID) = [2]> then\n    switch costume to (costume6 v)\n    show\n    set size to (50) %\n    go to x: (217) y: (-142)\n    forever\n        if <touching (player v)?> then\n            broadcast (back v)\n            hide\n        end\n    end\nend\n\nwhen I receive [back v]\nset [music? v] to [off]\nbroadcast (music v)\ndelete this clone\n\n@Sprite2\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\ngo to x: (-8) y: (-87)\nforever\n    if <not <touching (player v)?>> then\n        switch costume to (costume2 v)\n    else\n        if <touching (player v)?> then\n            switch costume to (costume3 v)\n        end\n    end\nend\n\nwhen I receive [next v]\nhide\n\ngo to [front v] layer\n\nwhen I receive [fall v]\nhide\n\nwhen I receive [begin intro v]\nshow\n\n@bubble\n\nwhen flag clicked\nset [bubbles2 v] to [off]\nset [bubbles? v] to [off]\nhide\ngo to x: (pick random (-240) to (240)) y: (-114)\n\nwhen I receive [bubbles v]\nif <(bubbles?) = [on]> then\n    forever\n        repeat (5)\n            create clone of (_myself_ v)\n        end\n        wait (pick random (1) to (3)) seconds\n    end\nelse\n    if <(bubbles?) = [off]> then\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nif <(bubbles2) = [on]> then\n    set size to (100) %\n    clear graphic effects\n    set [ghost v] effect to (0)\n    set size to (pick random (50) to (75)) %\n    show\n    go to x: (pick random (-240) to (-1)) y: (-114)\n    glide (pick random (3) to (7)) secs to x: (x position) y: (170)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nelse\n    set size to (100) %\n    clear graphic effects\n    set [ghost v] effect to (0)\n    set size to (pick random (100) to (130)) %\n    show\n    go to x: (pick random (-240) to (240)) y: (-114)\n    glide (pick random (3) to (7)) secs to x: (x position) y: (170)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen I receive [newcontrols v]\nset [bubbles2 v] to [on]\nbroadcast (bubbles v)\n\nwhen I receive [back v]\nset [bubbles? v] to [off]\nbroadcast (bubbles v)\n\n@end\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [the end 2 v]\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [the end v]\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [end 4 8 v]\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n@sugar bowl\n\nwhen flag clicked\nswitch costume to (sugar v)\nhide\ngo to x: (0) y: (-47)\n\nwhen I receive [the end 2 v]\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [start v]\nset [timer v] to [0]\nforever\n    wait (1) seconds\n    change [timer v] by (1)\n    if <(timer) > [190]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [the end v]\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [end 4 8 v]\nswitch costume to (sugar2 v)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (3) seconds\nswitch costume to (sugar3 v)\nstop [all v]\n\n@eyeguy\n\nwhen flag clicked\npoint in direction (90)\nhide\ngo to x: (0) y: (140)\n\nwhen I receive [next v]\nif <(level) = [6]> then\n    Render text [Ok Yes, just jump on the yellow to avoid the lava!] (1)\n    wait (4) seconds\n    Render text [Because the lava is bad ... right?] (1)\n    wait (3) seconds\n    say [] for (0) seconds\nelse\n    if <(level) = [7]> then\n        Render text [Ummm.. I wouldn't jump on that floating thing.] (1)\n        wait (3) seconds\n        Render text [You'll probably die...] (1)\n        wait (2) seconds\n        Render text [Instead, jump on that good ol' yellow!] (1)\n        wait (2) seconds\n        say [] for (0) seconds\n    else\n        if <(level) = [8]> then\n            Render text [OK, if you are GOING to jump on those...] (1)\n            wait (2) seconds\n            Render text [Press down!] (1)\n            wait (2) seconds\n            say [] for (0) seconds\n        else\n            if <(level) = [9]> then\n                wait (3) seconds\n                Render text [Oh it's not just you...] (1)\n                wait (2) seconds\n                Render text [But anyway, those yellow guys will help you!] (1)\n                wait (3) seconds\n                say [] for (0) seconds\n            else\n                if <(level) = [10]> then\n                    wait (4.5) seconds\n                    Render text [Oh really...] (1)\n                    wait (2) seconds\n                    Render text [Or have I been telling you the truth?] (1)\n                    wait (3) seconds\n                    Render text [I'll let you figure it out...] (1)\n                    wait (2) seconds\n                    say [] for (0) seconds\n                    repeat (10)\n                        change [ghost v] effect by (10)\n                    end\n                else\n                    if <(level) = [13]> then\n                        show\n                        repeat (10)\n                            change [ghost v] effect by (-10)\n                        end\n                        Render text [Hello again.] (1)\n                        wait (1) seconds\n                        Render text [Have you been enjoying the forest of fun?] (1)\n                        wait (3) seconds\n                        say [] for (0) seconds\n                        Render text [Aww.. Don't be like that.] (1)\n                        wait (1) seconds\n                        Render text [I'm here to help!] (1)\n                        wait (1) seconds\n                        say [] for (0) seconds\n                        wait (1) seconds\n                        Render text [Look, I'll be a sport.] (1)\n                        wait (1) seconds\n                        Render text [Just go forward to get out...] (1)\n                        wait (1) seconds\n                        Render text [Or go down here to see how deep this rabbit hole goes...] (1)\n                        wait (4) seconds\n                        say [] for (0) seconds\n                        repeat (10)\n                            change [ghost v] effect by (10)\n                        end\n                    else\n                        if <(level) = [15]> then\n                            show\n                            repeat (10)\n                                change [ghost v] effect by (-10)\n                            end\n                            wait (1) seconds\n                            Render text [You are in the place between your world and mine.] (1)\n                            wait (4) seconds\n                            Render text [But I can't let you leave yet...] (1)\n                            wait (3) seconds\n                            say [] for (0) seconds\n                            repeat (10)\n                                change [ghost v] effect by (10)\n                            end\n                        else\n                            hide\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine None\nset [chara number v] to [1]\nset [text v] to []\nrepeat (length of (string))\n    set [text v] to (join (Text) (letter (Chara number) of (string)))\n    say (Text)\n    start sound [bird v]\n    change [chara number v] by (1)\nend\n\nwhen I receive [falling v]\nwait (12) seconds\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nRender text [So you are finally here...] (1)\nwait (2) seconds\nRender text [Now I'll show you the truth!] (1)\nwait (3) seconds\nsay [] for (0) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (truth v)\n\nwhen I receive [the end 2 v]\nswitch costume to (costume4 v)\n\nwhen I receive [end 4 v]\nset [ghost v] effect to (100)\ngo to x: (216) y: (-89)\nswitch costume to (costume1 v)\nshow\nRender text [Hang on I'm coming.] (1)\nwait (2) seconds\nsay [] for (0) seconds\nrepeat (3)\n    play sound [hard_shoes.mp3 v] until done\nend\nset [ghost v] effect to (0)\nRender text [Yes how can I help you?] (1)\nwait (2) seconds\nsay [] for (0) seconds\n\nwhen I receive [end 4 2 v]\nRender text [Sure, I just happen to have some...] (1)\nwait (1) seconds\nsay [] for (0) seconds\nRender text [Just wait right here...] (1)\nwait (1) seconds\nsay [] for (0) seconds\nhide\n\nwhen I receive [end 4 3 v]\nshow\nRender text [Here you go.] (1)\nwait (1) seconds\nsay [] for (0) seconds\npoint in direction (-90)\n\nwhen I receive [end 4 4 v]\npoint in direction (90)\nRender text [Well I have lived here my whole life.] (1)\nwait (2) seconds\nsay [] for (0) seconds\n\nwhen I receive [end 4 5 v]\nRender text [Oh yes. Good old Red.] (1)\nwait (2) seconds\nsay [] for (0) seconds\nRender text [How've you been?] (1)\nwait (2) seconds\nsay [] for (0) seconds\n\nwhen I receive [end 4 6 v]\nRender text [What a coincidence!] (1)\nwait (2) seconds\nsay [] for (0) seconds\nRender text [I just painted a picture of a portal!] (1)\nwait (2) seconds\nsay [] for (0) seconds\nRender text [Want to see it?] (1)\nwait (2) seconds\nsay [] for (0) seconds\n\nwhen I receive [end 4 7 v]\nhide\n\nwhen I receive [eyeguy1 v]\nswitch costume to (costume3 v)\nshow\nwait (3) seconds\nhide\nwait (2) seconds\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nRender text [Hello there.] (1)\nwait (2) seconds\nsay [] for (0) seconds\nwait (3) seconds\nRender text [I am the one they call....] (1)\nwait (2) seconds\nsay [] for (0) seconds\nwait (1) seconds\nRender text [Eye guy!] (1)\nwait (2) seconds\nRender text [I heard your problem, and I can help you!] (1)\nwait (3) seconds\nsay [] for (0) seconds\nRender text [OH, I'll be glad to help.....] (1)\nwait (1) seconds\nRender text [HAHAH HAHAHHAHAH HAH...] (1)\nwait (1) seconds\nRender text [Ah-hem...] (1)\nwait (1) seconds\nRender text [Just keep going forward until you see some lava...] (1)\nwait (3) seconds\nsay [] for (0) seconds\nswitch costume to (costume2 v)\n\n@metroid\n\nwhen flag clicked\nclear graphic effects\nswitch costume to (metroid v)\nhide\ngo to x: (0) y: (180)\nwait (1) seconds\nshow\nglide (3) secs to x: (0) y: (-180)\nswitch costume to (citange2 v)\nglide (2) secs to x: (0) y: (90)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    wait (0.1) seconds\nend\nbroadcast (begin intro v)\nswitch costume to (costume1 v)\n\nwhen flag clicked\nrepeat (6)\n    switch costume to (metroid v)\n    wait (0.3) seconds\n    switch costume to (metroid2 v)\n    wait (0.3) seconds\nend\nrepeat (5)\n    switch costume to (citange2 v)\n    wait (0.3) seconds\n    switch costume to (citange3 v)\n    wait (0.3) seconds\nend\nswitch costume to (citange2 v)\n\nwait (1) seconds\n\n@hole1\n\nwhen flag clicked\nhide\n\nwhen I receive [cliff v]\nset [ghost v] effect to (100)\nshow\n\nwhen I receive [falling v]\nhide\n\n@wormy\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (199) y: (45)\nhide\n\nswitch costume to (costume1 v)\ngo to x: (199) y: (45)\n\nwhen I receive [next v]\nif <(level) = [11]> then\n    wait (pick random (2) to (5)) seconds\n    show\n    repeat (4)\n        start sound [Squishy 2.mp3 v]\n        change x by (-8.5)\n        switch costume to (costume1 v)\n        wait (0.2) seconds\n        switch costume to (costume2 v)\n        wait (0.2) seconds\n    end\n    wait (0.3) seconds\n    glide (1) secs to x: (100) y: (6)\n    wait (0.2) seconds\n    change y by (-2)\n    wait (0.3) seconds\n    glide (1) secs to x: (29) y: (41)\n    switch costume to (costume3 v)\n    wait (1) seconds\n    repeat (12)\n        start sound [Squishy 2.mp3 v]\n        change x by (-8.5)\n        switch costume to (costume1 v)\n        wait (0.2) seconds\n        switch costume to (costume2 v)\n        wait (0.2) seconds\n    end\nelse\n    hide\nend\n\nwhen I receive [cliff dive v]\nhide\n\nwhen I receive [cliff over v]\nshow\n\nwhen I receive [falling v]\nhide\n\n@wormy2\n\nwhen flag clicked\nset [wormy v] to [0]\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [next v]\nif <(level) = [12]> then\n    repeat (6)\n        change [wormy v] by (1)\n        create clone of (_myself_ v)\n    end\nelse\n    hide\nend\n\nwhen I start as a clone\nforever\n    if <(level) = [13]> then\n        delete this clone\n    else\n        if <(wormy) = [1]> then\n            point in direction (90)\n            go to x: (-194) y: (-117)\n            switch costume to (costume4 v)\n            show\n        end\n        if <(wormy) = [2]> then\n            point in direction (180)\n            go to x: (-180) y: (-9)\n            show\n            switch costume to (costume4 v)\n            wait (pick random (0.5) to (2)) seconds\n            switch costume to (costume1 v)\n            wait (pick random (0.5) to (2)) seconds\n        end\n        if <(wormy) = [3]> then\n            point in direction (90)\n            set rotation style [left-right v]\n            go to x: (-46) y: (148)\n            show\n            repeat (10)\n                start sound [Squishy 2.mp3 v]\n                change x by (-8.5)\n                switch costume to (costume4 v)\n                wait (0.2) seconds\n                switch costume to (costume5 v)\n                wait (0.2) seconds\n            end\n            wait (pick random (0.5) to (3.3)) seconds\n            point in direction (-90)\n            repeat (10)\n                start sound [Squishy 2.mp3 v]\n                change x by (8.5)\n                switch costume to (costume4 v)\n                wait (0.2) seconds\n                switch costume to (costume5 v)\n                wait (0.2) seconds\n            end\n        end\n        if <(wormy) = [4]> then\n            switch costume to (costume1 v)\n            go to x: (7) y: (-113)\n            show\n        end\n        if <(wormy) = [5]> then\n            switch costume to (costume6 v)\n            go to x: (4) y: (-82)\n            show\n            start sound [Jump-SoundBible.com-1007297584.mp3 v]\n            glide (0.2) secs to x: (4) y: (-8)\n            wait (0.2) seconds\n            glide (0.8) secs to x: (4) y: (-82)\n        end\n        if <(wormy) = [6]> then\n            go to x: (142) y: (-113)\n            show\n            switch costume to (costume7 v)\n            wait (pick random (0.5) to (2)) seconds\n            start sound [Baby Sneeze.mp3 v]\n            switch costume to (costume8 v)\n            set size to (600) %\n            wait (1) seconds\n            repeat (50)\n                change size by (-10)\n            end\n            switch costume to (costume7 v)\n        end\n    end\nend\n\n@hole2\n\nwhen flag clicked\nset [hole1 v] to [1]\nswitch costume to (hole1 v)\nset size to (100) %\ngo to x: (71) y: (-128)\nhide\nforever\n    if <touching (player v)?> then\n        if <(hole1) = [1]> then\n            set [hole1 v] to [0]\n            broadcast (hole1decent v)\n        end\n    end\nend\n\nwhen I receive [hole1decent v]\nwait (3) seconds\nrepeat (50)\n    change size by (10)\n    change x by (-3)\n    change y by (3)\nend\nhide\nbroadcast (falling v)\n\nwhen I receive [next v]\nif <(level) = [13]> then\n    show\nelse\n    hide\nend\n\nwhen I receive [falling v]\nset [cliff v] to [false]\nset [bubbles? v] to [off]\nbroadcast (bubbles v)\nset size to (100) %\ngo to x: (0) y: (4)\nswitch costume to (hole2 v)\nshow\nwait (4) seconds\nswitch costume to (costume1 v)\n\ndefine None\nset [chara number v] to [1]\nset [text v] to []\nrepeat (length of (string))\n    set [text v] to (join (Text) (letter (Chara number) of (string)))\n    say (Text)\n    start sound [bird v]\n    change [chara number v] by (1)\nend\n\nwhen I receive [truth v]\nrepeat (3)\n    next costume\n    wait (0.2) seconds\nend\ngo to x: (93) y: (11)\nset size to (70) %\nswitch costume to (costume2 v)\nRender text [You are me... and I am you....] (1)\nwait (2) seconds\nRender text [In this place, you are in me...] (1)\nwait (2) seconds\nRender text [But otherwise.... Can you guess?] (1)\nwait (2) seconds\nRender text [That's right! I'm in you!] (1)\nwait (2) seconds\nRender text [I am all the lies you tell yourself...] (1)\nwait (2) seconds\nRender text [But here... they are outside!] (1)\nwait (2) seconds\nRender text [And now that I'm out!] (1)\nwait (2) seconds\nRender text [I'm never going back....] (1)\nwait (3) seconds\nsay [] for (0) seconds\nbroadcast (The End 2 v)\nwait (3) seconds\nstop [all v]\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\nshow\nwait (1) seconds\nhide\n\n@Sprite3\n\nwhen flag clicked\nset size to (100) %\nset [ghost v] effect to (0)\ngo to x: (178) y: (157)\nswitch costume to (costume1 v)\nhide\nset [skips v] to [0]\nforever\n    if <(distance to [mouse-pointer v]) < [50]> then\n        show\n    else\n        hide\n    end\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(skips) < [3]>> then\n        wait until <not <mouse down?>>\n        if <<(level) > [5]> and <(level) < [13]>> then\n            change [skips v] by (1)\n            start sound [Bowling Strike v]\n            switch costume to (costume2 v)\n            wait (.3) seconds\n            switch costume to (costume1 v)\n            wait (.3) seconds\n            broadcast (skip v)\n            create clone of (_myself_ v)\n        end\n    end\n    if <(skips) = [3]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nstart sound [just_born v]\nset size to (100) %\ngo to x: (0) y: (0)\nswitch costume to (costume3 v)\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\n    change size by (10)\nend\nhide\ndelete this clone\n\n@yes\n\nwhen flag clicked\nhide\ngo to x: (-60) y: (0)\nswitch costume to (costume1 v)\n\nwhen this sprite clicked\nstart sound [hand clap v]\nswitch costume to (costume2 v)\nwait (0.3) seconds\nswitch costume to (costume1 v)\nwait (0.5) seconds\nset [answer v] to [1]\n\nwhen I receive [question v]\nshow\nwait until <(answer) > [0]>\nwait (1) seconds\nhide\n\n@no\n\nwhen flag clicked\nhide\ngo to x: (60) y: (0)\nswitch costume to (costume1 v)\n\nwhen this sprite clicked\nstart sound [hand clap v]\nswitch costume to (costume2 v)\nwait (0.3) seconds\nswitch costume to (costume1 v)\nwait (0.5) seconds\nset [answer v] to [2]\n\nwhen I receive [question v]\nshow\nwait until <(answer) > [0]>\nwait (1) seconds\nhide\n\n