Glom's Adventure (a platformer)

Instructions:                  http://scratch.mit.edu/projects/18423207/\nArrow keys to move the blob thing. Don't touch what looks dangerous. The signs are full of helpful hints. Space bar to interact with objects. Most people will give you beans as health. Blobs eat beans. Talk to all the creatures and read all the signs.  New characters include; Gompoe the swampling who sells beans Poil the the fish plant where you first find water, Flamin the lizroid on the first level, Mongo the swampling after the first mask, and Dadoo and Dadae the shadow chameleons when you enter The Nightmare Cavern.   \n

@Stage\n\nwhen I receive [start v]\nstop [other scripts in stage v]\nforever\n    play sound [POL-boring-cavern-short v] until done\nend\n\nwhen I receive [go mask v]\nwait (1) seconds\nstop [other scripts in stage v]\nforever\n    play sound [jungle v] until done\nend\n\nwhen backdrop switches to [backdrop3 v]\nstop [other scripts in stage v]\nbroadcast (next v)\nforever\n    play sound [awesomecave v] until done\nend\n\nwhen I receive [game over v]\nswitch backdrop to (backdrop4 v)\n\nbroadcast (game over v)\n\nwhen I receive [start game intro v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [game over v]\nstop [other scripts in stage v]\nforever\n    play sound [medieval1 v] until done\nend\n\nwhen I receive [mask2 v]\nwait (1) seconds\nstop [other scripts in stage v]\nforever\n    play sound [jungle v] until done\nend\n\nwhen backdrop switches to [backdrop5 v]\nstop [other scripts in stage v]\nbroadcast (next v)\nforever\n    play sound [172561__djgriffin__video-game-2 v] until done\nend\n\nwhen I receive [boss! v]\nstop [other scripts in stage v]\nforever\n    play sound [Awesome boss music v] until done\nend\n\nwhen backdrop switches to [backdrop8 v]\nstop [other scripts in stage v]\n\nwhen I receive [ you won bro!!! :d v]\nstop [other scripts in stage v]\nforever\n    play sound [Ending v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nplay sound [suspense v] until done\nforever\n    play sound [start v] until done\nend\n\nwhen backdrop switches to [backdrop3 v]\nset [level v] to [17]\n\nforever\nend\n\n@Blob\n\nif <touching (_edge_ v)?> then\nend\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\nset [fall power-up v] to [180]\n\nset [magnet power v] to [5]\n\nif <touching color (#2e2e2e)?> then\n    set [fall power-up v] to [180]\nend\n\nwhen backdrop switches to [backdrop2 v]\nforever\n    if <not <touching color (#558190)?>> then\n        if <key (right arrow v) pressed?> then\n            if <not <key (down arrow v) pressed?>> then\n                switch costume to (walk v)\n                wait (0.2) seconds\n                switch costume to (walk2 v)\n                wait (0.2) seconds\n            end\n        end\n        if <key (left arrow v) pressed?> then\n            if <not <key (down arrow v) pressed?>> then\n                switch costume to (walk v)\n                wait (0.2) seconds\n                switch costume to (walk2 v)\n                wait (0.2) seconds\n            end\n        end\n        if <not <<key (left arrow v) pressed?> or <<key (down arrow v) pressed?> or <key (right arrow v) pressed?>>>> then\n            if <(jump) = [off]> then\n                switch costume to (normal v)\n            end\n        end\n    end\nend\n\nchange y by (-10)\n\nwhen backdrop switches to [backdrop2 v]\n\nif <not <touching color (#0b5200)?>> then\nend\n\npoint in direction (0)\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nif <color (#000000) is touching (#0e6401)?> then\n    repeat until <not <color (#000000) is touching (#0e6401)?>>\n        set [jump v] to [off]\n    end\nend\n\nif <color (#000000) is touching (#006622)?> then\n    repeat until <not <color (#000000) is touching (#006622)?>>\n        repeat (5)\n            change y by (-3)\n        end\n        set [jump v] to [off]\n    end\nend\n\npoint in direction (180)\nmove (15) steps\n\nif <color (#000000) is touching (#006622)?> then\n    repeat until <not >\n        repeat (5)\n            change y by (-3)\n        end\n        set [jump v] to [off]\n    end\nend\n\nwhen I receive [game over v]\nhide\nrepeat (100)\n    hide\n    go to x: (0) y: (0)\nend\nif  then\nend\n\nwhen I receive [go mask3 v]\ngo to x: (-221) y: (-154)\n\nwhen backdrop switches to [backdrop3 v]\ngo to x: (-221) y: (-154)\n\nwhen I receive [game over v]\n\nwhen I receive [start v]\nshow\npoint in direction (90)\nset [ghost v] effect to (0)\ngo to x: (-221) y: (-154)\nforever\n    if <touching color (#663b00)?> then\n        change y by (0.01)\n    end\n    go to [front v] layer\n    if <key (right arrow v) pressed?> then\n        start sound [Walk v]\n        point in direction (90)\n        move (5) steps\n        if <touching color (#663b00)?> then\n            change x by (-5)\n        end\n    end\n    if <key (left arrow v) pressed?> then\n        start sound [Walk v]\n        point in direction (-90)\n        move (5) steps\n        if on edge, bounce\n        if <touching color (#663b00)?> then\n            change x by (5)\n        end\n        if <touching (_edge_ v)?> then\n            change x by (5)\n        end\n    end\nend\n\nif <touching (_edge_ v)?> then\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [230]> then\n        go to x: (-221) y: (-154)\n        broadcast (next v)\n    end\nend\n\nwhen I receive [game over v]\nforever\n    go to [front v] layer\n    go [backward v] (5) layers\nend\n\nwhen flag clicked\nforever\n    wait (120) seconds\n    change [hp v] by (1)\nend\n\nwhen flag clicked\n\nwhen I receive [start v]\nwait (1) seconds\nforever\n    go to [front v] layer\nend\n\nwhen I receive [ you won bro!!! :d v]\nhide\n\nwhen flag clicked\nset [ghost v] effect to (0)\ngo to x: (-214) y: (-136)\nshow\nforever\n    if <(jump) = [off]> then\n        if <not <touching (land v)?>> then\n            broadcast (fall v)\n        end\n    end\nend\n\nwhen I receive [jump v]\nstart sound [boing v]\nset [jump v] to [on]\nwait (0.5) seconds\nset [jump v] to [off]\nbroadcast (fall v)\n\nforever\n    change y by (-7)\n    if <touching (land v)?> then\n        set [jump v] to [off]\n        switch costume to (normal v)\n        stop [this script v]\n    end\nend\n\nrepeat (7)\n    change y by (20)\n    switch costume to (jump v)\nend\n\nforever\n    if <touching (land v)?> then\n        if <key (up arrow v) pressed?> then\n            start sound [Jumping v]\n            repeat (20)\n                switch costume to (jump v)\n                change y by (5)\n                set [jump v] to [on]\n            end\n            broadcast (fall v)\n            switch costume to (costume5 v)\n            set [jump v] to [off]\n        end\n    end\nend\n\nwhen flag clicked\nset [hp v] to [10]\n\nchange y by (15)\nswitch costume to (jump v)\n\nrepeat (10)\n    switch backdrop to (next backdrop v)\nend\n\nbroadcast (fall v)\n\nwhen backdrop switches to [backdrop5 v]\nshow\ngo to [front v] layer\n\nwait (0.01) seconds\n\nwait (0.01) seconds\n\nwhen flag clicked\nforever\n    if <not <touching (land v)?>> then\n        if <(jumping) = [0]> then\n            if <(jump) = [on]> then\n                broadcast (fall v)\n            end\n        end\n    end\nend\n\nwait (1) seconds\n\nwhen I receive [fall v]\nforever\n    switch costume to (normal v)\n    set [jumping v] to [-6]\n    if <touching (land v)?> then\n        switch costume to (normal v)\n        set [jump v] to [off]\n        set [jumping v] to [0]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nset [jumping v] to [0]\nforever\n    if <not <color (#ccffff) is touching (#558190)?>> then\n        if <key (up arrow v) pressed?> then\n            if <touching (land v)?> then\n                start sound [Jumping v]\n                broadcast (jump v)\n                set [jumping v] to [8]\n                set [jump v] to [on]\n            end\n        end\n    end\nend\n\nwhen I receive [next v]\nset [jumping v] to [0]\n\nwhen backdrop switches to [backdrop2 v]\nforever\n    if <(jump) = [off]> then\n        if <touching color (#00ffff)?> then\n            if <(jumping) < [1]> then\n                broadcast (heal v)\n                start sound [Jumping v]\n                repeat (3)\n                    set [jump v] to [on]\n                    set [jumping v] to [10]\n                end\n                wait (0.3) seconds\n                broadcast (fall v)\n            end\n        end\n    end\nend\n\nset [jump v] to [on]\nstart sound [Jumping v]\nset [hp v] to [10]\n\nset [jumping v] to [8]\nwait (1) seconds\nset [jump v] to [off]\nbroadcast (fall v)\n\nwhen flag clicked\nforever\n    change y by (jumping)\nend\n\nwhen flag clicked\nforever\n    if <touching color (#7f00ff)?> then\n        set [jump v] to [on]\n    end\nend\n\nwhen I receive [next v]\nforever\n    if <touching (sprite8 v)?> then\n        repeat (2)\n            switch costume to (hurt v)\n            change [ghost v] effect by (50)\n        end\n        broadcast (die v)\n        change [hp v] by (-1)\n        wait (0.5) seconds\n        set [ghost v] effect to (0)\n        go to x: (-214) y: (-136)\n        switch costume to (normal v)\n        show\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#7f00ff)?> then\n        if <(jumping) < [1]> then\n            start sound [boing v]\n            repeat (7)\n                set [jump v] to [on]\n                set [jumping v] to [9.2]\n            end\n            wait (0.6) seconds\n            broadcast (fall v)\n        end\n    end\nend\n\nset [jump v] to [on]\nstart sound [Jumping v]\nset [jumping v] to [3.5]\nwait (1) seconds\nset [jump v] to [off]\n\nset [jump v] to [off]\n\nwhen backdrop switches to [backdrop5 v]\nrepeat (10)\n    go to x: (-221) y: (-154)\n    show\nend\n\nwhen [down arrow v] key pressed\n\nwhen flag clicked\nforever\n    if <key (down arrow v) pressed?> then\n        switch costume to (crouch v)\n    end\nend\n\nrepeat (5)\n    change y by (-3)\nend\n\nwhen flag clicked\nforever\n    if <(jump) = [on]> then\n        switch costume to (jump v)\n        if <touching color (#663b00)?> then\n            set [jump v] to [off]\n            set [jumping v] to [-20]\n            wait (0.1) seconds\n            broadcast (fall v)\n        end\n    end\nend\n\nwhen I receive [start v]\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <key (up arrow v) pressed?> then\n        if <touching color (#558190)?> then\n            change y by (5)\n        end\n    end\nend\n\nwhen I receive [next v]\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <not <key (down arrow v) pressed?>> then\n        if <touching color (#558190)?> then\n            switch costume to (swim v)\n            wait (0.1) seconds\n            switch costume to (swim2 v)\n            wait (0.2) seconds\n            switch costume to (swim3 v)\n            wait (0.2) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\nend\n\nwhen flag clicked\nforever\n    if <touching color (#558190)?> then\n        repeat until <touching color (#663b00)?>\n            change y by (-3)\n        end\n    else\n        set y to (y position)\n    end\nend\n\nchange y by (-3)\n\nwhen [down arrow v] key pressed\n\nif <touching color (#dddede)?> then\nend\n\nwhen backdrop switches to [backdrop5 v]\ngo to x: (-221) y: (-154)\n\nbroadcast (die v)\n\nwhen I receive [die v]\nrepeat (2)\n    switch costume to (hurt v)\n    change [ghost v] effect by (50)\nend\nwait (0.5) seconds\nset [ghost v] effect to (0)\ngo to x: (-214) y: (-136)\nswitch costume to (normal v)\nshow\n\nchange y by (0)\n\nwhen flag clicked\nforever\n    if <touching color (#793500)?> then\n        change y by (4)\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [fall v]\nforever\n    if <touching color (#0e6401)?> then\n        start sound [footstep wood v]\n        stop [this script v]\n    end\n    if <touching color (#9c0031)?> then\n        start sound [footstep concrete v]\n        stop [this script v]\n    end\n    if <touching color (#7f00ff)?> then\n        start sound [boing v]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#793500)?> then\n        play sound [footstep grass v] until done\n    end\nend\n\nwait (0.1) seconds\n\nwhen I receive [fall v]\nif <touching (land v)?> then\n    set [jump v] to [off]\n    set [jumping v] to [0]\nend\n\nwhen flag clicked\nforever\n    if  then\n    end\nend\n\nforever\n    if <touching (land v)?> then\n        change y by (0.1)\n    end\nend\n\n@PLAY\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen this sprite clicked\nbroadcast (start v)\n\nwhen I receive [start game intro v]\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    end\n    if <not <touching (mouse-pointer v)?>> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [start game intro v]\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nbroadcast (start game intro v)\nset [ghost v] effect to (100)\n\nwhen I receive [start v]\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [start v]\nset [level v] to [1]\n\n@land\n\nwhen flag clicked\nset [level v] to [0]\nbroadcast (start game intro v)\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\n\nwhen I receive [next v]\nchange [level v] by (1)\nnext costume\nchange [level v] by (1)\n\nwhen backdrop switches to [backdrop1 v]\n\nwhen flag clicked\n\nwhen I receive [start game intro v]\nswitch costume to (costume1 v)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nforever\n    if <touching color (#000000)?> then\n        broadcast (STOP! v)\n    end\nend\n\nwhen I receive [start v]\nset [level v] to [1]\nset [level v] to [1]\nswitch costume to (level1 v)\ngo to [front v] layer\ngo [backward v] (100) layers\nshow\n\nplay sound [start v] until done\n\nstop [this script v]\n\nstop [this script v]\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [boss! v]\n\nwhen flag clicked\nshow\n\nwhen flag clicked\n\nnext costume\n\nwhen I receive [start v]\nforever\n    if <(Level) = [17]> then\n        broadcast (mask2 v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Level) = [22]> then\n        broadcast (mask 3 v)\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [start v]\nforever\n    if <(Level) = [10]> then\n        broadcast (Mask1 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop3 v]\nset [level v] to [17]\nset [level v] to [17]\nrepeat (10)\n    switch costume to (level21 v)\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [start v]\nforever\n    if <(costume [number v]) = [12]> then\n        switch backdrop to (backdrop6 v)\n        stop [this script v]\n    end\nend\n\nbroadcast (Mask1 v)\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\n    go [backward v] (10) layers\nend\n\nwhen I receive [start v]\n\nforever\n    if <(costume [number v]) = [10]> then\n        switch backdrop to (backdrop6 v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [ you won bro!!! :d v]\nhide\n\nwhen flag clicked\nset [level v] to [0]\n\nbroadcast (go mask v)\n\nbroadcast (go mask2 v)\n\nwhen I receive [start v]\nforever\n    if <(costume [number v]) = [19]> then\n        switch backdrop to (backdrop3 v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(costume [number v]) = [12]> then\n        switch backdrop to (backdrop6 v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(costume [number v]) = [22]> then\n        switch backdrop to (backdrop8 v)\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [backdrop5 v]\nforever\n    switch costume to (level20 v)\nend\n\n@Mun\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [next v]\nhide\n\nif  then\nend\n\nif  then\nelse\nend\n\nwhen I receive [start v]\nforever\n    if <(level) = [16]> then\n        go to x: (11) y: (-141)\n        show\n        switch costume to (costume7 v)\n        if <(action) = [4]> then\n            if <key (space v) pressed?> then\n                if <touching (blob v)?> then\n                    say [I don't eat beans ] for (0.5) seconds\n                    say [You can have them] for (0.5) seconds\n                    broadcast (heal v)\n                end\n            end\n        end\n    end\n    if <(level) = [19]> then\n        go to x: (-213) y: (134)\n        show\n        switch costume to (costume6 v)\n        if <(action) = [4]> then\n            if <key (space v) pressed?> then\n                if <touching (blob v)?> then\n                    say [Here take some beans] for (2) seconds\n                    broadcast (heal v)\n                end\n            end\n        end\n    end\n    if <(level) = [12]> then\n        go to x: (-122) y: (75)\n        show\n        switch costume to (costume5 v)\n        if <(action) = [4]> then\n            if <key (space v) pressed?> then\n                if <touching (blob v)?> then\n                    say [Here take some beans] for (2) seconds\n                    broadcast (heal v)\n                end\n            end\n        end\n    end\n    if <(level) = [4]> then\n        go to x: (-155) y: (-156)\n        show\n        switch costume to (costume4 v)\n        if <(action) = [4]> then\n            if <key (space v) pressed?> then\n                if <touching (blob v)?> then\n                    say [Try the up arrow then the right arrow when you're in the air] for (2) seconds\n                end\n            end\n        end\n    end\n    if <(level) = [1]> then\n        go to x: (64) y: (-152)\n        show\n        switch costume to (costume2 v)\n        if <(action) = [4]> then\n            if <key (space v) pressed?> then\n                if <touching (blob v)?> then\n                    say [Welcome to Treehead Forest!] for (2) seconds\n                end\n            end\n        end\n    end\n    if <(level) = [11]> then\n        go to x: (101) y: (-134)\n        show\n        switch costume to (costume1 v)\n        if <(action) = [4]> then\n            if <key (space v) pressed?> then\n                if <touching (blob v)?> then\n                    say [Welcome to Mudland Marshes] for (2) seconds\n                end\n            end\n        end\n    end\n    if <(level) = [18]> then\n        go to x: (-169) y: (-98)\n        show\n        switch costume to (costume3 v)\n        if <(action) = [4]> then\n            if <key (space v) pressed?> then\n                if <touching (blob v)?> then\n                    say [This is The Nighmare Caverns] for (2) seconds\n                end\n            end\n        end\n    end\nend\n\ngo to x: (101) y: (-134)\n\nif <key (space v) pressed?> then\n    if <touching (blob v)?> then\n        say [Welcome to Mudland Marshes] for (2) seconds\n    end\nend\n\nif <(action) = [4]> then\nend\n\nwhen flag clicked\nforever\n    if <touching (blob v)?> then\n        set [action v] to [4]\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <touching (blob v)?>> then\n        set [action v] to [1]\n    end\nend\n\nif <key (space v) pressed?> then\nend\n\ngo to x: (-169) y: (-98)\n\nbroadcast (heal v)\n\nhide\n\n@bad stuff\n\nwhen flag clicked\nset [level v] to [0]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [start v]\ngo [backward v] (5) layers\ngo to [front v] layer\nshow\nset [level v] to [1]\nswitch costume to (level1 v)\n\nwhen I receive [next v]\nchange [level v] by (1)\nnext costume\nshow\nwait (1) seconds\n\nwhen backdrop switches to [backdrop1 v]\n\nwhen I receive [start game intro v]\nhide\n\nwhen I receive [next v]\n\nchange [level v] by (1)\nnext costume\n\nwait (1) seconds\n\nplay sound [start v] until done\n\nforever\n    switch costume to (Level)\nend\n\nbroadcast (start game intro v)\nset [ghost v] effect to (100)\n\nshow\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [ you won bro!!! :d v]\nstop [other scripts in sprite v]\nhide\n\nstop [other scripts in sprite v]\n\ngo to x: (50) y: (0)\n\nwhen I receive [start v]\nforever\n    show\n    go to x: ([x position v] of [land v]) y: ([y position v] of [land v])\n    go to [front v] layer\n    go [backward v] (5) layers\nend\n\nwhen I receive [start v]\nforever\n    if <touching color (#044600)?> then\n        broadcast (die v)\n    end\nend\n\nwhen flag clicked\n\nwhen backdrop switches to [backdrop3 v]\nset [level v] to [16]\nrepeat (10)\n    switch costume to (level20 v)\nend\n\n@Health meter\n\nwhen backdrop switches to [backdrop2 v]\nset [hp v] to [10]\nforever\n    switch costume to (HP)\nend\n\nwhen backdrop switches to [backdrop2 v]\ngo to x: (-136) y: (145)\nshow\nforever\n    if <(HP) < [1]> then\n        hide\n        broadcast (game over v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\n\nwhen backdrop switches to [backdrop18 v]\nhide\n\nwhen backdrop switches to [backdrop17 v]\nhide\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen I receive [die v]\nchange [hp v] by (-1)\n\nwhen I receive [heal v]\nchange [hp v] by (1)\n\nwhen I receive [heal v]\nset [hp v] to [10]\n\nswitch backdrop to (backdrop18 v)\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\nforever\n    wait (120) seconds\n    change [hp v] by (1)\nend\n\nwhen flag clicked\nforever\n    if <(HP) > [10]> then\n        set [hp v] to [10]\n    end\nend\n\nwhen I receive [ you won bro!!! :d v]\nhide\n\nwhen flag clicked\n\nwhen I receive [start v]\ngo to [front v] layer\n\nwhen I receive [next v]\ngo to [front v] layer\n\n@Sprite6\n\nwhen backdrop switches to [backdrop1 v]\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [mask1 v]\ngo to x: (147) y: (-156)\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (blob v)?> then\n        set [action v] to [3]\n    end\n    if <key (space v) pressed?> then\n        if <touching (blob v)?> then\n            switch costume to (costume2 v)\n            broadcast (go mask v)\n            wait (5) seconds\n            hide\n        end\n    end\nend\n\nwhen I receive [next v]\nhide\n\nforever\n    stop [this script v]\nend\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [next v]\nhide\n\nwhen flag clicked\nforever\n    if <not <touching (blob v)?>> then\n        set [action v] to [1]\n    end\nend\n\n@mask1\n\nwhen flag clicked\nset [masks v] to [0]\nhide\n\nwhen I receive [go mask v]\nset size to (100) %\nshow\n\nwhen I receive [go mask v]\nstart sound [Get Item! v]\ngo to x: (128) y: (-96)\nhide\nwait (1) seconds\nstart sound [fairydust v]\nforever\n    go to x: (-180) y: (114)\n    switch costume to (costume1 v)\n    show\n    set size to (85) %\nend\n\nset size to (100) %\n\nwhen I receive [next v]\nhide\n\nwhen I receive [next v]\nhide\n\nwhen I receive [game over v]\nhide\n\nshow\n\nif <not <(level) > [9]>> then\nend\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen I receive [start game intro v]\nhide\n\nwhen I receive [start v]\nhide\nset [masks v] to [0]\n\nglide (1) secs to x: (112) y: (-58)\nglide (1) secs to x: (224) y: (-61)\nglide (0.2) secs to x: (251) y: (-60)\n\nstop [other scripts in sprite v]\n\nshow\n\nwhen I receive [ you won bro!!! :d v]\nhide\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nhide\n\nwhen backdrop switches to [backdrop5 v]\n\nforever\nend\n\nforever\n    next costume\nend\n\nhide\n\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nwhen backdrop switches to [backdrop5 v]\nwait (2) seconds\nshow\nglide (1) secs to x: (85) y: (-33)\nsay [Health] for (2) seconds\n\nswitch backdrop to (backdrop5 v)\n\nstop [other scripts in sprite v]\ngo to x: (-180) y: (114)\nswitch costume to (costume1 v)\nshow\nset size to (85) %\n\ngo to [front v] layer\n\n@Sprite2\n\nwhen backdrop switches to [backdrop1 v]\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [mask2 v]\ngo to x: (202) y: (-155)\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (blob v)?> then\n        set [action v] to [3]\n    end\n    if <key (space v) pressed?> then\n        if <touching (blob v)?> then\n            switch costume to (costume2 v)\n            broadcast (go mask2 v)\n            wait (5) seconds\n            hide\n        end\n    end\nend\n\nwhen I receive [next v]\nhide\n\nwhen I receive [go mask2 v]\nwait (3.2) seconds\nswitch backdrop to (backdrop3 v)\n\nstop [this script v]\n\nwhen backdrop switches to [backdrop3 v]\nhide\n\nwhen I receive [next v]\nhide\n\nwhen I receive [game over v]\nhide\n\nrepeat (10)\n    next costume\n    wait (0.1) seconds\nend\n\nwhen I receive [go mask v]\n\nwhen flag clicked\nforever\n    if <not <touching (blob v)?>> then\n        set [action v] to [1]\n    end\nend\n\n@mask2\n\nwhen flag clicked\nhide\n\nwhen I receive [go mask2 v]\nset size to (90) %\nshow\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nforever\n    next costume\nend\n\nwhen I receive [go mask2 v]\nstart sound [Get Item! v]\nhide\nwait (1) seconds\nstop [other scripts in sprite v]\nswitch backdrop to (backdrop3 v)\nwait (1) seconds\nstart sound [fairydust v]\nforever\n    set size to (65) %\n    go to x: (-132) y: (115)\n    switch costume to (costume1 v)\n    show\nend\n\nset size to (100) %\n\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [next v]\nhide\n\nwhen I receive [start v]\nforever\n    hide\nend\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [go mask2 v]\nrepeat (10)\n    show\nend\n\nwhen backdrop switches to [backdrop5 v]\nwait (1) seconds\nstop [other scripts in sprite v]\nglide (1) secs to x: (151) y: (-45)\nsay [Power] for (2) seconds\n\nstop [other scripts in sprite v]\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen I receive [start v]\nhide\n\ngo to x: (128) y: (-96)\nglide (1) secs to x: (112) y: (-58)\nglide (1) secs to x: (224) y: (-61)\nglide (0.2) secs to x: (251) y: (-60)\n\nshow\n\nwhen I receive [ you won bro!!! :d v]\nhide\n\nwhen backdrop switches to [backdrop3 v]\nforever\n    set size to (65) %\n    go to x: (-132) y: (115)\n    switch costume to (costume1 v)\n    show\nend\n\n@Sprite3\n\nwhen backdrop switches to [backdrop1 v]\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\n\nwhen I receive [next v]\nhide\n\nwhen I receive [go mask2 v]\n\nwait (3.2) seconds\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [next v]\nhide\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [start v]\nhide\n\nwhen backdrop switches to [backdrop5 v]\nhide\n\nwhen I receive [mask 3 v]\ngo to x: (147) y: (-156)\nswitch costume to (costume1 v)\nshow\nforever\n    if <touching (blob v)?> then\n        set [action v] to [3]\n    end\n    if <key (space v) pressed?> then\n        if <touching (blob v)?> then\n            switch costume to (costume2 v)\n            broadcast (go mask3 v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <touching (blob v)?>> then\n        set [action v] to [1]\n    end\nend\n\n@mask3\n\nwhen flag clicked\nhide\n\nwhen I receive [go mask3 v]\nset size to (100) %\nshow\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nforever\n    next costume\nend\n\nset size to (100) %\n\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [next v]\nhide\n\nwhen I receive [start v]\nforever\n    hide\nend\n\nwhen backdrop switches to [backdrop5 v]\nhide\n\nwhen backdrop switches to [backdrop5 v]\nwait (3) seconds\nstop [other scripts in sprite v]\nglide (1) secs to x: (31) y: (-38)\nsay [Inteligence] for (2) seconds\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\ngo to x: (128) y: (-96)\nglide (1) secs to x: (112) y: (-58)\nglide (1) secs to x: (224) y: (-61)\nglide (0.2) secs to x: (251) y: (-60)\nhide\n\nwhen I receive [game over v]\nhide\n\nstop [other scripts in sprite v]\n\nshow\n\nwhen I receive [go mask3 v]\nstart sound [Get Item! v]\nswitch backdrop to (backdrop5 v)\nwait (1) seconds\nstart sound [fairydust v]\nforever\n    set size to (65) %\n    go to x: (-71) y: (114)\n    switch costume to (costume1 v)\n    show\nend\n\nwhen I receive [ you won bro!!! :d v]\nhide\n\nwhen backdrop switches to [backdrop5 v]\nforever\n    set size to (65) %\n    go to x: (-71) y: (114)\n    switch costume to (costume1 v)\n    show\nend\n\n@Tomax\n\nwhen flag clicked\nhide\n\nwhen I receive [go mask3 v]\n\nforever\n    next costume\nend\n\nwhen I receive [go mask3 v]\n\nset size to (100) %\n\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [next v]\nhide\n\nset size to (100) %\nshow\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [go mask3 v]\ngo to x: (8) y: (-61)\nwait (10) seconds\nset size to (65) %\nswitch costume to (costume1 v)\nshow\nsay [Welcome to the Sacred Chamber] for (2) seconds\nsay [We are the three spirits of the world] for (2) seconds\nsay [By finding our masks you have freed us] for (3) seconds\nsay [The black mushrooms won't last much longer] for (4) seconds\nsay [You may go home now] for (4) seconds\nbroadcast ( YOU WON BRO!!! :D v)\nwait (3) seconds\nset size to (100) %\ngo to x: (0) y: (0)\nswitch costume to (costume2 v)\nswitch backdrop to (backdrop7 v)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [start game intro v]\nhide\n\nswitch backdrop to (backdrop1 v)\nbroadcast (start game intro v)\n\nstart sound [Ending v]\n\nwhen I receive [ you won bro!!! :d v]\ngo to x: (0) y: (0)\nset size to (100) %\nforever\n    switch costume to (costume2 v)\n    set [ghost v] effect to (0)\n    wait (3.4) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    switch costume to (costume3 v)\n    set [ghost v] effect to (0)\n    wait (3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    switch costume to (costume4 v)\n    set [ghost v] effect to (0)\n    wait (3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    switch costume to (costume5 v)\n    set [ghost v] effect to (0)\n    wait (3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    switch costume to (costume6 v)\n    set [ghost v] effect to (0)\n    wait (3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    switch costume to (costume8 v)\n    set [ghost v] effect to (0)\n    wait (3) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    switch costume to (costume7 v)\n    set [ghost v] effect to (0)\nend\n\nstart sound [tropical-musical-sound v]\nshow\ngo to x: (128) y: (-96)\nglide (1) secs to x: (112) y: (-58)\nglide (1) secs to x: (224) y: (-61)\nglide (0.2) secs to x: (251) y: (-60)\nhide\nstart sound [fairydust v]\nstop [other scripts in sprite v]\nwait (1) seconds\nforever\n    set size to (65) %\n    go to x: (-132) y: (115)\n    switch costume to (costume1 v)\n    show\nend\n\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nswitch costume to (costume7 v)\nset [ghost v] effect to (0)\n\n@Sprite8\n\nwhen backdrop switches to [backdrop1 v]\n\nwhen backdrop switches to [backdrop11 v]\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen I receive [stopblob v]\n\nwhen I receive [stopblob v]\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen I receive [boss! v]\n\nset size to (140) %\nrepeat until <(BadBlobHP) < [1]>\n    move (3) steps\n    if on edge, bounce\n    if <<touching (dosii v)?> and <touching color (#ff0000)?>> then\n        start sound [roar1 v]\n        change [badblobhp v] by (-1)\n        switch costume to (costume3 v)\n        move (-10) steps\n        wait (1) seconds\n        switch costume to (costume2 v)\n        broadcast (Stopblob v)\n    end\nend\n\nwhen I receive [game over v]\nhide\n\nwhen flag clicked\ngo to x: (131) y: (-45)\nhide\n\nwhen I receive [next v]\nforever\n    if <(level) = [22]> then\n    else\n        hide\n    end\nend\n\nset [level v] to [21]\n\nif  then\nend\n\nplay sound [roar1 v] until done\n\nwhen backdrop switches to [backdrop5 v]\nstop [other scripts in sprite v]\n\nplay sound [roar v] until done\n\nbroadcast (BOSS! v)\nshow\nforever\n    point in direction (90)\n    play sound [roar v] until done\n    glide (0.5) secs to x: (59) y: (150)\n    start sound [roar1 v]\n    glide (0.5) secs to x: (-6) y: (-35)\n    glide (0.5) secs to x: (-145) y: (100)\n    start sound [roar2 v]\n    glide (0.5) secs to x: (-165) y: (-37)\n    point in direction (-90)\n    start sound [roar v]\n    glide (0.5) secs to x: (-62) y: (67)\n    glide (0.5) secs to x: (25) y: (-32)\n    glide (0.2) secs to x: (127) y: (-35)\nend\n\nwhen I receive [go mask3 v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nset size to (100) %\n\nwhen I receive [start v]\nhide\n\nwhen I receive [game over v]\nhide\n\nhide\n\nwhen I receive [game over v]\nstart sound [medieval1 v]\nset [ghost v] effect to (100)\nshow\ngo to x: (0) y: (0)\nrepeat (10)\n    switch costume to (costume1 v)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait (4) seconds\nrepeat (10)\n    switch costume to (costume1 v)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\nrepeat (10)\n    switch costume to (costume2 v)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait (4) seconds\nrepeat (10)\n    switch costume to (costume2 v)\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\nrepeat (10)\n    switch costume to (costume3 v)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nwait (4) seconds\nbroadcast (start v)\n\n@Sign\n\nwhen flag clicked\nset [level v] to [0]\nhide\n\nwhen flag clicked\nforever\n    if <(level) = [2]> then\n        go to x: (-137) y: (-155)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [Down arrow to crouch] for (2) seconds\n            end\n        end\n    end\n    if <(level) = [3]> then\n        go to x: (-137) y: (-155)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [Up arrow to jump] for (2) seconds\n            end\n        end\n    end\n    if <(level) = [6]> then\n        go to x: (-155) y: (-155)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [Purple mushrooms make you jump high] for (2) seconds\n            end\n        end\n    end\n    if <(level) = [8]> then\n        go to x: (-155) y: (-155)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [DANGER] for (2) seconds\n            end\n        end\n    end\n    if <(level) = [10]> then\n        go to x: (51) y: (-155)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [DANGER: swamp ahead] for (2) seconds\n            end\n        end\n    end\n    if <(level) = [11]> then\n        go to x: (-142) y: (-136)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [DANGER poison water] for (2) seconds\n            end\n        end\n    end\n    if <(level) = [14]> then\n        go to x: (-179) y: (-153)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [These blue creatures heal you and throw you in the air] for (2) seconds\n            end\n        end\n    end\n    if <(level) = [17]> then\n        go to x: (-179) y: (-153)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [DANGER death mushrooms] for (2) seconds\n            end\n        end\n    end\n    if <(level) = [19]> then\n        go to x: (-179) y: (-153)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [Get on the platform with death mushrooms then fall and move right] for (2) seconds\n            end\n        end\n    end\n    if <(level) = [22]> then\n        go to x: (-179) y: (-153)\n        show\n        if <key (space v) pressed?> then\n            if <touching (blob v)?> then\n                say [Forgoss's lair] for (2) seconds\n            end\n        end\n    end\nend\n\nwhen flag clicked\n\nstop [other scripts in sprite v]\n\nstop [other scripts in sprite v]\n\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    if <not <<(level) = [3]> or <<(level) = [6]> or <<(level) = [8]> or <<(level) = [10]> or <<(level) = [11]> or <<(level) = [14]> or <<(level) = [16]> or <<(level) = [22]> or <(level) = [2]>>>>>>>>>> then\n        hide\n    end\nend\n\nwhen I receive [ you won bro!!! :d v]\nhide\n\nwhen I receive [game over v]\nhide\n\nif <key (space v) pressed?> then\nend\n\nif  then\nelse\nend\n\nwhen flag clicked\nforever\n    if <not <touching (blob v)?>> then\n        set [action v] to [1]\n    end\nend\n\nwhen flag clicked\nforever\nend\n\nwhen backdrop switches to [backdrop5 v]\nstop [other scripts in sprite v]\nhide\n\nforever\nend\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\nend\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nwait (0.1) seconds\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set size to (100) %\nend\n\n