Island (Platformer)

Instructions: Some parts are hard! If you're having trouble, then press Key Y to SKIP an area. \n\nWaterspout physics are honestly, the worst thing ever\n\nSo the first three levels are a bit generic, when you get to the fourth and fifth, added after the demo, things start getting, well, more complicated...\n\nSecret Exit in 2-4 Try to find it!\n\nJust a regular platformer with absolutely no storyline, that, for some reason, took 3 months to make.\n\n35 likes and I'll make another project\n\n\n                                 \n                                Project Statistics\n                                       -   -   -   -\n                                   Blocks | 2847\n                                     Sprites | 39\n                                   Variables | 33\n\n

@Stage\n\nwhen flag clicked\nforever\n    if <<(Area) = [1]> or <<(Area) = [2]> or <(Area) = [3]>>> then\n        switch backdrop to (n/a v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Area) = [N/A]> and <(Worldmapshowing?) = [0]>> then\n        if <(timer) < [230]> then\n            switch backdrop to (title v)\n        else\n            repeat (100)\n                change [ghost v] effect by (1)\n            end\n            switch backdrop to (title2 v)\n            repeat (100)\n                change [ghost v] effect by (-1)\n            end\n            stop [this script v]\n        end\n    end\nend\n\n@Guy\n\nwhen flag clicked\nhide\n\ndefine Die\nbroadcast (dead v)\nwait (.1) seconds\ngo to x: (-180) y: (-40)\nset [y v] to [0]\nset [x v] to [0]\n\ndefine Jump (height)\nset [y v] to (height)\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset size to (100) %\nset [ghost v] effect to (0)\nrepeat (5)\n    change size by (-3)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\ndefine Walljump (left/right)\nset [x v] to (left/right)\n\ndefine Bounce ()\nset [y v] to (() * (-1))\n\nwhen I receive [start v]\ngo to x: (-180) y: (-40)\nwait (2) seconds\nset [y v] to [0]\nset [x v] to [0]\nset [move v] to [1]\nshow\nset size to (100) %\ngo to [front v] layer\nforever\n    if <(move) = [1]> then\n        if <key (left arrow v) pressed?> then\n            change [x v] by (-0.75)\n        end\n        if <key (right arrow v) pressed?> then\n            change [x v] by (0.75)\n        end\n        set [x v] to ((x) * (0.9))\n        change x by (x)\n        if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n            change y by (1)\n            if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n                change y by (1)\n                if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n                    change y by (1)\n                    if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n                        change y by (1)\n                        if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n                            change y by (1)\n                            if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n                                change y by (1)\n                                if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n                                    change y by (1)\n                                    if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n                                        change x by ((x) * (-1))\n                                        change y by (-7)\n                                        if <key (up arrow v) pressed?> then\n                                            if <(x) > [0]> then\n                                                Walljump [-5]\n                                            else\n                                                Walljump [5]\n                                            end\n                                            Jump [10]\n                                        else\n                                            set [x v] to [0]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change y by (-1)\n        if <key (up arrow v) pressed?> then\n            if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n                Jump [10]\n            end\n        end\n        change y by (1)\n        if <not <touching color (#6bd8ff)?>> then\n            if <key (up arrow v) pressed?> then\n                change [y v] by (-0.7)\n            else\n                change [y v] by (-1)\n            end\n        else\n            change [y v] by (1)\n            if <key (up arrow v) pressed?> then\n                change [y v] by (1)\n            else\n                if <key (down arrow v) pressed?> then\n                    change [y v] by (-1)\n                end\n            end\n        end\n        set [y v] to ((y) * (1))\n        change y by (y)\n        if <<touching color (#57b744)?> or <touching color (#f4ff5e)?>> then\n            change y by ((y) * (-1))\n            set [y v] to [0]\n        end\n        if <[-175] > (y position)> then\n            if <(Worldmapshowing?) = [0]> then\n                Die\n            end\n        end\n        if <<<touching color (#535353)?> or <touching color (#787878)?>> or <touching color (#ff5555)?>> then\n            if <(Worldmapshowing?) = [0]> then\n                Die\n            end\n        end\n        if <touching color (#67b857)?> then\n            broadcast (trololol v)\n        end\n        if <(x position) > [236]> then\n            broadcast (next v)\n            go to x: (-180) y: (-40)\n        end\n        if <touching color (#9966ff)?> then\n            Die\n        end\n        change y by (-1)\n        if <touching (gizmos? v)?> then\n            if <([costume # v] of [gizmos? v]) = [1]> then\n                change [y v] by (0)\n                if <(Waterspout: Yv) > [4]> then\n                    change y by ((Waterspout: Yv) * (2))\n                else\n                    change y by ((Waterspout: Yv) * (-0.5))\n                end\n                if <key (up arrow v) pressed?> then\n                    Jump [10]\n                end\n            end\n        end\n        if <touching (gizmos? v)?> then\n            if <<([costume # v] of [gizmos? v]) = [2]> or <([costume # v] of [gizmos? v]) = [4]>> then\n                change y by (([sin v] of (sine1) ) + ([abs v] of ([sin v] of (sine1) ) ))\n            end\n        end\n        if <touching (gizmos? v)?> then\n            if <([costume # v] of [gizmos? v]) = [3]> then\n                change [y v] by (0)\n                if <(Waterspout: Yv) > [4]> then\n                    change y by ((Waterspout: Yv) * (2))\n                else\n                    change y by ((Waterspout: Yv) * (-0.5))\n                    change y by (1)\n                end\n                if <key (up arrow v) pressed?> then\n                    Jump [10]\n                end\n            end\n        end\n        if <touching (gizmos? v)?> then\n            if <([costume # v] of [gizmos? v]) = [6]> then\n                change x by ([sin v] of (sine1) )\n            end\n        end\n        if <touching (gizmos? v)?> then\n            if <([costume # v] of [gizmos? v]) = [9]> then\n                change x by ([sin v] of (sine1) )\n            end\n        end\n        change y by (1)\n    end\nend\n\nwhen I receive [end v]\nhide\n\nwhen I receive [fail v]\nstart sound [down v]\nplay sound [down v] until done\nstart sound [down v]\nstart sound [down v]\nplay sound [down v] until done\nstart sound [down v]\nplay sound [down v] until done\n\nwhen flag clicked\nforever\n    if <[0.1] > (HP)> then\n        Freeze at: (x position) (y position)\n    end\nend\n\ndefine Freeze at: (x) (y)\ngo to x: (x) y: (y)\n\npoint in direction (90)\n\nwhen I receive [skip\(for real\) v]\nhide\n\nwhen I receive [die. v]\nDie\n\nwhen I receive [secretexitbefore\(setup\) v]\nhide\nrepeat (35)\n    Freeze at: [250] [250]\nend\n\nwhen flag clicked\nset [colour\(canadian spelling\) v] to [Blue]\nforever\n    if <(Colour\(canadian spelling\)) = [Blue]> then\n        switch costume to (5 v)\n    else\n        if <(Colour\(canadian spelling\)) = [Orange]> then\n            switch costume to (3 v)\n        else\n            if <(Colour\(canadian spelling\)) = [Pink]> then\n                switch costume to (2 v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Canplayerchangecolor?) = [1]> then\n        if <key (1 v) pressed?> then\n            set [colour\(canadian spelling\) v] to [Orange]\n        end\n        if <key (2 v) pressed?> then\n            set [colour\(canadian spelling\) v] to [Pink]\n        end\n        if <key (3 v) pressed?> then\n            set [colour\(canadian spelling\) v] to [Blue]\n        end\n    end\nend\n\nchange y by (10)\n\nchange y by ((Waterspout: Yv) * (-0.5))\n\nchange y by ((Waterspout: Yv) * (1))\n\nwhen I receive [next v]\nset [x v] to [0]\nset [y v] to [0]\nhide\nwait (.3) seconds\nshow\nset [x v] to [0]\nset [y v] to [0]\n\n@World Map\n\nwhen flag clicked\nset [worldmapshowing? v] to [0]\nhide\n\nwhen I receive [play v]\ngo to [front v] layer\ngo [backward v] (2) layers\ngo to [back v] layer\nset [worldmapshowing? v] to [1]\nshow\nforever\n    if <[-220] > ([x position v] of [world map guy v])> then\n    if <([x position v] of [world map guy v]) = (round (-202))> then\nend\n\nwhen I receive [start v]\nset [worldmapshowing? v] to [0]\nhide\n\nwhen I receive [start v]\nstart sound [Throw v]\n\nwhen I receive [end v]\nset [worldmapshowing? v] to [1]\nshow\n\nwhen I receive [secretexit! v]\nset [worldmapshowing? v] to [1]\nshow\n\nwhen I receive [game end v]\nset [worldmapshowing? v] to [0]\nhide\n\nwhen I receive [outro done v]\nset [worldmapshowing? v] to [1]\nstop all sounds\nshow\nwait (1) seconds\nstop all sounds\n\n@World map guy\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nswitch costume to (costume1 v)\ngo to [front v] layer\nset [areascompleted v] to [0]\nset size to (50) %\ngo to x: (-228) y: (-25)\nshow\nforever\n    go to [front v] layer\n    if <(WorldMapNavigationClosed?) = [0]> then\n        if <<[-220] > (x position)> and <key (right arrow v) pressed?>> then\n            wait until <not <key (right arrow v) pressed?>>\n            if <(Worldmapshowing?) = [1]> then\n                start sound [Throw v]\n                glide (0.3) secs to x: (-202) y: (-26)\n            end\n        end\n        if <<(x position) = (round (-202))> and <key (right arrow v) pressed?>> then\n            if <<(Areascompleted) = [1]> or <(Areascompleted) > [1]>> then\n                wait until <not <key (right arrow v) pressed?>>\n                if <(Worldmapshowing?) = [1]> then\n                    start sound [Throw v]\n                    glide (0.3) secs to x: (-135) y: (-25)\n                    glide (0.3) secs to x: (-109) y: (13)\n                end\n            end\n        end\n        if <<(x position) = (round (-202))> and <key (left arrow v) pressed?>> then\n            wait until <not <key (left arrow v) pressed?>>\n            if <(Worldmapshowing?) = [1]> then\n                start sound [Throw v]\n                glide (0.3) secs to x: (-228) y: (-25)\n            end\n        end\n        if <<<(x position) = [-109]> and <(y position) = [13]>> and <key (left arrow v) pressed?>> then\n            wait until <not <key (left arrow v) pressed?>>\n            if <<(Areascompleted) = [1]> or <(Areascompleted) > [1]>> then\n                if <(Worldmapshowing?) = [1]> then\n                    start sound [Throw v]\n                    glide (0.3) secs to x: (-135) y: (-25)\n                    glide (0.3) secs to x: (-202) y: (-26)\n                end\n            end\n        end\n        if <<<(x position) = [-109]> and <(y position) = [13]>> and <key (right arrow v) pressed?>> then\n            wait until <not <key (right arrow v) pressed?>>\n            if <<(Areascompleted) = [2]> or <(Areascompleted) > [2]>> then\n                if <(Worldmapshowing?) = [1]> then\n                    start sound [Throw v]\n                    glide (0.3) secs to x: (-64) y: (4)\n                    glide (0.3) secs to x: (-46) y: (-49)\n                end\n            end\n        end\n        if <<<(x position) = [-46]> and <(y position) = [-49]>> and <key (left arrow v) pressed?>> then\n            wait until <not <key (left arrow v) pressed?>>\n            if <<(Areascompleted) = [2]> or <(Areascompleted) > [2]>> then\n                if <(Worldmapshowing?) = [1]> then\n                    start sound [Throw v]\n                    glide (0.3) secs to x: (-64) y: (4)\n                    glide (0.3) secs to x: (-109) y: (13)\n                end\n            end\n        end\n        if <<<(x position) = [-46]> and <(y position) = [-49]>> and <key (right arrow v) pressed?>> then\n            wait until <not <key (left arrow v) pressed?>>\n            if <<(Areascompleted) = [3]> or <(Areascompleted) > [3]>> then\n                if <(Worldmapshowing?) = [1]> then\n                    start sound [Throw v]\n                    glide (0.3) secs to x: (37) y: (-132)\n                    glide (.04) secs to x: (46) y: (-129)\n                end\n            end\n        end\n        if <<<(x position) = [46]> and <(y position) = [-129]>> and <key (left arrow v) pressed?>> then\n            wait until <not <key (left arrow v) pressed?>>\n            if <<(Areascompleted) = [3]> or <(Areascompleted) > [3]>> then\n                if <(Worldmapshowing?) = [1]> then\n                    start sound [Throw v]\n                    glide (.04) secs to x: (37) y: (-132)\n                    glide (0.3) secs to x: (-46) y: (-49)\n                end\n            end\n        end\n        if <<<(x position) = [-109]> and <(y position) = [13]>> and <key (up arrow v) pressed?>> then\n            wait until <not <key (up arrow v) pressed?>>\n            if <(SecretExitFound?) = [1]> then\n                if <(Worldmapshowing?) = [1]> then\n                    start sound [Throw v]\n                    glide (.4) secs to x: (-108) y: (125)\n                    glide (.03) secs to x: (-125) y: (139)\n                end\n            end\n        end\n        if <<<(x position) = [-125]> and <(y position) = [139]>> and <key (down arrow v) pressed?>> then\n            wait until <not <key (down arrow v) pressed?>>\n            if <(SecretExitFound?) = [1]> then\n                if <(Worldmapshowing?) = [1]> then\n                    start sound [Throw v]\n                    glide (.03) secs to x: (-108) y: (125)\n                    glide (.4) secs to x: (-109) y: (13)\n                end\n            end\n        end\n    end\n    if <<<(x position) = [46]> and <(y position) = [-129]>> and <key (down arrow v) pressed?>> then\n        wait until <not <key (down arrow v) pressed?>>\n        if <<(Areascompleted) = [3]> or <(Areascompleted) > [3]>> then\n            if <(Worldmapshowing?) = [1]> then\n                start sound [Throw v]\n                glide (.2) secs to x: (39) y: (-171)\n                glide (.4) secs to x: (-49) y: (-155)\n            end\n        end\n    end\n    if <<<(x position) = [-49]> and <(y position) = [-155]>> and <key (right arrow v) pressed?>> then\n        wait until <not <key (right arrow v) pressed?>>\n        if <<(Areascompleted) = [3]> or <(Areascompleted) > [3]>> then\n            if <(Worldmapshowing?) = [1]> then\n                start sound [Throw v]\n                glide (.4) secs to x: (39) y: (-171)\n                glide (.2) secs to x: (46) y: (-129)\n            end\n        end\n    end\n    if <<<(x position) = [46]> and <(y position) = [-129]>> and <key (right arrow v) pressed?>> then\n        wait until <not <key (right arrow v) pressed?>>\n        if <<(Areascompleted) = [4]> or <(Areascompleted) > [4]>> then\n            if <(Worldmapshowing?) = [1]> then\n                start sound [Throw v]\n                glide (.1) secs to x: (77) y: (-124)\n                glide (.4) secs to x: (164) y: (-26)\n            end\n        end\n    end\n    if <<<(x position) = [164]> and <(y position) = [-26]>> and <key (left arrow v) pressed?>> then\n        wait until <not <key (left arrow v) pressed?>>\n        if <<(Areascompleted) = [4]> or <(Areascompleted) > [4]>> then\n            if <(Worldmapshowing?) = [1]> then\n                start sound [Throw v]\n                glide (.4) secs to x: (77) y: (-124)\n                glide (.1) secs to x: (46) y: (-129)\n            end\n        end\n    end\nend\n\nwhen I receive [play v]\nset size to (50) %\ngo to x: (-228) y: (-25)\nshow\nforever\n    if <(WorldMapNavigationClosed?) = [0]> then\n        if <<(x position) = [-202]> and <(y position) = [-26]>> then\n            if <key (space v) pressed?> then\n                if <(Worldmapshowing?) = [1]> then\n                    set [area v] to [1]\n                    Befeffect\n                    play sound [enter level v] until done\n                    broadcast (A1: Start v)\n                    broadcast (Start v)\n                end\n            end\n        end\n        if <<(x position) = [-109]> and <(y position) = [13]>> then\n            if <key (space v) pressed?> then\n                if <(Worldmapshowing?) = [1]> then\n                    set [area v] to [2]\n                    Befeffect\n                    play sound [enter level v] until done\n                    broadcast (A2:start v)\n                    broadcast (Start v)\n                end\n            end\n        end\n        if <<(x position) = [-46]> and <(y position) = [-49]>> then\n            if <key (space v) pressed?> then\n                if <(Worldmapshowing?) = [1]> then\n                    set [area v] to [3]\n                    Befeffect\n                    play sound [enter level v] until done\n                    broadcast (A3:Start v)\n                    broadcast (Start v)\n                end\n            end\n        end\n        if <<(x position) = [46]> and <(y position) = [-129]>> then\n            if <key (space v) pressed?> then\n                if <(Worldmapshowing?) = [1]> then\n                    set [area v] to [4]\n                    Befeffect\n                    play sound [enter level v] until done\n                    broadcast (A4:Start v)\n                    broadcast (Start v)\n                end\n            end\n        end\n    end\n    if <<(x position) = [-49]> and <(y position) = [-155]>> then\n        if <key (space v) pressed?> then\n            if <(Worldmapshowing?) = [1]> then\n                if <(WorldMapNavigationClosed?) = [0]> then\n                    broadcast (shop v)\n                end\n            end\n        end\n    end\n    if <<(x position) = [164]> and <(y position) = [-26]>> then\n        if <key (space v) pressed?> then\n            if <(Worldmapshowing?) = [1]> then\n                set [area v] to [5]\n                Befeffect\n                play sound [enter level v] until done\n                broadcast (A5:Start v)\n                broadcast (Start v)\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nhide\n\nwhen flag clicked\nreset timer\npoint in direction (90)\nforever\n    change x by (0.1)\n    wait (0) seconds\n    change x by (-0.1)\n    wait (0) seconds\nend\n\nturn right (0.1) degrees\n\ndefine Befeffect\nbroadcast (trans v)\n\nwhen I receive [end v]\nshow\n\nwhen I receive [secretexit! v]\nrepeat (10)\n    show\nend\n\nset [shopopen? v] to [1]\n\nwhen flag clicked\nset [colour\(canadian spelling\) v] to [Blue]\nforever\n    if <(Colour\(canadian spelling\)) = [Blue]> then\n        switch costume to (costume1 v)\n    else\n        if <(Colour\(canadian spelling\)) = [Orange]> then\n            switch costume to (costume2 v)\n        else\n            if <(Colour\(canadian spelling\)) = [Pink]> then\n                switch costume to (costume3 v)\n            end\n        end\n    end\nend\n\nwhen I receive [game end v]\nhide\nset [worldmapnavigationclosed? v] to [Closed]\n\nwhen I receive [outro done v]\nshow\nset [worldmapnavigationclosed? v] to [0]\n\nwhen I receive [outro done v]\nswitch backdrop to (n/a v)\n\n@Playbutton\n\nwhen flag clicked\nswitch costume to (costume2 v)\ngo to x: (0) y: (0)\nshow\nset size to (100) %\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (102) %\n        wait (0) seconds\n        set size to (104) %\n        wait (0) seconds\n        set size to (106) %\n        wait (0) seconds\n        set size to (108) %\n        wait (0) seconds\n        set size to (110) %\n        wait (0) seconds\n        set size to (112) %\n        wait (0) seconds\n        set size to (114) %\n        wait (0) seconds\n        set size to (116) %\n        wait (0) seconds\n        set size to (118) %\n        wait until <<<mouse down?> and <touching (mouse-pointer v)?>> or <not <touching (mouse-pointer v)?>>>\n        if <not <touching (mouse-pointer v)?>> then\n            set size to (100) %\n        else\n            if <<mouse down?> and <touching (mouse-pointer v)?>> then\n                start sound [beep v]\n                wait (.01) seconds\n                broadcast (Play v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [play v]\nhide\n\nstart sound [beep v]\n\nstart sound [beep v]\n\nwhen flag clicked\nwait (238.23) seconds\nswitch costume to (costume3 v)\n\n@muusic\n\nwhen flag clicked\nhide\n\nwhen I receive [a1: start v]\nwait (0.1) seconds\nstop all sounds\nrepeat until <(Worldmapshowing?) = [1]>\n    if <(Area) = [1]> then\n        play sound [Nebula v] until done\n    else\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen I receive [a2:start v]\nwait (0.1) seconds\nstop all sounds\nrepeat until <(Worldmapshowing?) = [1]>\n    if <(Area) = [2]> then\n        play sound [vexento-lonely-dance v] until done\n    else\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen I receive [a3:start v]\nwait (0.1) seconds\nstop all sounds\nrepeat until <(Worldmapshowing?) = [1]>\n    if <(Area) = [3]> then\n        play sound [Vexento_-_Tevo.mp3 v] until done\n    else\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen I receive [a4:start v]\nwait (0.1) seconds\nstop all sounds\nrepeat until <(Worldmapshowing?) = [1]>\n    if <(Area) = [4]> then\n        play sound [Vexento - Across The Ocean.mp3 v] until done\n    else\n        stop all sounds\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nstop all sounds\n\nwhen I receive [a5:start v]\nwait (0.1) seconds\nstop all sounds\nrepeat until <(Worldmapshowing?) = [1]>\n    if <(Area) = [5]> then\n        play sound [Inferno v] until done\n    else\n        stop all sounds\n        stop [this script v]\n    end\nend\n\n@Lines-49\n\nwhen I receive [success! v]\nchange [areascompleted v] by (1)\nif <(Areascompleted) = [1]> then\n    go to [front v] layer\n    go [backward v] (1) layers\n    show\nelse\n    if <(Areascompleted) = [2]> then\n        go to [front v] layer\n        go [backward v] (1) layers\n        show\n    else\n        if <(Areascompleted) = [3]> then\n            go to [front v] layer\n            go [backward v] (1) layers\n            show\n        else\n            if <(Areascompleted) = [4]> then\n        end\n    end\nend\n\nwhen flag clicked\nswitch costume to (0 v)\nset [isarea1complete? v] to [0]\nset [isarea2complete? v] to [0]\nset [isarea3complete? v] to [0]\nset [isarea4complete? v] to [0]\nset [isarea5complete? v] to [0]\n\nwhen flag clicked\nforever\n    set [areascompleted v] to ((Isarea1complete?) + ((IsArea2Complete?) + ((IsArea3Complete?) + ((IsArea4Complete?) + (IsArea5Complete?)))))\nend\n\nwhen flag clicked\nforever\n    if <(Worldmapshowing?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to ((Areascompleted) + (1))\n    if <(Areascompleted) = [0]> then\n        hide\n    end\nend\n\nwhen I receive [game end v]\nrepeat until <(Worldmapshowing?) = [1]>\n    hide\nend\n\nset [areascompleted v] to [5]\n\n@HP\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\npoint in direction (90)\nset [hp v] to (HealthCap)\nswitch costume to ((HealthCap) + (1))\nshow\ngo to x: (0) y: (0)\nset size to (80) %\nglide (0.5) secs to x: (-200) y: (143)\nrepeat (10)\n    change size by (-3)\nend\nset size to (50) %\n\nwhen I receive [dead v]\nset size to (70) %\ngo to x: (0) y: (0)\ngo to (guy v)\nchange y by (55)\nwait (.3) seconds\nchange [hp v] by (-1)\nwait (.1) seconds\nglide (0.5) secs to x: (-200) y: (143)\nset size to (70) %\nrepeat (5)\n    change size by (-4)\nend\nset size to (50) %\npoint in direction (90)\nif <(HP) = [1]> then\n    broadcast (Flash v)\nend\nif <(HP) = [0]> then\n    switch costume to (hp0 v)\n    broadcast (downe v)\n    broadcast (Fail v)\n    broadcast (End v)\n    switch costume to (hp0 v)\nend\n\nwhen flag clicked\nforever\n    switch costume to ((HP) + (1))\nend\n\nwhen I receive [flash v]\nrepeat (5)\n    start sound [Pickup_Coin3 v]\n    hide\n    wait (.1) seconds\n    show\n    wait (0.5) seconds\nend\n\nwhen I receive [end v]\nstop all sounds\nhide\n\nwhen I receive [yeeayaa v]\nrepeat until <not <showing?>>\n    hide\nend\n\nwhen flag clicked\nforever\n    if <(Worldmapshowing?) = [1]> then\n        hide\n    end\nend\n\nwhen I receive [end v]\nset [hp v] to [-500]\n\nwhen I receive [dead v]\nif <(HP) = [0]> then\n    switch costume to (hp0 v)\n    broadcast (downe v)\n    broadcast (Fail v)\n    broadcast (End v)\n    switch costume to (hp0 v)\nend\n\nwhen I receive [secretexitbefore\(setup\) v]\nstop all sounds\nhide\n\nchange [hp v] by (1)\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [trans v]\nif <(Worldmapshowing?) = [1]> then\n    set y to (0)\n    go to [front v] layer\n    switch costume to (costume1 v)\n    clear graphic effects\n    show\n    set size to (50) %\n    go to (world map guy v)\n    point in direction (90)\n    go to x: (0) y: (0)\n    repeat (20)\n        change size by (150)\n    end\n    set x to (0)\n    repeat (5)\n        set size to (100) %\n        if <(Area) = [1]> then\n            switch costume to (area=1? v)\n        else\n            if <(Area) = [2]> then\n                switch costume to (area=2? v)\n            else\n                if <(Area) = [3]> then\n                    switch costume to (area=3? v)\n                else\n                    if <(Area) = [4]> then\n                        switch costume to (area=4? v)\n                    else\n                        if <(Area) = [5]> then\n                            switch costume to (area=5? v)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    point in direction (90)\n    set size to (80) %\n    repeat (70)\n        change size by (0.05)\n        turn right (.03) degrees\n        change [pixelate v] effect by (.5)\n    end\n    repeat (10)\n        change [pixelate v] effect by (10)\n        change [brightness v] effect by (2)\n    end\n    hide\n    clear graphic effects\nend\n\nwhen I receive [fail v]\nbroadcast (Yeeayaa v)\ngo to [front v] layer\ngo to x: (0) y: (0)\nset size to (100) %\nif <not <(my wariable) = [1]>> then\n    switch costume to (costume2 v)\nelse\n    switch costume to (costume3 v)\nend\nclear graphic effects\nshow\nplay sound [down v] until done\nplay sound [down v] until done\nplay sound [down v] until done\nrepeat (60)\n    change [ghost v] effect by (1.8)\nend\nhide\nclear graphic effects\n\nwhen I receive [outro done v]\nwait (5) seconds\nstop all sounds\n\n@A1: Levels\n\nwhen flag clicked\nset [area v] to [N/A]\nshow\nswitch costume to (level 1 v)\n\nwhen I receive [a1: start v]\nswitch costume to (level 1 v)\nset [area v] to [1]\nshow\n\nwhen I receive [play v]\nhide\n\nwhen I receive [next v]\nnext costume\nif <(costume [number v]) = [6]> then\n    if <(Area) = [1]> then\n        wait (0.3) seconds\n        broadcast (End v)\n        broadcast (Success! v)\n        set [isarea1complete? v] to [1]\n    end\nend\n\nwhen I receive [end v]\nhide\n\nwhen [y v] key pressed\nif <(Area) = [1]> then\n    if <(Worldmapshowing?) = [0]> then\n        broadcast (Skip v)\n    end\nend\n\nwhen I receive [skip\(for real\) v]\nswitch costume to (level 5 v)\nbroadcast (next v)\n\n@A2: Levels\n\nwhen flag clicked\nset [area v] to [N/A]\nhide\nswitch costume to (level 1 v)\n\nwhen I receive [a2:start v]\ngo to x: (0) y: (0)\nswitch costume to (level 1 v)\nset [area v] to [2]\nshow\n\nwhen I receive [play v]\nhide\n\nwhen I receive [next v]\nnext costume\nif <(costume [number v]) = [11]> then\n    if <(Area) = [2]> then\n        wait (0.3) seconds\n        broadcast (End v)\n        broadcast (Success! v)\n        set [isarea2complete? v] to [1]\n    end\nend\n\nwhen I receive [end v]\nhide\n\nwhen [y v] key pressed\nif <(Area) = [2]> then\n    if <(Worldmapshowing?) = [0]> then\n        broadcast (Skip v)\n    end\nend\n\nwhen I receive [skip\(for real\) v]\nswitch costume to (level 10 v)\nbroadcast (next v)\n\nwhen I receive [secretexit! v]\nset [isarea2complete? v] to [1]\nhide\n\n@A3: Levels\n\nwhen flag clicked\nset [area v] to [N/A]\nhide\nswitch costume to (level 1 v)\n\nwhen I receive [a3:start v]\ngo to x: (0) y: (0)\nswitch costume to (level 1 v)\nset [area v] to [3]\nshow\n\nwhen I receive [play v]\nhide\n\nwhen I receive [next v]\nnext costume\nif <(costume [number v]) = [8]> then\n    if <(Area) = [3]> then\n        wait (0.3) seconds\n        broadcast (End v)\n        broadcast (Success! v)\n        set [isarea3complete? v] to [1]\n    end\nend\n\nwhen I receive [end v]\nhide\n\nwhen [y v] key pressed\nif <(Area) = [3]> then\n    if <(Worldmapshowing?) = [0]> then\n        broadcast (Skip v)\n    end\nend\n\nwhen I receive [skip\(for real\) v]\nswitch costume to (level 7 v)\nbroadcast (next v)\n\nwhen I receive [start v]\nstop all sounds\n\n@A4: Levels\n\nwhen flag clicked\nset [area v] to [N/A]\nhide\nswitch costume to (level 1 v)\n\nwhen I receive [a4:start v]\ngo to x: (0) y: (0)\nswitch costume to (level 1 v)\nset [area v] to [4]\nshow\n\nwhen I receive [play v]\nhide\n\nwhen I receive [next v]\nnext costume\nif <(costume [number v]) = [11]> then\n    if <(Area) = [4]> then\n        wait (0.3) seconds\n        broadcast (End v)\n        broadcast (Success! v)\n        set [isarea4complete? v] to [1]\n    end\nend\n\nwhen I receive [end v]\nhide\n\nwhen [y v] key pressed\nif <(Area) = [4]> then\n    if <(Worldmapshowing?) = [0]> then\n        broadcast (Skip v)\n    end\nend\n\nwhen I receive [skip\(for real\) v]\nswitch costume to (level 10 v)\nbroadcast (next v)\n\n@A5: Levels\n\nwhen flag clicked\nset [area v] to [N/A]\nhide\nswitch costume to (level 1 v)\n\nwhen I receive [a5:start v]\ngo to x: (0) y: (0)\nswitch costume to (level 1 v)\nset [area v] to [5]\nshow\n\nwhen I receive [play v]\nhide\n\nwhen I receive [next v]\nnext costume\nif <(costume [number v]) = [10]> then\n    if <(Area) = [5]> then\n        wait (0.3) seconds\n        broadcast (End v)\n        broadcast (Success! v)\n        broadcast (Game End v)\n        set [isarea5complete? v] to [1]\n    end\nend\n\nwhen I receive [end v]\nhide\n\nwhen [y v] key pressed\nif <(Area) = [5]> then\n    if <(Worldmapshowing?) = [0]> then\n        broadcast (Skip v)\n    end\nend\n\nwhen I receive [skip\(for real\) v]\nswitch costume to (level 9 v)\nbroadcast (next v)\n\nwhen I receive [start v]\nstop all sounds\n\n@Islandtn\n\nwhen flag clicked\nhide\nset volume to (20) %\nplay sound [Elektronomia - Sky High \[NCS Bass Boosted\] v] until done\n\nwhen I receive [start v]\n\nwhen I receive [end v]\nwait (3) seconds\nrepeat until <(Worldmapshowing?) = [0]>\n    play sound [menu v] until done\nend\n\nwhen I receive [play v]\nstop all sounds\nwait (5) seconds\nplay sound [menu v] until done\nplay sound [menu v] until done\n\n@Congrats!\n\ndefine Animation\nset size to (130) %\nrepeat (5)\n    change size by (20)\nend\nrepeat (2)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (1)\n    change size by (-5)\nend\n\ndefine AnimationBackwards\nrepeat (1)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (2)\n    change size by (-5)\nend\nrepeat (5)\n    change size by (-30)\nend\nhide\n\nwhen flag clicked\nset [score v] to [0]\nhide\n\nwhen I receive [success! v]\nset size to (130) %\nbroadcast (Payment v)\nshow\nif <(Area) = [1]> then\n    switch costume to (area1payment v)\n    Animation\n    change [score v] by (2)\n    wait (.3) seconds\n    AnimationBackwards\nend\nif <(Area) = [2]> then\n    AnimationBackwards\n    switch costume to (area2payment v)\n    change [score v] by (5)\n    wait (.3) seconds\n    AnimationBackwards\nend\nif <(Area) = [3]> then\n    Animation\n    switch costume to (area3payment v)\n    change [score v] by (7)\n    wait (.3) seconds\n    AnimationBackwards\nend\nif <(Area) = [4]> then\n    Animation\n    switch costume to (area4payment v)\n    change [score v] by (10)\n    wait (.3) seconds\n    AnimationBackwards\nend\nif <(Area) = [5]> then\n    Animation\n    switch costume to (area5payment v)\n    change [score v] by (13)\n    wait (.3) seconds\n    AnimationBackwards\nend\nwait (2) seconds\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\n\nwhen I receive [payment v]\nwait (.6) seconds\nshow\nset size to (100) %\ngo to x: (0) y: (0)\nrepeat (4)\n    change size by (400)\nend\nhide\n\n@Sprite3\n\nwhen I receive [success! v]\nstart sound [Connect v]\ngo to x: (0) y: (0)\nshow\ngo to [front v] layer\nrepeat (10)\n    change x by (-50)\nend\nhide\n\nwhen flag clicked\nhide\n\n@oop\n\nwhen flag clicked\nhide\n\nwhen I receive [trololol v]\nif <([costume # v] of [a2: levels v]) = [9]> then\n    if <(once.) = [0]> then\n        wait (.3) seconds\n        show\n        point in direction (90)\n        set [sine1 v] to [50]\n        repeat (15)\n            start sound [Pickup_Coin3 v]\n            point in direction (pick random (0) to (360))\n            turn right (([sin v] of (sine1) ) * (13)) degrees\n            set [sine1 v] to ((sine1) * (-0.999))\n        end\n        hide\n        set [once. v] to [1]\n    end\nend\n\nwhen flag clicked\nset [once. v] to [0]\n\n@Skip\n\nwhen flag clicked\nhide\n\nwhen I receive [skip v]\nset [move v] to [0]\nswitch costume to (costume1 v)\nshow\nset size to (10) %\nAnimation\nrepeat (50)\n    if <key (space v) pressed?> then\n        if <not <(Area) = [5]>> then\n            broadcast (Skip\(For REAL\) v)\n            AnimationBackwards\n            set [move v] to [1]\n            stop [this script v]\n        else\n            switch costume to (costume2 v)\n            wait (1) seconds\n            AnimationBackwards\n            set [move v] to [1]\n        end\n    end\nend\nAnimationBackwards\nset [move v] to [1]\n\ndefine Animation\nrepeat (5)\n    change size by (20)\nend\nrepeat (2)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (1)\n    change size by (-5)\nend\n\ndefine AnimationBackwards\nrepeat (1)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (2)\n    change size by (-5)\nend\nrepeat (5)\n    change size by (-20)\nend\nhide\n\nAnimation\n\nwhen I receive [start v]\nset [move v] to [1]\n\nwhen I receive [start v]\nset [move v] to [1]\n\n@Water:layer\n\nwhen flag clicked\nforever\n    if <<(Area) = [4]> and <(Worldmapshowing?) = [0]>> then\n        go to [back v] layer\n        set [ghost v] effect to (0)\n        switch costume to ([costume # v] of [a4: levels v])\n        show\n    else\n        if <<(Area) = [5]> and <(Worldmapshowing?) = [0]>> then\n            if <(EndTransition) = [1]> then\n                hide\n            else\n                set [ghost v] effect to (0)\n                switch costume to (([costume # v] of [a5: levels v]) + (10))\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    repeat (5)\n        change y by (1)\n    end\n    repeat (1)\n        change y by (0.5)\n    end\n    repeat (1)\n        change y by (0.1)\n    end\n    repeat (1)\n        change y by (-0.1)\n    end\n    repeat (1)\n        change y by (-0.5)\n    end\n    repeat (5)\n        change y by (-1)\n    end\n    repeat (1)\n        change y by (-0.5)\n    end\n    repeat (1)\n        change y by (-0.1)\n    end\n    repeat (1)\n        change y by (0.1)\n    end\n    repeat (1)\n        change y by (0.5)\n    end\nend\n\nwhen I receive [game end v]\nhide\n\nwhen I receive [success! v]\nhide\n\nwhen flag clicked\nforever\n    \nend\n\n@Water t\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    repeat (10)\n        change y by (1)\n    end\n    repeat (2)\n        change y by (0.5)\n    end\n    repeat (2)\n        change y by (0.1)\n    end\n    repeat (2)\n        change y by (-0.1)\n    end\n    repeat (2)\n        change y by (-0.5)\n    end\n    repeat (10)\n        change y by (-1)\n    end\n    repeat (2)\n        change y by (-0.5)\n    end\n    repeat (2)\n        change y by (-0.1)\n    end\n    repeat (2)\n        change y by (0.1)\n    end\n    repeat (2)\n        change y by (0.5)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nforever\n    if <<(Area) = [4]> and <(Worldmapshowing?) = [0]>> then\n        set [ghost v] effect to (0)\n        switch costume to ([costume # v] of [a4: levels v])\n        show\n    else\n        if <<(Area) = [5]> and <(Worldmapshowing?) = [0]>> then\n            if <(EndTransition) = [1]> then\n                hide\n            else\n                set [ghost v] effect to (0)\n                switch costume to (([costume # v] of [a5: levels v]) + (10))\n                show\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [game end v]\nhide\n\nwhen I receive [game end v]\nhide\n\nwhen I receive [success! v]\nhide\n\nif <(EndTransition) = [1]> then\n    hide\nend\n\nif <(EndTransition) = [1]> then\n    hide\nelse\n    set [ghost v] effect to (0)\n    switch costume to (([costume # v] of [a5: levels v]) + (10))\n    show\nend\n\n@Invisible platform for A2\n\nwhen flag clicked\ngo to x: (-284) y: (0)\nset [ghost v] effect to (99)\nset [invisplatform v] to [0]\nhide\nforever\n    if <<<(Area) = [2]> and <([costume # v] of [a2: levels v]) = [4]>> and <(Worldmapshowing?) = [0]>> then\n        if <(invisPlatform) = [0]> then\n            set [ghost v] effect to (99)\n            show\n        end\n        wait until <<<touching (guy v)?> or <not <([costume # v] of [a2: levels v]) = [4]>>> or <not <(Worldmapshowing?) = [0]>>>\n        if <<([costume # v] of [a2: levels v]) = [4]> and <(Worldmapshowing?) = [0]>> then\n            set [invisplatform v] to [1]\n            repeat (33)\n                change [ghost v] effect by (-3)\n            end\n        else\n            set [ghost v] effect to (0)\n            hide\n        end\n    end\nend\n\nwhen I receive [a2:start v]\nset [invisplatform v] to [0]\n\ngo to x: (-284) y: (0)\n\n@DA WALL\n\nwhen flag clicked\ngo to x: (27) y: (173)\nset [ghost v] effect to (0)\nhide\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\n    if <<<(Area) = [2]> and <([costume # v] of [a2: levels v]) = [4]>> and <(Worldmapshowing?) = [0]>> then\n        show\n        if <touching (guy v)?> then\n            set [ghost v] effect to (50)\n        else\n            set [ghost v] effect to (0)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(SecretExitFound?) = [1]> then\n        hide\n    end\nend\n\n@DA SECRET EXIT\n\nwhen flag clicked\nforever\n    if <<<([costume # v] of [a2: levels v]) = [4]> and <(Area) = [2]>> and <(Worldmapshowing?) = [0]>> then\n        show\n        if <touching (guy v)?> then\n            broadcast (SecretExitBEFoRE\(setup\) v)\n            hide\n            wait (4) seconds\n            broadcast (SecretExit! v)\n        end\n    else\n        hide\n    end\n    go to [back v] layer\nend\n\nwhen flag clicked\nforever\n    if <(SecretExitFound?) = [1]> then\n        hide\n    end\nend\n\n@Retry\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\ndefine Animation\nrepeat (5)\n    change size by (20)\nend\nrepeat (2)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (1)\n    change size by (-5)\nend\n\ndefine AnimationBackwards\nrepeat (1)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (2)\n    change size by (-5)\nend\nrepeat (5)\n    change size by (-20)\nend\nhide\n\nwhen [r v] key pressed\nset [move v] to [0]\ngo to x: (0) y: (0)\nif <(Worldmapshowing?) = [0]> then\n    show\n    set size to (10) %\n    Animation\n    repeat (50)\n        if <key (space v) pressed?> then\n            broadcast (Die. v)\n            AnimationBackwards\n            set [move v] to [1]\n            stop [this script v]\n        end\n    end\n    AnimationBackwards\n    set [move v] to [1]\nend\n\n@Sprite4\n\nwhen flag clicked\nset [secretexitfound? v] to [0]\nhide\nset [my wariable v] to [0]\n\nwhen I receive [secretexitbefore\(setup\) v]\nshow\nrepeat (50)\n    go to [front v] layer\nend\nset [my wariable v] to [1]\n\nwhen I receive [secretexit! v]\nbroadcast (Success! v)\nset [secretexitfound? v] to [1]\nhide\nwait (10) seconds\nset [my wariable v] to [0]\n\n@Lines-A2_SE\n\nwhen flag clicked\nset [worldmapnavigationclosed? v] to [0]\nhide\nwait (1) seconds\nwait until <(SecretExitFound?) = [1]>\nshow\nset [ghost v] effect to (100)\nset [worldmapnavigationclosed? v] to [CLOSED]\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nset [worldmapnavigationclosed? v] to [0]\n\nwhen flag clicked\nforever\n    if <(Worldmapshowing?) = [1]> then\n        if <(SecretExitFound?) = [1]> then\n            show\n        end\n    else\n        hide\n    end\nend\n\n@WIPMessage\n\nwhen flag clicked\nset [1-use v] to [0]\ngo to x: (0) y: (0)\nhide\n\ndefine Animation\nrepeat (5)\n    change size by (20)\nend\nrepeat (2)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (1)\n    change size by (-5)\nend\n\ndefine AnimationBackwards\nrepeat (1)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (2)\n    change size by (-5)\nend\nrepeat (5)\n    change size by (-20)\nend\nhide\n\nwhen [space v] key pressed\nif <<([x position v] of [world map guy v]) = [-125]> and <([y position v] of [world map guy v]) = [139]>> then\n    if <(Worldmapshowing?) = [1]> then\n        set [worldmapnavigationclosed? v] to [CLOSED]\n        show\n        go to [front v] layer\n        set size to (10) %\n        Animation\n        wait until <key (space v) pressed?>\n        wait until <not <key (space v) pressed?>>\n        AnimationBackwards\n        hide\n        if <(1-use) = [0]> then\n            change [score v] by (10)\n            set [1-use v] to [1]\n        end\n        wait (1) seconds\n        set [worldmapnavigationclosed? v] to [0]\n    end\nend\n\n@Tutorial\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\ndefine Animation\nrepeat (5)\n    change size by (20)\nend\nrepeat (2)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (1)\n    change size by (-5)\nend\n\ndefine AnimationBackwards\nstart sound [pop v]\nrepeat (1)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (2)\n    change size by (-5)\nend\nrepeat (5)\n    change size by (-20)\nend\n\nwhen I receive [play v]\nset [worldmapnavigationclosed? v] to [CLOSED]\nshow\nset size to (10) %\ngo to [front v] layer\nswitch costume to (costume1 v)\nAnimation\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nAnimationBackwards\nswitch costume to (costume2 v)\nset size to (10) %\nstart sound [beep v]\nAnimation\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nAnimationBackwards\nswitch costume to (costume3 v)\nset size to (10) %\nstart sound [beep v]\nAnimation\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nAnimationBackwards\nhide\nset [worldmapnavigationclosed? v] to [0]\n\n@da shop\n\nwhen flag clicked\nhide\ngo to [front v] layer\n\nwhen I receive [shop v]\ngo to [front v] layer\nwait (.05) seconds\ngo to [front v] layer\nif <(ShopOpen?) = [0]> then\n    show\n    set [shopopen? v] to [1]\n    set [worldmapnavigationclosed? v] to [1]\nelse\n    set [shopopen? v] to [0]\n    set [worldmapnavigationclosed? v] to [0]\n    hide\nend\n\nwhen I receive [bought colorchange v]\nwait until <(ShopOpen?) = [0]>\nbroadcast (Colors! v)\n\nwhen [x v] key pressed\nif <(ShopOpen?) = [1]> then\n    if <<not <(WorldMapNavigationClosed?) = [0]>> and <(Worldmapshowing?) = [1]>> then\n        set [shopopen? v] to [0]\n        hide\n        if <(you got colourchange?) = [0]> then\n            set [worldmapnavigationclosed? v] to [0]\n        end\n    end\nend\n\n@Guy color\n\nwhen flag clicked\nhide\n\n@Guy'scolor shop p\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [shopopen? v] to [0]\nset [canplayerchangecolor? v] to [0]\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (50)\n        set [brightness v] effect to (5)\n    else\n        clear graphic effects\n    end\n    if <(ShopOpen?) = [1]> then\n        go to x: (49) y: (-19)\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <<<(Score) > [18]> or <(Score) = [18]>> and <(costume [number v]) = [1]>> then\n    switch costume to (costume2 v)\n    broadcast (NEVAR STAHP v)\n    change [score v] by (-18)\n    set [canplayerchangecolor? v] to [1]\n    start sound [dading v]\n    broadcast (bought colorchange v)\nelse\n    if <not <<(Score) > [18]> or <(Score) = [18]>>> then\n        switch costume to (costume3 v)\n        wait (1) seconds\n        switch costume to (costume1 v)\n    end\n    if <(costume [number v]) = [2]> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen I receive [nevar stahp v]\nforever\n    switch costume to (costume2 v)\nend\n\n@+1 healthcap\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [shopopen? v] to [0]\nset [healthcap v] to [5]\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (50)\n        set [brightness v] effect to (5)\n    else\n        clear graphic effects\n    end\n    if <(ShopOpen?) = [1]> then\n        show\n        go to x: (59) y: (141)\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <<<(Score) > [10]> or <(Score) = [10]>> and <(costume [number v]) = [1]>> then\n    if <(HealthCap) = [6]> then\n        broadcast (NANVA SHTAP v)\n    end\n    change [score v] by (-10)\n    change [healthcap v] by (1)\n    start sound [dingding v]\nelse\n    if <not <<(Score) > [10]> or <(Score) = [10]>>> then\n        switch costume to (costume3 v)\n        wait (1) seconds\n        switch costume to (costume1 v)\n    end\n    if <(costume [number v]) = [2]> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen I receive [nanva shtap v]\nforever\n    switch costume to (costume2 v)\nend\n\nstart sound [dingding v]\n\nchange [score v] by (1)\n\n@You got colourchange!!!!!\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\ndefine Animation\nrepeat (5)\n    change size by (20)\nend\nrepeat (2)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (1)\n    change size by (-5)\nend\n\ndefine AnimationBackwards\nstart sound [pop v]\nrepeat (1)\n    change size by (5)\nend\nrepeat (1)\n    change size by (3)\nend\nchange size by (1)\nrepeat (1)\n    change size by (-1)\nend\nrepeat (1)\n    change size by (-3)\nend\nrepeat (2)\n    change size by (-5)\nend\nrepeat (5)\n    change size by (-20)\nend\n\nwhen I receive [colors! v]\nset [you got colourchange? v] to [1]\nset [worldmapnavigationclosed? v] to [CLOSED]\nshow\nset size to (10) %\ngo to [front v] layer\nswitch costume to (costume1 v)\nAnimation\nset [worldmapnavigationclosed? v] to [CLOSED]\nif <(WorldMapNavigationClosed?) = [0]> then\n    set [worldmapnavigationclosed? v] to [CLOSED]\nend\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nif <(WorldMapNavigationClosed?) = [0]> then\n    set [worldmapnavigationclosed? v] to [CLOSED]\nend\nAnimationBackwards\nif <(WorldMapNavigationClosed?) = [0]> then\n    set [worldmapnavigationclosed? v] to [CLOSED]\nend\nswitch costume to (costume2 v)\nset size to (10) %\nAnimation\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nAnimationBackwards\nswitch costume to (costume3 v)\nset size to (10) %\nAnimation\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nAnimationBackwards\nhide\nset [worldmapnavigationclosed? v] to [0]\nset [you got colourchange? v] to [0]\n\nset [score v] to [18]\n\nchange [score v] by (1)\n\n@Gizmos?\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    if <<<(Area) = [4]> and <([costume # v] of [a4: levels v]) = [6]>> and <(Worldmapshowing?) = [0]>> then\n        go to x: (0) y: (-90)\n        go to [back v] layer\n        go [forward v] (4) layers\n        switch costume to (waterspout v)\n        show\n        repeat (10)\n            change [waterspout: yv v] by (2)\n        end\n        repeat (50)\n            change y by (Waterspout: Yv)\n            set [waterspout: yv v] to ((Waterspout: Yv) * (0.9))\n            change [waterspout: yv v] by (-1)\n            if <[-30] > (y position)> then\n                change [waterspout: yv v] by (1)\n            end\n            if <touching (guy v)?> then\n                set [y v] to (Waterspout: Yv)\n            end\n        end\n    else\n        if <<<(Area) = [4]> and <([costume # v] of [a4: levels v]) = [7]>> and <(Worldmapshowing?) = [0]>> then\n            show\n            switch costume to (floating platform v)\n            go to x: (34) y: (-20)\n            set [sine1 v] to [0]\n            repeat (350)\n                change [sine1 v] by (1)\n                change y by ([sin v] of (sine1) )\n            end\n        else\n            if <<<(Area) = [5]> and <<([costume # v] of [a5: levels v]) = [1]> or <([costume # v] of [a5: levels v]) = [5]>>> and <(Worldmapshowing?) = [0]>> then\n                go to x: (0) y: (-90)\n                show\n                go to [back v] layer\n                go [forward v] (4) layers\n                switch costume to (waterspout2 v)\n                show\n                repeat (10)\n                    change [waterspout: yv v] by (2)\n                end\n                repeat (50)\n                    change y by (Waterspout: Yv)\n                    set [waterspout: yv v] to ((Waterspout: Yv) * (0.9))\n                    change [waterspout: yv v] by (-1)\n                    if <[-30] > (y position)> then\n                        change [waterspout: yv v] by (1)\n                    end\n                    if <touching (guy v)?> then\n                        set [y v] to (Waterspout: Yv)\n                    end\n                end\n            else\n                if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [2]>> and <(Worldmapshowing?) = [0]>> then\n                    show\n                    switch costume to (floating platform2 v)\n                    if <(1use#2) = [0]> then\n                        go to x: (-150) y: (-65)\n                        set [1use#2 v] to [1]\n                    end\n                    set [sine1 v] to [0]\n                    repeat (350)\n                        change [sine1 v] by (1)\n                        change y by ([sin v] of (sine1) )\n                    end\n                else\n                    hide\n                end\n            end\n        end\n    end\n    if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [3]>> and <(Worldmapshowing?) = [0]>> then\n        go to x: (185) y: (114)\n        if <(Did guy take health 5-3) = [0]> then\n            show\n            set size to (100) %\n            repeat (2)\n                change size by (2)\n            end\n            change size by (1)\n            change size by (-1)\n            repeat (2)\n                change size by (-2)\n            end\n            change size by (-1)\n            change size by (1)\n        end\n        switch costume to (health v)\n        set [color v] effect to (0)\n        change [color v] effect by (0.1)\n        if <touching (guy v)?> then\n            if <(Did guy take health 5-3) = [0]> then\n                set [did guy take health 5-3 v] to [1]\n                change [hp v] by (2)\n                repeat (5)\n                    change size by (5)\n                    change [ghost v] effect by (20)\n                end\n                set size to (100) %\n                hide\n            end\n        end\n    else\n        if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [6]>> and <(Worldmapshowing?) = [0]>> then\n            switch costume to (moving platform v)\n            if <(a variable) = [0]> then\n                go to x: (0) y: (-50)\n                set [a variable v] to [1]\n            end\n            set [sine1 v] to [0]\n            repeat (350)\n                set y to (-50)\n                change [sine1 v] by (1)\n                change x by ([sin v] of (sine1) )\n            end\n        else\n            if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [7]>> and <(Worldmapshowing?) = [0]>> then\n                show\n                go to x: (0) y: (30)\n                switch costume to (spinning spikes v)\n                turn right (1) degrees\n            else\n                if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [8]>> and <(Worldmapshowing?) = [0]>> then\n                    show\n                    go to x: (0) y: (30)\n                    switch costume to (spinning spikes2 v)\n                    turn right (3) degrees\n                else\n                    if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [9]>> and <(Worldmapshowing?) = [0]>> then\n                        if <(anotherVariable) = [0]> then\n                            go to x: (0) y: (0)\n                            set [anothervariable v] to [1]\n                        end\n                        show\n                        go to x: (0) y: (30)\n                        switch costume to (weird end thinf v)\n                        repeat (350)\n                            set y to (0)\n                            change [sine1 v] by (1)\n                            change x by ([sin v] of (sine1) )\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nwait until <<<(Area) = [4]> and <([costume # v] of [a4: levels v]) = [7]>> and <(Worldmapshowing?) = [0]>>\ngo to x: (34) y: (5)\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    if <<<(Area) = [4]> and <([costume # v] of [a4: levels v]) = [6]>> and <(Worldmapshowing?) = [0]>> then\n        point in direction (90)\n        set size to (100) %\n        clear graphic effects\n        switch costume to (waterspout v)\n        show\n    else\n        if <<<(Area) = [4]> and <([costume # v] of [a4: levels v]) = [7]>> and <(Worldmapshowing?) = [0]>> then\n            point in direction (90)\n            set size to (100) %\n            clear graphic effects\n            switch costume to (floating platform v)\n            show\n        else\n            if <<<(Area) = [5]> and <<([costume # v] of [a5: levels v]) = [1]> or <([costume # v] of [a5: levels v]) = [5]>>> and <(Worldmapshowing?) = [0]>> then\n                point in direction (90)\n                set size to (100) %\n                clear graphic effects\n                show\n                switch costume to (waterspout2 v)\n            else\n                if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [2]>> and <(Worldmapshowing?) = [0]>> then\n                    point in direction (90)\n                    set size to (100) %\n                    clear graphic effects\n                    show\n                    switch costume to (floating platform2 v)\n                else\n                    if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [3]>> and <(Worldmapshowing?) = [0]>> then\n                        point in direction (90)\n                        switch costume to (health v)\n                        if <(Did guy take health 5-3) = [0]> then\n                            clear graphic effects\n                            show\n                            go to x: (185) y: (114)\n                        end\n                    else\n                        if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [6]>> and <(Worldmapshowing?) = [0]>> then\n                            point in direction (90)\n                            show\n                            switch costume to (moving platform v)\n                            if <(a variable) = [0]> then\n                                go to x: (0) y: (-50)\n                            end\n                        else\n                            if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [7]>> and <(Worldmapshowing?) = [0]>> then\n                                show\n                                switch costume to (spinning spikes v)\n                                go to x: (0) y: (30)\n                            else\n                                if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [8]>> and <(Worldmapshowing?) = [0]>> then\n                                    show\n                                    switch costume to (spinning spikes2 v)\n                                    go to x: (0) y: (30)\n                                else\n                                    if <<<(Area) = [5]> and <([costume # v] of [a5: levels v]) = [9]>> and <(Worldmapshowing?) = [0]>> then\n                                        if <(anotherVariable) = [0]> then\n                                            go to x: (0) y: (0)\n                                            set [anothervariable v] to [1]\n                                        end\n                                        show\n                                        point in direction (90)\n                                        switch costume to (weird end thinf v)\n                                    else\n                                        hide\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [did guy take health 5-3 v] to [0]\n\nwhen I receive [a5:start v]\nset [did guy take health 5-3 v] to [0]\n\nchange [hp v] by (1)\n\nrepeat (2)\n\nwhen I receive [a5:start v]\nset [a variable v] to [0]\nset [anothervariable v] to [0]\n\nwhen I receive [a5:start v]\nset [1-use v] to [0]\n\nwhen I receive [a5:start v]\nset [1use#2 v] to [0]\n\nforever\n    show\nend\n\nset y to (-50)\n\n@Ones\n\nwhen flag clicked\nset size to (100) %\nforever\n    if <[10] > (Score)> then\n        switch costume to (letter (1) of (Score))\n        go to x: (-180) y: (142)\n    end\n    if <(Score) > [9]> then\n        switch costume to (letter (2) of (Score))\n        go to x: (-150) y: (142)\n    end\n    if <(Score) > [99]> then\n        switch costume to (letter (3) of (Score))\n        go to x: (-120) y: (142)\n    end\n    if <(Score) > [999]> then\n        switch costume to (letter (4) of (Score))\n        go to x: (-90) y: (142)\n    end\n    if <(Score) > [9999]> then\n        switch costume to (letter (5) of (Score))\n        go to x: (-60) y: (142)\n    end\n    if <(Score) > [99999]> then\n        switch costume to (letter (6) of (Score))\n        go to x: (-30) y: (142)\n    end\n    if <(Score) > [999999]> then\n        switch costume to (letter (7) of (Score))\n        go to x: (0) y: (142)\n    end\n    if <(ShopOpen?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (142)\n\nset size to (100) %\n\n@Tens\n\nwhen flag clicked\nforever\n    if <[10] > (Score)> then\n        hide\n    end\n    if <(Score) > [9]> then\n        switch costume to (letter (1) of (Score))\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-180) y: (142)\n        else\n            hide\n        end\n    end\n    if <(Score) > [99]> then\n        switch costume to (letter (2) of (Score))\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-150) y: (142)\n        else\n            hide\n        end\n    end\n    if <(Score) > [999]> then\n        switch costume to (letter (3) of (Score))\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-120) y: (142)\n        else\n            hide\n        end\n    end\n    if <(Score) > [9999]> then\n        switch costume to (letter (4) of (Score))\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-90) y: (142)\n        else\n            hide\n        end\n    end\n    if <(Score) > [99999]> then\n        switch costume to (letter (5) of (Score))\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-60) y: (142)\n        else\n            hide\n        end\n    end\n    if <(Score) > [999999]> then\n        switch costume to (letter (6) of (Score))\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-30) y: (142)\n        else\n            hide\n        end\n    end\nend\n\nshow\n\nwhen flag clicked\ngo to x: (-30) y: (142)\n\nset [score v] to [10]\n\nshow\n\n@Hundreds\n\nwhen flag clicked\nforever\n    if <[10] > (Score)> then\n        hide\n    end\n    if <(Score) > [9]> then\n        hide\n    end\n    if <(Score) > [99]> then\n        switch costume to (letter (1) of (Score))\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-180) y: (142)\n        else\n            hide\n        end\n    end\n    if <(Score) > [999]> then\n        switch costume to (letter (2) of (Score))\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-150) y: (142)\n        else\n            hide\n        end\n    end\n    if <(Score) > [9999]> then\n        switch costume to (letter (3) of (Score))\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-120) y: (142)\n        else\n            hide\n        end\n    end\n    if <(Score) > [99999]> then\n        switch costume to (letter (4) of (Score))\n        show\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-90) y: (142)\n        else\n            hide\n        end\n    end\n    if <(Score) > [999999]> then\n        switch costume to (letter (5) of (Score))\n        show\n        if <(ShopOpen?) = [1]> then\n            show\n            go to x: (-60) y: (142)\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\ngo to x: (-60) y: (142)\n\nset [score v] to [10]\n\n@Sprite5\n\nwhen I receive [game end v]\nset [endtransition v] to [1]\nstop all sounds\nclear graphic effects\nset [worldmapnavigationclosed? v] to [CLOSED]\nshow\nset [ghost v] effect to (100)\nswitch costume to (costume1 v)\nrepeat (50)\n    change [ghost v] effect by (-2)\n    set [worldmapnavigationclosed? v] to [CLOSED]\nend\nswitch backdrop to (title3 v)\nwait (1) seconds\nswitch costume to (costume2 v)\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\n    set [worldmapnavigationclosed? v] to [CLOSED]\nend\nwait (1) seconds\nswitch costume to (costume3 v)\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\n    set [worldmapnavigationclosed? v] to [CLOSED]\nend\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (2)\nend\nset [worldmapnavigationclosed? v] to [0]\nhide\nset [endtransition v] to [0]\nbroadcast (Outro done v)\n\nwhen flag clicked\nhide\n\nclear graphic effects\n\n