Legends - A Platformer

Instructions: <<<<<<<<THIS IS A BIG PROJECT. IT MAY TAKE A\nWHILE TO LOAD.  >>>>>>>>>>>>> \n                           \n                           Legends - A Platformer\n                         @DuckGoose9254 2020\n=========================================\n                 [WASD or Arrow] - Move / Jump      \n[1 to 3] - Select Item         [Y / Space] interact\n[P] - Pause / Unpause      [M] Toggle Mouse points\n[V] Toggle the Music         [B] If you get stuck in a wall\n\nPlease no advertising.\nPLEASE WASH YOUR HANDS AND STAY SAFE!\n=========================================\nV1.0 - Release\nV1.1 - Made the enemy easier, removed unused code, and made it so you can use Space to interact too.

@Stage\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\nforever\n    play sound [Wind v] until done\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nbroadcast (Wind v)\nforever\n    switch backdrop to (Area)\nend\n\nwhen I receive [title screen v]\nforever\n    play sound [Pokemon Ultra Sun and Pokemon Ultra Moon - Ten Carat Hill \(Soundtrack OST\) v] until done\nend\n\nwhen I receive [title screen v]\nforever\n    if <(Volume) = [1]> then\n        set volume to (50) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [wind v]\nforever\n    play sound [Wind v] until done\nend\n\nwhen I receive [wind v]\nforever\n    if <(Pause Screen) = [Off]> then\n        set volume to (75) %\n    else\n        set volume to (25) %\n    end\nend\n\nwhen I receive [wind v]\nforever\n    if <(Area) > [29]> then\n        wait until <(Pause Screen) = [Off]>\n        wait (pick random (1) to (3)) seconds\n        wait until <(Pause Screen) = [Off]>\n        clear graphic effects\n        set [brightness v] effect to (25)\n        start sound [Super Mario World - All Sound Effects \(COMPLETE\) v]\n        repeat (25)\n            wait until <(Pause Screen) = [Off]>\n            change [brightness v] effect by (-1)\n        end\n    else\n        clear graphic effects\n    end\nend\n\n@Player\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nclear graphic effects\nswitch costume to (die v)\nstart sound [recording2 v]\nwait (1) seconds\nrepeat until <<touching (level v)?> or <(y position) < [-179]>>\n    change y by (YV)\n    change [yv v] by (-1)\nend\nstart sound [recording3 v]\nswitch costume to (die2 v)\nwait (0.1) seconds\nswitch costume to (die3 v)\nwait (0.5) seconds\nbroadcast (Show Game Over v)\nset [health v] to [0]\n\ndefine Platfrom (jump height) (gravity) (friction) (running speed)\nswitch costume to (hit box v)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    point in direction (90)\n    change [xv v] by (running speed)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    point in direction (-90)\n    change [xv v] by ((running speed) * (-1))\nend\nif <(Area) = [15]> then\n    set [xv v] to ((XV) * ((friction) + (0.1)))\nelse\n    set [xv v] to ((XV) * (friction))\nend\nchange x by (XV)\nif <<touching (level v)?> or <touching (rock v)?>> then\n    set [slopes v] to [0]\n    repeat until <<(Slopes) = [8]> or <not <<touching (level v)?> or <touching (rock v)?>>>>\n        change [slopes v] by (1)\n        change y by (1)\n    end\nend\nif <<touching (level v)?> or <touching (rock v)?>> then\n    change y by ((Slopes) * (-1))\n    repeat ([ceiling v] of ([abs v] of (XV) ) )\n        if <<touching (level v)?> or <touching (rock v)?>> then\n            change x by ((([abs v] of (XV) ) / (XV)) * (-1))\n        end\n    end\n    set [xv v] to [0]\nend\nchange y by (YV)\nif <<touching (level v)?> or <touching (rock v)?>> then\n    if <<([abs v] of (YV) ) > [8]> and <(YV) < [0]>> then\n        create clone of (dust 2 v)\n    end\n    repeat ([ceiling v] of ([abs v] of (YV) ) )\n        if <<touching (level v)?> or <touching (rock v)?>> then\n            change y by ((([abs v] of (YV) ) / (YV)) * (-1))\n        end\n    end\n    if <<(([abs v] of (YV) ) / (YV)) = [-1]> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        start sound [Woosh-Mark_DiAngelo-4778593.mp3 v]\n        set [onground? v] to [No]\n        set [yv v] to (jump height)\n    else\n        if <(YV) < [-18]> then\n            change [health v] by (-2)\n            broadcast (Hurt v)\n        end\n        set [onground? v] to [Yes]\n        set [yv v] to [0]\n    end\nelse\n    change [yv v] by (-1)\nend\nswitch costume to (Idle)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    switch costume to (Walk)\nend\nif <(YV) > [2]> then\n    switch costume to (jump v)\nend\nif <(YV) < [-3]> then\n    switch costume to (fall v)\nend\nif <touching (bouncy mushroom v)?> then\n    start sound [Cartoon Sound Effect - Bounce.mp3 v]\n    set [yv v] to [17]\nend\n\nwhen I receive [hurt v]\nstart sound [recording2 v]\nset [brightness v] effect to (-10)\nset [pixelate v] effect to (15)\nset [time hurt v] to [On]\nrepeat until <touching (level v)?>\n    change y by (YV)\n    change [yv v] by (-1)\nend\nwait (0.25) seconds\nclear graphic effects\nset [time hurt v] to [Off]\nset [yv v] to [0]\n\nwhen I receive [start v]\nset [walk v] to [5]\nforever\n    change [walk v] by (1)\n    if <(Walk) > [8]> then\n        set [walk v] to [5]\n    end\n    wait (0.07) seconds\nend\n\nwhen I receive [start v]\nset [idle v] to [2]\nforever\n    change [idle v] by (1)\n    if <(Idle) > [4]> then\n        set [idle v] to [2]\n    end\n    wait (0.15) seconds\nend\n\nwhen I receive [start v]\nshow\nclear graphic effects\nset size to (35) %\ngo to [front v] layer\npoint in direction (90)\ngo to x: (-150) y: (-120)\nset rotation style [left-right v]\nset [xv v] to [0]\nset [yv v] to [0]\nset [area v] to [1]\nset [iscollecting? v] to [No]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(IsCollecting?) = [No]> then\n            if <(Time Hurt) = [Off]> then\n                Platfrom (Jump Height) (3) (0.7) (Walk Speed)\n            else\n                switch costume to (hurt v)\n            end\n        else\n            switch costume to (jump v)\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Area) > [1]> then\n        if <(x position) < [-230]> then\n            set x to (224)\n            change [area v] by (-1)\n            broadcast (Switch Area v)\n        end\n    end\n    if <(x position) > [230]> then\n        set x to (-224)\n        change [area v] by (1)\n        broadcast (Switch Area v)\n    end\n    if <touching (entrance v)?> then\n        if <(Area) = [14]> then\n            set [xv v] to [0]\n            set [yv v] to [0]\n            set x to (-120)\n            change [area v] by (1)\n            broadcast (Switch Area v)\n            point in direction (90)\n        else\n            if <(Area) = [15]> then\n                set [xv v] to [0]\n                set [yv v] to [0]\n                set x to (190)\n                change [area v] by (-1)\n                broadcast (Switch Area v)\n                point in direction (90)\n            else\n                if <(Area) = [19]> then\n                    set [xv v] to [0]\n                    set [yv v] to [0]\n                    set x to (-120)\n                    change [area v] by (1)\n                    broadcast (Switch Area v)\n                    point in direction (90)\n                else\n                    if <(Area) = [20]> then\n                        set [xv v] to [0]\n                        set [yv v] to [0]\n                        set x to (120)\n                        change [area v] by (-1)\n                        broadcast (Switch Area v)\n                        point in direction (-90)\n                    else\n                        if <(Area) = [29]> then\n                            set [xv v] to [0]\n                            set [yv v] to [0]\n                            set x to (-170)\n                            change [area v] by (1)\n                            broadcast (Switch Area v)\n                            point in direction (90)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Jump Height) > [14]> then\n        set [jump height v] to [14]\n    end\n    if <(Walk Speed) > [5]> then\n        set [walk speed v] to [5]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <<((costume [number v]) mod (7)) = [0]> and <(OnGround?) = [Yes]>> then\n            Foot Sound\n            create clone of (dust v)\n        end\n        wait (0.05) seconds\n    end\nend\n\nwhen flag clicked\nhide\nset [time hurt v] to [Off]\nset [touching star? v] to [No]\n\nwhen I receive [start v]\nset [time hurt v] to [Off]\nwait (0.1) seconds\nforever\n    if <(Health) < [1]> then\n        broadcast (Game Over v)\n        stop [this script v]\n    end\nend\n\ndefine Foot Sound\nif <<<(Area) = [1]> or <(Area) = [2]>> or <<<(Area) = [5]> or <(Area) = [7]>> or <<(Area) = [8]> or <<(Area) = [9]> or <<(Area) = [10]> or <<(Area) = [11]> or <<(Area) = [20]> or <<(Area) = [21]> or <<(Area) = [22]> or <<(Area) = [23]> or <<(Area) = [24]> or <<(Area) = [25]> or <<(Area) = [26]> or <<(Area) = [27]> or <<(Area) = [28]> or <<(Area) = [29]> or <(Area) = [30]>>>>>>>>>>>>>>>>> then\n    play sound (pick random (7) to (10)) until done\nend\nif <<<<<(Area) = [3]> or <<(Area) = [4]> or <(Area) = [6]>>> or <(Area) = [12]>> or <(Area) = [13]>> or <(Area) = [14]>> then\n    play sound (pick random (3) to (6)) until done\nend\nif <<<(Area) = [15]> or <<(Area) = [16]> or <(Area) = [17]>>> or <<(Area) = [18]> or <(Area) = [19]>>> then\n    play sound (pick random (14) to (17)) until done\nend\n\nwhen I receive [switch area v]\nset [touching star? v] to [No]\n\nwhen I receive [grab star v]\nwait until <touching (star v)?>\nset [touching star? v] to [Yes]\nset [health v] to [10]\nwait until <not <touching (star v)?>>\nstart sound [All Super Mario 64 Sound Effects \(1\) v]\n\nwhen I receive [start v]\nforever\n    if <<touching (spikes v)?> or <(y position) < [-179]>> then\n        change [health v] by (-1)\n        broadcast (Hurt v)\n        point in direction (90)\n        wait (0.1) seconds\n        set [yv v] to [0]\n        go to x: (-224) y: (-120)\n        if <<<(Area) = [15]> or <(Area) = [16]>> or <<(Area) = [17]> or <<(Area) = [18]> or <(Area) = [19]>>>> then\n            set [xv v] to [0]\n            set [yv v] to [0]\n            set x to (190)\n            set [area v] to [14]\n            broadcast (Switch Area v)\n            point in direction (90)\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <touching (rocks falling v)?> then\n        change [health v] by (-1)\n        broadcast (Hurt v)\n        wait (0.1) seconds\n        go to x: (-120) y: (-120)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [area v] to [20]\n        broadcast (Switch Area v)\n        point in direction (90)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <touching (fire v)?> then\n        change [health v] by (-2)\n        broadcast (Hurt v)\n        wait until <not <touching (fire v)?>>\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <key (b v) pressed?> then\n        go to x: (-150) y: (-122)\n        wait until <not <key (b v) pressed?>>\n    end\nend\n\nwhen flag clicked\nset [walk speed v] to [1]\nset [jump height v] to [3]\n\nset [jump height v] to [15]\nset [walk speed v] to [15]\n\n@Arms\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nhide\n\nwhen I receive [hurt v]\nset [brightness v] effect to (-10)\nset [pixelate v] effect to (15)\nwait (0.25) seconds\nwait until <(Time Hurt) = [Off]>\nclear graphic effects\n\nwhen I receive [gun v]\ngo to (player v)\nswitch costume to (Item)\npoint in direction ([direction v] of [player v])\n\nwhen I receive [gun v]\nif <(Pause Screen) = [Off]> then\n    if <(IsCollecting?) = [No]> then\n        if <(Idle) = [2]> then\n            change y by (-1)\n        else\n            change y by (1)\n        end\n    end\nend\n\nwhen I receive [start v]\nshow\nset size to (35) %\ngo to [front v] layer\nforever\n    broadcast (Gun v)\nend\n\nwhen I receive [start v]\nclear graphic effects\nset [item v] to [Nothing]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <key (1 v) pressed?> then\n            if <[item v] contains [Nothing]?> then\n                set [item v] to [Nothing]\n                wait until <not <key (1 v) pressed?>>\n            end\n        end\n        if <key (2 v) pressed?> then\n            if <[item v] contains [Pickaxe]?> then\n                set [item v] to [Pickaxe]\n                wait until <not <key (2 v) pressed?>>\n            end\n        end\n        if <key (3 v) pressed?> then\n            if <[item v] contains [Sword]?> then\n                set [item v] to [Sword]\n                wait until <not <key (3 v) pressed?>>\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@Level\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    switch costume to (Area)\n    if <(Area) > [19]> then\n        set [brightness v] effect to (-25)\n    else\n        clear graphic effects\n    end\nend\n\n@Enemy\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\nclear graphic effects\n\ndefine Sense up\nrepeat until <not <touching (level v)?>>\n    wait until <(Area) = [9]>\n    wait until <(Pause Screen) = [Off]>\n    change y by (1)\nend\nchange y by (-5)\n\nwhen I receive [start v]\nforever\n    if <(Area) = [9]> then\n        show\n        if <(Pause Screen) = [Off]> then\n            if <<touching (arms v)?> and <(Item) = [Sword]>> then\n                set [show/hide y button v] to [Show]\n                if <<key (y v) pressed?> or <key (space v) pressed?>> then\n                    start sound [recording2 v]\n                    change [alien hp tick v] by (-1)\n                    broadcast (Hurt Enemy v)\n                    if <(Alien HP Tick) < [1]> then\n                        set [alien hp tick v] to [5]\n                        change [alien hp v] by (-1)\n                    end\n                    if <(Alien Hp) < [1]> then\n                        hide\n                        set [show/hide y button v] to [Hide]\n                        change [walk speed v] by (0.5)\n                        change [jump height v] by (1)\n                        broadcast (Bouncy mushroom v)\n                        stop [other scripts in sprite v]\n                        stop [this script v]\n                    end\n                    wait until <not <<key (y v) pressed?> or <key (space v) pressed?>>>\n                end\n            else\n                set [show/hide y button v] to [Hide]\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nshow\nclear graphic effects\nset size to (35) %\ngo to x: (80) y: (-100)\nswitch costume to (enemy v)\nset rotation style [left-right v]\nset [alien hp v] to [10]\nset [alien hp tick v] to [5]\nforever\n    if <(Area) = [9]> then\n        show\n        Sense up\n        switch costume to (enemy v)\n        wait until <(Area) = [9]>\n        wait until <(Pause Screen) = [Off]>\n        wait until <(Line of Sight) = [True]>\n        wait (1) seconds\n        switch costume to (enemy 2 v)\n        wait until <(Area) = [9]>\n        wait until <(Pause Screen) = [Off]>\n        wait (0.05) seconds\n        switch costume to (enemy 3 v)\n        set [change x v] to ((([x position v] of [player v]) - (x position)) / (pick random (25) to (50)))\n        set [yv v] to [16]\n        wait until <(Area) = [9]>\n        wait until <(Pause Screen) = [Off]>\n        repeat until <not <touching (level v)?>>\n            wait until <(Area) = [9]>\n            wait until <(Pause Screen) = [Off]>\n            change y by (yv)\n            change [yv v] by (-1.5)\n            change x by (Change X)\n        end\n        repeat until <touching (level v)?>\n            wait until <(Area) = [9]>\n            wait until <(Pause Screen) = [Off]>\n            change y by (yv)\n            change [yv v] by (-1.5)\n            change x by (Change X)\n        end\n        wait until <(Area) = [9]>\n        wait until <(Pause Screen) = [Off]>\n        switch costume to (enemy v)\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    point towards (player v)\nend\n\nwhen I receive [start v]\nforever\n    if <<<touching (player v)?> and <(costume [number v]) = [3]>> and <(yv) < [0]>> then\n        broadcast (Hurt v)\n        change [health v] by (-1)\n        wait until <not <touching (player v)?>>\n    end\nend\n\nwhen I receive [switch area v]\ngo to x: (80) y: (-100)\n\nwhen I receive [start v]\nforever\n    Line of Sight (costume [number v])\nend\n\ndefine Line of Sight (costume #)\nset rotation style [all around v]\nswitch costume to (line of sight block v)\nset size to (((distance to [player v]) / (240)) * (100)) %\npoint towards (player v)\nswitch costume to (line of sight v)\nif <touching (level v)?> then\n    set [line of sight v] to [False]\nelse\n    set [line of sight v] to [True]\nend\nset rotation style [left-right v]\nswitch costume to (costume #)\nset size to (35) %\n\nwhen I receive [hurt enemy v]\nset [whirl v] effect to (pick random (10) to (100))\nset [brightness v] effect to (10)\nwait (0.1) seconds\nclear graphic effects\n\n@Tree\n\nwhen flag clicked\nhide\n\nwhen I receive [walk upgrade yes v]\ncreate clone of (walk upgrade v)\n\nwhen I receive [switch area v]\nset [show/hide y button v] to [Hide]\n\nwhen I receive [jump upgrade yes v]\ncreate clone of (jump upgrade v)\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Area)\nend\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(Area) = [5]> then\n            if <<(Item) = [Nothing]> and <touching (player v)?>> then\n                set [show/hide y button v] to [Show]\n                if <<key (y v) pressed?> or <key (space v) pressed?>> then\n                    start sound [Shaker v]\n                    set [show/hide y button v] to [Hide]\n                    set [iscollecting? v] to [Yes]\n                    wait (0.75) seconds\n                    if <(pick random (1) to (2)) = [1]> then\n                        broadcast (Walk Upgrade Yes v)\n                    else\n                        broadcast (Walk Upgrade No v)\n                        if <(pick random (1) to (3)) = [1]> then\n                            broadcast (Food Yes v)\n                        else\n                            broadcast (Food No v)\n                        end\n                    end\n                    set [iscollecting? v] to [No]\n                    wait until <not <<key (y v) pressed?> or <key (space v) pressed?>>>\n                end\n            else\n                set [show/hide y button v] to [Hide]\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(IsCollecting?) = [Yes]> then\n            wait (0.1) seconds\n            change x by (-2)\n            wait (0.1) seconds\n            change x by (2)\n        else\n            set x to (0)\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(Area) = [2]> then\n            if <<(Item) = [Nothing]> and <touching (player v)?>> then\n                set [show/hide y button v] to [Show]\n                if <<key (y v) pressed?> or <key (space v) pressed?>> then\n                    start sound [Shaker v]\n                    set [show/hide y button v] to [Hide]\n                    set [iscollecting? v] to [Yes]\n                    wait (0.75) seconds\n                    if <(pick random (1) to (2)) = [1]> then\n                        broadcast (Jump Upgrade Yes v)\n                    else\n                        broadcast (Jump Upgrade No v)\n                        if <(pick random (1) to (10)) = [1]> then\n                            broadcast (Food Yes v)\n                        else\n                            broadcast (Food No v)\n                        end\n                    end\n                    set [iscollecting? v] to [No]\n                    wait until <not <<key (y v) pressed?> or <key (space v) pressed?>>>\n                end\n            else\n                set [show/hide y button v] to [Hide]\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(Area) = [7]> then\n            if <<(Item) = [Nothing]> and <touching (player v)?>> then\n                set [show/hide y button v] to [Show]\n                if <<key (y v) pressed?> or <key (space v) pressed?>> then\n                    start sound [Shaker v]\n                    set [show/hide y button v] to [Hide]\n                    set [iscollecting? v] to [Yes]\n                    wait (0.75) seconds\n                    if <(pick random (1) to (2)) = [1]> then\n                        broadcast (Walk Upgrade Yes v)\n                    else\n                        broadcast (Walk Upgrade No v)\n                        if <(pick random (1) to (4)) = [1]> then\n                            broadcast (Food Yes v)\n                        else\n                            broadcast (Food No v)\n                        end\n                    end\n                    set [iscollecting? v] to [No]\n                    wait until <not <<key (y v) pressed?> or <key (space v) pressed?>>>\n                end\n            else\n                set [show/hide y button v] to [Hide]\n            end\n        end\n    end\nend\n\nwhen I receive [food yes v]\ncreate clone of (food v)\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(Area) = [11]> then\n            if <<(Item) = [Nothing]> and <touching (player v)?>> then\n                set [show/hide y button v] to [Show]\n                if <<key (y v) pressed?> or <key (space v) pressed?>> then\n                    start sound [Shaker v]\n                    set [show/hide y button v] to [Hide]\n                    set [iscollecting? v] to [Yes]\n                    wait (0.75) seconds\n                    if <(pick random (1) to (2)) = [1]> then\n                        broadcast (Walk Upgrade Yes v)\n                    else\n                        broadcast (Walk Upgrade No v)\n                        if <(pick random (1) to (2)) = [1]> then\n                            broadcast (Jump Upgrade Yes v)\n                        else\n                            broadcast (Jump Upgrade No v)\n                            if <(pick random (1) to (2)) = [1]> then\n                                broadcast (Food Yes v)\n                            else\n                                broadcast (Food No v)\n                            end\n                        end\n                    end\n                    set [iscollecting? v] to [No]\n                    wait until <not <<key (y v) pressed?> or <key (space v) pressed?>>>\n                end\n            else\n                set [show/hide y button v] to [Hide]\n            end\n        end\n    end\nend\n\n@Press Y\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <touching (player v)?> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [start v]\nforever\n    set x to ([x position v] of [player v])\n    set y to ([y position v] of [player v])\nend\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        go to [front v] layer\n        wait (0.4) seconds\n        next costume\n    end\nend\n\nwhen I receive [start v]\nset [show/hide y button v] to [Hide]\nforever\n    if <(Show/hide Y button) = [Hide]> then\n        hide\n    end\n    if <(Show/hide Y button) = [Show]> then\n        show\n        if <(IsCollecting?) = [Yes]> then\n            set [show/hide y button v] to [Hide]\n        else\n            set [show/hide y button v] to [Show]\n        end\n    end\nend\n\n@Health\n\nwhen I receive [the end v]\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [hurt v]\nset [org. x v] to (x position)\nset [org. y v] to (y position)\nrepeat (5)\n    go to x: ((org. x) + (pick random (-3) to (3))) y: ((org. y) + (pick random (-3) to (3)))\nend\ngo to x: (org. x) y: (org. y)\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nwait (0.1) seconds\nshow\nset size to (0) %\nset [health v] to [2]\nforever\n    change size by (((200) - (size)) / (3))\n    switch costume to (Health)\nend\n\nwhen I receive [start v]\nforever\n    if <(distance to [player v]) < [75]> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (5)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Health) > [10]> then\n        set [health v] to [10]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        go to [front v] layer\n    end\nend\n\nwhen I receive [start v]\ngo to x: (-185) y: (167)\nforever\n    wait until <(Pause Screen) = [Off]>\n    glide (0.3) secs to x: (-185) y: (165)\n    wait until <(Pause Screen) = [Off]>\n    glide (0.3) secs to x: (-185) y: (167)\nend\n\nwhen I receive [stop all v]\nhide\n\n@NPC\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nsay [Are you okay?]\nswitch costume to (npc 5 v)\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(Area) = [1]> then\n            if <<<touching (arms v)?> and <<(Item) = [Sword]> or <(Item) = [Pickaxe]>>> and <(NPC State) = [Talking]>> then\n                set [show/hide y button v] to [Show]\n                if <<<key (y v) pressed?> or <key (space v) pressed?>> and <touching (arms v)?>> then\n                    start sound [recording2 v]\n                    set [npc state v] to [Hurt]\n                    set [brightness v] effect to (-10)\n                    set [pixelate v] effect to (15)\n                    wait (0.15) seconds\n                    clear graphic effects\n                end\n            else\n                set [show/hide y button v] to [Hide]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nset size to (32) %\ngo to x: (-50) y: (-120)\nswitch costume to (npc 1 v)\nset rotation style [left-right v]\nset [npc state v] to [Talking]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(NPC State) = [Talking]> then\n            change y by (0.3)\n            wait (0.1) seconds\n            switch costume to (npc 1 v)\n            change y by (-0.3)\n        else\n            switch costume to (npc 2 v)\n            wait (0.1) seconds\n            switch costume to (npc 3 v)\n            wait (0.1) seconds\n            switch costume to (npc 4 v)\n            wait (1) seconds\n            switch costume to (npc 3 v)\n            wait (0.01) seconds\n            set [npc state v] to [Talking]\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(NPC State) = [Talking]> then\n        point towards (player v)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(Area) = [1]> then\n            show\n            if <(NPC State) = [Talking]> then\n                say [Arrow keys or WASD to move.]\n            else\n                say [OW!!]\n            end\n        else\n            hide\n        end\n    end\nend\n\n@Birds\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nset size to (75) %\nset rotation style [left-right v]\nforever\n    point towards (player v)\n    if <(Area) = [1]> then\n        hide\n    end\n    if <(Area) = [2]> then\n        show\n        go to x: (100) y: (30)\n        say [Press Y or Space to shake the tree for goodies.]\n    end\n    if <(Area) > [2]> then\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(IsCollecting?) = [No]> then\n            switch costume to (1 v)\n        else\n            say [AHH!!]\n            switch costume to (2 v)\n            set y to ((30) + (([cos v] of (((timer) - (3)) * (2000)) ) * (2)))\n        end\n    end\nend\n\n@Shadow tree\n\nwhen flag clicked\nhide\n\nwhen I receive [gun v]\nswitch costume to (Area)\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (60)\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(IsCollecting?) = [Yes]> then\n            wait (0.1) seconds\n            change x by (-2)\n            wait (0.1) seconds\n            change x by (2)\n        else\n            set x to (0)\n        end\n    end\nend\n\n@Shadow Player\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen I receive [gun v]\ngo to (player v)\npoint in direction ([direction v] of [player v])\nswitch costume to ([costume # v] of [player v])\n\nwhen I receive [start v]\nshow\nforever\n    set size to (35) %\n    if <(OnGround?) = [No]> then\n        set [ghost v] effect to (85)\n    else\n        set [ghost v] effect to (60)\n    end\nend\n\nwhen I receive [game over v]\nhide\n\n@Level Count\n\nwhen I receive [stop all v]\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nshow\nset size to (0) %\nforever\n    change size by (((100) - (size)) / (3))\n    go to x: (((Digits) * (14)) - (198)) y: (145)\n    if <(length of (Area)) < (Digits)> then\n        hide\n    else\n        show\n        switch costume to (letter (Digits) of (Area))\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Pause Screen) = [Off]> then\n        go to [front v] layer\n        if <(distance to [player v]) < [75]> then\n            set [ghost v] effect to (50)\n        else\n            set [ghost v] effect to (5)\n        end\n    end\nend\n\nwhen I receive [start v]\nwait (0.1) seconds\nhide\nset [digits v] to [1]\nrepeat (30)\n    create clone of (_myself_ v)\n    change [digits v] by (1)\nend\nhide\n\nwhen I receive [start v]\ndelete this clone\n\nwhen I receive [the end v]\nstop [other scripts in sprite v]\n\n@Walk Upgrade\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [switch area v]\nhide\ndelete this clone\n\nwhen I start as a clone\nshow\ngo to (tree v)\nswitch costume to (pick random (1) to (2))\nchange x by (pick random (-30) to (30))\nrepeat until <touching (level v)?>\n    wait until <(Pause Screen) = [Off]>\n    change y by (-5)\nend\nstop [this script v]\n\nwhen I start as a clone\nforever\n    if <(Pause Screen) = [Off]> then\n        go to [front v] layer\n        if <touching (player v)?> then\n            start sound [Coin v]\n            change [walk speed v] by (0.1)\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [start v]\nhide\ndelete this clone\n\n@Walk Speed bar\n\nwhen I receive [stop all v]\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(distance to [player v]) < [75]> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (5)\n    end\nend\n\nwhen I receive [start v]\nwait (0.1) seconds\nshow\nset size to (0) %\ngo to x: (204) y: (157)\nforever\n    change size by (((100) - (size)) / (3))\n    switch costume to (Walk Speed)\nend\n\nwhen I receive [the end v]\nstop [other scripts in sprite v]\n\n@Leaf\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (20)\nswitch costume to (pick random (1) to (4))\nset size to (pick random (50) to (80)) %\ngo to x: (pick random (90) to (170)) y: (-30)\nrepeat until <touching (level v)?>\n    wait until <(Pause Screen) = [Off]>\n    change y by (-2)\nend\nrepeat (20)\n    change [ghost v] effect by (4)\nend\ndelete this clone\n\nwhen I receive [switch area v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nhide\nforever\n    if <<<<(Area) = [2]> or <(Area) = [5]>> or <(Area) = [7]>> or <(Area) = [11]>> then\n        if <(IsCollecting?) = [Yes]> then\n            create clone of (_myself_ v)\n            wait (pick random (0.1) to (0.2)) seconds\n        end\n    end\nend\n\n@Pickaxe\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to x: (36) y: (28)\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(Area) = [3]> then\n            show\n            say [Use the pickaxe to break rocks.]\n            if <touching (player v)?> then\n                set [show/hide y button v] to [Show]\n                if <<key (y v) pressed?> or <key (space v) pressed?>> then\n                    start sound [Coin v]\n                    set [show/hide y button v] to [Hide]\n                    hide\n                    add [Pickaxe] to [item v]\n                    set [item v] to [Pickaxe]\n                    stop [this script v]\n                end\n            else\n                set [show/hide y button v] to [Hide]\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\ndelete all of [item v]\nadd [Nothing] to [item v]\n\n@rock\n\nwhen flag clicked\nhide\n\nwhen I receive [switch area v]\nswitch costume to (rock v)\n\nwhen I receive [start v]\nswitch costume to (rock v)\nset rotation style [left-right v]\nforever\n    if <(Pause Screen) = [Off]> then\n        if <(Area) = [4]> then\n            show\n            go to x: (0) y: (-5)\n            set size to (100) %\n            clear graphic effects\n            if <<(Item) = [Pickaxe]> and <touching (arms v)?>> then\n                set [show/hide y button v] to [Show]\n                if <<<key (y v) pressed?> or <key (space v) pressed?>> and <touching (arms v)?>> then\n                    start sound [Clang v]\n                    set [iscollecting? v] to [Yes]\n                    wait (0.5) seconds\n                    next costume\n                    set [iscollecting? v] to [No]\n                end\n            else\n                set [show/hide y button v] to [Hide]\n            end\n        else\n            if <(Area) = [6]> then\n                show\n                go to x: (-25) y: (32)\n                set size to (125) %\n                clear graphic effects\n                if <<(Item) = [Pickaxe]> and <touching (arms v)?>> then\n                    set [show/hide y button v] to [Show]\n                    if <<<key (y v) pressed?> or <key (space v) pressed?>> and <touching (arms v)?>> then\n                        start sound [Clang v]\n                        set [iscollecting? v] to [Yes]\n                        wait (0.5) seconds\n                        next costume\n                        set [iscollecting? v] to [No]\n                    end\n                else\n                    set [show/hide y button v] to [Hide]\n                end\n            else\n                if <(Area) = [17]> then\n                    show\n                    go to x: (-180) y: (185)\n                    set size to (170) %\n                    set [brightness v] effect to (-5)\n                    if <<(Item) = [Pickaxe]> and <touching (arms v)?>> then\n                        set [show/hide y button v] to [Show]\n                        if <<<key (y v) pressed?> or <key (space v) pressed?>> and <touching (arms v)?>> then\n                            start sound [Clang v]\n                            set [iscollecting? v] to [Yes]\n                            wait (0.5) seconds\n                            next costume\n                            set [iscollecting? v] to [No]\n                        end\n                    else\n                        set [show/hide y button v] to [Hide]\n                    end\n                else\n                    if <(Area) = [22]> then\n                        show\n                        go to x: (0) y: (0)\n                        set size to (100) %\n                        set [brightness v] effect to (-15)\n                        if <<(Item) = [Pickaxe]> and <touching (arms v)?>> then\n                            set [show/hide y button v] to [Show]\n                            if <<<key (y v) pressed?> or <key (space v) pressed?>> and <touching (arms v)?>> then\n                                start sound [Clang v]\n                                set [iscollecting? v] to [Yes]\n                                wait (0.5) seconds\n                                next costume\n                                set [iscollecting? v] to [No]\n                            end\n                        else\n                            set [show/hide y button v] to [Hide]\n                        end\n                    else\n                        if <(Area) = [25]> then\n                            show\n                            go to x: (-350) y: (275)\n                            set size to (300) %\n                            set [brightness v] effect to (-15)\n                            if <<(Item) = [Pickaxe]> and <touching (arms v)?>> then\n                                set [show/hide y button v] to [Show]\n                                if <<<key (y v) pressed?> or <key (space v) pressed?>> and <touching (arms v)?>> then\n                                    start sound [Clang v]\n                                    set [iscollecting? v] to [Yes]\n                                    wait (0.5) seconds\n                                    next costume\n                                    set [iscollecting? v] to [No]\n                                end\n                            else\n                                set [show/hide y button v] to [Hide]\n                            end\n                        else\n                            if <(Area) = [28]> then\n                                show\n                                go to x: (-350) y: (275)\n                                set size to (300) %\n                                set [brightness v] effect to (-15)\n                                if <<(Item) = [Pickaxe]> and <touching (arms v)?>> then\n                                    set [show/hide y button v] to [Show]\n                                    if <<<key (y v) pressed?> or <key (space v) pressed?>> and <touching (arms v)?>> then\n                                        start sound [Clang v]\n                                        set [iscollecting? v] to [Yes]\n                                        wait (0.5) seconds\n                                        next costume\n                                        set [iscollecting? v] to [No]\n                                    end\n                                else\n                                    set [show/hide y button v] to [Hide]\n                                end\n                            else\n                                hide\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Shadow rock\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nswitch costume to (rock v)\nset [ghost v] effect to (60)\nset rotation style [left-right v]\nforever\n    if <(Area) = [4]> then\n        show\n        set size to (100) %\n        go to x: (-10) y: (-80)\n        switch costume to ([costume # v] of [rock v])\n    else\n        if <(Area) = [6]> then\n            show\n            set size to (125) %\n            go to x: (-40) y: (-70)\n            switch costume to ([costume # v] of [rock v])\n        else\n            if <(Area) = [17]> then\n                show\n                set size to (170) %\n                go to x: (-200) y: (50)\n                switch costume to ([costume # v] of [rock v])\n            else\n                if <(Area) = [22]> then\n                    show\n                    set size to (100) %\n                    go to x: (-10) y: (-80)\n                    switch costume to ([costume # v] of [rock v])\n                else\n                    if <(Area) = [25]> then\n                        show\n                        set size to (300) %\n                        go to x: (-375) y: (50)\n                        switch costume to ([costume # v] of [rock v])\n                    else\n                        hide\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Item text\n\nwhen I receive [the end v]\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(distance to [player v]) < [75]> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (5)\n    end\nend\n\nwhen I receive [start v]\nwait (0.1) seconds\nshow\nset size to (0) %\ngo to [front v] layer\ngo to x: (-179) y: (120)\nforever\n    change size by (((100) - (size)) / (3))\n    switch costume to (Item)\nend\n\nwhen I receive [stop all v]\nhide\n\n@Jump Height bar\n\nwhen I receive [stop all v]\nhide\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nwait (0.1) seconds\nshow\nset size to (0) %\ngo to x: (150) y: (157)\nforever\n    change size by (((100) - (size)) / (3))\n    switch costume to (Jump Height)\nend\n\nwhen I receive [start v]\nforever\n    if <(distance to [player v]) < [75]> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (5)\n    end\nend\n\nwhen I receive [the end v]\nstop [other scripts in sprite v]\n\n@Jump Upgrade\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [switch area v]\nhide\ndelete this clone\n\nwhen I start as a clone\nshow\ngo to (tree v)\nswitch costume to (pick random (1) to (2))\nchange x by (pick random (-30) to (30))\nrepeat until <touching (level v)?>\n    wait until <(Pause Screen) = [Off]>\n    change y by (-5)\nend\nstop [this script v]\n\nwhen I start as a clone\nforever\n    if <(Pause Screen) = [Off]> then\n        go to [front v] layer\n        if <touching (player v)?> then\n            start sound [Coin v]\n            change [jump height v] by (0.2)\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [start v]\nhide\ndelete this clone\n\n@Volume\n\nwhen I receive [the end v]\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nshow\nset size to (0) %\ngo to x: (210) y: (160)\nset [volume v] to [1]\nswitch costume to (volume v)\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (-20)\n        change size by (((120) - (size)) / (3))\n        if <mouse down?> then\n            next costume\n            start sound [Click v]\n            wait until <not <mouse down?>>\n        end\n    else\n        change size by (((100) - (size)) / (3))\n        set [brightness v] effect to (0)\n    end\n    if <key (v v) pressed?> then\n        next costume\n        start sound [Click v]\n        wait until <not <key (v v) pressed?>>\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [1]> then\n        set [volume v] to [1]\n    else\n        set [volume v] to [0]\n    end\nend\n\nwhen I receive [start v]\nshow\nset size to (0) %\ngo to x: (-210) y: (90)\nset [volume v] to [1]\nswitch costume to (volume v)\nstop [other scripts in sprite v]\nwait (0.1) seconds\nbroadcast (Volume 2 v)\nforever\n    go to [front v] layer\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (-20)\n        change size by (((120) - (size)) / (3))\n        if <mouse down?> then\n            next costume\n            start sound [Click v]\n            wait until <not <mouse down?>>\n        end\n    else\n        change size by (((100) - (size)) / (3))\n        set [brightness v] effect to (0)\n    end\n    if <key (v v) pressed?> then\n        next costume\n        start sound [Click v]\n        wait until <not <key (v v) pressed?>>\n    end\nend\n\nwhen I receive [volume 2 v]\nforever\n    if <(costume [number v]) = [1]> then\n        set [volume v] to [1]\n    else\n        set [volume v] to [0]\n    end\n    if <(distance to [player v]) < [75]> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (5)\n    end\nend\n\nwhen I receive [stop all v]\nhide\n\n@Dust\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nshow\ngo to (player v)\nchange y by (-25)\nif <(Pause Screen) = [Off]> then\n    if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n        move (5) steps\n        forever\n            move (-1) steps\n            change y by (1)\n        end\n    else\n        forever\n            change y by (1)\n        end\n    end\nend\n\nwhen I start as a clone\nrepeat (15)\n    go to [front v] layer\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I start as a clone\nswitch costume to (1 v)\nwait (0.05) seconds\nswitch costume to (2 v)\nwait (0.05) seconds\nswitch costume to (3 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [switch area v]\ndelete this clone\n\n@Dust 2\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I start as a clone\nshow\nstart sound [Teleport v]\nset [ghost v] effect to (50)\ngo to (player v)\nswitch costume to (1 v)\nrepeat (2)\n    wait (0.05) seconds\n    wait until <(Pause Screen) = [Off]>\n    next costume\nend\ndelete this clone\n\nwhen I receive [switch area v]\ndelete this clone\n\n@Shadow Player2\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\n\nwhen I receive [gun v]\ngo to (player v)\npoint in direction ([direction v] of [player v])\n\nwhen I receive [start v]\nshow\nset size to (35) %\nforever\n    if <(Pause Screen) = [Off]> then\n        go to [front v] layer\n        switch costume to (Item)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(OnGround?) = [No]> then\n        set [ghost v] effect to (85)\n    else\n        set [ghost v] effect to (65)\n    end\nend\n\nwhen I receive [game over v]\nhide\n\n@Sound\n\nwhen I receive [stop all v]\nhide\nstop [other scripts in sprite v]\nforever\n    play sound [Flughand - Feblu \(1\) v] until done\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(Volume) = [1]> then\n        set volume to (75) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [switch area v]\nif <<<(Area) = [1]> or <(Area) = [2]>> or <(Area) = [5]>> then\n    set [soundrequested v] to [1]\nend\nif <<<(Area) = [3]> or <(Area) = [4]>> or <(Area) = [6]>> then\n    set [soundrequested v] to [2]\nend\nif <<(Area) = [7]> or <(Area) = [8]>> then\n    set [soundrequested v] to [0]\nend\nif <(Area) = [9]> then\n    set [soundrequested v] to [3]\nend\nif <<(Area) = [10]> or <(Area) = [11]>> then\n    set [soundrequested v] to [4]\nend\nif <<<(Area) = [12]> or <(Area) = [13]>> or <(Area) = [14]>> then\n    set [soundrequested v] to [5]\nend\nif <<<<(Area) = [15]> or <(Area) = [16]>> or <(Area) = [17]>> or <<(Area) = [18]> or <(Area) = [19]>>> then\n    set [soundrequested v] to [6]\nend\nif <<(Area) = [20]> or <<(Area) = [21]> or <<(Area) = [22]> or <<(Area) = [23]> or <<(Area) = [24]> or <<(Area) = [25]> or <<(Area) = [26]> or <<(Area) = [27]> or <<(Area) = [28]> or <(Area) = [29]>>>>>>>>>> then\n    set [soundrequested v] to [7]\nend\nif <(Area) = [30]> then\n    set [soundrequested v] to [8]\nend\n\nwhen I receive [volume for music v]\nforever\n    if <not <(CurrentSound) = (SoundRequested)>> then\n        stop all sounds\n    end\nend\n\nwhen I receive [volume for music v]\nforever\n    if <(SoundRequested) = []> then\n    if <(SoundRequested) = [0]> then\n        set [currentsound v] to (SoundRequested)\n        play sound [Glimwood Tangle - Pokémon Sword and Shield OST \(Gamerip\) v] until done\n    end\n    if <(SoundRequested) = [1]> then\n        set [currentsound v] to (SoundRequested)\n        play sound [Field - Day \(The Legend of Zelda Breath of the Wild OST\) v] until done\n    end\n    if <(SoundRequested) = [2]> then\n        set [currentsound v] to (SoundRequested)\n        play sound [Kara Kara Bazaar \(The Legend of Zelda Breath of the Wild OST\) v] until done\n    end\n    if <(SoundRequested) = [3]> then\n        set [currentsound v] to (SoundRequested)\n        play sound [Battle \(Lynel Yiga\) - The Legend of Zelda Breath of the Wild Soundtrack v] until done\n    end\n    if <(SoundRequested) = [4]> then\n        set [currentsound v] to (SoundRequested)\n        play sound [Flughand - Feblu \(1\) v] until done\n    end\n    if <(SoundRequested) = [5]> then\n        set [currentsound v] to (SoundRequested)\n        play sound [Pokemon Sun & Moon OST Haina Desert Music v] until done\n    end\n    if <(SoundRequested) = [6]> then\n        set [currentsound v] to (SoundRequested)\n        play sound [Ruins - Super Mario Odyssey \[OST\] v] until done\n    end\n    if <(SoundRequested) = [7]> then\n        set [currentsound v] to (SoundRequested)\n        play sound [Full Moon Caves v] until done\n    end\n    if <(SoundRequested) = [8]> then\n        set [currentsound v] to (SoundRequested)\n        play sound [Final Bowser Battle - Super Mario Galaxy v] until done\n    end\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\nwait (0.1) seconds\nbroadcast (Volume for music v)\nforever\n    if <<<(Area) = [1]> or <(Area) = [2]>> or <(Area) = [5]>> then\n        set [soundrequested v] to [1]\n    end\n    if <<<(Area) = [3]> or <(Area) = [4]>> or <(Area) = [6]>> then\n        set [soundrequested v] to [2]\n    end\n    if <<(Area) = [7]> or <(Area) = [8]>> then\n        set [soundrequested v] to [0]\n    end\n    if <(Area) = [9]> then\n        set [soundrequested v] to [3]\n    end\n    if <<(Area) = [10]> or <(Area) = [11]>> then\n        set [soundrequested v] to [4]\n    end\n    if <<<(Area) = [12]> or <(Area) = [13]>> or <(Area) = [14]>> then\n        set [soundrequested v] to [5]\n    end\n    if <<<<(Area) = [15]> or <(Area) = [16]>> or <(Area) = [17]>> or <<(Area) = [18]> or <(Area) = [19]>>> then\n        set [soundrequested v] to [6]\n    end\n    if <<(Area) = [20]> or <<(Area) = [21]> or <<(Area) = [22]> or <<(Area) = [23]> or <<(Area) = [24]> or <<(Area) = [25]> or <<(Area) = [26]> or <<(Area) = [27]> or <<(Area) = [28]> or <(Area) = [29]>>>>>>>>>> then\n        set [soundrequested v] to [7]\n    end\n    if <(Area) = [30]> then\n        set [soundrequested v] to [8]\n    end\nend\n\nwhen I receive [volume for music v]\ngo to x: (0) y: (0)\nforever\n    if <(Volume) = [1]> then\n        if <(Pause Screen) = [Off]> then\n            set volume to (75) %\n        else\n            set volume to (10) %\n        end\n    else\n        set volume to (0) %\n    end\nend\n\n@Sword\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset size to (50) %\ndelete all of [item v]\ngo to x: (-63) y: (-93)\nadd [Nothing] to [item v]\nforever\n    if <(Pause Screen) = [Off]> then\n        go to [back v] layer\n        if <(Area) = [6]> then\n            show\n            say [Use the Sword to hit enemies with.]\n            if <touching (player v)?> then\n                set [show/hide y button v] to [Show]\n                if <<key (y v) pressed?> or <key (space v) pressed?>> then\n                    start sound [Coin v]\n                    set [show/hide y button v] to [Hide]\n                    hide\n                    add [Sword] to [item v]\n                    set [item v] to [Sword]\n                    stop [this script v]\n                end\n            else\n                \n                    set [show/hide y button v] to [Hide]\n                end\n            end\n        else\n            hide\n        end\n    end\nend\n\n@NPC Shadow\n\nwhen flag clicked\nhide\n\nwhen I receive [gun v]\ngo to (npc v)\npoint in direction ([direction v] of [npc v])\n\nwhen I receive [start v]\nshow\nset size to (35) %\nset rotation style [left-right v]\nset [ghost v] effect to (65)\nforever\n    if <(Pause Screen) = [Off]> then\n        switch costume to ([costume # v] of [npc v])\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Area) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@Start Button\n\nwhen I receive [title screen v]\nwait until <not <mouse down?>>\nshow\nset size to (0) %\ngo to [front v] layer\ngo to x: (130) y: (-20)\nswitch costume to (start button v)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (-20)\n        change size by (((120) - (size)) / (3))\n        if <mouse down?> then\n            hide\n            start sound [Click v]\n            broadcast (Start v)\n            stop [this script v]\n        end\n    else\n        change size by (((100) - (size)) / (3))\n        clear graphic effects\n    end\nend\n\nwhen I receive [show game start button v]\nwait until <not <mouse down?>>\nshow\nset size to (0) %\ngo to [front v] layer\ngo to x: (0) y: (-50)\nswitch costume to (play again v)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (-20)\n        change size by (((150) - (size)) / (3))\n        if <mouse down?> then\n            hide\n            start sound [Click v]\n            broadcast (Start v)\n            stop [this script v]\n        end\n    else\n        change size by (((120) - (size)) / (3))\n        clear graphic effects\n    end\nend\n\nwhen I receive [gun v]\ngo to [front v] layer\n\n@Menu Background\n\nwhen flag clicked\nbroadcast (Title Screen v)\n\nwhen I receive [start v]\nhide\n\nwhen I receive [menu v]\nswitch costume to (menu background 2 v)\n\nwhen I receive [title screen v]\nshow\ngo to [back v] layer\ngo to x: (0) y: (0)\nswitch costume to (menu background 1 v)\nforever\n    go to [back v] layer\nend\n\nwhen I receive [show game over v]\nwait (0.3) seconds\nstart sound [Game Over - The Legend of Zelda Breath of the Wild OST v]\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nswitch costume to (menu background 3 v)\nrepeat (80)\n    change [ghost v] effect by (-1)\nend\nbroadcast (Show Game start button v)\n\nwhen I receive [show game over v]\nforever\n    go to [front v] layer\nend\n\n@Hurt effect\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [hurt v]\nshow\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Extras\n\nwhen [m v] key pressed\nif <([abs v] of (mouse x) ) < [240]> then\n    show variable [mouse v]\n    set [mouse v] to (join ((mouse x) + (SX)) (join [,] ((mouse y) + (SY))))\nelse\n    hide variable [mouse v]\nend\n\nwhen I receive [start v]\nhide variable [fps v]\nhide variable [mouse v]\n\nwhen flag clicked\nhide variable [fps v]\nhide variable [mouse v]\nforever\n    change [counter v] by (1)\n    if <(timer) > [1]> then\n        set [fps v] to (Counter)\n        set [counter v] to [0]\n        reset timer\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (f v) pressed?> then\n        show variable [fps v]\n        wait until <not <key (f v) pressed?>>\n        wait until <key (f v) pressed?>\n        hide variable [fps v]\n        wait until <not <key (f v) pressed?>>\n    end\nend\n\n@Food\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(Pause Screen) = [Off]> then\n        go to [front v] layer\n        if <touching (player v)?> then\n            start sound [Chomp v]\n            change [health v] by (1)\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nshow\ngo to (tree v)\nchange x by (pick random (-20) to (20))\nrepeat until <touching (level v)?>\n    wait until <(Pause Screen) = [Off]>\n    change y by (-7)\nend\nstop [this script v]\n\nwhen I receive [switch area v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nhide\ndelete this clone\n\n@Pause\n\nwhen I receive [the end v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [game over v]\nhide\nset [pause screen v] to [Off]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [pause screen v] to [Off]\n\nwhen I receive [start v]\nhide\nset [pause screen v] to [Off]\nforever\n    if <(IsCollecting?) = [No]> then\n        if <key (p v) pressed?> then\n            set [pause screen v] to [On]\n            wait until <not <key (p v) pressed?>>\n            show\n            set [ghost v] effect to (100)\n            repeat (10)\n                change [ghost v] effect by (-7)\n            end\n            wait until <key (p v) pressed?>\n            wait until <not <key (p v) pressed?>>\n            set [pause screen v] to [Off]\n            set [ghost v] effect to (30)\n            repeat (10)\n                change [ghost v] effect by (7)\n            end\n            hide\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [start v]\nforever\n    next costume\n    wait (0.1) seconds\nend\n\n@Bouncy Mushroom\n\nwhen flag clicked\nhide\ngo to x: (77) y: (-127)\n\nwhen I receive [start v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [bouncy mushroom v]\nforever\n    go to [back v] layer\n    if <(Area) = [9]> then\n        show\n    else\n        hide\n    end\nend\n\n@Star\n\nwhen flag clicked\nhide\nset size to (20) %\ngo to x: (0) y: (-50)\n\nwhen I receive [start v]\nforever\n    if <<<<(Area) = [10]> or <(Area) = [15]>> or <(Area) = [20]>> or <(Area) = [29]>> then\n        if <(Area) = [10]> then\n            go to x: (0) y: (-50)\n        end\n        if <(Area) = [15]> then\n            go to x: (82) y: (0)\n        end\n        if <(Area) = [20]> then\n            go to x: (0) y: (0)\n        end\n        if <(Area) = [29]> then\n            go to x: (0) y: (0)\n        end\n        if <(Touching star?) = [Yes]> then\n            hide\n        else\n            show\n            broadcast (Grab Star v)\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [start v]\nforever\n    wait (0.01) seconds\n    next costume\nend\n\n@grunge\n\nwhen I receive [gun v]\ngo to [front v] layer\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (95)\n\nwhen flag clicked\nhide\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    switch costume to (Area)\nend\n\nwhen I receive [start v]\nforever\n    if <<<<(Area) = [8]> or <(Area) = [23]>> or <(Area) = [26]>> or <<(Area) = [27]> or <(Area) = [28]>>> then\n        wait until <(Pause Screen) = [Off]>\n        wait (1) seconds\n        wait until <(Pause Screen) = [Off]>\n        glide (0.2) secs to x: (0) y: (27)\n        wait until <(Pause Screen) = [Off]>\n        start sound [Jail Metal Door Slam Sound Effect \(Gaming Sound Effect\).mp3 v]\n        wait (0.5) seconds\n        wait until <(Pause Screen) = [Off]>\n        glide (0.2) secs to x: (0) y: (0)\n    else\n        go to x: (0) y: (0)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <<<(Area) = [8]> or <(Area) = [23]>> or <<(Area) = [26]> or <<(Area) = [27]> or <(Area) = [28]>>>> then\n        set volume to (100) %\n    else\n        set volume to (0) %\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@Entrance\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    go to [back v] layer\n    if <(Area) = [14]> then\n        show\n        go to x: (130) y: (-123)\n        switch costume to (1 v)\n    else\n        if <(Area) = [15]> then\n            show\n            go to x: (-202) y: (-123)\n            switch costume to (1 v)\n        else\n            if <(Area) = [19]> then\n                show\n                go to x: (200) y: (-123)\n                switch costume to (1 v)\n            else\n                if <(Area) = [20]> then\n                    show\n                    go to x: (-210) y: (-123)\n                    switch costume to (2 v)\n                else\n                    if <(Area) = [29]> then\n                        show\n                        go to x: (210) y: (-123)\n                        switch costume to (2 v)\n                    else\n                        hide\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Rocks Falling\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nhide\nforever\n    if <<(Area) > [20]> and <(Area) < [29]>> then\n        wait until <(Pause Screen) = [Off]>\n        wait (pick random (0.5) to (1)) seconds\n        wait until <(Pause Screen) = [Off]>\n        create clone of (_myself_ v)\n    else\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nset [brightness v] effect to (-15)\ngo to x: (([x position v] of [player v]) + (pick random (-100) to (100))) y: (181)\nrepeat until <<touching (level v)?> or <touching (rock v)?>>\n    wait until <(Pause Screen) = [Off]>\n    change y by (-10)\nend\ndelete this clone\n\nwhen I receive [switch area v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    wait until <(Pause Screen) = [Off]>\n    turn right (10) degrees\nend\n\nwhen I start as a clone\nwait until <<(Area) < [21]> or <(Area) > [28]>>\ndelete this clone\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\ndelete this clone\n\n@THUMBNAIL\n\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\n\n@HP Bar Enemy\n\nwhen I receive [hurt enemy v]\nshow\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (-20)\n    wait until <(Pause Screen) = [Off]>\nend\nwait (1) seconds\nwait until <(Pause Screen) = [Off]>\nrepeat (20)\n    change [ghost v] effect by (5)\n    wait until <(Pause Screen) = [Off]>\nend\nhide\n\nwhen flag clicked\nhide\nset size to (200) %\n\nwhen I receive [start v]\nforever\n    go to (enemy v)\n    change y by (30)\nend\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [start v]\nforever\n    go [forward v] (10) layers\n    switch costume to (Alien Hp)\nend\n\nwhen I receive [bouncy mushroom v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [switch area v]\nhide\nclear graphic effects\n\n@Boss\n\nwhen flag clicked\nhide\nclear graphic effects\nset [area v] to [1]\nset [firing? v] to [No]\nset [boss hp tick v] to [20]\nset [boss hp v] to [5]\n\nwhen I receive [start v]\nclear graphic effects\nset [boss hp tick v] to [20]\nset [boss hp v] to [5]\nforever\n    if <(Area) = [30]> then\n        broadcast (Start Boss v)\n        stop [this script v]\n    else\n        hide\n    end\nend\n\nwhen I receive [start boss v]\nshow\nset [firing? v] to [No]\ngo to x: (149) y: (-76)\npoint in direction (-90)\nset rotation style [left-right v]\nset size to (150) %\nswitch costume to (idol6 v)\nwait (1) seconds\nrepeat (3)\n    wait until <(Pause Screen) = [Off]>\n    wait (0.1) seconds\n    next costume\nend\nwait (0.5) seconds\nwait until <(Pause Screen) = [Off]>\nswitch costume to (idol v)\nwait (0.5) seconds\nwait until <(Pause Screen) = [Off]>\nrepeat (2)\n    wait until <(Pause Screen) = [Off]>\n    wait (0.1) seconds\n    change size by (10)\n    next costume\nend\nswitch costume to (idol11 v)\nwait (1) seconds\nwait until <(Pause Screen) = [Off]>\nrepeat (6)\n    wait until <(Pause Screen) = [Off]>\n    wait (0.1) seconds\n    next costume\nend\nwait (1) seconds\nwait until <(Pause Screen) = [Off]>\nrepeat (2)\n    wait until <(Pause Screen) = [Off]>\n    wait (0.1) seconds\n    next costume\nend\nwait (1) seconds\nwait until <(Pause Screen) = [Off]>\nrepeat (3)\n    wait until <(Pause Screen) = [Off]>\n    wait (0.1) seconds\n    next costume\nend\nwait (1) seconds\nwait until <(Pause Screen) = [Off]>\nbroadcast (Start Fire v)\n\nwhen I receive [start fire v]\nforever\n    set [show/hide y button v] to [Hide]\n    repeat (20)\n        wait until <(Pause Screen) = [Off]>\n        change y by (5)\n    end\n    set [firing? v] to [Yes]\n    repeat (10)\n        point towards (player v)\n        wait until <(Pause Screen) = [Off]>\n        repeat (10)\n            wait until <(Pause Screen) = [Off]>\n            change y by (2)\n        end\n        repeat (10)\n            wait until <(Pause Screen) = [Off]>\n            change y by (-2)\n        end\n    end\n    set [firing? v] to [No]\n    repeat (20)\n        wait until <(Pause Screen) = [Off]>\n        change y by (-5)\n    end\n    wait (pick random (4) to (6)) seconds\n    wait until <(Pause Screen) = [Off]>\nend\n\nwhen I receive [start fire v]\nforever\n    if <(Firing?) = [Yes]> then\n        set [show/hide y button v] to [Hide]\n        wait (0.1) seconds\n        wait until <(Pause Screen) = [Off]>\n        switch costume to (idol21 v)\n        wait (0.1) seconds\n        wait until <(Pause Screen) = [Off]>\n        switch costume to (idol22 v)\n    else\n        if <(Pause Screen) = [Off]> then\n            if <<touching (arms v)?> and <(Item) = [Sword]>> then\n                set [show/hide y button v] to [Show]\n                if <<key (y v) pressed?> or <key (space v) pressed?>> then\n                    change [boss hp tick v] by (-1)\n                    broadcast (Hurt Boss v)\n                    start sound [recording2 v]\n                    if <(Boss HP TIck) < [1]> then\n                        set [boss hp tick v] to [20]\n                        change [boss hp v] by (-1)\n                    end\n                    wait until <not <<key (y v) pressed?> or <key (space v) pressed?>>>\n                end\n            else\n                set [show/hide y button v] to [Hide]\n            end\n        end\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [hurt boss v]\nset [whirl v] effect to (pick random (10) to (100))\nset [brightness v] effect to (10)\nwait (0.1) seconds\nclear graphic effects\n\nwhen I receive [start fire v]\nforever\n    if <(Boss HP) < [1]> then\n        broadcast (Hide HP v)\n        set [firing? v] to [No]\n        set [show/hide y button v] to [Hide]\n        stop [other scripts in sprite v]\n        clear graphic effects\n        switch costume to (idol23 v)\n        repeat until <touching (level v)?>\n            change y by (-10)\n        end\n        repeat (3)\n            wait (0.1) seconds\n            next costume\n        end\n        wait (1) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        hide\n        broadcast (THE END v)\n    end\nend\n\n@Fire\n\nwhen I receive [start fire v]\nhide\nwait (1) seconds\nforever\n    if <(Firing?) = [Yes]> then\n        wait (1) seconds\n        wait until <(Pause Screen) = [Off]>\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to (boss v)\npoint towards (player v)\nstart sound [Super Mario World - All Sound Effects \(COMPLETE\) v]\nrepeat until <<touching (player v)?> or <touching (level v)?>>\n    wait until <(Pause Screen) = [Off]>\n    move (10) steps\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    wait (0.01) seconds\n    wait until <(Pause Screen) = [Off]>\n    next costume\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\n@HP Bar Boss\n\nwhen I receive [hide hp v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [hurt boss v]\nshow\nset [ghost v] effect to (100)\nrepeat (5)\n    change [ghost v] effect by (-20)\n    wait until <(Pause Screen) = [Off]>\nend\nwait (1) seconds\nwait until <(Pause Screen) = [Off]>\nrepeat (20)\n    change [ghost v] effect by (5)\n    wait until <(Pause Screen) = [Off]>\nend\nhide\n\nwhen flag clicked\nhide\nset size to (200) %\n\nwhen I receive [start v]\nforever\n    go to (boss v)\n    change y by (30)\nend\n\nwhen I receive [game over v]\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [start v]\nforever\n    go [forward v] (10) layers\n    switch costume to (Boss HP)\nend\n\n@The End\n\nwhen I receive [the end v]\nshow\nswitch costume to (1 v)\nset [ghost v] effect to (100)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait (0.5) seconds\nbroadcast (Stop All v)\n\nwhen flag clicked\nhide\nclear graphic effects\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [stop all v]\nclear graphic effects\nwait (0.5) seconds\nswitch costume to (2 v)\n\n