Battle Cat Hero (Puzzle Platformer)

Instructions: Welcome to a game where only the most patient, most skilled and smart people can make it through this massive scrolling platformer.\n--------------------------------------\nLeft arrow key to move left ⇦\nRight arrow key to move right⇨\nUp arrow to jump⇧\nX to interact with doors\nIf a door doesn't open,  then you put in the wrong password, or you don't have the key\nTouch hovering items to pick them up\npress space to attack\nEnemy attacks stun you, but take away your stamina. When your stamina is depleted, you lose consciousness, and lose. \n-------------------------------------------\nCHEATS⇩\nDo not use unless you are completely stumped\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nCHEATS\n-------------------------------------------------------------------------\nMine: Count the pickaxes in the different areas. The vault's password is 135\n\nBanners: The first letters of the colors on the bottom of the 4 banners spell out "GROW"\n\nIron bars: What were the names of the fruit?\nGrapes, Lemons, Oranges, Bananas, Apricots, more lemons... The first letters spell "GLOBAL"\nSome plants are very inaccurate

@Stage\n\n@Costumes\n\nwhen flag clicked\nset size to (400) %\ngo to x: (-10) y: (-20)\nset rotation style [left-right v]\nforever\n    go to (hitbox v)\n    change y by (-15)\n    if <key (right arrow v) pressed?> then\n        if <(direction) = [-90]> then\n            change x by (-30)\n        end\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        if <(direction) = [90]> then\n            change x by (30)\n        end\n        point in direction (-90)\n    end\nend\n\nwhen flag clicked\ndelete all of [inventory v]\nswitch costume to (costume1 v)\nforever\n    if <key (up arrow v) pressed?> then\n        switch costume to (costume26 v)\n        repeat (9)\n            next costume\n            wait (0.08) seconds\n        end\n    end\n    if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n        switch costume to (costume19 v)\n        repeat (6)\n            if <not <<key (up arrow v) pressed?> or <key (space v) pressed?>>> then\n                next costume\n                wait (0.08) seconds\n            end\n        end\n    end\n    if <not <key (up arrow v) pressed?>> then\n        if <key (space v) pressed?> then\n            switch costume to (costume1 v)\n            repeat (17)\n                next costume\n            end\n            repeat (17)\n                switch costume to ((costume [number v]) - (1))\n            end\n        end\n    end\nend\n\ngo to x: (-342) y: (345)\n\nwhen flag clicked\nforever\n    if <touching (enemies v)?> then\n        change [touchingenemy v] by (1)\n        wait until <not <touching (enemies v)?>>\n        change [touchingenemy v] by (-1)\n        wait until <touching (enemies v)?>\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\nswitch costume to (costume35 v)\nrepeat (2)\n    wait (0.3) seconds\n    next costume\nend\n\n@Hitbox\n\nwhen flag clicked\nset size to (500) %\nset [ghost v] effect to (100)\nset [scrolly v] to [452]\nset [move v] to [0]\nset [scrollx v] to [558]\nshow\nset rotation style [left-right v]\nswitch costume to (costume1 v)\nset [xvelocity v] to [0]\nset [yvelocity v] to [0]\nforever\n    go to x: (0) y: (0)\n    if <(Move) > [0]> then\n        change [xvelocity v] by (1.5)\n    end\n    if <(Move) < [0]> then\n        change [xvelocity v] by (-1.5)\n    end\n    if <key (right arrow v) pressed?> then\n        if <not <(Captured) = [1]>> then\n            change [xvelocity v] by (1)\n            point in direction (90)\n        end\n    end\n    if <key (left arrow v) pressed?> then\n        if <not <(Captured) = [1]>> then\n            change [xvelocity v] by (-1)\n            point in direction (-90)\n        end\n    end\n    set [xvelocity v] to ((Xvelocity) * (0.9))\n    change x by (Xvelocity)\n    if <<touching (ground v)?> or <touching (items v)?>> then\n        change y by (1)\n        if <<touching (ground v)?> or <touching (items v)?>> then\n            change y by (1)\n            if <<touching (ground v)?> or <touching (items v)?>> then\n                change y by (1)\n                if <<touching (ground v)?> or <touching (items v)?>> then\n                    change y by (1)\n                    if <<touching (ground v)?> or <touching (items v)?>> then\n                        change y by (1)\n                        if <<touching (ground v)?> or <touching (items v)?>> then\n                            change x by ((Xvelocity) * (-1))\n                            change y by (-5)\n                        end\n                        if <key (up arrow v) pressed?> then\n                            if <(Xvelocity) > [0]> then\n                                set [xvelocity v] to [-5]\n                            else\n                                set [xvelocity v] to [5]\n                            end\n                            if <not <(Captured) = [1]>> then\n                                set [yvelocity v] to [10]\n                            end\n                        else\n                            set [xvelocity v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yvelocity v] by (-1)\n    change y by (Yvelocity)\n    if <<touching (ground v)?> or <touching (items v)?>> then\n        change y by ((Yvelocity) * (-1))\n        set [yvelocity v] to [0]\n    end\n    change y by (-1)\n    if <<touching (ground v)?> or <touching (items v)?>> then\n        if <not <<([costume # v] of [costumes v]) > [1]> and <[19] > ([costume # v] of [costumes v])>>> then\n            if <key (up arrow v) pressed?> then\n                if <not <(Captured) = [1]>> then\n                    set [yvelocity v] to [16]\n                    broadcast (Jumped v)\n                end\n            end\n        end\n    end\n    if <(Captured) = [1]> then\n        set [xvelocity v] to [0]\n        if <[0] < (Yvelocity)> then\n            set [yvelocity v] to [0]\n        end\n    end\n    change y by (1)\n    change [scrollx v] by ((x position) * (-1))\n    change [scrolly v] by ((y position) * (-1))\nend\n\nwhen flag clicked\nforever\nend\n\nwhen flag clicked\nforever\n    if <(Captured) = [1]> then\n        change [stamina v] by (-1)\n        wait until <(Captured) = [0]>\n    end\n    if <touching (boss v)?> then\n        change [stamina v] by (-1)\n        wait until <not <touching (boss v)?>>\n    end\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    if <(scrollX) > [2313]> then\n        broadcast (You win! v)\n    end\nend\n\n@Ground\n\nwhen flag clicked\nset [clones v] to [0]\nhide\nswitch costume to (costume2 v)\nset size to (400) %\nrepeat (25)\n    change [clones v] by (1)\n    create clone of (_myself_ v)\nend\nchange [totalclones v] by (Clones)\n\nwhen I start as a clone\nshow\nif <(Clones) = [1]> then\n    switch costume to (costume1 v)\n    forever\n        set x to ((scrollX) + ((480) * ((0) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [2]> then\n    switch costume to (costume3 v)\n    forever\n        set x to ((scrollX) + ((480) * ((1) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [3]> then\n    switch costume to (costume4 v)\n    forever\n        set x to ((scrollX) + ((480) * ((2) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [4]> then\n    switch costume to (costume5 v)\n    forever\n        set x to ((scrollX) + ((480) * ((3) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [5]> then\n    switch costume to (costume6 v)\n    forever\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [6]> then\n    switch costume to (mine v)\n    forever\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((-1) * (4))))\n    end\nend\nif <(Clones) = [7]> then\n    switch costume to (costume8 v)\n    forever\n        set x to ((scrollX) + ((480) * ((5) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [8]> then\n    switch costume to (costume9 v)\n    forever\n        set x to ((scrollX) + ((480) * ((5) * (4))))\n        set y to ((scrollY) + ((360) * ((-1) * (4))))\n    end\nend\nif <(Clones) = [9]> then\n    switch costume to (costume10 v)\n    forever\n        set x to ((scrollX) + ((480) * ((6) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [10]> then\n    switch costume to (costume11 v)\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [11]> then\n    switch costume to (costume12 v)\n    forever\n        set x to ((scrollX) + ((480) * ((8) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [12]> then\n    switch costume to (costume13 v)\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((-1) * (4))))\n    end\nend\nif <(Clones) = [13]> then\n    switch costume to (costume14 v)\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((-2) * (4))))\n    end\nend\nif <(Clones) = [14]> then\n    switch costume to (costume15 v)\n    forever\n        set x to ((scrollX) + ((480) * ((8) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Clones) = [15]> then\n    switch costume to (costume16 v)\n    forever\n        set x to ((scrollX) + ((480) * ((8) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Clones) = [16]> then\n    switch costume to (leapofaith v)\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Clones) = [17]> then\n    switch costume to (costume7 v)\n    forever\n        set x to ((scrollX) + ((480) * ((-1) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Clones) = [18]> then\n    switch costume to (grow area v)\n    forever\n        set x to ((scrollX) + ((480) * ((6) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Clones) = [19]> then\n    switch costume to (grow area2 v)\n    forever\n        set x to ((scrollX) + ((480) * ((5) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Clones) = [20]> then\n    switch costume to (grow area3 v)\n    forever\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Clones) = [21]> then\n    switch costume to (grow area4 v)\n    forever\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Clones) = [22]> then\n    switch costume to (costume17 v)\n    forever\n        set x to ((scrollX) + ((480) * ((0) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Clones) = [23]> then\n    switch costume to (costume18 v)\n    forever\n        set x to ((scrollX) + ((480) * ((3) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\n\n@ScrollFrame\n\nwhen flag clicked\nwait (3) seconds\nforever\n    go to [front v] layer\nend\n\nwhen I receive [game over v]\nstop [other scripts in sprite v]\n\nwhen I receive [you win! v]\nstop [other scripts in sprite v]\n\n@Items\n\nwhen flag clicked\ndelete all of [puzzles solved v]\nset [items v] to [0]\nset size to (400) %\nswitch costume to (costume1 v)\nhide\nrepeat (10)\n    change [items v] by (1)\n    create clone of (_myself_ v)\nend\nchange [totalclones v] by (Items)\n\nwhen I start as a clone\nshow\nif <(Items) = [1]> then\n    switch costume to (door in mine v)\n    go to [back v] layer\n    forever\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((-1) * (4))))\n        if <[puzzles solved v] contains [Vault]?> then\n            repeat (25)\n                change [ghost v] effect by (4)\n            end\n            hide\n            delete this clone\n        end\n    end\nend\nif <(Items) = [2]> then\n    switch costume to (key v)\n    go to [back v] layer\n    forever\n        set x to ((scrollX) + ((480) * ((5) * (4))))\n        set y to ((scrollY) + (((360) * ((-1) * (4))) + (Hover)))\n        set [brightness v] effect to (Hover)\n        if <touching (hitbox v)?> then\n            add [Key] to [inventory v]\n            broadcast (Artifact Collected! v)\n            repeat (25)\n                change [ghost v] effect by (4)\n            end\n            hide\n            delete this clone\n        end\n    end\nend\nif <(Items) = [3]> then\n    switch costume to (costume2 v)\n    go to [back v] layer\n    forever\n        set x to ((scrollX) + ((480) * ((8) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n        if <[puzzles solved v] contains [Key]?> then\n            repeat (25)\n                change [ghost v] effect by (4)\n            end\n            hide\n            delete this clone\n        end\n    end\nend\nif <(Items) = [4]> then\n    switch costume to (grow panel v)\n    go to [back v] layer\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n        if <[puzzles solved v] contains [Grow]?> then\n            repeat (25)\n                change [ghost v] effect by (4)\n            end\n            hide\n            delete this clone\n        end\n    end\nend\nif <(Items) = [5]> then\n    switch costume to (costume3 v)\n    go to [back v] layer\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + (((360) * ((-2) * (4))) + (Hover)))\n        set [brightness v] effect to (Hover)\n        if <touching (hitbox v)?> then\n            add [Useless Bone] to [inventory v]\n            broadcast (Artifact Collected! v)\n            repeat (25)\n                change [ghost v] effect by (4)\n            end\n            hide\n            delete this clone\n        end\n    end\nend\nif <(Items) = [6]> then\n    switch costume to (costume4 v)\n    forever\n        set x to ((scrollX) + ((480) * ((0) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n        if <[puzzles solved v] contains [Global]?> then\n            repeat (25)\n                change [ghost v] effect by (4)\n            end\n            hide\n            delete this clone\n        end\n    end\nend\n\nwhen flag clicked\nset [hover v] to [0]\nrepeat (5)\n    change [hover v] by (1)\nend\nrepeat (3)\n    change [hover v] by (0.5)\nend\nrepeat (2)\n    change [hover v] by (0.25)\nend\nrepeat (2)\n    change [hover v] by (0)\nend\nforever\n    repeat (4)\n        change [hover v] by (-0.25)\n    end\n    repeat (6)\n        change [hover v] by (-0.5)\n    end\n    repeat (10)\n        change [hover v] by (-1)\n    end\n    repeat (6)\n        change [hover v] by (-0.5)\n    end\n    repeat (4)\n        change [hover v] by (-0.25)\n    end\n    repeat (2)\n        change [hover v] by (0)\n    end\n    repeat (4)\n        change [hover v] by (0.25)\n    end\n    repeat (6)\n        change [hover v] by (0.5)\n    end\n    repeat (10)\n        change [hover v] by (1)\n    end\n    repeat (6)\n        change [hover v] by (0.5)\n    end\n    repeat (4)\n        change [hover v] by (0.25)\n    end\n    repeat (2)\n        change [hover v] by (0)\n    end\nend\n\n@Sensors\n\nwhen I start as a clone\nif <(Sensors) = [1]> then\n    forever\n        if <touching (hitbox v)?> then\n            if <key (x v) pressed?> then\n                ask [3 digit passcode] and wait\n                if <(answer) = [135]> then\n                    add [Vault] to [puzzles solved v]\n                    delete this clone\n                end\n            end\n        end\n    end\nend\nif <(Sensors) = [2]> then\n    forever\n        if <touching (hitbox v)?> then\n            if <key (x v) pressed?> then\n                if <[inventory v] contains [Key]?> then\n                    add [Key] to [puzzles solved v]\n                    delete this clone\n                end\n            end\n        end\n    end\nend\nif <(Sensors) = [3]> then\n    forever\n        if <touching (hitbox v)?> then\n            if <key (x v) pressed?> then\n                ask [4 letter passcode \(lowercase\)] and wait\n                if <(answer) = [grow]> then\n                    add [Grow] to [puzzles solved v]\n                    delete this clone\n                end\n            end\n        end\n    end\nend\nif <(Sensors) = [4]> then\n    forever\n        if <touching (hitbox v)?> then\n            if <key (x v) pressed?> then\n                ask [Password?] and wait\n                if <(answer) = [Global]> then\n                    add [Global] to [puzzles solved v]\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Sensors) = [1]> then\n    switch costume to (costume2 v)\n    go to [back v] layer\n    forever\n        set [ghost v] effect to (100)\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((-1) * (4))))\n    end\nend\nif <(Sensors) = [2]> then\n    switch costume to (costume3 v)\n    go to [back v] layer\n    forever\n        set [ghost v] effect to (100)\n        set x to ((scrollX) + ((480) * ((8) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Sensors) = [3]> then\n    switch costume to (costume4 v)\n    go to [back v] layer\n    forever\n        set [ghost v] effect to (100)\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Sensors) = [4]> then\n    switch costume to (costume5 v)\n    go to [back v] layer\n    forever\n        set [ghost v] effect to (100)\n        set x to ((scrollX) + ((480) * ((0) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\n\nwhen flag clicked\nset [sensors v] to [0]\nswitch costume to (costume1 v)\nset size to (400) %\nrepeat (4)\n    change [sensors v] by (1)\n    create clone of (_myself_ v)\nend\nchange [totalclones v] by (Sensors)\n\n@BackGround\n\nwhen flag clicked\nset [back v] to [0]\nhide\nswitch costume to (costume2 v)\nset size to (400) %\nrepeat (26)\n    change [back v] by (1)\n    create clone of (_myself_ v)\nend\nset [totalclones v] to (Back)\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nif <(Back) = [1]> then\n    switch costume to (costume1 v)\n    forever\n        set x to ((scrollX) + ((480) * ((0) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [2]> then\n    switch costume to (costume3 v)\n    forever\n        set x to ((scrollX) + ((480) * ((1) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [3]> then\n    switch costume to (costume4 v)\n    forever\n        set x to ((scrollX) + ((480) * ((2) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [4]> then\n    switch costume to (costume5 v)\n    forever\n        set x to ((scrollX) + ((480) * ((3) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [5]> then\n    switch costume to (costume6 v)\n    forever\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [6]> then\n    switch costume to (mine v)\n    forever\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((-1) * (4))))\n    end\nend\nif <(Back) = [7]> then\n    switch costume to (costume8 v)\n    forever\n        set x to ((scrollX) + ((480) * ((5) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [8]> then\n    switch costume to (costume9 v)\n    forever\n        set x to ((scrollX) + ((480) * ((5) * (4))))\n        set y to ((scrollY) + ((360) * ((-1) * (4))))\n    end\nend\nif <(Back) = [9]> then\n    switch costume to (costume10 v)\n    forever\n        set x to ((scrollX) + ((480) * ((6) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [10]> then\n    switch costume to (costume11 v)\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [11]> then\n    switch costume to (costume12 v)\n    forever\n        set x to ((scrollX) + ((480) * ((8) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [12]> then\n    switch costume to (costume13 v)\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((-1) * (4))))\n    end\nend\nif <(Back) = [13]> then\n    switch costume to (costume14 v)\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((-2) * (4))))\n    end\nend\nif <(Back) = [14]> then\n    switch costume to (costume15 v)\n    forever\n        set x to ((scrollX) + ((480) * ((8) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Back) = [15]> then\n    switch costume to (costume16 v)\n    forever\n        set x to ((scrollX) + ((480) * ((8) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Back) = [16]> then\n    switch costume to (leapofaith v)\n    forever\n        set x to ((scrollX) + ((480) * ((7) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Back) = [17]> then\n    switch costume to (costume7 v)\n    forever\n        set x to ((scrollX) + ((480) * ((-1) * (4))))\n        set y to ((scrollY) + ((360) * ((0) * (4))))\n    end\nend\nif <(Back) = [18]> then\n    switch costume to (costume17 v)\n    forever\n        set x to ((scrollX) + ((480) * ((6) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Back) = [19]> then\n    switch costume to (costume19 v)\n    forever\n        set x to ((scrollX) + ((480) * ((5) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Back) = [20]> then\n    switch costume to (costume20 v)\n    forever\n        set x to ((scrollX) + ((480) * ((1) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Back) = [21]> then\n    switch costume to (costume20 v)\n    forever\n        set x to ((scrollX) + ((480) * ((2) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Back) = [21]> then\n    switch costume to (costume20 v)\n    forever\n        set x to ((scrollX) + ((480) * ((2) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Back) = [22]> then\n    switch costume to (costume20 v)\n    forever\n        set x to ((scrollX) + ((480) * ((3) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Back) = [23]> then\n    switch costume to (costume21 v)\n    forever\n        set x to ((scrollX) + ((480) * ((0) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Back) = [24]> then\n    switch costume to (costume20 v)\n    forever\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((1) * (4))))\n    end\nend\nif <(Back) = [25]> then\n    switch costume to (costume22 v)\n    forever\n        set x to ((scrollX) + ((480) * ((4) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\nif <(Back) = [26]> then\n    switch costume to (costume22 v)\n    forever\n        set x to ((scrollX) + ((480) * ((5) * (4))))\n        set y to ((scrollY) + ((360) * ((2) * (4))))\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nwait (3) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\n@Sprite2\n\nwhen flag clicked\nhide variable [last collected v]\ngo to x: (0) y: (150)\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [artifact collected! v]\nset [last collected v] to (item (length of [inventory v]) of [inventory v])\nshow\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nshow variable [last collected v]\nrepeat (5)\n    set [brightness v] effect to (20)\n    wait (0.1) seconds\n    set [brightness v] effect to (0)\n    wait (0.1) seconds\nend\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nhide variable [last collected v]\nhide\n\n@Enemies\n\nwhen flag clicked\nset [totalclones v] to [0]\nset [stamina v] to [50]\nset [touchingenemy v] to [0]\nset [enemies v] to [0]\nset [captured v] to [0]\nhide\nrepeat (60)\n    change [enemies v] by (1)\n    create clone of (_myself_ v)\nend\nchange [totalclones v] by (Enemies)\n\nwhen I start as a clone\ngo to x: (0) y: (0)\nset rotation style [left-right v]\nshow\nswitch costume to (costume1 v)\nif <(Enemies) = [1]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (50))\n        set y to ((scrollY) + ((-452) - (15)))\n    end\nend\nif <(Enemies) = [2]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (250))\n        set y to ((scrollY) + ((-452) - (15)))\n    end\nend\nif <(Enemies) = [3]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (500))\n        set y to ((scrollY) + ((-452) - (15)))\n    end\nend\nif <(Enemies) = [4]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (2185))\n        set y to ((scrollY) + ((-289) - (15)))\n    end\nend\nif <(Enemies) = [5]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (3572))\n        set y to ((scrollY) + ((-289) - (15)))\n    end\nend\nif <(Enemies) = [6]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (3855))\n        set y to ((scrollY) + ((-167) - (15)))\n    end\nend\nif <(Enemies) = [7]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (4625))\n        set y to ((scrollY) + ((-165) - (15)))\n    end\nend\nif <(Enemies) = [8]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (4787))\n        set y to ((scrollY) + ((-165) - (15)))\n    end\nend\nif <(Enemies) = [9]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (4994))\n        set y to ((scrollY) + ((-165) - (15)))\n    end\nend\nif <(Enemies) = [10]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (5695))\n        set y to ((scrollY) + ((-309) - (15)))\n    end\nend\nif <(Enemies) = [11]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (5826))\n        set y to ((scrollY) + ((-283) - (15)))\n    end\nend\nif <(Enemies) = [12]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (6213))\n        set y to ((scrollY) + ((-441) - (15)))\n    end\nend\nif <(Enemies) = [13]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (6523))\n        set y to ((scrollY) + ((-503) - (15)))\n    end\nend\nif <(Enemies) = [14]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (6757))\n        set y to ((scrollY) + ((-509) - (15)))\n    end\nend\nif <(Enemies) = [15]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (7362))\n        set y to ((scrollY) + ((-183) - (15)))\n    end\nend\nif <(Enemies) = [16]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (7029))\n        set y to ((scrollY) + ((-994) - (15)))\n    end\nend\nif <(Enemies) = [17]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8109))\n        set y to ((scrollY) + ((-1228) - (15)))\n    end\nend\nif <(Enemies) = [18]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8309))\n        set y to ((scrollY) + ((-882) - (15)))\n    end\nend\nif <(Enemies) = [19]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8428))\n        set y to ((scrollY) + ((-882) - (15)))\n    end\nend\nif <(Enemies) = [20]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8032))\n        set y to ((scrollY) + ((-1388) - (15)))\n    end\nend\nif <(Enemies) = [21]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (7897))\n        set y to ((scrollY) + ((-1388) - (15)))\n    end\nend\nif <(Enemies) = [22]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (7186))\n        set y to ((scrollY) + ((-1402) - (15)))\n    end\nend\nif <(Enemies) = [23]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (7240))\n        set y to ((scrollY) + ((-1961) - (15)))\n    end\nend\nif <(Enemies) = [24]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (7240))\n        set y to ((scrollY) + ((-1961) - (15)))\n    end\nend\nif <(Enemies) = [25]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8761))\n        set y to ((scrollY) + ((-1961) - (15)))\n    end\nend\nif <(Enemies) = [26]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8860))\n        set y to ((scrollY) + ((-1961) - (15)))\n    end\nend\nif <(Enemies) = [27]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8959))\n        set y to ((scrollY) + ((-1961) - (15)))\n    end\nend\nif <(Enemies) = [28]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (7796))\n        set y to ((scrollY) + ((-265) - (15)))\n    end\nend\nif <(Enemies) = [29]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8192))\n        set y to ((scrollY) + ((451) - (15)))\n    end\nend\nif <(Enemies) = [30]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8300))\n        set y to ((scrollY) + ((-451) - (15)))\n    end\nend\nif <(Enemies) = [31]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8246))\n        set y to ((scrollY) + ((-449) - (15)))\n    end\nend\nif <(Enemies) = [32]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8984))\n        set y to ((scrollY) + ((-487) - (15)))\n    end\nend\nif <(Enemies) = [33]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (10595))\n        set y to ((scrollY) + ((-206) - (15)))\n    end\nend\nif <(Enemies) = [34]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (12565))\n        set y to ((scrollY) + ((-202) - (15)))\n    end\nend\nif <(Enemies) = [35]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (12862))\n        set y to ((scrollY) + ((-202) - (15)))\n    end\nend\nif <(Enemies) = [36]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (12952))\n        set y to ((scrollY) + ((72) - (15)))\n    end\nend\nif <(Enemies) = [37]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (14143))\n        set y to ((scrollY) + ((88) - (15)))\n    end\nend\nif <(Enemies) = [38]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (14269))\n        set y to ((scrollY) + ((88) - (15)))\n    end\nend\nif <(Enemies) = [39]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (14902))\n        set y to ((scrollY) + ((378) - (15)))\n    end\nend\nif <(Enemies) = [40]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (15055))\n        set y to ((scrollY) + ((378) - (15)))\n    end\nend\nif <(Enemies) = [41]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (14992))\n        set y to ((scrollY) + ((378) - (15)))\n    end\nend\nif <(Enemies) = [42]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (15785))\n        set y to ((scrollY) + ((2433) - (15)))\n    end\nend\nif <(Enemies) = [43]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (15722))\n        set y to ((scrollY) + ((2433) - (15)))\n    end\nend\nif <(Enemies) = [44]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (14984))\n        set y to ((scrollY) + ((2413) - (15)))\n    end\nend\nif <(Enemies) = [45]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (13265))\n        set y to ((scrollY) + ((2413) - (15)))\n    end\nend\nif <(Enemies) = [46]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (13130))\n        set y to ((scrollY) + ((2413) - (15)))\n    end\nend\nif <(Enemies) = [47]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (12536))\n        set y to ((scrollY) + ((2413) - (15)))\n    end\nend\nif <(Enemies) = [48]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (12113))\n        set y to ((scrollY) + ((2413) - (15)))\n    end\nend\nif <(Enemies) = [49]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (11987))\n        set y to ((scrollY) + ((2413) - (15)))\n    end\nend\nif <(Enemies) = [50]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (10214))\n        set y to ((scrollY) + ((2413) - (15)))\n    end\nend\nif <(Enemies) = [51]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (9215))\n        set y to ((scrollY) + ((2413) - (15)))\n    end\nend\nif <(Enemies) = [52]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (8630))\n        set y to ((scrollY) + ((2416) - (15)))\n    end\nend\nif <(Enemies) = [53]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (6461))\n        set y to ((scrollY) + ((757) - (15)))\n    end\nend\nif <(Enemies) = [54]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (6302))\n        set y to ((scrollY) + ((757) - (15)))\n    end\nend\nif <(Enemies) = [55]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (5546))\n        set y to ((scrollY) + ((757) - (15)))\n    end\nend\nif <(Enemies) = [56]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (4790))\n        set y to ((scrollY) + ((757) - (15)))\n    end\nend\nif <(Enemies) = [57]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (3638))\n        set y to ((scrollY) + ((757) - (15)))\n    end\nend\nif <(Enemies) = [58]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (2603))\n        set y to ((scrollY) + ((757) - (15)))\n    end\nend\nif <(Enemies) = [59]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (1451))\n        set y to ((scrollY) + ((757) - (15)))\n    end\nend\nif <(Enemies) = [60]> then\n    forever\n        point towards (hitbox v)\n        set x to ((scrollX) + (6))\n        set y to ((scrollY) + ((757) - (15)))\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(distance to [costumes v]) < [100]> then\n        wait (0.01) seconds\n        next costume\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (costumes v)?> then\n        if <not <<([costume # v] of [costumes v]) < [19]> and <([costume # v] of [costumes v]) > [10]>>> then\n            if <<(costume [number v]) < [8]> and <(costume [number v]) > [5]>> then\n                set [captured v] to [1]\n            else\n                if <not <touching (costumes v)?>> then\n                    set [captured v] to [0]\n                end\n                set [captured v] to [0]\n            end\n        else\n            set [enemyboomx v] to (x position)\n            broadcast (Hit v)\n            set [enemyboomy v] to (y position)\n            set [captured v] to [0]\n            delete this clone\n        end\n    else\n        if <(TouchingEnemy) = [0]> then\n            set [captured v] to [0]\n        end\n    end\nend\n\nset [color v] effect to (30)\n\nwhen I start as a clone\n\n@Boss\n\nwhen flag clicked\nhide variable [boss lives v]\nshow\nswitch costume to (costume4 v)\nset [ghost v] effect to (100)\nset rotation style [left-right v]\nset size to (1000) %\nforever\n    set x to ((scrollX) + (-1855))\n    point towards (hitbox v)\n    set y to (((scrollY) + (-452)) + (15))\n    if <touching (hitbox v)?> then\n        change [xvelocity v] by (1)\n    end\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nshow\nif <(costume [number v]) = [1]> then\n    forever\n        set x to ((scrollX) + (-1855))\n        point towards (hitbox v)\n        set y to (((scrollY) + (-452)) + (15))\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [4]> then\n    switch costume to (costume6 v)\n    go to [front v] layer\n    repeat (25)\n        change [ghost v] effect by (4)\n        set x to ((scrollX) + (-1845))\n        set [move v] to (direction)\n        point towards (hitbox v)\n        set y to (((scrollY) + (-452)) + (20))\n        change size by (1000)\n    end\n    set [move v] to [0]\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    forever\n        if <(distance to [hitbox v]) < [300]> then\n            switch costume to (costume4 v)\n            wait (1.75) seconds\n            repeat (3)\n                wait (0.04) seconds\n                next costume\n            end\n            create clone of (_myself_ v)\n            wait (0.4) seconds\n            repeat (3)\n                wait (0.04) seconds\n                switch costume to ((costume [number v]) - (1))\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    forever\n        wait until <(distance to [hitbox v]) < [300]>\n        broadcast (Boss Battle v)\n        show variable [boss lives v]\n    end\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    set [boss lives v] to [5]\n    forever\n        if <touching (costumes v)?> then\n            if <<([costume # v] of [costumes v]) < [19]> and <([costume # v] of [costumes v]) > [10]>> then\n                change [boss lives v] by (-1)\n                broadcast (BossHurt v)\n                set [bossx v] to (x position)\n                set [bossy v] to (y position)\n                wait until <not <<([costume # v] of [costumes v]) < [19]> and <([costume # v] of [costumes v]) > [10]>>>\n            end\n        end\n    end\nend\n\nwhen I receive [bossdown v]\nhide\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    forever\n        if <(Boss lives) = [0]> then\n            stop [other scripts in sprite v]\n            broadcast (BossDown v)\n            hide variable [boss lives v]\n            change [boss lives v] by (-1)\n            set [bossx v] to (x position)\n            set [bossy v] to (y position)\n        end\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\ncreate clone of (_myself_ v)\n\n@Sprite3\n\nwhen flag clicked\nwait (1) seconds\ngo to x: (-210) y: (147)\nforever\n    if <(length of (Stamina)) = [1]> then\n        switch costume to (Stamina)\n    end\n    if <(length of (Stamina)) = [2]> then\n        switch costume to (letter (1) of (Stamina))\n    end\n    if <(letter (1) of (Stamina)) = [0]> then\n        switch costume to (costume10 v)\n    else\n        switch costume to (letter (1) of (Stamina))\n    end\n    if <<(Stamina) < [0]> or <(Stamina) = [0]>> then\n        set [stamina v] to [0]\n        broadcast (GAME OVER v)\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nchange x by (15)\nforever\n    if <(letter (2) of (Stamina)) = [0]> then\n        switch costume to (costume10 v)\n    else\n        switch costume to (letter (2) of (Stamina))\n    end\n    if <(length of (Stamina)) = [1]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    if <(length of (Stamina)) = [2]> then\n        create clone of (_myself_ v)\n        wait until <not <(length of (Stamina)) = [2]>>\n        delete this clone\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\nwhen I receive [game over v]\nwait (2) seconds\ngo to [front v] layer\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nstop [all v]\n\n@Sprite5\n\nwhen I receive [hit v]\nrepeat (6)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to x: (EnemyBoomX) y: (EnemyBoomY)\npoint in direction (pick random (1) to (360))\nrepeat (5)\n    move (10) steps\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\n@Sprite6\n\nwhen I receive [bossdown v]\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to x: (BossX) y: (BossY)\npoint in direction (pick random (1) to (360))\nrepeat (5)\n    move (10) steps\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [bosshurt v]\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen I receive [you win! v]\ngo to [front v] layer\nshow\n\n