Wilderness - A platformer [v1.6]
@Stage\n\nwhen flag clicked\nswitch costume to (e v)\n\nwhen I receive [next level v]\npoint in direction (90)\nhide\nif <(The Level) = [6]> then\n    show\n    switch costume to (e v)\nelse\n    if <(The Level) = [11]> then\n        show\n    else\n        if <(The Level) = [16]> then\n            show\n            switch costume to (e3 v)\n        else\n            if <(The Level) = [21]> then\n                show\n                switch costume to (e2 v)\n            else\n                if <(The Level) = [26]> then\n                    switch costume to (e v)\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (a2 v)\n\n@Intro\n\nwhen flag clicked\n\nwhen [space v] key pressed\nif <not <(costume [name v]) = [costume1]>> then\n    go to [front v] layer\n    go [backward v] (1) layers\n    if <key (c v) pressed?> then\n        wait until <not <<key (c v) pressed?> and <key (space v) pressed?>>>\n        switch costume to (wwiv v)\n        hide\n        broadcast (Reset v)\n        set [the level v] to [1]\n        broadcast (Next Level v)\n        reset timer\n        show variable [timer v]\n        switch costume to (costume1 v)\n    else\n        wait until <not <key (space v) pressed?>>\n        repeat (20)\n            change [brightness v] effect by (5)\n        end\n        wait (0.05) seconds\n        next costume\n        repeat (20)\n            change [brightness v] effect by (-5)\n        end\n        if <(costume [number v]) = [9]> then\n            wait until <key (space v) pressed?>\n            wait until <not <key (space v) pressed?>>\n            repeat (20)\n                change [brightness v] effect by (5)\n            end\n            hide\n            broadcast (Reset v)\n            set [the level v] to [1]\n            reset timer\n            show variable [timer v]\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nswitch costume to (10 years ago v)\n\nset [ghost v] effect to (0)\n\nrepeat (160)\n    create clone of (snow v)\nend\n\nwait until <(Clone Count) < [46]>\n\nwhen flag clicked\nshow\nswitch costume to (10 years ago v)\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\n    set [timer v] to (timer)\nend\n\ngo to [front v] layer\n\nnext costume\n\ngo to [front v] layer\n\n@Achievements\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen [t v] key pressed\nwait until <not <key (t v) pressed?>>\nif <(costume [number v]) = [1]> then\n    hide list [list of achievements v]\n    switch costume to (costume2 v)\nelse\n    show list [list of achievements v]\n    switch costume to (costume1 v)\nend\n\n@Sun Ray\n\nwhen flag clicked\ngo to [back v] layer\npoint in direction (180)\nforever\n    turn right (0.5) degrees\n    go to [back v] layer\nend\n\n@Lava\n\nwhen flag clicked\nforever\n    set y to (Magma)\n    go to [back v] layer\n    switch costume to (The Level)\nend\n\nwhen flag clicked\nforever\n    set [magma v] to [0]\n    repeat (10)\n        change [magma v] by (1)\n    end\n    repeat (20)\n        change [magma v] by (-1)\n    end\n    repeat (10)\n        change [magma v] by (1)\n    end\nend\n\n@Player Trail\n\nwhen flag clicked\nshow\nforever\n    point in direction ([direction v] of [player v])\n    switch costume to ([costume name v] of [player v])\n    go to x: ([x position v] of [player v]) y: ([y position v] of [player v])\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nrepeat (10)\n    change [ghost v] effect by (21)\nend\ndelete this clone\n\nwhen I receive [scroll v]\nhide\ndelete this clone\n\n@Player\n\nwhen I receive [next level v]\nbroadcast (Reset v)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nif <(The Level) = [26]> then\n    go to x: (-55) y: (70)\nelse\n    go to x: (-200) y: (40)\nend\n\nwhen flag clicked\nset [the level v] to [1]\nbroadcast (Next Level v)\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        if <<(Speed Boost) = [1]> and <not <(The Level) = [18]>>> then\n            change [x velocity v] by (-1.7)\n        else\n            change [x velocity v] by (-1.5)\n        end\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        if <<(Speed Boost) = [1]> and <not <(The Level) = [18]>>> then\n            change [x velocity v] by (1.7)\n        else\n            change [x velocity v] by (1.5)\n        end\n    end\n    if <<(Speed Boost) = [1]> and <not <(The Level) = [18]>>> then\n        if <touching color (#b5ecff)?> then\n            set [x velocity v] to ((X Velocity) * (1.1))\n        else\n            if <touching (water v)?> then\n                set [x velocity v] to ((X Velocity) * (0.7))\n            else\n                set [x velocity v] to ((X Velocity) * (0.92))\n            end\n        end\n    else\n        if <touching color (#b5ecff)?> then\n            set [x velocity v] to ((X Velocity) * (1))\n        else\n            if <touching (water v)?> then\n                set [x velocity v] to ((X Velocity) * (0.6))\n            else\n                set [x velocity v] to ((X Velocity) * (0.85))\n            end\n        end\n    end\n    change x by (X Velocity)\n    if <touching (roof v)?> then\n        change y by (-1)\n    end\n    if <touching (roof v)?> then\n        change y by (-1)\n    end\n    if <touching (roof v)?> then\n        change y by (-1)\n    end\n    if <touching (roof v)?> then\n        change y by (-1)\n    end\n    if <touching (roof v)?> then\n        change y by (4)\n        change x by ((X Velocity) * (1))\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            if <<(Jump Boost) = [1]> and <not <(The Level) = [18]>>> then\n                if <(X Velocity) > [0]> then\n                    set [x velocity v] to [4]\n                else\n                    set [x velocity v] to [-4]\n                end\n                set [y velocity v] to [-5]\n            else\n                if <(X Velocity) > [0]> then\n                    set [x velocity v] to [4]\n                else\n                    set [x velocity v] to [-4]\n                end\n                set [y velocity v] to [-4]\n            end\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            if <<(Jump Boost) = [1]> and <not <(The Level) = [18]>>> then\n                if <(X Velocity) > [0]> then\n                    if <touching (water v)?> then\n                        set [x velocity v] to [-4]\n                    else\n                        set [x velocity v] to [-10]\n                    end\n                else\n                    if <touching (water v)?> then\n                        set [x velocity v] to [4]\n                    else\n                        set [x velocity v] to [10]\n                    end\n                end\n                if <touching (water v)?> then\n                    set [y velocity v] to [5]\n                else\n                    set [y velocity v] to [20]\n                end\n            else\n                if <(X Velocity) > [0]> then\n                    if <touching (water v)?> then\n                        set [x velocity v] to [-4]\n                    else\n                        set [x velocity v] to [-10]\n                    end\n                else\n                    if <touching (water v)?> then\n                        set [x velocity v] to [4]\n                    else\n                        set [x velocity v] to [10]\n                    end\n                end\n                if <touching (water v)?> then\n                    set [y velocity v] to [4]\n                else\n                    set [y velocity v] to [15]\n                end\n            end\n        else\n            set [x velocity v] to [0]\n        end\n    end\n    if <touching (bounce v)?> then\n        set [y velocity v] to [20]\n    end\n    if <touching (water v)?> then\n        change [y velocity v] by (-0.1)\n        change y by (Y Velocity)\n    else\n        change [y velocity v] by (-1)\n        change y by (Y Velocity)\n    end\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n        if <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n            if <touching (water v)?> then\n                change y by (-0.1)\n            else\n                switch costume to (crouch v)\n            end\n        else\n            switch costume to (player v)\n        end\n    end\n    if <<touching (water v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        change [y velocity v] by (0.5)\n        change y by (Y Velocity)\n    else\n        if <touching (water v)?> then\n            change y by (-0.1)\n        else\n            change y by (-1)\n        end\n    end\n    if <<touching (ground v)?> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <<(Jump Boost) = [1]> and <not <(The Level) = [18]>>> then\n            if <touching (water v)?> then\n                change [y velocity v] by (1)\n                change y by (Y Velocity)\n            else\n                set [y velocity v] to [22]\n            end\n        else\n            if <touching (water v)?> then\n                change [y velocity v] by (1)\n                change y by (Y Velocity)\n            else\n                set [y velocity v] to [15]\n            end\n        end\n    end\n    change y by (1)\n    if <(x position) > [239]> then\n        broadcast (Next Level v)\n        change [the level v] by (1)\n    end\n    if <not <(Fight Started???) = [1]>> then\n        if <touching (secret exit v)?> then\n            broadcast (Special Level v)\n        end\n        if <[-165] > (y position)> then\n            broadcast (Reset v)\n            create clone of (_myself_ v)\n        end\n        if <touching (spikes v)?> then\n            broadcast (Reset v)\n            create clone of (_myself_ v)\n        else\n            if <touching (lava v)?> then\n                broadcast (Reset v)\n                create clone of (_myself_ v)\n            end\n            if <touching (spikes v)?> then\n                broadcast (Reset v)\n                create clone of (_myself_ v)\n            end\n            if <touching color (#ff0000)?> then\n                broadcast (Reset v)\n                create clone of (_myself_ v)\n            end\n            if <<touching (arrow v)?> and <([costume # v] of [arrow v]) = [1]>> then\n                broadcast (Reset v)\n                create clone of (_myself_ v)\n            end\n            if <<touching (enemy sword v)?> and <(Enemy SAnimation) = [1]>> then\n                broadcast (Reset v)\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (5)\n    turn right (5) degrees\nend\ndelete this clone\n\nwhen I receive [reset v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nif <(The Level) = [26]> then\n    wait (0.05) seconds\n    if <(Random) = [1]> then\n        go to x: (0) y: (-138)\n    else\n        go to x: (0) y: (70)\n    end\nelse\n    go to x: (-200) y: (40)\nend\n\nwhen I receive [special level v]\nbroadcast (Reset v)\n\nwhen [f v] key pressed\n\nset [y velocity v] to [30]\n\nwhen [r v] key pressed\nwait until <not <key (r v) pressed?>>\nbroadcast (Reset v)\n\nchange [y velocity v] by (1)\nchange y by (Y Velocity)\n\nchange [y velocity v] by (1)\nchange y by (Y Velocity)\n\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\nif <touching (ground v)?> then\n    change y by (1)\nend\n\nchange x by ((X Velocity) * (-1))\n\nwhen [c v] key pressed\nif <<touching (water v)?> and <touching (ground v)?>> then\n    change y by (-4)\n    set [y velocity v] to [0]\n    set [x velocity v] to [0]\nend\n\nwhen I receive [fight v]\nforever\n    if <<touching (boss v)?> or <<touching (enemy sword2 v)?> or <<<touching (arrow3 v)?> or <touching (arrow4 v)?>> or <touching (arrow2 v)?>>>> then\n        go to x: (-55) y: (70)\n        change [player health v] by (-1)\n        if <(Player Health) < [1]> then\n            repeat (20)\n                change [ghost v] effect by (5)\n            end\n            broadcast (FaLiUrE v)\n        end\n    else\n    end\nend\n\nwhen I receive [next level v]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nif <(The Level) = [25]> then\n    go to x: (-55) y: (70)\nelse\n    go to x: (-200) y: (40)\nend\n\nbroadcast (Reset v)\n\ndefine Immunity\n\nImmunity\n\nset [ghost v] effect to (0)\nwait (0.5) seconds\nset [ghost v] effect to (100)\nwait (0.3) seconds\n\nset [ghost v] effect to (0)\n\nset [ghost v] effect to (100)\n\nrepeat (6)\n    change [ghost v] effect by (25)\nend\n\n\n\nwait (0.05) seconds\nif <(Random) = [1]> then\n    go to x: (0) y: (-138)\nelse\n    go to x: (0) y: (70)\nend\n\nrepeat (6)\n    turn left (15) degrees\nend\nglide (0.3) secs to x: (x position) y: ((y position) + (-17))\n\nif <(pick random (1) to (2)) = [1]> then\nelse\nend\n\nbroadcast (Ending 1 v)\n\nbroadcast (Ending 2 v)\n\n@Spikes\n\nwhen flag clicked\n\nwhen I receive [next level v]\nswitch costume to (The Level)\n\nwhen I receive [special level v]\nswitch costume to (costume2 v)\n\n@Ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [special level v]\nwait (0.01) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nswitch costume to (The Level)\n\nwhen I receive [cutscene  v]\nwait (0.01) seconds\nswitch costume to (costume2 v)\n\n@Roof\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [special level v]\nwait (0.01) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nswitch costume to (The Level)\n\n@Ground Hitbox\n\nwhen I receive [next level v]\nset [ghost v] effect to (100)\nswitch costume to (The Level)\n\nwhen I receive [special level v]\nwait (0.01) seconds\nswitch costume to (costume3 v)\n\nwhen I receive [fight v]\nwait (0.01) seconds\nswitch costume to (costume4 v)\n\n@Secret Level\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nforever\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\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 [special level v]\nwait (0.01) seconds\nhide\n\nwhen I receive [next level v]\nif <(The Level) = [4]> then\n    show\n    switch costume to (c v)\nelse\n    hide\n    switch costume to (a v)\nend\n\n@Pit Trap\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [special level v]\n\nwhen I receive [next level v]\nif <(The Level) = [20]> then\n    show\nelse\n    hide\nend\n\nwait (0.01) seconds\nswitch costume to (e v)\n\nswitch costume to (a v)\n\nwhen I receive [reset v]\nif <(The Level) = [20]> then\n    show\nelse\n    hide\nend\n\n@Ice\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [special level v]\n\nwhen I receive [next level v]\nif <(The Level) = [19]> then\n    show\n    switch costume to (e v)\nelse\n    if <(The Level) = [20]> then\n        switch costume to (e2 v)\n        show\n    else\n        hide\n    end\nend\n\nwait (0.01) seconds\n\nwhen I receive [reset v]\nif <(The Level) = [19]> then\n    show\n    switch costume to (e v)\nelse\n    if <(The Level) = [20]> then\n        switch costume to (e2 v)\n        show\n    else\n        hide\n    end\nend\n\n@Water\n\nwhen I receive [reset v]\ngo to [back v] layer\nif <(The Level) = [22]> then\n    show\n    switch costume to (costume2 v)\nelse\n    if <(The Level) = [23]> then\n        show\n        switch costume to (costume3 v)\n    else\n        hide\n    end\nend\n\nwhen I receive [next level v]\ngo to [back v] layer\nif <(The Level) = [22]> then\n    show\n    switch costume to (costume2 v)\nelse\n    if <(The Level) = [23]> then\n        show\n        switch costume to (costume3 v)\n    else\n        hide\n    end\nend\n\nif <(The Level) = [23]> then\n    switch costume to (e2 v)\n    show\nend\n\nif <(The Level) = [20]> then\n    switch costume to (e2 v)\n    show\nend\n\nset [ghost v] effect to (50)\n\nshow\nswitch costume to (costume2 v)\n\n@Secret Exit\n\nwhen flag clicked\ngo to x: (0) y: (0)\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 [next level v]\nif <(The Level) = [4]> then\n    show\n    switch costume to (c v)\nelse\n    hide\n    switch costume to (a v)\nend\n\nwhen I receive [special level v]\nwait (0.01) seconds\nhide\n\n@Orb Shard\n\nwhen flag clicked\nset [clone# v] to [0]\nset [orb shards v] to [0]\nhide variable [orb shards v]\n\nwhen I receive [special level v]\nhide\n\nwhen I start as a clone\nif <not <(Clone#) = [0]>> then\n    delete this clone\nelse\n    change [clone# v] by (1)\n    repeat until <touching (player v)?>\n        go to [back v] layer\n        show\n        go to x: (35) y: (0)\n        switch costume to (e2 v)\n        repeat until <touching (player v)?>\n            turn right (2) degrees\n        end\n        hide\n        broadcast (Got orb v)\n        change [clone# v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I receive [next level v]\npoint in direction (90)\nhide\nif <(The Level) = [5]> then\n    show\n    switch costume to (a2 v)\n    create clone of (_myself_ v)\nelse\n    if <(The Level) = [10]> then\n        show\n        switch costume to (a3 v)\n        create clone of (_myself_ v)\n    else\n        if <(The Level) = [15]> then\n            show\n            switch costume to (a4 v)\n            create clone of (_myself_ v)\n        else\n            if <(The Level) = [20]> then\n                show\n                switch costume to (a5 v)\n                create clone of (_myself_ v)\n            else\n                if <(The Level) = [25]> then\n                    show\n                    switch costume to (a6 v)\n                    create clone of (_myself_ v)\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (e2 v)\n\nwhen I receive [got orb v]\nswitch costume to (e v)\nset [clone# v] to [0]\nchange [orb shards v] by (1)\nshow variable [orb shards v]\nhide\nif <(The Level) = [25]> then\n    if <(Orb Shards) = [5]> then\n        change [the level v] by (1)\n        broadcast (Boss Fight v)\n    else\n        broadcast (FaLiUrE v)\n    end\nend\n\nwhen I receive [reset v]\nif <<(The Level) = [5]> and <(Orb Shards) = [0]>> then\n    show\n    switch costume to (a2 v)\n    if <(Clone#) = [0]> then\n        create clone of (_myself_ v)\n    else\n    end\nelse\n    if <<(The Level) = [10]> and <(Orb Shards) = [1]>> then\n        show\n        switch costume to (a3 v)\n        if <(Clone#) = [0]> then\n            create clone of (_myself_ v)\n        else\n        end\n    else\n        if <<(The Level) = [15]> and <(Orb Shards) = [2]>> then\n            show\n            switch costume to (a4 v)\n            if <(Clone#) = [0]> then\n                create clone of (_myself_ v)\n            else\n            end\n        else\n            if <<(The Level) = [20]> and <(Orb Shards) = [3]>> then\n                show\n                switch costume to (a2 v)\n                if <(Clone#) = [0]> then\n                    create clone of (_myself_ v)\n                end\n            else\n                if <(The Level) = [25]> then\n            end\n        end\n    end\nend\n\nswitch costume to (e2 v)\n\nwhen I start as a clone\nforever\n    go [backward v] (1) layers\n    switch costume to (e2 v)\nend\n\n@CAPtions\n\nwhen I receive [special level v]\nswitch costume to (e v)\n\nwhen I receive [next level v]\nshow\nswitch costume to (The Level)\n\nwhen I receive [cutscene  v]\nhide\n\nwhen flag clicked\nshow\nforever\n    go to [back v] layer\nend\n\nwhen I receive [cutscene  v]\n\n@Enemy\n\nwhen flag clicked\nshow\nset [enemies v] to [1]\ngo to x: (0) y: (-57)\nset y to (100)\nset [the level v] to [1]\nbroadcast (Next Level v)\n\nif <(x position) > [239]> then\n\ndefine Move Around (x min) (x max) (level) (ground y) (speed)\nwait until <(The Level) = (level)>\nset y to (100)\nset x to (((x max) + (x min)) / (2))\nrepeat until <(y position) = (ground y)>\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Enemy) * (-1))\n    end\n    change [y enemy v] by (-1)\n    change y by (Y Enemy)\n    if <touching (ground v)?> then\n        change y by ((Y Enemy) - ((Y Enemy) * (2)))\n        set [y enemy v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <touching (spikes v)?> then\nend\nwait until <(y position) = (ground y)>\nrepeat until <not <(The Level) = (level)>>\n    repeat until <((x position) + (1)) < (x min)>\n        change x by ((0) - ([abs v] of (speed) ))\n    end\n    repeat until <(x max) < ((x position) + (-1))>\n        change x by ([abs v] of (speed) )\n    end\nend\n\nwhen flag clicked\nMove Around [0] [150] [1] [-56] [2.5]\n\nglide (1) secs to x: (x min) y: (y position)\n\nMove Around [0] [150] [1] [-57] []\n\nif <(y position) = [-1]> then\n\nMove Around (x min) (x max) (level) (ground y) []\n\nif <not <(y position) = (mingroundy)>> then\n    repeat until <(y position) = (mingroundy)>\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((X Enemy) * (-1))\n        end\n        change [y enemy v] by (-1)\n        change y by (Y Enemy)\n        if <touching (ground v)?> then\n            change y by ((Y Enemy) - ((Y Enemy) * (2)))\n            set [y enemy v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n        if <touching (spikes v)?> then\n    end\n    wait until <(y position) = (mingroundy)>\n    repeat until <not <(The Level) = (level)>>\n        glide (1) secs to x: (x min) y: (y position)\n        glide (1) secs to x: (x max) y: (y position)\n    end\nend\nglide (1) secs to x: (x max) y: (y position)\n\nif <not <(y position) = (mingroundy)>> then\n    repeat until <(y position) = (mingroundy)>\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((X Enemy) * (-1))\n        end\n        change [y enemy v] by (-1)\n        change y by (Y Enemy)\n        if <touching (ground v)?> then\n            change y by ((Y Enemy) - ((Y Enemy) * (2)))\n            set [y enemy v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n        if <touching (spikes v)?> then\n    end\n    wait until <(y position) = (mingroundy)>\n    repeat until <not <(The Level) = (level)>>\n        glide (1) secs to x: (x min) y: (y position)\n        glide (1) secs to x: (x max) y: (y position)\n    end\nend\nglide (1) secs to x: (x max) y: (y position)\n\nwhen flag clicked\nforever\n    if <<<touching (player arrow v)?> and <([costume # v] of [player arrow v]) = [1]>> or <<<touching (sword v)?> and <(Sword Animation) = [1]>> or <<<touching (dagger v)?> and <(Dagger Being used?) = [1]>> or <touching (arrow hitbox v)?>>>> then\n        change [money v] by (1)\n        hide\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [next level v]\nhide\nswitch costume to (costume1 v)\nif <(The Level) = [6]> then\n    wait (0.1) seconds\n    show\n    Move Around [-50] [150] [6] [-58] [2.5]\nelse\n    if <(The Level) = [7]> then\n        wait (0.1) seconds\n        show\n        Move Around [0] [0] [7] [-58] [2.5]\n    end\nend\n\nwhen flag clicked\nwait (0.05) seconds\nforever\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Enemy) * (-1))\n    end\n    change [y enemy v] by (-1)\n    change y by (Y Enemy)\n    if <touching (ground v)?> then\n        change y by ((Y Enemy) - ((Y Enemy) * (2)))\n        set [y enemy v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <touching (bounce v)?> then\n        set [y enemy v] to [20]\n    end\n    if <touching (spikes v)?> then\nend\n\nshow\nMove Around [-50] [150] [6] [-58] [2.5]\n\nif <touching (bounce v)?> then\nend\n\nset [y velocity v] to [20]\n\nif <(The Level) = [23]> then\n    wait (0.1) seconds\n    show\n    Move Around [-130] [-130] [23] [-58] [2.5]\nend\n\nwhen I receive [reset v]\nhide\nswitch costume to (costume1 v)\nif <(The Level) = [6]> then\n    wait (0.1) seconds\n    show\n    Move Around [-50] [150] [6] [-58] [2.5]\nelse\n    if <(The Level) = [7]> then\n        wait (0.1) seconds\n        show\n        Move Around [0] [0] [7] [-58] [2.5]\n    end\nend\n\n@BOunce\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nforever\n    if <touching (sword trail v)?> then\n        hide\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\nrepeat until <[239] < ([x position v] of [player v])>\n    if <<touching (player v)?> or <touching (sniper v)?>> then\n        switch costume to (costume2 v)\n        wait until <not <<touching (player v)?> or <touching (sniper v)?>>>\n        wait (0.04) seconds\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\ndelete this clone\n\nwhen I receive [reset v]\npoint in direction (90)\nif <(The Level) = [17]> then\n    go to x: (11) y: (-71)\n    create clone of (_myself_ v)\nelse\n    if <(The Level) = [18]> then\n        wait (0.1) seconds\n        go to x: (0) y: (-71)\n        create clone of (_myself_ v)\n    else\n        if <(The Level) = [19]> then\n            wait (0.1) seconds\n            go to x: (-12) y: (-80)\n            create clone of (_myself_ v)\n        else\n        end\n    end\nend\n\npoint in direction (0)\n\nwhen I start as a clone\n\nwhen I receive [reset v]\npoint in direction (90)\nif <(The Level) = [18]> then\n    go to x: (-130) y: (-71)\n    create clone of (_myself_ v)\nelse\nend\n\npoint in direction (180)\n\nwhen I receive [reset v]\npoint in direction (90)\nif <(The Level) = [18]> then\n    wait (0.2) seconds\n    go to x: (130) y: (-71)\n    create clone of (_myself_ v)\n    go to x: (10000) y: (1000000)\n    go to [back v] layer\nelse\nend\n\nwhen [p v] key pressed\nwait until <not <key (p v) pressed?>>\nif <(username) = [kikiisacat]> then\n    broadcast (Next Level v)\n    change [the level v] by (1)\nend\n\nnext costume\n\nwhen I start as a clone\nforever\n    if <touching (sword trail v)?> then\n        delete this clone\n    end\nend\n\ngo to [back v] layer\n\nif <(The Level) = [23]> then\n    go to x: (0) y: (-71)\n    create clone of (_myself_ v)\nelse\nend\n\n@BOunce2\n\nwhen flag clicked\nset rotation style [all around v]\nswitch costume to (costume1 v)\nhide\nforever\n    if <touching (sword trail v)?> then\n        hide\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\nswitch costume to (costume1 v)\nshow\nrepeat until <[239] < ([x position v] of [player v])>\n    if <touching (player v)?> then\n        switch costume to (costume2 v)\n        wait until <not <touching (player v)?>>\n        wait (0.04) seconds\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\ndelete this clone\n\nwhen I receive [reset v]\npoint in direction (90)\nif <(The Level) = [19]> then\n    go to x: (-12) y: (-5)\n    create clone of (_myself_ v)\nend\n\npoint in direction (0)\n\nwhen I start as a clone\n\npoint in direction (180)\n\nnext costume\n\nwhen I start as a clone\nforever\n    if <touching (sword trail v)?> then\n        delete this clone\n    end\nend\n\ngo to [back v] layer\n\n@Sniper\n\nwhen flag clicked\nset [sniper health v] to [2]\nforever\n    if <<touching (player arrow v)?> or <<<touching (sword v)?> and <(Sword Animation) = [1]>> or <<touching (dagger v)?> and <(Dagger Being used?) = [1]>>>> then\n        if <(The Level) = [26]> then\n            change [sniper health v] by (-1)\n            if <(Sniper Health) < [1]> then\n                hide\n                switch costume to (costume2 v)\n            else\n            end\n        else\n            show variable [arrows v]\n            change [arrows v] by (1)\n            hide\n            switch costume to (costume2 v)\n        end\n    end\nend\n\nwhen I receive [next level v]\nhide\nswitch costume to (costume2 v)\nif <(The Level) = [7]> then\n    Spawn Sniper [107] [-58]\n    switch costume to (costume1 v)\n    show\nelse\n    if <(The Level) = [8]> then\n        Spawn Sniper [76] [128]\n        switch costume to (costume1 v)\n        show\n    else\n        if <(The Level) = [9]> then\n            Spawn Sniper [0] [-59]\n            switch costume to (costume1 v)\n            show\n        else\n            if <(The Level) = [15]> then\n                Spawn Sniper [-223] [92]\n                switch costume to (costume1 v)\n                show\n            else\n                if <(The Level) = [23]> then\n                    Spawn Sniper [0] [0]\n                    switch costume to (costume1 v)\n                    show\n                end\n            end\n        end\n    end\nend\n\ndefine Spawn Sniper (x) (y)\nshow\nswitch costume to (costume1 v)\ngo to x: (x) y: (y)\nset [snipers v] to [1]\nwait (0.05) seconds\nforever\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Velocity) * (-1))\n    end\n    change [y velocity v] by (-1)\n    change y by (Y Velocity)\n    if <touching (bounce v)?> then\n        set [y velocity v] to [15]\n    end\n    if <touching (ground v)?> then\n        change y by ((Y Velocity) - ((Y Velocity) * (2)))\n        set [y velocity v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <(x position) > [239]> then\n    if <touching (spikes v)?> then\nend\n\nif <touching (bounce v)?> then\n    set [y velocity v] to [20]\nend\n\nwhen I receive [reset v]\nhide\nswitch costume to (costume2 v)\nif <(The Level) = [7]> then\n    Spawn Sniper [107] [-58]\n    switch costume to (costume1 v)\n    show\nelse\n    if <(The Level) = [8]> then\n        Spawn Sniper [76] [128]\n        switch costume to (costume1 v)\n        show\n    else\n        if <(The Level) = [9]> then\n            Spawn Sniper [0] [-59]\n            switch costume to (costume1 v)\n            show\n        else\n            if <(The Level) = [15]> then\n                Spawn Sniper [-223] [92]\n                switch costume to (costume1 v)\n                show\n            else\n                if <(The Level) = [23]> then\n                    Spawn Sniper [0] [0]\n                    switch costume to (costume1 v)\n                    show\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [recruit someone v]\nhide\nswitch costume to (costume2 v)\nSpawn Sniper [0] [10]\nswitch costume to (costume1 v)\nshow\n\nif <(Sniper Health) < [1]> then\n    hide\n    switch costume to (costume2 v)\nelse\n    change [sniper health v] by (1)\nend\n\nshow variable [arrows v]\nchange [arrows v] by (1)\n\nshow variable [arrows v]\n\n@Sword Enemy\n\nwhen flag clicked\nshow\nset [enemies v] to [1]\ngo to x: (0) y: (-57)\nset y to (100)\nset [the level v] to [1]\nbroadcast (Next Level v)\nwait (0.05) seconds\nforever\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Enemy) * (-1))\n    end\n    change [y enemy v] by (-1)\n    change y by (Y Enemy)\n    if <touching (bounce v)?> then\n        set [y velocity v] to [20]\n    end\n    if <touching (ground v)?> then\n        change y by ((Y Enemy) - ((Y Enemy) * (2)))\n        set [y enemy v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <touching (spikes v)?> then\nend\n\nif <(x position) > [239]> then\n\ndefine Move Around Sword Enemy (x min) (x max) (level) (ground y) (speed) (skyy)\nset y to (skyy)\nshow\nwait until <(The Level) = (level)>\nset x to (((x max) + (x min)) / (2))\nrepeat until <(y position) = (ground y)>\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Enemy) * (-1))\n    end\n    change [y enemy v] by (-1)\n    change y by (Y Enemy)\n    if <touching (ground v)?> then\n        change y by ((Y Enemy) - ((Y Enemy) * (2)))\n        set [y enemy v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <touching (spikes v)?> then\nend\nwait until <(y position) = (ground y)>\nrepeat until <not <(The Level) = (level)>>\n    repeat until <((x position) + (1)) < (x min)>\n        change x by ((0) - ([abs v] of (speed) ))\n    end\n    repeat until <(x max) < ((x position) + (-1))>\n        change x by ([abs v] of (speed) )\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\n\nwhen flag clicked\nforever\n    if <<<touching (sword v)?> and <(Sword Animation) = [1]>> or <<touching (dagger v)?> and <(Dagger Being used?) = [1]>>> then\n        change [money v] by (1)\n        hide\n        set [enemy sanimation v] to [0]\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [next level v]\nwait (0.05) seconds\nif <(The Level) = [14]> then\n    show\n    Move Around Sword Enemy [-13] [-14] [14] [-56] [2.5] [-56]\nelse\n    if <(The Level) = [15]> then\n        show\n        Move Around Sword Enemy [-10] [66] [15] [-69] [2.5] [-69]\n    else\n        if <(The Level) = [16]> then\n            show\n            Move Around Sword Enemy [100] [100] [16] [-57] [2.5] [-57]\n        else\n            hide\n        end\n    end\nend\n\nwhen I receive [next level v]\n\nshow\n\nMove Around Sword Enemy [-13] [-56] [14] [-56] [2.5] []\n\nhide\n\nif <(The Level) = [14]> then\n    repeat until <not <(The Level) = [14]>>\n        if <(distance to [tumbleweed v]) < [101]> then\n            set [touching player??? v] to [0]\n        end\n    end\nend\n\nif <touching (bounce v)?> then\n    set [y velocity v] to [20]\nend\n\nwhen I receive [reset v]\nwait (0.05) seconds\nif <(The Level) = [14]> then\n    show\n    Move Around Sword Enemy [-13] [-14] [14] [-56] [2.5] [-56]\nelse\n    if <(The Level) = [15]> then\n        show\n        Move Around Sword Enemy [-10] [66] [15] [-69] [2.5] [-69]\n    else\n        if <(The Level) = [16]> then\n            show\n            Move Around Sword Enemy [100] [100] [16] [-57] [2.5] [-57]\n        else\n            hide\n        end\n    end\nend\n\n@Sword Enemy HTbox\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\nif <(x position) > [239]> then\n\ndefine Move Around (x min) (x max) (level) (ground y) (mingroundy) (speed)\nwait until <(The Level) = (level)>\nset x to (((x max) + (x min)) / (2))\nrepeat until <(y position) = (ground y)>\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Enemy) * (-1))\n    end\n    change [y enemy v] by (-1)\n    change y by (Y Enemy)\n    if <touching (ground v)?> then\n        change y by ((Y Enemy) - ((Y Enemy) * (2)))\n        set [y enemy v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <touching (spikes v)?> then\nend\nwait until <(y position) = (ground y)>\nrepeat until <not <(The Level) = (level)>>\n    repeat until <((x position) + (1)) < (x min)>\n        change x by ((0) - ([abs v] of (speed) ))\n    end\n    repeat until <(x max) < ((x position) + (-1))>\n        change x by ([abs v] of (speed) )\n    end\nend\n\nwhen flag clicked\nMove Around [0] [150] [1] [-1] [-57] [2.5]\n\nglide (1) secs to x: (x min) y: (y position)\n\nMove Around [0] [150] [1] [-57] [] []\n\nif <(y position) = [-1]> then\n\nMove Around (x min) (x max) (level) (ground y) (mingroundy) []\n\nif <not <(y position) = (mingroundy)>> then\n    repeat until <(y position) = (mingroundy)>\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((X Enemy) * (-1))\n        end\n        change [y enemy v] by (-1)\n        change y by (Y Enemy)\n        if <touching (ground v)?> then\n            change y by ((Y Enemy) - ((Y Enemy) * (2)))\n            set [y enemy v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n        if <touching (spikes v)?> then\n    end\n    wait until <(y position) = (mingroundy)>\n    repeat until <not <(The Level) = (level)>>\n        glide (1) secs to x: (x min) y: (y position)\n        glide (1) secs to x: (x max) y: (y position)\n    end\nend\nglide (1) secs to x: (x max) y: (y position)\n\nif <not <(y position) = (mingroundy)>> then\n    repeat until <(y position) = (mingroundy)>\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((X Enemy) * (-1))\n        end\n        change [y enemy v] by (-1)\n        change y by (Y Enemy)\n        if <touching (ground v)?> then\n            change y by ((Y Enemy) - ((Y Enemy) * (2)))\n            set [y enemy v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n        if <touching (spikes v)?> then\n    end\n    wait until <(y position) = (mingroundy)>\n    repeat until <not <(The Level) = (level)>>\n        glide (1) secs to x: (x min) y: (y position)\n        glide (1) secs to x: (x max) y: (y position)\n    end\nend\nglide (1) secs to x: (x max) y: (y position)\n\nwhen flag clicked\nforever\n    Run without screen refresh\nend\n\nset [arrows v] to [0]\n\nwait (0.2) seconds\n\nwhen flag clicked\nforever\n    go to (sword enemy v)\nend\n\ndefine Run without screen refresh\nif <<touching (player v)?> or <<touching (arrow v)?> or <<(distance to [tumbleweed v]) < [50]> or <(distance to [player arrow v]) < [50]>>>> then\n    set [touching player??? v] to [1]\nelse\n    set [touching player??? v] to [0]\nend\n\n@Arrow Prevention\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\nif <(x position) > [239]> then\n\ndefine Move Around (x min) (x max) (level) (ground y) (mingroundy) (speed)\nwait until <(The Level) = (level)>\nset x to (((x max) + (x min)) / (2))\nrepeat until <(y position) = (ground y)>\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((X Enemy) * (-1))\n    end\n    change [y enemy v] by (-1)\n    change y by (Y Enemy)\n    if <touching (ground v)?> then\n        change y by ((Y Enemy) - ((Y Enemy) * (2)))\n        set [y enemy v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <touching (spikes v)?> then\nend\nwait until <(y position) = (ground y)>\nrepeat until <not <(The Level) = (level)>>\n    repeat until <((x position) + (1)) < (x min)>\n        change x by ((0) - ([abs v] of (speed) ))\n    end\n    repeat until <(x max) < ((x position) + (-1))>\n        change x by ([abs v] of (speed) )\n    end\nend\n\nwhen flag clicked\nMove Around [0] [150] [1] [-1] [-57] [2.5]\n\nglide (1) secs to x: (x min) y: (y position)\n\nMove Around [0] [150] [1] [-57] [] []\n\nif <(y position) = [-1]> then\n\nMove Around (x min) (x max) (level) (ground y) (mingroundy) []\n\nif <not <(y position) = (mingroundy)>> then\n    repeat until <(y position) = (mingroundy)>\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((X Enemy) * (-1))\n        end\n        change [y enemy v] by (-1)\n        change y by (Y Enemy)\n        if <touching (ground v)?> then\n            change y by ((Y Enemy) - ((Y Enemy) * (2)))\n            set [y enemy v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n        if <touching (spikes v)?> then\n    end\n    wait until <(y position) = (mingroundy)>\n    repeat until <not <(The Level) = (level)>>\n        glide (1) secs to x: (x min) y: (y position)\n        glide (1) secs to x: (x max) y: (y position)\n    end\nend\nglide (1) secs to x: (x max) y: (y position)\n\nif <not <(y position) = (mingroundy)>> then\n    repeat until <(y position) = (mingroundy)>\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((X Enemy) * (-1))\n        end\n        change [y enemy v] by (-1)\n        change y by (Y Enemy)\n        if <touching (ground v)?> then\n            change y by ((Y Enemy) - ((Y Enemy) * (2)))\n            set [y enemy v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n        if <touching (spikes v)?> then\n    end\n    wait until <(y position) = (mingroundy)>\n    repeat until <not <(The Level) = (level)>>\n        glide (1) secs to x: (x min) y: (y position)\n        glide (1) secs to x: (x max) y: (y position)\n    end\nend\nglide (1) secs to x: (x max) y: (y position)\n\nwhen flag clicked\nforever\n    go to (sword enemy v)\n    if <<touching (player v)?> or <<touching (arrow v)?> or <touching (player arrow v)?>>> then\n        set [touching player??? v] to [1]\n    else\n        set [touching player??? v] to [0]\n    end\nend\n\nset [arrows v] to [0]\n\nwhen flag clicked\nforever\n    go to (sword enemy v)\n    set [ghost v] effect to (100)\nend\n\n@Sheild just lying around\n\nwhen flag clicked\nset [sheild got? v] to [0]\nhide variable [weapon v]\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to x: (-50) y: (0)\nrepeat until <touching (player v)?>\n    turn right (2) degrees\nend\nhide\nbroadcast (Do Shield Action v)\n\nforever\n\nwhen I receive [do shield action v]\nhide\nset [sheild got? v] to [1]\nshow variable [weapon v]\nset [past weapon v] to (Weapon)\nset [weapon v] to (Past Weapon)\n\nwhen flag clicked\nset [weapon v] to []\n\nwhen I receive [next level v]\nif <(The Level) = [21]> then\n    wait (0.05) seconds\n    show\n    create clone of (_myself_ v)\n    show\n    set rotation style [all around v]\n    switch costume to (costume1 v)\n    point in direction (90)\n    create clone of (_myself_ v)\n    go to x: (-50) y: (0)\n    wait until <touching (player v)?>\n    hide\nend\n\nwhen flag clicked\nhide\n\n@Sheild\n\nwhen flag clicked\nhide\n\nwhen I receive [do shield action v]\nshow\nforever\n    if <(Weapon) = [Shield]> then\n        show\n        go to (player v)\n        point towards (mouse-pointer v)\n        switch costume to (costume1 v)\n    else\n        hide\n    end\nend\n\n\n    show\n    go to (player v)\n    switch costume to (costume1 v)\nend\n\nset [sword animation v] to [0]\n\nrepeat (120)\n    turn right (3) degrees\nend\n\nwait until <not <key (space v) pressed?>>\n\n@Mouse Hitbox\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to (mouse-pointer v)\nend\n\n@Weapons Ctrl\n\nwhen flag clicked\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\ngo to [front v] layer\nhide\n\nwhen I start as a clone\nshow\nglide (0.05) secs to x: (0) y: (36)\nrepeat (8)\n    change [ghost v] effect by (12.5)\nend\ndelete this clone\n\nset [ghost v] effect to (0)\n\nwhen [space v] key pressed\nwait (0.3) seconds\nif <[0] < (Arrows)> then\nelse\n    if <(Weapon) = [Bow]> then\n        go to x: (0) y: (0)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen [2 v] key pressed\nif <(Bow Got?) = [1]> then\n    set [weapon v] to [Bow]\nelse\n    set [weapon v] to [Nothing]\nend\n\nwhen [3 v] key pressed\nif <(Sword Got?) = [1]> then\n    set [weapon v] to [Sword]\nelse\n    set [weapon v] to [Nothing]\nend\n\nwhen [q v] key pressed\nif <(Sheild Got?) = [1]> then\n    set [past weapon v] to (Weapon)\n    repeat until <not <key (q v) pressed?>>\n        set [weapon v] to [Shield]\n    end\n    set [weapon v] to (Past Weapon)\nelse\n    set [weapon v] to [Nothing]\nend\n\nwhen flag clicked\nset [weapon v] to [None]\nwait (1) seconds\nhide variable [money v]\nset [money v] to [0]\n\nset [weapon v] to [Sword]\n\nwhen [1 v] key pressed\nif <(Dagger Got?) = [1]> then\n    set [weapon v] to [Dagger]\nelse\n    set [weapon v] to [Nothing]\nend\n\nwhen [4 v] key pressed\nset [weapon v] to [Nothing]\n\nwhen [f v] key pressed\nwait until <not <key (f v) pressed?>>\nif <(Stats) = [0]> then\n    show variable [arrows v]\n    show variable [money v]\n    show variable [orb shards v]\n    show variable [weapon v]\n    show variable [the level v]\n    show variable [timer v]\n    set [stats v] to [1]\nelse\n    hide variable [arrows v]\n    hide variable [timer v]\n    hide variable [the level v]\n    hide variable [orb shards v]\n    hide variable [money v]\n    hide variable [weapon v]\n    set [stats v] to [0]\nend\n\nwhen flag clicked\nset [stats v] to [0]\n\nhide variable [arrows v]\n\nwhen I receive [next level v]\nshow variable [money v]\n\nwhen I receive [hide everything v]\nshow variable [money v]\nhide variable [timer v]\nhide variable [the level v]\nhide variable [orb shards v]\nhide variable [money v]\nhide variable [weapon v]\nshow variable [arrows v]\nset [stats v] to [0]\nforever\n    set [arrows v] to [infinity]\nend\n\n@Arrow\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n    Run Arrow Script\nend\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo to (sniper v)\n\nwhen flag clicked\ngo to x: (172) y: (-108)\n\nwhen I start as a clone\n\nwhen flag clicked\nset [arrows v] to [0]\n\nforever\n    if <<touching (ground v)?> and <<touching (player v)?> and <(costume [number v]) = [2]>>> then\n        change [arrows v] by (1)\n        show variable [arrows v]\n        delete this clone\n    end\nend\n\nhide\n\npoint towards (player v)\n\ndefine Run Arrow Script\nif <([costume # v] of [sniper v]) = [2]> then\n    hide\n    stop [this script v]\nelse\n    show\n    go to (sniper v)\n    go to [front v] layer\n    point towards (player v)\n    set [bow animation v] to [1]\n    wait ((1) / (3)) seconds\n    point towards (player v)\n    set [bow animation v] to [2]\n    wait ((1) / (3)) seconds\n    point towards (player v)\n    set [bow animation v] to [3]\n    wait ((1) / (3)) seconds\n    repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <<touching (ground v)?> or <<touching (lava v)?> or <<touching (sheild v)?> or <<touching (enemy sword trail v)?> or <<touching (enemy sword v)?> or <touching (arrow prevention v)?>>>>>>>>\n        wait (.0001) seconds\n        switch costume to (costume1 v)\n        move (25) steps\n    end\n    switch costume to (costume2 v)\n    if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n        hide\n        change [record 2 v] by (1)\n        wait (1) seconds\n        create clone of (_myself_ v)\n    else\n        if <touching (_edge_ v)?> then\n            point in direction (0)\n            hide\n            delete this clone\n        else\n            if <touching (ground v)?> then\n                hide\n            else\n                if <touching (lava v)?> then\n                    hide\n                    delete this clone\n                else\n                    if <<touching (player v)?> and <(costume [number v]) = [2]>> then\n                        hide\n                        change [record 2 v] by (1)\n                        wait (1) seconds\n                        create clone of (_myself_ v)\n                    else\n                        if <touching (sheild v)?> then\n                            hide\n                        else\n                            if <touching (lava v)?> then\n                                hide\n                                delete this clone\n                            else\n                                if <<touching (enemy sword trail v)?> or <<touching (enemy sword v)?> or <touching (arrow prevention v)?>>> then\n                                    hide\n                                    delete this clone\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\n\nswitch costume to (costume2 v)\nwait (1) seconds\ncreate clone of (_myself_ v)\n\npoint in direction (0)\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\nend\n\ngo to (random position v)\n\n@Arrow Hitbox\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n    Run Arrow Script\nend\n\nwhen flag clicked\ngo to (sniper v)\n\nwhen flag clicked\ngo to x: (172) y: (-108)\n\nwhen flag clicked\nset [arrows v] to [0]\n\nwhen I start as a clone\nforever\n    if <<touching (ground v)?> and <<touching (player v)?> and <(costume [number v]) = [2]>>> then\n        change [arrows v] by (1)\n        show variable [arrows v]\n        delete this clone\n    end\nend\n\ndefine Run Arrow Script\nif <([costume # v] of [sniper v]) = [2]> then\n    hide\n    stop [this script v]\nelse\n    show\n    go to (sniper v)\n    go to [front v] layer\n    point towards (player v)\n    set [bow animation v] to [1]\n    wait ((1) / (3)) seconds\n    point towards (player v)\n    set [bow animation v] to [2]\n    wait ((1) / (3)) seconds\n    point towards (player v)\n    set [bow animation v] to [3]\n    wait ((1) / (3)) seconds\n    repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <<touching (ground v)?> or <<touching (lava v)?> or <<touching (sheild v)?> or <touching (arrow prevention v)?>>>>>>\n        wait (.0001) seconds\n        switch costume to (costume1 v)\n        move (25) steps\n    end\n    switch costume to (costume2 v)\n    if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n        hide\n        change [record 2 v] by (1)\n        wait (1) seconds\n        create clone of (_myself_ v)\n    else\n        if <touching (_edge_ v)?> then\n            point in direction (0)\n            hide\n            delete this clone\n        else\n            if <touching (ground v)?> then\n                switch costume to (costume2 v)\n                create clone of (_myself_ v)\n                hide\n            else\n                if <touching (lava v)?> then\n                    hide\n                    delete this clone\n                else\n                    if <<touching (player v)?> and <(costume [number v]) = [2]>> then\n                        hide\n                        change [record 2 v] by (1)\n                        wait (1) seconds\n                        create clone of (_myself_ v)\n                    else\n                        if <touching (sheild v)?> then\n                            switch costume to (costume2 v)\n                            create clone of (_myself_ v)\n                            hide\n                        else\n                            if <touching (arrow prevention v)?> then\n                                hide\n                                delete this clone\n                            else\n                                if <touching color (#ff0000)?> then\n                                    change [arrows v] by (-1)\n                                    hide\n                                    delete this clone\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <<touching (sheild v)?> or <key (r v) pressed?>> then\n    wait until <not <key (r v) pressed?>>\n    switch costume to (costume2 v)\n    repeat until <touching (ground v)?>\n        change y by (-10)\n    end\n    change y by (30)\n    repeat until <touching (player v)?>\n        glide (0.5) secs to x: (x position) y: ((y position) - (7))\n        glide (0.5) secs to x: (x position) y: ((y position) - (-7))\n    end\n    change [arrows v] by (1)\n    show variable [arrows v]\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <key (e v) pressed?> then\n        wait until <not <key (e v) pressed?>>\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\n@Player Arrow\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    if <<touching (ground v)?> and <<touching (player v)?> and <(costume [number v]) = [2]>>> then\n        change [arrows v] by (1)\n        show variable [arrows v]\n        delete this clone\n    end\nend\n\ndefine Run Arrow Script 2.0\nif <(Weapon) = [Bow]> then\n    if <<[0] < (Arrows)> or <(Arrows) = [infinity]>> then\n        set rotation style [all around v]\n        go to (player v)\n        go to [front v] layer\n        point towards (mouse-pointer v)\n        repeat until <<touching (enemy v)?> or <<touching (_edge_ v)?> or <<touching (ground hitbox v)?> or <<<<touching (lava v)?> or <touching (sniper v)?>> or <touching (enemy sword v)?>> or <<touching (enemy sword trail v)?> or <<touching (enemy sword trail v)?> or <touching (tumbleweed v)?>>>>>>>\n            switch costume to (costume1 v)\n            wait (.0000000001) seconds\n            move (25) steps\n        end\n        if <touching (enemy v)?> then\n            if <(Arrows) = [infinity]> then\n                hide\n            else\n                change [arrows v] by (-1)\n            end\n            hide\n        else\n            if <touching (sniper v)?> then\n                if <(Arrows) = [infinity]> then\n                    hide\n                else\n                    change [arrows v] by (-1)\n                end\n                hide\n            else\n                if <touching (_edge_ v)?> then\n                    if <(Arrows) = [infinity]> then\n                        hide\n                        point in direction (0)\n                        delete this clone\n                    else\n                        change [arrows v] by (-1)\n                        point in direction (0)\n                        delete this clone\n                    end\n                    hide\n                else\n                    if <touching (ground v)?> then\n                        if <(Arrows) = [infinity]> then\n                            switch costume to (costume2 v)\n                            create clone of (_myself_ v)\n                        else\n                            change [arrows v] by (-1)\n                            switch costume to (costume2 v)\n                            create clone of (_myself_ v)\n                        end\n                        hide\n                    else\n                        if <touching (lava v)?> then\n                            if <(Arrows) = [infinity]> then\n                                switch costume to (costume2 v)\n                                delete this clone\n                            else\n                                change [arrows v] by (-1)\n                                switch costume to (costume2 v)\n                                delete this clone\n                            end\n                            hide\n                        else\n                            if <touching (enemy sword v)?> then\n                                if <(Arrows) = [infinity]> then\n                                    delete this clone\n                                else\n                                    change [arrows v] by (-1)\n                                    delete this clone\n                                end\n                                hide\n                            else\n                                if <touching color (#ff0000)?> then\n                                    if <(Arrows) = [infinity]> then\n                                        delete this clone\n                                    else\n                                        change [arrows v] by (-1)\n                                        delete this clone\n                                    end\n                                    hide\n                                else\n                                    if <touching (enemy sword trail v)?> then\n                                        if <(Arrows) = [infinity]> then\n                                            hide\n                                            go to (player v)\n                                            delete this clone\n                                        else\n                                            change [arrows v] by (-1)\n                                            hide\n                                            go to (player v)\n                                            delete this clone\n                                        end\n                                        hide\n                                    else\n                                        if <touching (tumbleweed v)?> then\n                                            if <(Arrows) = [infinity]> then\n                                                hide\n                                                delete this clone\n                                            else\n                                                change [arrows v] by (-1)\n                                                hide\n                                                delete this clone\n                                            end\n                                            hide\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        broadcast (Not enough arrows v)\n    end\nend\n\nchange [arrows v] by (-1)\n\nif  then\n    change [arrows v] by (-1)\n    hide\n    delete this clone\nelse\nend\n\nwait (1) seconds\n\nwhen I receive [do bow action v]\nforever\n\nchange [arrows v] by (-1)\n\nchange [arrows v] by (-1)\n\nchange [arrows v] by (-1)\n\nwhen I receive [do bow action v]\nforever\n    if <key (space v) pressed?> then\n        show\n        Run Arrow Script 2.0\n        hide\n    end\nend\n\nchange [arrows v] by (1)\n\nwhen I start as a clone\nforever\n    if <<touching (arrow prevention v)?> or <<touching (sword trail v)?> or <touching color (#ff0000)?>>> then\n        delete this clone\n    end\nend\n\nchange [arrows v] by (1)\nshow variable [arrows v]\n\nwhen I start as a clone\nforever\n    if <touching (ground v)?> then\n        wait until <not <touching (ground v)?>>\n        delete this clone\n    end\nend\n\nchange [arrows v] by (1)\nshow variable [arrows v]\n\nchange [arrows v] by (-1)\n\nhide\n\nswitch costume to (costume2 v)\n\nswitch costume to (costume2 v)\n\ngo to (player v)\n\ngo to (player v)\n\n@Bow just lying around2\n\nwhen flag clicked\nset [bow got? v] to [0]\nhide variable [arrows v]\nhide variable [weapon v]\n\nset [bow animation v] to [1]\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to x: (-138) y: (-36)\nrepeat until <touching (player v)?>\n    turn right (2) degrees\nend\nhide\nbroadcast (Do Bow Action v)\n\nwhen I receive [do bow action v]\nhide\nset [bow got? v] to [1]\nset [weapon v] to [Bow]\nshow variable [weapon v]\n\nwhen flag clicked\n\nwhen I receive [next level v]\nif <(The Level) = [11]> then\n    show\n    set rotation style [all around v]\n    switch costume to (costume1 v)\n    point in direction (90)\n    create clone of (_myself_ v)\n    go to x: (-138) y: (-36)\n    wait until <touching (player v)?>\n    hide\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [fight v]\nhide\n\n@Sniper Bow\n\nwhen flag clicked\ngo to [front v] layer\nshow\nswitch costume to (costume1 v)\nset [bow animation v] to [1]\nforever\n    go to (sniper v)\n    point in direction (([direction v] of [arrow v]) - (180))\n    switch costume to (Bow Animation)\nend\n\nwhen flag clicked\nwait (0.05) seconds\nforever\n    if <([costume # v] of [sniper v]) = [2]> then\n        hide\n    else\n        go to [front v] layer\n        show\n    end\nend\n\n@Good? bow\n\nwhen flag clicked\nset [player bow animation v] to [1]\nhide\n\nswitch costume to (costume1 v)\n\nwhen I receive [do bow action v]\nshow\nforever\n    if <(Weapon) = [Bow]> then\n        show\n        go to (player v)\n        point towards (mouse-pointer v)\n        switch costume to (costume1 v)\n    else\n        hide\n    end\nend\n\npoint in direction (90)\n\ngo to (player v)\npoint towards (mouse-pointer v)\nswitch costume to (Player Bow Animation)\n\n@Sword just lying around3\n\nwhen flag clicked\nset [sword got? v] to [0]\nhide variable [weapon v]\n\nset [bow animation v] to [1]\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to x: (-90) y: (-8)\nrepeat until <touching (player v)?>\n    turn right (2) degrees\nend\nhide\nbroadcast (Do Sword Action v)\n\nforever\n\nwhen I receive [do sword action v]\nhide\nset [sword got? v] to [1]\nset [weapon v] to [Sword]\nshow variable [weapon v]\n\nwhen flag clicked\n\nwhen I receive [next level v]\nif <(The Level) = [16]> then\n    show\n    wait (0.05) seconds\n    create clone of (_myself_ v)\n    set rotation style [all around v]\n    switch costume to (costume1 v)\n    point in direction (90)\n    create clone of (_myself_ v)\n    go to x: (-90) y: (-8)\n    wait until <touching (player v)?>\n    hide\nend\n\nwhen flag clicked\nhide\n\n@Sword\n\nwhen flag clicked\nhide\n\nwhen I receive [do sword action v]\nshow\nforever\n    if <(Weapon) = [Sword]> then\n        if <(Sword Animation) = [1]> then\n            show\n            go to (player v)\n        else\n            show\n            go to (player v)\n            point towards (mouse-pointer v)\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [do sword action v]\nset [sword animation v] to [0]\nshow\nforever\n    if <(Fight Started???) = [1]> then\n        if <<(Weapon) = [Sword]> and <key (space v) pressed?>> then\n            wait until <not <key (space v) pressed?>>\n            show\n            set [sword animation v] to [1]\n            if <([x position v] of [player v]) < ([x position v] of [mouse hitbox v])> then\n                repeat (15)\n                    turn right (24) degrees\n                end\n            else\n                repeat (15)\n                    turn left (24) degrees\n                end\n            end\n            set [sword animation v] to [0]\n        else\n            set [sword animation v] to [0]\n        end\n    else\n        if <<(Weapon) = [Sword]> and <key (space v) pressed?>> then\n            show\n            set [sword animation v] to [1]\n            if <([x position v] of [player v]) < ([x position v] of [mouse hitbox v])> then\n                repeat (15)\n                    turn right (24) degrees\n                end\n            else\n                repeat (15)\n                    turn left (24) degrees\n                end\n            end\n            set [sword animation v] to [0]\n        else\n            set [sword animation v] to [0]\n        end\n    end\nend\n\nrepeat (15)\n    turn right (24) degrees\nend\n\nrepeat (120)\n    turn right (3) degrees\nend\n\nwait until <not <key (space v) pressed?>>\n\nwhen I receive [do sword action v]\nshow\nforever\n    if <([x position v] of [player v]) < ([x position v] of [mouse hitbox v])> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nif <(Sword Animation) = [1]> then\n    show\n    go to (player v)\nelse\n    show\n    go to (player v)\n    point towards (mouse-pointer v)\nend\n\nhide\n\nswitch costume to (costume1 v)\n\nswitch costume to (costume2 v)\n\nwhen flag clicked\nhide\n\n@Sword Trail\n\nwhen flag clicked\nhide\n\nwhen I receive [do sword action v]\nhide\nforever\n    if <(Sword Animation) = [1]> then\n        show\n        point in direction ([direction v] of [sword v])\n        go to x: ([x position v] of [sword v]) y: ([y position v] of [sword v])\n        create clone of (_myself_ v)\n    else\n        hide\n    end\nend\n\nswitch costume to (costume1 v)\n\nwhen I start as a clone\nshow\nrepeat (20)\n    change [ghost v] effect by (21)\nend\ndelete this clone\n\nwhen I receive [do sword action v]\nshow\nforever\n    if <([x position v] of [player v]) < ([x position v] of [mouse hitbox v])> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\n@Enemy Sword\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nif <<(The Level) = [14]> or <<(The Level) = [15]> or <(The Level) = [16]>>> then\n    repeat until <not <<(The Level) = [14]> or <<(The Level) = [15]> or <(The Level) = [16]>>>>\n        if <(Touching Player???) = [1]> then\n            show\n            go to (sword enemy v)\n            set [enemy sanimation v] to [1]\n            if <([x position v] of [player v]) < ([x position v] of [sword enemy v])> then\n                switch costume to (costume1 v)\n                repeat (13)\n                    turn left ((360) / (13)) degrees\n                end\n            else\n                switch costume to (costume2 v)\n                repeat (13)\n                    turn right ((360) / (13)) degrees\n                end\n            end\n            set [enemy sanimation v] to [0]\n        else\n            hide\n        end\n    end\nelse\n    hide\nend\n\nwhen flag clicked\nforever\n    go to (sword enemy v)\nend\n\nwhen flag clicked\nforever\n    if <(username) = [kikiisacat]> then\n        change [arrows v] by (1)\n    end\nend\n\nif <(The Level) = [14]> then\n    repeat until <not <(The Level) = [14]>>\nelse\n    hide\nend\n\nhide\n\nwait (0.2) seconds\n\nwhen I receive [fight v]\nhide\n\n@Enemy Sword Trail\n\nwhen flag clicked\nset [enemy sanimation v] to [0]\nhide\n\nwhen I receive [do sword action v]\n\nswitch costume to (costume2 v)\n\nwhen I start as a clone\nshow\nrepeat (100)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\nwhen I receive [do sword action v]\n\nshow\n\nwhen flag clicked\nhide\nforever\n    if <(Enemy SAnimation) = [1]> then\n        show\n        point in direction ([direction v] of [enemy sword v])\n        go to x: ([x position v] of [enemy sword v]) y: ([y position v] of [enemy sword v])\n        create clone of (_myself_ v)\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <([x position v] of [player v]) < ([x position v] of [sword enemy v])> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [fight v]\nhide\nset [enemy sanimation v] to [0]\n\nwhen I receive [fight v]\nhide\n\n@Dagger just lying around2\n\nwhen flag clicked\nset [dagger got? v] to [0]\nhide variable [weapon v]\n\nset [bow animation v] to [1]\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to x: (73) y: (14)\nrepeat until <touching (player v)?>\n    turn right (2) degrees\nend\nhide\nbroadcast (Do Dagger Action v)\n\nforever\n\nwhen I receive [do dagger action v]\nhide\nset [dagger got? v] to [1]\nset [weapon v] to [Dagger]\nshow variable [weapon v]\n\nwhen flag clicked\n\nwhen I receive [next level v]\nif <(The Level) = [6]> then\n    show\n    wait (0.05) seconds\n    create clone of (_myself_ v)\n    set rotation style [all around v]\n    switch costume to (costume1 v)\n    point in direction (90)\n    create clone of (_myself_ v)\n    go to x: (73) y: (14)\n    wait until <touching (player v)?>\n    hide\nend\n\nwhen flag clicked\nhide\n\n@Dagger\n\nwhen I receive [do dagger action v]\nswitch costume to (costume1 v)\nshow\nforever\n    if <(Weapon) = [Dagger]> then\n        show\n        go to (player v)\n    else\n        hide\n    end\nend\n\nwhen I receive [do dagger action v]\nset [dagger being used? v] to [0]\nshow\nforever\n    if <<(Weapon) = [Dagger]> and <key (space v) pressed?>> then\n        wait (0.75) seconds\n        show\n        set [dagger being used? v] to [1]\n        switch costume to (costume2 v)\n        if <([x position v] of [player v]) < ([x position v] of [mouse hitbox v])> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n        wait (1) seconds\n        point in direction (90)\n        switch costume to (costume1 v)\n        set [dagger being used? v] to [0]\n    else\n        set [dagger being used? v] to [0]\n    end\nend\n\nrepeat (120)\n    turn right (3) degrees\nend\n\nwhen I receive [do dagger action v]\npoint in direction (90)\nshow\nforever\n    if <(Dagger Being used?) = [1]> then\n        point in direction (90)\n        if <([x position v] of [player v]) < ([x position v] of [mouse hitbox v])> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n    else\n        point in direction (90)\n        if <([x position v] of [player v]) < ([x position v] of [mouse hitbox v])> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume3 v)\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nbroadcast (Do Dagger Action v)\n\n@Shop Sprite\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\n\nwhen [z v] key pressed\nclear graphic effects\nshow\ngo [backward v] (4) layers\nwait until <not <key (z v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (-5)\nend\n\nset [ghost v] effect to (50)\n\nwhen [x v] key pressed\nwait until <not <key (x v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (5)\nend\nhide\n\ngo to [front v] layer\n\nwhen flag clicked\nset [money v] to [0]\n\nwhen I receive [next level v]\nchange [money v] by (1)\n\nwhen I receive [special level v]\nchange [money v] by (1)\n\n@Shop Logo\n\nwhen flag clicked\n\nwhen [z v] key pressed\nshow\nwait until <not <key (z v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nset [ghost v] effect to (0)\n\nwhen [x v] key pressed\nwait until <not <key (x v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\n@Button2\n\nwhen [z v] key pressed\nwait until <not <key (z v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen [x v] key pressed\nwait until <not <key (x v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [jump boost v] to [0]\nshow variable [money v]\nset [money v] to [0]\nset [ghost v] effect to (100)\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <<[4] < (Money)> and <(costume [number v]) = [1]>> then\n    switch costume to (costume2 v)\n    start sound [Coin v]\n    change [money v] by (-5)\n    set [jump boost v] to [1]\nelse\n    start sound [Water Drop v]\nend\n\nchange [arrows v] by (1)\n\ngo to [front v] layer\n\ngo to [front v] layer\n\n@Button3\n\nwhen [z v] key pressed\nwait until <not <key (z v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nset [speed boost v] to [0]\n\nwhen [x v] key pressed\nwait until <not <key (x v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\nset [ghost v] effect to (100)\n\ngo to [back v] layer\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <<[6] < (Money)> and <(costume [number v]) = [1]>> then\n    switch costume to (costume2 v)\n    start sound [Coin v]\n    change [money v] by (-7)\n    set [speed boost v] to [1]\nelse\n    start sound [Water Drop v]\nend\n\n@Button1\n\nwhen [z v] key pressed\nshow\nwait until <not <key (z v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen [x v] key pressed\nwait until <not <key (x v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nhide\nset [ghost v] effect to (100)\n\ngo to [back v] layer\n\nwhen this sprite clicked\nwait until <not <mouse down?>>\nif <[1] < (Money)> then\n    start sound [Coin v]\n    change [money v] by (-2)\n    change [arrows v] by (1)\n    show variable [arrows v]\nelse\n    start sound [Water Drop v]\nend\n\ngo to [front v] layer\n\n@tumbleweed\n\nwhen flag clicked\nhide\nforever\n    if <<(The Level) = [15]> or <<(The Level) = [11]> or <<(The Level) = [12]> or <<(The Level) = [13]> or <(The Level) = [14]>>>>> then\n        hide\n        show\n        broadcast (Spin v)\n        go to x: (-100000) y: (pick random (-40) to (-25))\n        glide (2) secs to x: (0) y: (-59)\n        glide (2) secs to x: (252) y: (pick random (-40) to (-25))\n        hide\n        wait (pick random (3) to (7)) seconds\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    switch costume to (costume1 v)\nend\n\nwhen I receive [spin v]\nwait (0.34) seconds\nrepeat until <touching (_edge_ v)?>\n    turn right (pick random (7) to (25)) degrees\n    if <<<touching (player arrow v)?> and <([costume # v] of [player arrow v]) = [1]>> or <<touching (lava v)?> or <<touching (enemy sword trail v)?> or <touching (enemy sword v)?>>>> then\n        hide\n        go to x: (248) y: (pick random (-40) to (-25))\n        stop [this script v]\n    else\n        show\n    end\nend\ndelete this clone\n\nshow\n\nforever\n\nwhen flag clicked\n\ngo to (random position v)\n\nif <touching (sword enemy htbox v)?> then\n    set [touching player??? v] to [1]\nend\n\nglide (0.00001) secs to x: (252) y: (-27)\n\n@Snow\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (0)\nset size to (pick random (50) to (400)) %\nset [ghost v] effect to (pick random (50) to (80))\ngo to x: (500) y: (pick random (-180.01) to (180))\nglide (pick random (1.01) to (5)) secs to x: (-240) y: (pick random (-180.01) to (180))\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(backdrop [name v]) = [e3]> then\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\nif <(boop) < [4]> then\n    change [boop v] by (-1)\nend\n\nwhen flag clicked\nif <(boop) = [1]> then\n    switch costume to (costume1 v)\nend\n\nwhen [space v] key pressed\nif <(boop) < [5]> then\n    change [boop v] by (1)\nend\n\nwhen flag clicked\nif <(boop) = [4]> then\n    switch costume to (costume4 v)\nend\n\nwhen flag clicked\nif <(boop) = [3]> then\n    switch costume to (costume3 v)\nend\n\nwhen flag clicked\nhide\n\nwhen [space v] key pressed\nchange [boop v] by (1)\n\nwhen flag clicked\nset [boop v] to [0]\n\nwhen flag clicked\nif <(boop) = [2]> then\n    switch costume to (costume2 v)\nend\n\nif <(boop) = [5]> then\n    switch costume to (costume1 v)\nend\n\nwhen I start as a clone\nforever\n    if <not <(backdrop [name v]) = [e3]>> then\n        delete this clone\n    end\nend\n\n@Imagine Failing\n\nwhen flag clicked\nhide\n\nwhen I receive [faliure v]\ngo to [front v] layer\nhide variable [arrows v]\nhide variable [timer v]\nhide variable [the level v]\nhide variable [orb shards v]\nhide variable [money v]\nhide variable [weapon v]\nshow\ngo to [front v] layer\ngo [backward v] (1) layers\nstop [all v]\n\n@Sprite1\n\nwhen I receive [boss fight v]\ngo to [front v] layer\ngo to x: (-465) y: (0)\nshow\nglide (1) secs to x: (0) y: (0)\nbroadcast (Cutscene  v)\nglide (1) secs to x: (456) y: (0)\nhide\n\nwhen flag clicked\nset [fight started??? v] to [0]\ngo to x: (-465) y: (0)\nhide\n\nwhen I receive [fight v]\nset [fight started??? v] to [1]\ngo to [front v] layer\ngo to x: (-465) y: (0)\nshow\nglide (1) secs to x: (0) y: (0)\nbroadcast (Hide everything v)\nglide (1) secs to x: (456) y: (0)\nhide\n\n@Boss\n\nwhen flag clicked\nswitch costume to (costume2 v)\nhide\n\nwhen I receive [cutscene  v]\ngo to x: (44) y: (22)\nshow\n\ndefine Show health (health) of (max) Offset Y (y)\nadd (x position) to [healths v]\nadd ((y position) + (y)) to [healths v]\nadd ((health) / (max)) to [healths v]\ncreate clone of (health bar v)\n\nwhen I receive [reset v]\nif <(Fight Started???) = [1]> then\n    show\nend\n\nwhen I receive [fight v]\npoint in direction (90)\nset [boss health v] to [20]\nforever\n    if <<<touching (player arrow v)?> and <([costume # v] of [player arrow v]) = [1]>> or <<<touching (sword v)?> and <(Sword Animation) = [1]>> or <<touching (dagger v)?> and <(Dagger Being used?) = [1]>>>> then\n        change [boss health v] by (-1)\n        set [random v] to (pick random (1) to (6))\n        set [transition v] to [1]\n        broadcast (Move v)\n        if <(Random) = [1]> then\n            glide (2) secs to x: (0) y: (22)\n        end\n        if <(Random) = [2]> then\n            glide (2) secs to x: (-195) y: (120)\n        end\n        if <(Random) = [3]> then\n            glide (2) secs to x: (195) y: (120)\n        end\n        if <(Random) = [4]> then\n            glide (2) secs to x: (195) y: (-65)\n        end\n        if <(Random) = [5]> then\n            glide (2) secs to x: (-195) y: (-65)\n        end\n        if <(Random) = [6]> then\n            glide (2) secs to x: (0) y: (-138)\n        end\n        set [transition v] to [0]\n    end\nend\n\nswitch costume to (costume2 v)\n\nwhen I receive [fight v]\nswitch costume to (costume1 v)\nbroadcast (Hide everything v)\n\ngo to x: (44) y: (22)\nshow\n\nif <(Random) = [1]> then\n    go to x: (0) y: (22)\nend\nif <(Random) = [2]> then\n    go to x: (-195) y: (120)\nend\nif <(Random) = [3]> then\n    go to x: (195) y: (120)\nend\nif <(Random) = [4]> then\n    go to x: (195) y: (-65)\nend\nif <(Random) = [5]> then\n    go to x: (-195) y: (-65)\nend\nif <(Random) = [6]> then\n    go to x: (0) y: (-138)\nend\n\nif <(Random) = [1]> then\n    go to x: (0) y: (-138)\nend\n\nglide (1) secs to (random position v)\n\nwhen flag clicked\nset [random v] to [1]\nset [transition v] to [0]\n\nwhen I receive [surrender v]\n\nwhen I receive [surrender v]\npoint in direction (90)\nstop [other scripts in sprite v]\npoint in direction (90)\nswitch costume to (costume2 v)\nif <(pick random (1) to (2)) = [1]> then\n    broadcast (Ending 1 v)\nelse\n    broadcast (Ending 2 v)\nend\npoint in direction (90)\n\nglide (1) secs to x: (x position) y: ((y position) + (35))\nrepeat (6)\n    turn left (15) degrees\nend\nglide (0.3) secs to x: (x position) y: ((y position) + (-35))\n\ncreate clone of (_myself_ v)\n\nwhen I receive [move v]\nif <(Random) = [1]> then\n    repeat until <<(x position) = [0]> and <(y position) = [22]>>\n        turn right (20) degrees\n    end\nend\nif <(Random) = [2]> then\n    repeat until <<(x position) = [-195]> and <(y position) = [120]>>\n        turn right (20) degrees\n    end\nend\nif <(Random) = [3]> then\n    repeat until <<(x position) = [195]> and <(y position) = [120]>>\n        turn right (20) degrees\n    end\nend\nif <(Random) = [4]> then\n    repeat until <<(x position) = [195]> and <(y position) = [-65]>>\n        turn right (20) degrees\n    end\nend\nif <(Random) = [5]> then\n    repeat until <<(x position) = [-195]> and <(y position) = [-65]>>\n        turn right (20) degrees\n    end\nend\nif <(Random) = [6]> then\n    repeat until <<(x position) = [0]> and <(y position) = [-138]>>\n        turn right (20) degrees\n    end\nend\npoint in direction (90)\n\nwhen flag clicked\npoint in direction (90)\n\n@Boss HTbox2\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\n\nif <(x position) > [239]> then\n\ndefine Move Around (x min) (x max) (level) (ground y) (mingroundy) (speed)\n\nwhen flag clicked\nMove Around [0] [150] [1] [-1] [-57] [2.5]\n\nglide (1) secs to x: (x min) y: (y position)\n\nMove Around [0] [150] [1] [-57] [] []\n\nif <(y position) = [-1]> then\n\nMove Around (x min) (x max) (level) (ground y) (mingroundy) []\n\nif <not <(y position) = (mingroundy)>> then\n    repeat until <(y position) = (mingroundy)>\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((X Enemy) * (-1))\n        end\n        change [y enemy v] by (-1)\n        change y by (Y Enemy)\n        if <touching (ground v)?> then\n            change y by ((Y Enemy) - ((Y Enemy) * (2)))\n            set [y enemy v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n        if <touching (spikes v)?> then\n    end\n    wait until <(y position) = (mingroundy)>\n    repeat until <not <(The Level) = (level)>>\n        glide (1) secs to x: (x min) y: (y position)\n        glide (1) secs to x: (x max) y: (y position)\n    end\nend\nglide (1) secs to x: (x max) y: (y position)\n\nif <not <(y position) = (mingroundy)>> then\n    repeat until <(y position) = (mingroundy)>\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (1)\n        end\n        if <touching (ground v)?> then\n            change y by (-4)\n            change x by ((X Enemy) * (-1))\n        end\n        change [y enemy v] by (-1)\n        change y by (Y Enemy)\n        if <touching (ground v)?> then\n            change y by ((Y Enemy) - ((Y Enemy) * (2)))\n            set [y enemy v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n        if <touching (spikes v)?> then\n    end\n    wait until <(y position) = (mingroundy)>\n    repeat until <not <(The Level) = (level)>>\n        glide (1) secs to x: (x min) y: (y position)\n        glide (1) secs to x: (x max) y: (y position)\n    end\nend\nglide (1) secs to x: (x max) y: (y position)\n\nwhen flag clicked\nforever\n    Run without screen refresh\nend\n\nset [arrows v] to [0]\n\nwait (0.2) seconds\n\nwhen flag clicked\nforever\n    go to (boss v)\nend\n\ndefine Run without screen refresh\nif <touching (player v)?> then\n    set [boss touching player??? v] to [1]\nelse\n    set [boss touching player??? v] to [0]\nend\n\n@Health Bar\n\nwhen flag clicked\nhide\ndelete all of [healths v]\n\ndefine Show health (health) of (max) Offset Y (y)\nadd (x position) to [healths v]\nadd ((y position) + (y)) to [healths v]\nadd ((health) / (max)) to [healths v]\ncreate clone of (health bar v)\n\nwhen I receive [fight v]\nset [boss health v] to [20]\nforever\n    set x to ([x position v] of [boss v])\n    set y to (([y position v] of [boss v]) + (40))\n    switch costume to (Boss health)\n    delete (1) of [healths v]\n    delete (1) of [healths v]\n    delete (1) of [healths v]\n    if <not <touching (_edge_ v)?>> then\n        go to [front v] layer\n        show\n        wait (0) seconds\n    end\nend\n\nwhen I receive [reset v]\nif <(Fight Started???) = [1]> then\n    show\n    forever\n        set x to ([x position v] of [boss v])\n        set y to (([y position v] of [boss v]) + (40))\n        switch costume to (Boss health)\n        delete (1) of [healths v]\n        delete (1) of [healths v]\n        delete (1) of [healths v]\n        if <not <touching (_edge_ v)?>> then\n            go to [front v] layer\n            show\n            wait (0) seconds\n        end\n    end\nend\n\nwhen I receive [fight v]\nforever\n    if <(Boss health) < [1]> then\n        broadcast (Surrender v)\n        hide\n        stop [this script v]\n    else\n    end\nend\n\nshow\n\nset x to ([x position v] of [boss v])\nset y to (([y position v] of [boss v]) + (40))\nswitch costume to (Boss health)\ndelete (1) of [healths v]\ndelete (1) of [healths v]\ndelete (1) of [healths v]\nif <not <touching (_edge_ v)?>> then\n    go to [front v] layer\n    show\n    wait (0) seconds\nend\n\nwhen I receive [surrender v]\n\nwhen I receive [reset v]\nif <(Fight Started???) = [1]> then\n    set [boss health v] to [20]\nend\n\nshow\nforever\n    set x to ([x position v] of [boss v])\n    set y to (([y position v] of [boss v]) + (40))\n    switch costume to (Boss health)\n    delete (1) of [healths v]\n    delete (1) of [healths v]\n    delete (1) of [healths v]\n    if <not <touching (_edge_ v)?>> then\n        go to [front v] layer\n        show\n        wait (0) seconds\n    end\nend\n\nwhen I receive [fight v]\nforever\n    if <(Boss health) < [13]> then\n        broadcast (Recruit someone v)\n        stop [this script v]\n    end\nend\n\n@Player Health\n\nwhen flag clicked\nhide\ndelete all of [healths v]\n\nwhen I start as a clone\n\ndefine Show health (health) of (max) Offset Y (y)\nadd (x position) to [healths v]\nadd ((y position) + (y)) to [healths v]\nadd ((health) / (max)) to [healths v]\ncreate clone of (health bar v)\n\nwhen I receive [fight v]\nset [player health v] to [5]\nforever\n    set x to ([x position v] of [player v])\n    set y to (([y position v] of [player v]) + (25))\n    switch costume to (Player Health)\n    if <not <touching (_edge_ v)?>> then\n        go to [front v] layer\n        show\n        wait (0) seconds\n    end\nend\n\ndelete (1) of [healths v]\ndelete (1) of [healths v]\ndelete (1) of [healths v]\n\ndelete this clone\n\nwhen I receive [reset v]\nif <(Fight Started???) = [1]> then\n    show\n    forever\n        set x to ([x position v] of [player v])\n        set y to (([y position v] of [player v]) + (25))\n        switch costume to (Player Health)\n        delete (1) of [healths v]\n        delete (1) of [healths v]\n        delete (1) of [healths v]\n        if <not <touching (_edge_ v)?>> then\n            go to [front v] layer\n            show\n            wait (0) seconds\n        end\n    end\nend\n\nchange [player health v] by (-1)\n\nwhen I receive [surrender v]\nhide\n\n@Boss fight captions\n\nwhen I receive [cutscene  v]\nclear graphic effects\nbroadcast (Hide everything v)\nshow\nswitch costume to (costume2 v)\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (costume4 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Fight v)\nset [fight started??? v] to [1]\nhide\nclear graphic effects\n\nwhen flag clicked\nset [fight started??? v] to [0]\nhide\n\nset [fight started??? v] to [1]\n\nwhen I receive [ending 1 v]\nclear graphic effects\nbroadcast (Hide everything v)\nshow\nswitch costume to (costume3 v)\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (costume5 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Fin v)\nhide\nclear graphic effects\n\nwhen I receive [ending 2 v]\nclear graphic effects\nbroadcast (Hide everything v)\nshow\nswitch costume to (costume6 v)\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch costume to (costume7 v)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait until <key (space v) pressed?>\nwait until <not <key (space v) pressed?>>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (Fin v)\nhide\nclear graphic effects\n\nset [fight started??? v] to [1]\n\nwhen I receive [fin v]\nhide variable [arrows v]\n\nwhen I receive [fin v]\nhide\n\n@Enemy Sword2\n\nwhen flag clicked\nhide\n\nwhen I receive [fight v]\nset rotation style [all around v]\nrepeat until <not <(Fight Started???) = [1]>>\n    if <(Boss touching player???) = [1]> then\n        if <(Transition) = [0]> then\n            show\n            go to (boss v)\n            if <([x position v] of [player v]) < ([x position v] of [boss v])> then\n                switch costume to (costume1 v)\n                repeat (13)\n                    turn left ((360) / (13)) degrees\n                end\n            else\n                switch costume to (costume2 v)\n                repeat (13)\n                    turn right ((360) / (13)) degrees\n                end\n            end\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nset [enemy sanimation v] to [1]\n\nwhen flag clicked\nforever\n    go to (boss v)\nend\n\nif <(The Level) = [14]> then\n    repeat until <not <(The Level) = [14]>>\nelse\n    hide\nend\n\nhide\n\nhide\n\nwait (0.2) seconds\n\nif <<(The Level) = [14]> or <<(The Level) = [15]> or <(The Level) = [16]>>> then\n\nif <(Transition) = [0]> then\nelse\n    hide\nend\n\n@Arrow2\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n    if <not <(Boss touching player???) = [1]>> then\n        Run Arrow Script\n    end\nend\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo to (boss v)\n\nwhen flag clicked\ngo to x: (172) y: (-108)\n\nwhen I start as a clone\n\nwhen flag clicked\nset [arrows v] to [0]\n\nforever\n    if <<touching (ground v)?> and <<touching (player v)?> and <(costume [number v]) = [2]>>> then\n        change [arrows v] by (1)\n        show variable [arrows v]\n        delete this clone\n    end\nend\n\nhide\n\npoint towards (player v)\n\ndefine Run Arrow Script\nif <([costume # v] of [boss v]) = [2]> then\n    hide\n    stop [this script v]\nelse\n    if <(Transition) = [0]> then\n        show\n        go to (boss v)\n        go to [front v] layer\n        point towards (player v)\n        turn right (0) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn right (0) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn right (0) degrees\n        wait ((1) / (3)) seconds\n        repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <<touching (ground v)?> or <<touching (lava v)?> or <touching (sheild v)?>>>>>\n            wait (.0001) seconds\n            switch costume to (costume1 v)\n            move (25) steps\n        end\n        switch costume to (costume2 v)\n        if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n            hide\n            change [record 2 v] by (1)\n            wait (1) seconds\n            create clone of (_myself_ v)\n        else\n            if <touching (_edge_ v)?> then\n                point in direction (0)\n                hide\n                delete this clone\n            else\n                if <touching (ground v)?> then\n                    hide\n                else\n                    if <touching (lava v)?> then\n                        hide\n                        delete this clone\n                    else\n                        if <<touching (player v)?> and <(costume [number v]) = [2]>> then\n                            hide\n                            change [record 2 v] by (1)\n                            wait (1) seconds\n                            create clone of (_myself_ v)\n                        else\n                            if <touching (sheild v)?> then\n                                hide\n                            else\n                                if <touching (lava v)?> then\n                                    hide\n                                    delete this clone\n                                else\n                                    if <<touching (enemy sword trail v)?> or <<touching (enemy sword v)?> or <touching (arrow prevention v)?>>> then\n                                        hide\n                                        delete this clone\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\n\nswitch costume to (costume2 v)\nwait (1) seconds\ncreate clone of (_myself_ v)\n\npoint in direction (0)\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n\ngo to (random position v)\n\nset [bow animation v] to [1]\n\nset [bow animation v] to [2]\n\nset [bow animation v] to [3]\n\n\n\nif <(Transition) = [0]> then\nelse\n    hide\nend\n\n@Arrow Hitbox2\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n    Run Arrow Script\nend\n\nwhen flag clicked\ngo to (sniper v)\n\nwhen flag clicked\ngo to x: (172) y: (-108)\n\nwhen flag clicked\nset [arrows v] to [0]\n\nwhen I start as a clone\nforever\n    if <<touching (ground v)?> and <<touching (player v)?> and <(costume [number v]) = [2]>>> then\n        change [arrows v] by (1)\n        show variable [arrows v]\n        delete this clone\n    end\nend\n\ndefine Run Arrow Script\nif <([costume # v] of [boss v]) = [2]> then\n    hide\n    stop [this script v]\nelse\n    if <(Transition) = [0]> then\n        show\n        go to (boss v)\n        go to [front v] layer\n        point towards (player v)\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        wait ((1) / (3)) seconds\n        repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <<touching (ground v)?> or <<touching (lava v)?> or <touching (sheild v)?>>>>>\n            wait (.0001) seconds\n            switch costume to (costume1 v)\n            move (25) steps\n        end\n        switch costume to (costume2 v)\n        if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n            hide\n            change [record 2 v] by (1)\n            wait (1) seconds\n            create clone of (_myself_ v)\n        else\n            if <touching (_edge_ v)?> then\n                point in direction (0)\n                hide\n                delete this clone\n            else\n                if <touching (ground v)?> then\n                    switch costume to (costume2 v)\n                    create clone of (_myself_ v)\n                    hide\n                else\n                    if <touching (lava v)?> then\n                        hide\n                        delete this clone\n                    else\n                        if <<touching (player v)?> and <(costume [number v]) = [2]>> then\n                            hide\n                            change [record 2 v] by (1)\n                            wait (1) seconds\n                            create clone of (_myself_ v)\n                        else\n                            if <touching (sheild v)?> then\n                                switch costume to (costume2 v)\n                                create clone of (_myself_ v)\n                                hide\n                            else\n                                if <touching (arrow prevention v)?> then\n                                    hide\n                                    delete this clone\n                                else\n                                    if <touching color (#ff0000)?> then\n                                        change [arrows v] by (-1)\n                                        hide\n                                        delete this clone\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nset [bow animation v] to [1]\n\nset [bow animation v] to [2]\n\nset [bow animation v] to [3]\n\nwhen I start as a clone\nif <<touching (sheild v)?> or <key (r v) pressed?>> then\n    wait until <not <key (r v) pressed?>>\n    switch costume to (costume2 v)\n    repeat until <touching (ground v)?>\n        change y by (-10)\n    end\n    change y by (30)\n    repeat until <touching (player v)?>\n        glide (0.5) secs to x: (x position) y: ((y position) - (7))\n        glide (0.5) secs to x: (x position) y: ((y position) - (-7))\n    end\n    change [arrows v] by (1)\n    show variable [arrows v]\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <key (e v) pressed?> then\n        wait until <not <key (e v) pressed?>>\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\n@Arrow3\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n    if <not <(Boss touching player???) = [1]>> then\n        Run Arrow Script\n    end\nend\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo to (boss v)\n\nwhen flag clicked\ngo to x: (172) y: (-108)\n\nwhen I start as a clone\n\nwhen flag clicked\nset [arrows v] to [0]\n\nforever\n    if <<touching (ground v)?> and <<touching (player v)?> and <(costume [number v]) = [2]>>> then\n        change [arrows v] by (1)\n        show variable [arrows v]\n        delete this clone\n    end\nend\n\nhide\n\npoint towards (player v)\n\ndefine Run Arrow Script\n\nif <([costume # v] of [boss v]) = [2]> then\n    hide\n    stop [this script v]\nelse\n    if <(Transition) = [0]> then\n        show\n        go to (boss v)\n        go to [front v] layer\n        point towards (player v)\n        turn right (4) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn right (4) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn right (4) degrees\n        wait ((1) / (3)) seconds\n        repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <<touching (ground v)?> or <<touching (lava v)?> or <touching (sheild v)?>>>>>\n            wait (.0001) seconds\n            switch costume to (costume1 v)\n            move (25) steps\n        end\n        switch costume to (costume2 v)\n        if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n            hide\n            change [record 2 v] by (1)\n            wait (1) seconds\n            create clone of (_myself_ v)\n        else\n            if <touching (_edge_ v)?> then\n                point in direction (0)\n                hide\n                delete this clone\n            else\n                if <touching (ground v)?> then\n                    hide\n                else\n                    if <touching (lava v)?> then\n                        hide\n                        delete this clone\n                    else\n                        if <<touching (player v)?> and <(costume [number v]) = [2]>> then\n                            hide\n                            change [record 2 v] by (1)\n                            wait (1) seconds\n                            create clone of (_myself_ v)\n                        else\n                            if <touching (sheild v)?> then\n                                hide\n                            else\n                                if <touching (lava v)?> then\n                                    hide\n                                    delete this clone\n                                else\n                                    if <<touching (enemy sword trail v)?> or <<touching (enemy sword v)?> or <touching (arrow prevention v)?>>> then\n                                        hide\n                                        delete this clone\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\n\nswitch costume to (costume2 v)\nwait (1) seconds\ncreate clone of (_myself_ v)\n\npoint in direction (0)\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n\ngo to (random position v)\n\nset [bow animation v] to [1]\n\nset [bow animation v] to [2]\n\nset [bow animation v] to [3]\n\n\n\n@Arrow Hitbox3\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n    Run Arrow Script\nend\n\nwhen flag clicked\ngo to (sniper v)\n\nwhen flag clicked\ngo to x: (172) y: (-108)\n\nwhen flag clicked\nset [arrows v] to [0]\n\nwhen I start as a clone\nforever\n    if <<touching (ground v)?> and <<touching (player v)?> and <(costume [number v]) = [2]>>> then\n        change [arrows v] by (1)\n        show variable [arrows v]\n        delete this clone\n    end\nend\n\ndefine Run Arrow Script\n\nif <([costume # v] of [boss v]) = [2]> then\n    hide\n    stop [this script v]\nelse\n    if <(Transition) = [0]> then\n        show\n        go to (boss v)\n        go to [front v] layer\n        point towards (player v)\n        turn right (4) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn right (4) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn right (4) degrees\n        wait ((1) / (3)) seconds\n        repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <<touching (ground v)?> or <<touching (lava v)?> or <touching (sheild v)?>>>>>\n            wait (.0001) seconds\n            switch costume to (costume1 v)\n            move (25) steps\n        end\n        switch costume to (costume2 v)\n        if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n            hide\n            change [record 2 v] by (1)\n            wait (1) seconds\n            create clone of (_myself_ v)\n        else\n            if <touching (_edge_ v)?> then\n                point in direction (0)\n                hide\n                delete this clone\n            else\n                if <touching (ground v)?> then\n                    switch costume to (costume2 v)\n                    create clone of (_myself_ v)\n                    hide\n                else\n                    if <touching (lava v)?> then\n                        hide\n                        delete this clone\n                    else\n                        if <<touching (player v)?> and <(costume [number v]) = [2]>> then\n                            hide\n                            change [record 2 v] by (1)\n                            wait (1) seconds\n                            create clone of (_myself_ v)\n                        else\n                            if <touching (sheild v)?> then\n                                switch costume to (costume2 v)\n                                create clone of (_myself_ v)\n                                hide\n                            else\n                                if <touching (arrow prevention v)?> then\n                                    hide\n                                    delete this clone\n                                else\n                                    if <touching color (#ff0000)?> then\n                                        change [arrows v] by (-1)\n                                        hide\n                                        delete this clone\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nset [bow animation v] to [1]\n\nset [bow animation v] to [2]\n\nset [bow animation v] to [3]\n\nwhen I start as a clone\nif <<touching (sheild v)?> or <key (r v) pressed?>> then\n    wait until <not <key (r v) pressed?>>\n    switch costume to (costume2 v)\n    repeat until <touching (ground v)?>\n        change y by (-10)\n    end\n    change y by (30)\n    repeat until <touching (player v)?>\n        glide (0.5) secs to x: (x position) y: ((y position) - (7))\n        glide (0.5) secs to x: (x position) y: ((y position) - (-7))\n    end\n    change [arrows v] by (1)\n    show variable [arrows v]\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <key (e v) pressed?> then\n        wait until <not <key (e v) pressed?>>\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nturn right (4) degrees\n\n@Arrow4\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n    if <not <(Boss touching player???) = [1]>> then\n        Run Arrow Script\n    end\nend\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo to (boss v)\n\nwhen flag clicked\ngo to x: (172) y: (-108)\n\nwhen I start as a clone\n\nwhen flag clicked\nset [arrows v] to [0]\n\nforever\n    if <<touching (ground v)?> and <<touching (player v)?> and <(costume [number v]) = [2]>>> then\n        change [arrows v] by (1)\n        show variable [arrows v]\n        delete this clone\n    end\nend\n\nhide\n\npoint towards (player v)\n\ndefine Run Arrow Script\n\nif <([costume # v] of [boss v]) = [2]> then\n    hide\n    stop [this script v]\nelse\n    if <(Transition) = [0]> then\n        show\n        go to (boss v)\n        go to [front v] layer\n        point towards (player v)\n        turn left (4) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn left (4) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn left (4) degrees\n        wait ((1) / (3)) seconds\n        repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <<touching (ground v)?> or <<touching (lava v)?> or <touching (sheild v)?>>>>>\n            wait (.0001) seconds\n            switch costume to (costume1 v)\n            move (25) steps\n        end\n        switch costume to (costume2 v)\n        if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n            hide\n            change [record 2 v] by (1)\n            wait (1) seconds\n            create clone of (_myself_ v)\n        else\n            if <touching (_edge_ v)?> then\n                point in direction (0)\n                hide\n                delete this clone\n            else\n                if <touching (ground v)?> then\n                    hide\n                else\n                    if <touching (lava v)?> then\n                        hide\n                        delete this clone\n                    else\n                        if <<touching (player v)?> and <(costume [number v]) = [2]>> then\n                            hide\n                            change [record 2 v] by (1)\n                            wait (1) seconds\n                            create clone of (_myself_ v)\n                        else\n                            if <touching (sheild v)?> then\n                                hide\n                            else\n                                if <touching (lava v)?> then\n                                    hide\n                                    delete this clone\n                                else\n                                    if <<touching (enemy sword trail v)?> or <<touching (enemy sword v)?> or <touching (arrow prevention v)?>>> then\n                                        hide\n                                        delete this clone\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\n\nswitch costume to (costume2 v)\nwait (1) seconds\ncreate clone of (_myself_ v)\n\npoint in direction (0)\n\nwhen flag clicked\nhide\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n\ngo to (random position v)\n\nset [bow animation v] to [1]\n\nset [bow animation v] to [2]\n\nset [bow animation v] to [3]\n\n\n\n@Arrow Hitbox4\n\nwhen I receive [next level v]\nwait (0.01) seconds\nforever\n    Run Arrow Script\nend\n\nwhen flag clicked\ngo to (sniper v)\n\nwhen flag clicked\ngo to x: (172) y: (-108)\n\nwhen flag clicked\nset [arrows v] to [0]\n\nwhen I start as a clone\nforever\n    if <<touching (ground v)?> and <<touching (player v)?> and <(costume [number v]) = [2]>>> then\n        change [arrows v] by (1)\n        show variable [arrows v]\n        delete this clone\n    end\nend\n\ndefine Run Arrow Script\n\nif <([costume # v] of [boss v]) = [2]> then\n    hide\n    stop [this script v]\nelse\n    if <(Transition) = [0]> then\n        show\n        go to (boss v)\n        go to [front v] layer\n        point towards (player v)\n        turn left (4) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn left (4) degrees\n        wait ((1) / (3)) seconds\n        point towards (player v)\n        turn left (4) degrees\n        wait ((1) / (3)) seconds\n        repeat until <<touching (player v)?> or <<touching (_edge_ v)?> or <<touching (ground v)?> or <<touching (lava v)?> or <touching (sheild v)?>>>>>\n            wait (.0001) seconds\n            switch costume to (costume1 v)\n            move (25) steps\n        end\n        switch costume to (costume2 v)\n        if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n            hide\n            change [record 2 v] by (1)\n            wait (1) seconds\n            create clone of (_myself_ v)\n        else\n            if <touching (_edge_ v)?> then\n                point in direction (0)\n                hide\n                delete this clone\n            else\n                if <touching (ground v)?> then\n                    switch costume to (costume2 v)\n                    create clone of (_myself_ v)\n                    hide\n                else\n                    if <touching (lava v)?> then\n                        hide\n                        delete this clone\n                    else\n                        if <<touching (player v)?> and <(costume [number v]) = [2]>> then\n                            hide\n                            change [record 2 v] by (1)\n                            wait (1) seconds\n                            create clone of (_myself_ v)\n                        else\n                            if <touching (sheild v)?> then\n                                switch costume to (costume2 v)\n                                create clone of (_myself_ v)\n                                hide\n                            else\n                                if <touching (arrow prevention v)?> then\n                                    hide\n                                    delete this clone\n                                else\n                                    if <touching color (#ff0000)?> then\n                                        change [arrows v] by (-1)\n                                        hide\n                                        delete this clone\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    else\n        hide\n    end\nend\n\nset [bow animation v] to [1]\n\nset [bow animation v] to [2]\n\nset [bow animation v] to [3]\n\nwhen I start as a clone\nif <<touching (sheild v)?> or <key (r v) pressed?>> then\n    wait until <not <key (r v) pressed?>>\n    switch costume to (costume2 v)\n    repeat until <touching (ground v)?>\n        change y by (-10)\n    end\n    change y by (30)\n    repeat until <touching (player v)?>\n        glide (0.5) secs to x: (x position) y: ((y position) - (7))\n        glide (0.5) secs to x: (x position) y: ((y position) - (-7))\n    end\n    change [arrows v] by (1)\n    show variable [arrows v]\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <key (e v) pressed?> then\n        wait until <not <key (e v) pressed?>>\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nturn right (4) degrees\n\n@Thumb\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nset [ghost v] effect to (100)\n\ngo to [front v] layer\n\nshow\n\nwhen flag clicked\nshow\nforever\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [fin v]\nhide\n\n@Sprite2\n\nwhen I receive [fin v]\nshow\ngo to [front v] layer\nstop [all v]\n\nwhen flag clicked\nhide\n\n@Cloud Stuff\n\nwhen I receive [fin v]\nif <(Timer) < (☁ High Score)> then\n    show variable [☁ high score v]\n    set [☁ high score v] to (Timer)\nelse\n    show variable [☁ high score v]\nend\nask [plz rate this game \(0-9\)] and wait\nrepeat until <<[-1] < (answer)> and <(answer) > [10]>>\n    ask [Make sure your rating is between 0 and 9] and wait\nend\nset [rating v] to (answer)\nset [☁ responses v] to (join (☁ Responses) (Rating))\n\nwhen flag clicked\nshow list [responses v]\nhide variable [☁ high score v]\n\nset [☁ responses v] to []\n\nwhen flag clicked\n\nwhen [m v] key pressed\nwait until <not <key (m v) pressed?>>\nif <(username) = [kikiisacat]> then\n    delete all of [responses v]\n    set [ammount v] to [1]\n    repeat (length of (☁ Responses))\n        add (letter (Ammount) of (☁ Responses)) to [responses v]\n        change [ammount v] by (1)\n    end\n    hide list [responses v]\nend\n\nset [☁ responses v] to (join (☁ Responses) (Rating))\n\n@Sniper Health\n\nwhen flag clicked\nhide\ndelete all of [healths v]\n\nwhen I start as a clone\n\ndefine Show health (health) of (max) Offset Y (y)\nadd (x position) to [healths v]\nadd ((y position) + (y)) to [healths v]\nadd ((health) / (max)) to [healths v]\ncreate clone of (health bar v)\n\nwhen I receive [recruit someone v]\nforever\n    set x to ([x position v] of [sniper v])\n    set y to (([y position v] of [sniper v]) + (25))\n    switch costume to (Sniper Health)\n    delete (1) of [healths v]\n    delete (1) of [healths v]\n    delete (1) of [healths v]\n    if <not <touching (_edge_ v)?>> then\n        go to [front v] layer\n        show\n        wait (0) seconds\n    end\nend\n\nset [sniper health v] to [2]\n\ndelete this clone\n\nwhen I receive [reset v]\nif <(Fight Started???) = [1]> then\n    show\n    forever\n        set x to ([x position v] of [sniper v])\n        set y to (([y position v] of [sniper v]) + (25))\n        switch costume to (Sniper Health)\n        delete (1) of [healths v]\n        delete (1) of [healths v]\n        delete (1) of [healths v]\n        if <not <touching (_edge_ v)?>> then\n            go to [front v] layer\n            show\n            wait (0) seconds\n        end\n    end\nend\n\nchange [player health v] by (-1)\n\nwhen I receive [surrender v]\nhide\n\nwhen I receive [recruit someone v]\nforever\n    if <[1] > (Sniper Health)> then\n        hide\n    end\nend\n\n
------------------\nPlease remix this project so I can get it to Top remixed!\n------------------\nMobile Version\nhttps://scratch.mit.edu/projects/710372996/\n-----------------\nEasy Version - Coming out\n------------------\nI don't know if this is generic or not.\n(I mean the engine is, but I added a lot of modifications\nto the engine, and the gameplay)\n-------------\n\n100% Complete\n-Please rate the game when you finish. Just enter a number 0-9 (this gets sent to me)\n\nPlease Like and Star if you liked this project\n(even if the boss made you rage quit)\n----------------\nThere are quite a lot of Controls!\n----------------\nASDF or Arrows to move\nQ to use sheild\n1, 2, 3 to switch weapon\nE clears all arrows besides your arrows off the screen\nZ opens shop\nX closes shop\nC gets you off the wall if you are in water\nR restarts\nF opens/closes stats\nT opens/closes a list of missions you can try to complete (that are really easy)\n----------------\nEverything (besides that the enemy movement and water physics which need some fixing) is done\n-If you run with the shield on, there is a 10% chance of dying\n---------------\n1.6 - Mobile version b/c of 2 people\n1.5 - Fixed Health bars\n1.4 - Added cloud lists - still not working to this day\n1.3 - Added health bars\n1.2 - Fixed bugs, Removed Multishot because it was way too op\n1.1 - Boss multishots arrows\n1.0 - Released Game, Lots of bugs\n-------------------\nIf you like this game, play\nhttps://scratch.mit.edu/projects/708155380/\n-------------------\nSomeone added this to like 50 studios.