Conquering Quest - Platformer

Instructions: You Are Finn !\nA young boy set out on an adventure to find coins and jewels.\nCollect treasure as you jump and fight through 10 exciting levels\nUnlock keys and hit the purple block to pass the level\nAvoid Fullscreen - causes lag and weird things...\n★★Ꮸ๏ntᖇ๏lຮ★★ \n►Arrow Keys / WASD - Move◄\n►Mouse Click- Sword◄\n\nYou may have to click back into the game after it loads if it takes a long time and you can't move\n\nThere are some shortcuts - can you figure them out?\n\nWhen you die during a level, the keys and jewels don't disappear - I know :) - they're not supposed to.\n\nThis took almost two months to finish!\n\n\n"I'm too good for fall damage"\n-Finn\n\n

@Stage\n\nwhen flag clicked\nhide variable [level v]\nswitch backdrop to (main menu v)\nset volume to (100) %\nforever\n    if <(backdrop [number v]) = [1]> then\n        start sound [Just Move - opengameart.org v]\n    end\n    wait (193) seconds\nend\n\nwhen I receive [volumeup v]\nrepeat (20)\n    change volume by (5)\nend\n\nwhen I receive [playergo v]\nset volume to (MusicVolume) %\n\nwhen I receive [startsetup v]\nswitch backdrop to (game v)\nset volume to (0) %\n\nwhen flag clicked\nforever\n    set volume to (MusicVolume) %\nend\n\nwhen I receive [newsound v]\nstop all sounds\nrepeat (20)\n    change volume by (-5)\nend\nbroadcast (VolumeUp v)\nforever\n    play sound [TitleX - opengameart.org v] until done\nend\n\n@Ground\n\nwhen I receive [hideground v]\nset [ghost v] effect to (100)\n\nwhen I receive [startsetup v]\nshow variable [jewels: v]\nshow\nnext costume\nclear graphic effects\n\nwhen flag clicked\nset [jewels: v] to [0]\nhide variable [jewels: v]\ngo to x: (2) y: (-12)\nclear graphic effects\nset size to (2400) %\nhide\nswitch costume to (start v)\n\n@Player\n\nwhen flag clicked\nset [loading v] to [0]\n\nwhen flag clicked\nforever\n    if <(y position) < [-180]> then\n        broadcast (playergo v)\n    end\n    set [boxx v] to (XVel)\nend\n\nset volume to (SoundFXVolume) %\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to [front v] layer\n\ndefine Across\nif <(XVel) > [0]> then\n    repeat until <not <<touching (ground v)?> or <touching (extraextras v)?>>>\n        change x by (-1)\n    end\n    change x by (-1)\nelse\n    repeat until <not <<touching (ground v)?> or <touching (extraextras v)?>>>\n        change x by (1)\n    end\n    change x by (1)\nend\n\ndefine Down\nif <(SoundFXVolume) = [100]> then\n    if <([abs v] of (YVel) ) > [1]> then\n        set volume to (([abs v] of (YVel) ) * (3)) %\n    end\n    start sound [Hit v]\nend\nset [yvel v] to [0]\nset [i2 v] to [0]\nset [roof v] to [1]\nrepeat until <<not <<touching (ground v)?> or <touching (extraextras v)?>>> or <(i2) = [8]>>\n    change y by (-1)\n    change [i2 v] by (1)\nend\nset [roof v] to [0]\n\ndefine Up\nif <<([abs v] of (YVel) ) > [1]> and <(SoundFXVolume) = [100]>> then\n    set volume to (([abs v] of (YVel) ) * (3)) %\n    start sound [Hit v]\nend\nset [iy v] to (([abs v] of (YVel) ) + (1))\nset [test v] to [true]\nset [yup? v] to [1]\nset [i v] to [0]\nset [yvel v] to [0]\nrepeat until <<not <<touching (ground v)?> or <touching (extraextras v)?>>> or <(i) = (iY)>>\n    change y by (1)\n    change [i v] by (1)\nend\nif <(i) = (iY)> then\n    change y by ((0) - (iY))\nend\nset [yup? v] to [0]\n\nwhen I receive [startsetup v]\nset size to (400) %\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [noup!!! v] to [0]\nforever\n    change [yvel v] by (-1)\n    change y by (YVel)\n    if <<<touching (ground v)?> or <touching (extraextras v)?>> and <(YVel) > [0]>> then\n        Down\n    end\n    if <<<touching (ground v)?> or <touching (extraextras v)?>> and <(YVel) > [0]>> then\n        Down\n    end\n    if <<touching (ground v)?> or <touching (extraextras v)?>> then\n        Up\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xvel v] by (2)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xvel v] by (-2)\n    end\n    change y by (-1)\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<touching (ground v)?> or <touching (extraextras v)?>>> and <not <(YVel) > [0]>>> then\n        if <(SoundFXVolume) = [100]> then\n            set volume to (50) %\n            start sound (pick random (2) to (4))\n        end\n        change [yvel v] by (13.17)\n    end\n    change y by (1)\n    change x by (XVel)\n    if <touching (ground v)?> then\n        Across\n    end\n    set [xvel v] to ((XVel) * (0.6))\nend\n\ngo to x: (-100) y: (173)\n\nwhen I receive [playergo v]\ngo to x: (StartingX) y: (StartingY)\nset [finnhealth v] to [100]\n\n@tiles\n\nwhen flag clicked\npoint in direction (90)\nshow\nerase all\n\nwhen I receive [startsetup v]\nset volume to (0) %\nerase all\nwait (0.2) seconds\nSenseBlocks\nhide\ndelete this clone\n\nwhen flag clicked\nhide\nerase all\nset [startingx v] to [0]\nset [startingy v] to [0]\n\ndefine SenseBlocks\nset [go v] to [0]\nshow\nswitch costume to (black v)\nset size to (300) %\ngo to x: (-228) y: (168)\nrepeat (14)\n    repeat (20)\n        if <<touching (ground v)?> or <touching (extras v)?>> then\n            set size to (300) %\n            create clone of (_myself_ v)\n        end\n        set x to ((x position) + (24))\n    end\n    go to x: (-226) y: ((y position) - (24))\nend\nrepeat (20)\n    if <<touching (ground v)?> or <touching (extras v)?>> then\n        set size to (300) %\n        create clone of (_myself_ v)\n    end\n    set x to ((x position) + (24))\nend\nhide\nbroadcast (Gray v)\n\ndefine SenseEdges\nset size to (200) %\nif <not <touching (ground v)?>> then\n    set size to (300) %\n    delete this clone\nend\nset size to (300) %\ngo to [front v] layer\nset size to (325) %\nswitch costume to (sensing v)\nwait (0) seconds\nif <touching color (#ffd499)?> then\n    wait (0) seconds\n    set size to (301) %\n    switch costume to (sand v)\n    stop [this script v]\nelse\n    if <touching color (#006622)?> then\n        wait (0) seconds\n        set size to (301) %\n        switch costume to (tree v)\n        stop [this script v]\n    else\n        if <touching color (#00ff55)?> then\n            wait (0) seconds\n            set size to (301) %\n            switch costume to (coin v)\n            stop [this script v]\n        else\n            if <touching color (#cc7700)?> then\n                wait (0) seconds\n                set size to (301) %\n                switch costume to (cratebox v)\n                stop [this script v]\n            else\n                if <touching color (#ff9400)?> then\n                    wait (0) seconds\n                    set size to (301) %\n                    switch costume to (orange v)\n                    set [startingx v] to (x position)\n                    set [startingy v] to (y position)\n                    stop [this script v]\n                else\n                    if <touching color (#cc0000)?> then\n                        wait (0) seconds\n                        set size to (301) %\n                        switch costume to (lava v)\n                        stop [this script v]\n                    else\n                        if <touching color (#7f00ff)?> then\n                            wait (0) seconds\n                            set size to (301) %\n                            switch costume to (purple v)\n                            stop [this script v]\n                        else\n                            if <<color (#ffff00) is touching (#666666)?> and <<color (#00cc44) is touching (#666666)?> and <<color (#003fff) is touching (#666666)?> and <color (#ff0000) is touching (#666666)?>>>> then\n                                wait (0) seconds\n                                set size to (301) %\n                                switch costume to (1234 v)\n                                stop [this script v]\n                            else\n                                if <<color (#ffff00) is touching (#666666)?> and <<color (#00cc44) is touching (#666666)?> and <color (#003fff) is touching (#666666)?>>> then\n                                    wait (0) seconds\n                                    set size to (301) %\n                                    switch costume to (123 v)\n                                    stop [this script v]\n                                else\n                                    if <<color (#ffff00) is touching (#666666)?> and <<color (#00cc44) is touching (#666666)?> and <color (#ff0000) is touching (#666666)?>>> then\n                                        wait (0) seconds\n                                        set size to (301) %\n                                        switch costume to (124 v)\n                                        stop [this script v]\n                                    else\n                                        if <<color (#ffff00) is touching (#666666)?> and <<color (#003fff) is touching (#666666)?> and <color (#ff0000) is touching (#666666)?>>> then\n                                            wait (0) seconds\n                                            set size to (301) %\n                                            switch costume to (134 v)\n                                            stop [this script v]\n                                        else\n                                            if <<color (#00cc44) is touching (#666666)?> and <<color (#003fff) is touching (#666666)?> and <color (#ff0000) is touching (#666666)?>>> then\n                                                wait (0) seconds\n                                                set size to (301) %\n                                                switch costume to (234 v)\n                                                stop [this script v]\n                                            else\n                                                if <<color (#00cc44) is touching (#666666)?> and <color (#ff0000) is touching (#666666)?>> then\n                                                    wait (0) seconds\n                                                    set size to (301) %\n                                                    switch costume to (24 v)\n                                                    stop [this script v]\n                                                else\n                                                    if <<color (#ffff00) is touching (#666666)?> and <color (#00cc44) is touching (#666666)?>> then\n                                                        wait (0) seconds\n                                                        set size to (301) %\n                                                        switch costume to (12 v)\n                                                        stop [this script v]\n                                                    else\n                                                        if <<color (#ffff00) is touching (#666666)?> and <color (#003fff) is touching (#666666)?>> then\n                                                            wait (0) seconds\n                                                            set size to (301) %\n                                                            switch costume to (13 v)\n                                                            stop [this script v]\n                                                        else\n                                                            if <<color (#ffff00) is touching (#666666)?> and <color (#ff0000) is touching (#666666)?>> then\n                                                                wait (0) seconds\n                                                                set size to (301) %\n                                                                switch costume to (14 v)\n                                                                stop [this script v]\n                                                            else\n                                                                if <<color (#00cc44) is touching (#666666)?> and <color (#003fff) is touching (#666666)?>> then\n                                                                    wait (0) seconds\n                                                                    set size to (301) %\n                                                                    switch costume to (23 v)\n                                                                    stop [this script v]\n                                                                else\n                                                                    if <<color (#003fff) is touching (#666666)?> and <color (#ff0000) is touching (#666666)?>> then\n                                                                        wait (0) seconds\n                                                                        set size to (301) %\n                                                                        switch costume to (34 v)\n                                                                        stop [this script v]\n                                                                    else\n                                                                        if <color (#ffff00) is touching (#666666)?> then\n                                                                            wait (0) seconds\n                                                                            set size to (301) %\n                                                                            switch costume to (1 v)\n                                                                            stop [this script v]\n                                                                        else\n                                                                            if <color (#00cc44) is touching (#666666)?> then\n                                                                                wait (0) seconds\n                                                                                set size to (301) %\n                                                                                switch costume to (2 v)\n                                                                                stop [this script v]\n                                                                            else\n                                                                                if <color (#003fff) is touching (#666666)?> then\n                                                                                    wait (0) seconds\n                                                                                    set size to (301) %\n                                                                                    switch costume to (3 v)\n                                                                                    stop [this script v]\n                                                                                else\n                                                                                    if <color (#ff0000) is touching (#666666)?> then\n                                                                                        wait (0) seconds\n                                                                                        set size to (301) %\n                                                                                        switch costume to (4 v)\n                                                                                        stop [this script v]\n                                                                                    else\n                                                                                        set size to (301) %\n                                                                                        switch costume to (none v)\n                                                                                    end\n                                                                                end\n                                                                            end\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        stop [this script v]\n    end\nend\n\ndefine AddCoralAndStarFish\nchange y by (24)\nset [costume v] to (costume [number v])\nif <<(pick random (1) to (2)) = [1]> and <not <touching (ground v)?>>> then\n    switch costume to (pick random (34) to (38))\n    stamp\nend\nchange y by (-24)\nswitch costume to (Costume)\n\nwhen I start as a clone\nset [keys v] to [1]\nshow\nset size to (300) %\nif <not <<touching (ground v)?> or <touching (extras v)?>>> then\n    delete this clone\nend\nif <touching color (#ff9999)?> then\n    wait (0) seconds\n    switch costume to (key v)\n    repeat until <touching (finn v)?>\n        point in direction (90)\n        turn right (pick random (-3) to (3)) degrees\n        change size by (pick random (1) to (-1))\n        set [keys v] to [0]\n    end\n    set [keys v] to [1]\n    set volume to (SoundFXVolume) %\n    start sound [CollectKey v]\n    delete this clone\nelse\n    if <touching color (#ff00bf)?> then\n        wait (0) seconds\n        if <(pick random (1) to (3)) = [1]> then\n            switch costume to (jewel3 v)\n        else\n            if <(pick random (1) to (3)) = [2]> then\n                switch costume to (jewel2 v)\n            else\n                switch costume to (jewel v)\n            end\n        end\n        repeat until <touching (finn v)?>\n            point in direction (90)\n            turn right (pick random (-3) to (3)) degrees\n            change size by (pick random (1) to (-1))\n        end\n        set volume to (SoundFXVolume) %\n        start sound [CollectJewel v]\n        change [jewels: v] by (1)\n        delete this clone\n    else\n    end\nend\nSenseEdges\nFX\n\ndefine Across\nif <(BoxXVel) > [0]> then\n    repeat until <not <<touching (ground v)?> or <touching (extraextras v)?>>>\n        change x by (-1)\n    end\n    change x by (-1)\nelse\n    repeat until <not <<touching (ground v)?> or <touching (extraextras v)?>>>\n        change x by (1)\n    end\n    change x by (1)\nend\n\ndefine Down\nif <(SoundFXVolume) = [100]> then\n    if <([abs v] of (BoxYVel) ) > [1]> then\n        set volume to (([abs v] of (BoxYVel) ) * (3)) %\n    end\n    start sound [Hit v]\nend\nset [boxyvel v] to [0]\nset [boxi2 v] to [0]\nset [roof v] to [1]\nrepeat until <<not <<touching (ground v)?> or <touching (extraextras v)?>>> or <(Boxi2) = [8]>>\n    change y by (-1)\n    change [boxi2 v] by (1)\nend\nset [roof v] to [0]\n\ndefine Up\nif <<([abs v] of (BoxYVel) ) > [1]> and <(SoundFXVolume) = [100]>> then\n    set volume to (([abs v] of (BoxYVel) ) * (3)) %\n    start sound [Hit v]\nend\nset [iy v] to (([abs v] of (YVel) ) + (1))\nset [test v] to [true]\nset [yup? v] to [1]\nset [boxi v] to [0]\nset [yvel v] to [0]\nrepeat until <<not <<touching (ground v)?> or <touching (extraextras v)?>>> or <(Boxi) = (iY)>>\n    change y by (1)\n    change [boxi v] by (1)\nend\nif <(i) = (iY)> then\n    change y by ((0) - (iY))\nend\nset [yup? v] to [0]\n\nwhen I receive [startsetup v]\ndelete this clone\n\ndefine AddFlowersAndGrass\nchange y by (24)\nset [costume v] to (costume [number v])\nif <<(pick random (1) to (10)) = [1]> and <<(costume [number v]) = [4]> or <<(costume [number v]) = [29]> or <(costume [number v]) = [28]>>>> then\n    change y by (-24)\n    if <not <touching color (#7f00ff)?>> then\n        switch costume to (bush v)\n        stamp\n    end\n    change y by (24)\nend\nswitch costume to (Costume)\nif <<(pick random (1) to (pick random (1) to (pick random (1) to (2)))) = [1]> and <<(costume [number v]) = [4]> or <<(costume [number v]) = [32]> or <<(costume [number v]) = [31]> or <(costume [number v]) = [27]>>>>> then\n    switch costume to (extra v)\n    stamp\nend\nswitch costume to (Costume)\nif <<(pick random (1) to (3)) = [1]> and <<(costume [number v]) = [4]> or <<(costume [number v]) = [7]> or <<(costume [number v]) = [32]> or <(costume [number v]) = [27]>>>>> then\n    switch costume to (pick random (23) to (26))\n    stamp\nend\nswitch costume to (Costume)\nif <<(pick random (1) to (4)) = [1]> and <<(costume [number v]) = [4]> or <<(costume [number v]) = [32]> or <<(costume [number v]) = [31]> or <(costume [number v]) = [27]>>>>> then\n    wait (0.1) seconds\n    go to [front v] layer\n    set [changexvine v] to ((pick random (-3) to (3)) * (2))\n    change x by (ChangeXVine)\n    change y by (-27)\n    switch costume to (pick random (42) to (45))\n    stamp\n    change x by ((0) - (ChangeXVine))\n    change y by (26)\nend\nchange y by (-24)\nswitch costume to (Costume)\nif <<(pick random (1) to (7)) = [1]> and <<<<<(costume [number v]) = [19]> or <(costume [number v]) = [13]>> or <(costume [number v]) = [1]>> or <(costume [number v]) = [11]>> or <(costume [number v]) = [10]>>> then\n    point in direction ((pick random (-2) to (2)) * (90))\n    switch costume to (rocks v)\n    stamp\nend\nswitch costume to (Costume)\nif <<(pick random (1) to (7)) = [1]> and <<<<<(costume [number v]) = [19]> or <(costume [number v]) = [13]>> or <(costume [number v]) = [1]>> or <(costume [number v]) = [11]>> or <(costume [number v]) = [10]>>> then\n    point in direction ((pick random (-2) to (2)) * (90))\n    switch costume to (moss v)\n    stamp\nend\npoint in direction (90)\nswitch costume to (Costume)\n\nif <touching color (#995900)?> then\n    wait (0) seconds\n    switch costume to (box v)\nelse\nend\n\ndefine FX\nif <(costume [number v]) = [33]> then\n    AddCoralAndStarFish\n    stamp\n    delete this clone\nelse\n    wait (0) seconds\n    broadcast (HideGround v)\n    stamp\n    set [go v] to [0]\n    AddFlowersAndGrass\n    broadcast (PlayerGo v)\n    delete this clone\nend\n\nswitch costume to (Costume)\nif <<(pick random (1) to (10)) = [1]> and <<(costume [number v]) = [4]> or <<(costume [number v]) = [32]> or <<(costume [number v]) = [31]> or <(costume [number v]) = [27]>>>>> then\n    point in direction (90)\n    switch costume to (palmtree v)\n    stamp\nend\n\nswitch costume to (jewel v)\n\n@StartingCharacter\n\nwhen flag clicked\nwait (0) seconds\nshow\ngo to [front v] layer\nset size to (400) %\ngo to x: (-50) y: (-85)\nrepeat until <[0] = [1]>\n    wait (0.6) seconds\n    switch costume to (costume1 v)\n    next costume\n    wait (0.2) seconds\n    switch costume to (costume1 v)\nend\n\nwhen I receive [startsetup v]\nhide\n\n@Finn\n\nwhen I receive [start v]\n\nwhen flag clicked\nset rotation style [left-right v]\nset [stopping? v] to [0]\nforever\n    if <<not <key (right arrow v) pressed?>> and <not <key (left arrow v) pressed?>>> then\n        switch costume to (standing v)\n        point in direction (90)\n    end\n    if <not <touching (ground v)?>> then\n        switch costume to (jumping v)\n    end\n    if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n        repeat (2)\n            if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n                wait (0.04) seconds\n                next costume\n            end\n        end\n        switch costume to (right v)\n        repeat until <not <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>>>\n            repeat (6)\n                if <<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> then\n                    wait (0.04) seconds\n                    next costume\n                end\n            end\n            switch costume to (right v)\n        end\n        switch costume to (almostright v)\n    end\nend\n\nhide\n\nwhen flag clicked\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n    end\nend\n\nwhen flag clicked\nset size to (176) %\nhide\ngo to [front v] layer\nset [finnhealth v] to [100]\nforever\n    go to (player v)\n    change y by (10)\nend\n\nshow\n\nset size to (200) %\n\nwhen I receive [playergo v]\nset [go v] to [1]\nshow\n\nset [stopping? v] to [1]\nswitch costume to (stopping v)\n\nset [stopping? v] to [0]\n\nchange [level v] by (1)\nbroadcast (StartSetup v)\nwait until <not <touching color (#7f00ff)?>>\n\nwhen flag clicked\nforever\n    set size to (180) %\n    if <<touching color (#7f00ff)?> and <(Keys) = [1]>> then\n        change [level v] by (1)\n        broadcast (StartSetup v)\n        wait until <not <touching color (#7f00ff)?>>\n    end\n    set size to (176) %\n    if <(FinnHealth) < [1]> then\n        broadcast (PlayerGo v)\n    end\n    if <touching (slargle v)?> then\n        wait (0.02) seconds\n        if <touching (slargle v)?> then\n            set volume to (SoundFXVolume) %\n            start sound [Hit v]\n            change [finnhealth v] by (-33)\n            change [ghost v] effect by (15)\n        end\n    end\nend\n\nwhen I receive [playergo v]\nset [ghost v] effect to (0)\n\nwhen I receive [startsetup v]\nhide\n\nset [finnhealth v] to [0]\n\n@Start3\n\nwhen flag clicked\nshow\ngo to x: (69) y: (-32)\nset size to (70) %\nset [ghost v] effect to (35)\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat (10)\n            change [ghost v] effect by (-3)\n        end\n        wait until <not <touching (mouse-pointer v)?>>\n    else\n        set [ghost v] effect to (35)\n    end\nend\n\nwhen I receive [startsetup v]\nhide\n\nwhen this sprite clicked\nbroadcast (Start v)\n\ngo to [front v] layer\n\n@Start2\n\nwhen flag clicked\nshow\ngo to x: (75) y: (0)\nset size to (70) %\nset [ghost v] effect to (35)\ngo to [front v] layer\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat (10)\n            change [ghost v] effect by (-3)\n        end\n        wait until <not <touching (mouse-pointer v)?>>\n    else\n        set [ghost v] effect to (35)\n    end\nend\n\nwhen I receive [startsetup v]\nhide\n\nwhen this sprite clicked\nbroadcast (Credits v)\n\nbroadcast (LevelEditor v)\n\n@Start\n\nwhen flag clicked\nshow\ngo to x: (84) y: (51)\nset size to (70) %\nset [ghost v] effect to (35)\ngo to [front v] layer\nforever\n    if <touching (mouse-pointer v)?> then\n        repeat (10)\n            change [ghost v] effect by (-3)\n        end\n        wait until <not <touching (mouse-pointer v)?>>\n    else\n        set [ghost v] effect to (35)\n    end\nend\n\nwhen this sprite clicked\n\nwhen I receive [startsetup v]\nhide\n\nwhen flag clicked\nrepeat until <<touching (mouse-pointer v)?> and <mouse down?>>\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (NewSound v)\n        broadcast (StartSetup v)\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\nend\nif <<touching (mouse-pointer v)?> and <mouse down?>> then\n    broadcast (NewSound v)\n    broadcast (StartSetup v)\n    wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\nend\n\n@Follows\n\nwhen flag clicked\nset size to (4) %\nhide\nforever\n    set [mousex v] to (mouse x)\n    set [mousey v] to (mouse y)\n    wait (0.01) seconds\n    if <<not <(mouse x) = (MouseX)>> or <not <(mouse y) = (MouseY)>>> then\n        create clone of (_myself_ v)\n    end\nend\n\nrepeat (5)\nend\nforever\n    go to [front v] layer\nend\n\nwhen I start as a clone\npoint towards (mouse-pointer v)\nshow\nset [ghost v] effect to (0)\nset size to (4) %\ngo to (mouse-pointer v)\nchange y by (-5)\nrepeat (40)\n    go to [front v] layer\n    change y by (-2)\n    change [ghost v] effect by (3)\n    change size by (-0.05)\nend\ndelete this clone\n\n@Sprite2\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset size to (400) %\ngo [backward v] (1) layers\npoint in direction (-90)\ngo to x: (-60) y: (-85)\nrepeat until <[0] = [1]>\n    repeat (25)\n        turn left (1) degrees\n    end\n    repeat (25)\n        turn right (1) degrees\n    end\nend\n\npoint in direction (10)\n\nwhen I receive [startsetup v]\nhide\n\n@Sprite3\n\nwhen flag clicked\ngo to [front v] layer\n\npoint in direction (10)\n\nwhen flag clicked\nshow\nset size to (400) %\npoint in direction (-45)\ngo to x: (-60) y: (-75)\nrepeat until <[0] = [1]>\n    repeat (25)\n        turn left (1) degrees\n    end\n    repeat (25)\n        turn right (1) degrees\n    end\nend\n\ngo [backward v] (1) layers\n\nwhen I receive [startsetup v]\nhide\n\n@Sprite4\n\nwhen I receive [startsetup v]\nhide\n\nwhen flag clicked\ngo to x: (-25) y: (-85)\nset size to (200) %\ngo to [front v] layer\ngo [backward v] (1) layers\nshow\nrepeat until <[0] = [1]>\n    wait (0.1) seconds\n    next costume\nend\n\n@Sun\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (6) layers\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [tm v] to [1]\n    else\n        set [tm v] to [0]\n    end\nend\n\nwhen flag clicked\nshow\nset size to (20) %\nforever\n    go to x: (-240) y: (115)\n    repeat until <(x position) = [264]>\n        change x by (0.5)\n        if <(TM) = [0]> then\n            point towards (mouse-pointer v)\n        end\n    end\n    wait (0.1) seconds\nend\n\nwhen I receive [startsetup v]\nhide\n\n@Sprite7\n\nwhen flag clicked\nshow\nforever\n    go to (sun v)\n    set size to (15) %\n    turn right (0.5) degrees\nend\n\nwhen I receive [startsetup v]\nhide\n\n@Eyes\n\nwhen flag clicked\nwait (0) seconds\ngo to [front v] layer\ngo [backward v] (4) layers\n\nwhen flag clicked\nshow\nset size to (25) %\nset [ghost v] effect to (65)\nforever\n    if <(TM) = [0]> then\n        go to (sun v)\n        point towards (mouse-pointer v)\n        move (7) steps\n        point in direction (90)\n    else\n        go to (sun v)\n        if <(distance to [mouse-pointer v]) > [7]> then\n            go to (sun v)\n            point towards (mouse-pointer v)\n            move (7) steps\n            point in direction (90)\n        else\n            go to (sun v)\n            point towards (mouse-pointer v)\n            move (distance to [mouse-pointer v]) steps\n            point in direction (90)\n        end\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [startsetup v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nshow\nset size to (400) %\ngo to x: (-153) y: (47)\ngo to [front v] layer\n\nwhen I receive [startsetup v]\nhide\n\n@Clouds\n\nwhen flag clicked\nhide\ngo [backward v] (1) layers\nforever\n    wait (pick random (6) to (8)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to x: (350) y: (pick random (100) to (180))\nset size to (pick random (30) to (60)) %\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (pick random (50) to (75))\nrepeat (((240) / (((100) - (size)) / (100))) * (2))\n    change x by ((0) - (((100) - (size)) / (100)))\nend\ndelete this clone\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\n@Restart Level\n\nwhen flag clicked\ngo to x: (150) y: (165)\nset size to (200) %\nforever\n    switch costume to (hitbox v)\n    if <touching (mouse-pointer v)?> then\n        switch costume to (settingsmouse v)\n    else\n        switch costume to (settings v)\n    end\n    if <key (r v) pressed?> then\n        broadcast (PlayerGo v)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (PlayerGo v)\n\n@Sprite8\n\nwhen this sprite clicked\nif <(ToggleMute) = [Mute]> then\n    set [togglemute v] to [Sound]\nelse\n    set [togglemute v] to [Mute]\nend\n\nwhen flag clicked\ngo to x: (180) y: (165)\nset size to (200) %\nforever\n    switch costume to (hitbox v)\n    if <(ToggleMute) = [Mute]> then\n        set [soundfxvolume v] to [0]\n        if <touching (mouse-pointer v)?> then\n            switch costume to (mutesense v)\n        else\n            switch costume to (mute v)\n        end\n    else\n        set [soundfxvolume v] to [100]\n        if <touching (mouse-pointer v)?> then\n            switch costume to (audioonsense v)\n        else\n            switch costume to (audioon v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ToggleMute) = [Mute]> then\n        set volume to (0) %\n    end\nend\n\nset [togglemute v] to [Sound]\n\n@Sensing\n\nwhen I receive [playergo v]\nshow\nwait (0.1) seconds\nset [ghost v] effect to (100)\ngo to (player v)\nrepeat until <touching color (#7f00ff)?>\n    set size to (70) %\n    switch costume to (lava v)\n    change y by (-2)\n    if <touching color (#ff1202)?> then\n        broadcast (PlayerGo v)\n    end\n    change y by (2)\n    switch costume to (sensing v)\n    set size to (176) %\n    go to (player v)\nend\n\nwhen flag clicked\nhide\n\nchange y by (15)\n\nchange y by (-15)\n\n@FinnCape\n\nwhen flag clicked\nhide\n\nwhen I receive [startsetup v]\nset size to (125) %\nhide\nforever\n    go to (finn v)\n    point in direction ((0) - ([direction v] of [finn v]))\n    change y by (7)\nend\n\nwhen I receive [startsetup v]\nforever\n    next costume\n    wait (0) seconds\nend\n\nwhen I receive [playergo v]\nshow\n\n@Sprite6\n\nwhen this sprite clicked\nif <(ToggleMusic) = [Mute]> then\n    set [togglemusic v] to [Sound]\nelse\n    set [togglemusic v] to [Mute]\nend\n\nwhen flag clicked\nforever\n    if <(ToggleMute) = [Mute]> then\n        set volume to (0) %\n    end\nend\n\nwhen flag clicked\ngo to x: (125) y: (165)\nset size to (200) %\nforever\n    switch costume to (hitbox v)\n    if <(ToggleMusic) = [Mute]> then\n        set [musicvolume v] to [0]\n        if <touching (mouse-pointer v)?> then\n            switch costume to (musicmutesense v)\n        else\n            switch costume to (musicmute v)\n        end\n    else\n        set [musicvolume v] to [100]\n        if <touching (mouse-pointer v)?> then\n            switch costume to (musiconsense v)\n        else\n            switch costume to (musicon v)\n        end\n    end\nend\n\nset [togglemusic v] to [Sound]\n\n@LoadingBar\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nset [graphics v] to [1]\nforever\n    if <key (1 v) pressed?> then\n        set [graphics v] to [1]\n    end\n    if <key (2 v) pressed?> then\n        set [graphics v] to [2]\n    end\nend\n\nwhen I receive [startsetup v]\ngo to x: (10) y: (0)\nwait (0.3) seconds\nrepeat until <(Go) = [1]>\n    show\n    go to [front v] layer\nend\nhide\n\nforever\n    if  then\n        ask [What level would you like to go to?] and wait\n        set [level v] to (answer)\n        broadcast (StartSetup v)\n    end\nend\n\n@Extras\n\nwhen I receive [hideground v]\nset [ghost v] effect to (100)\n\ngo to [front v] layer\n\nforever\nend\n\nwhen flag clicked\ngo to x: (2) y: (-12)\nclear graphic effects\nset size to (2400) %\nhide\nswitch costume to (start v)\n\nnext costume\n\nhide\n\nwhen I receive [startsetup v]\ngo to x: (2) y: (-12)\nshow\nnext costume\nclear graphic effects\n\nwhen I receive [restartlevel v]\n\nclear graphic effects\nshow\n\nswitch costume to (Level)\n\nset [level v] to [1]\n\n@Box\n\nwhen flag clicked\nhide\nset [level v] to [0]\n\nforever\n    if <(Level) = [0]> then\n    end\nend\n\ngo to x: (14) y: (4)\n\nset [yup? v] to [0]\n\ndefine Up\nset [boxiy v] to (([abs v] of (BoxYVel) ) + (1))\nset [test v] to [true]\nset [boxi v] to [0]\nset [boxxvel v] to [0]\nrepeat until <<not <touching (ground v)?>> or <(Boxi) = (BoxiY)>>\n    change y by (1)\n    change [boxi v] by (1)\nend\nif <(Boxi) = (BoxiY)> then\n    change y by ((0) - (BoxiY))\nend\n\ndefine Across\nif <(BoxXVel) > [0]> then\n    repeat until <not <<touching (ground v)?> or <touching (extraextras v)?>>>\n        change x by (-1)\n    end\n    change x by (-1)\nelse\n    repeat until <not <<touching (ground v)?> or <touching (extraextras v)?>>>\n        change x by (1)\n    end\n    change x by (1)\nend\n\nchange y by (-1)\nif <<<key (up arrow v) pressed?> and <touching (ground v)?>> and <not <(BoxYVel) > [0]>>> then\n    change [boxyvel v] by (13)\nend\nchange y by (1)\n\nif <(SoundFXVolume) = [100]> then\n    set volume to (50) %\n    start sound (pick random (2) to (4))\nend\n\nwhen I receive [startsetup v]\n\nif <(SoundFXVolume) = [100]> then\n    if <([abs v] of (BoxYVel) ) > [1]> then\n        set volume to (([abs v] of (BoxYVel) ) * (3)) %\n    end\n    start sound [Hit v]\nend\n\nif <<([abs v] of (BoxYVel) ) > [1]> and <(SoundFXVolume) = [100]>> then\n    set volume to (([abs v] of (BoxYVel) ) * (3)) %\n    start sound [Hit v]\nend\n\ndefine Down\nset [boxxvel v] to [0]\nset [boxi2 v] to [0]\nrepeat until <<not <touching (ground v)?>> or <(Boxi2) = [8]>>\n    change y by (-1)\n    change [boxi2 v] by (1)\nend\n\ngo to x: (-50) y: (-44)\nset size to (400) %\nset [boxxvel v] to [0]\nset [boxyvel v] to [0]\nforever\n    change [boxyvel v] by (-1)\n    change y by (BoxYVel)\n    if <<touching (ground v)?> and <(BoxYVel) > [0]>> then\n        Down\n    end\n    if <<touching (ground v)?> and <(BoxYVel) > [0]>> then\n        Down\n    end\n    if <touching (ground v)?> then\n        Up\n    end\n    if <<touching (sensing v)?> and <key (right arrow v) pressed?>> then\n        change [boxxvel v] by (2)\n    end\n    if <<touching (sensing v)?> and <key (left arrow v) pressed?>> then\n        change [boxxvel v] by (-2)\n    end\n    change x by (BoxXVel)\n    if <touching (ground v)?> then\n        Across\n    end\n    set [boxxvel v] to ((BoxXVel) * (0.6))\nend\n\nshow\n\n@Sword\n\nwhen flag clicked\nhide\n\nwhen I receive [playergo v]\nset rotation style [all around v]\nset size to (200) %\nshow\nforever\n    if <mouse down?> then\n        set volume to (SoundFXVolume) %\n        start sound [SwordSlice v]\n        repeat (10)\n            point towards (mouse-pointer v)\n            turn left (45) degrees\n        end\n    end\nend\n\nwhen I receive [playergo v]\nforever\n    go to (player v)\n    change y by (10)\nend\n\nwhen I receive [startsetup v]\nhide\n\n@Bat\n\nwhen flag clicked\npen up\nshow\nset size to (400) %\ngo to [front v] layer\ngo to x: (0) y: (100)\nrepeat until <[0] = [1]>\n    wait (pick random (0) to (0.05)) seconds\n    next costume\n    set [costume v] to (costume [number v])\n    change x by (pick random (-10) to (10))\n    change y by (pick random (-10) to (10))\nend\n\ndefine None\n\nwhen I receive [startsetup v]\nhide\n\nwhen I receive [startsetup v]\n\nset pen size to (8)\npen up\nchange x by ((0) - (max))\nchange y by ((size) * (1.5))\npen down\nset pen color to (#299f40)\nchange x by ((now) * (2))\nset pen color to (#c23f3f)\nchange x by (((max) - (now)) * (2))\npen up\nchange x by ((0) - (((max) - (now)) * (2.5)))\nset pen color to (#299f40)\npen down\npen up\nchange x by (((max) - (now)) * (2.5))\nchange x by ((0) - (max))\nchange y by ((0) - ((size) * (1.5)))\n\nforever\n    if <(distance to [mouse-pointer v]) < [40]> then\n        erase all\n        Health Bar (5) (10) (16)\n    else\n        erase all\n    end\nend\n\n@Slargle\n\nwhen I receive [playergo v]\nwait until <([costume # v] of [extras v]) = [3]>\nset [ghost v] effect to (0)\nset size to (200) %\nset rotation style [left-right v]\nset [slarglehealth v] to [100]\nshow\nrepeat until <(Level) = [2]>\n    go to x: (0) y: (98)\n    repeat (20)\n        change x by (5)\n        next costume\n        wait (0) seconds\n        point in direction (-90)\n    end\n    repeat (20)\n        change x by (-5)\n        next costume\n        wait (0) seconds\n        point in direction (90)\n    end\nend\n\ndefine SlargleHealthBar\n\nwait until <(Level) = [1]>\nrepeat until <(SlargleHealth) < [0]>\n    SlargleHealthBar\nend\n\nshow\n\nif <<touching (sword v)?> and <mouse down?>> then\nend\n\nchange y by (10)\npen up\nchange x by (-5)\npen down\nset pen color to (#cc0000)\nchange x by ((SlargleHealth) / (10))\nset pen color to (#30bd1b)\nchange x by ((10) - ((SlargleHealth) / (10)))\npen up\nchange y by (-10)\nchange x by (-10)\n\nwhen I receive [playergo v]\nwait until <([costume # v] of [extras v]) = [3]>\nforever\n    if <(SlargleHealth) < [15]> then\n        set size to (200) %\n        set rotation style [left-right v]\n        start sound [SlargleDie v]\n        hide\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\n\nwait until <not <touching (sword v)?>>\n\nchange [slarglehealth v] by (pick random (-5) to (-10))\n\nrepeat until <(Level) = [2]>\n    hide\nend\n\nshow\n\nif <(SlargleHealth) < [15]> then\n    hide\n    start sound [SlargleDie v]\n    stop [this script v]\nend\n\nif <(SlargleHealth) < [15]> then\n    hide\nend\n\nstop [this script v]\n\nwhen I receive [playergo v]\nwait until <(Level) = [1]>\nrepeat until <(Level) = [2]>\n    if <touching (sword v)?> then\n        set [slarglehitammount v] to [-40]\n        change [slarglehealth v] by (SlargleHitAmmount)\n        set volume to (SoundFXVolume) %\n        start sound [SlargleHit v]\n        change [ghost v] effect by ((0) - (SlargleHitAmmount))\n        broadcast (SlargleHit v)\n        wait until <not <touching (sword v)?>>\n    end\nend\nhide\n\nsay [Hello!] for (2) seconds\n\nwait (0.3) seconds\n\nset [slarglehealth v] to [100]\n\nset [ghost v] effect to (0)\n\nhide\n\n@SlargleHit\n\nwhen flag clicked\nhide\n\nwhen I receive [slarglehit v]\nshow\ngo to (slargle v)\npoint in direction (0)\nset [ghost v] effect to (0)\nrepeat (3)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nturn right (pick random (0) to (360)) degrees\nset size to (pick random (90) to (150)) %\nrepeat (pick random (5) to (9))\n    move (pick random (3) to (8)) steps\nend\ndelete this clone\n\nchange [ghost v] effect by (10)\n\n@RollingCredits\n\nwhen I receive [credits v]\nshow\ngo to x: (0) y: (-175)\nswitch costume to (costume1 v)\nset size to (210) %\nswitch costume to (credits v)\nrepeat (940)\n    go to [front v] layer\n    change y by (1)\n    if <key (space v) pressed?> then\n        hide\n        stop [this script v]\n    end\nend\nhide\n\nwhen flag clicked\nhide\n\n@thumbnail\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset size to (970) %\nhide\ngo to x: (-48) y: (8)\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\n\nshow\n\ngo to [front v] layer\n\n