Forest Green (Mobile Platformer)

Instructions: This took forever for me to make! I hope you enjoy it and I would really appreciate if you heart and favorite this project!  (More Levels + Boss Fight Coming Soon!)\n\nUse Arrow Keys or W,A,S,D to navigate!\nPress Space to use Sword to kill enemy\nPress Q, or Z to use Shield to block close and long range attacks.

@Stage\n\nwhen flag clicked\nswitch backdrop to (story mode selection screen v)\nstart sound [Loading Screen Music v]\n\nwhen backdrop switches to [wait. v]\nstop all sounds\nif <(Music) = [1]> then\n    set [music v] to [4]\nend\n\nwhen backdrop switches to [level 1 v]\nif <(Music) = [4]> then\n    set [music v] to [2]\nend\n\nwhen flag clicked\nset [whirl v] effect to (0)\nwait (0.1) seconds\nstop all sounds\n\nwhen flag clicked\nset volume to (100) %\nset [music v] to [0]\nforever\n    if <(Music) = [0]> then\n        play sound [recording1 v] until done\n        set volume to (0) %\n    else\n        if <(Music) = [4]> then\n            play sound [recording1 v] until done\n        end\n        if <(Music) = [2]> then\n            set volume to (100) %\n            play sound [Wild Woods v] until done\n            if <(Music) = [1]> then\n                set volume to (100) %\n                play sound [Loading Screen Music v] until done\n            end\n        end\n    end\nend\n\nwhen I receive [hide message v]\nset [music v] to [1]\nset volume to (100) %\n\nwhen flag clicked\nset [time v] to [0]\nhide variable [time v]\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <not <(Level) = [16]>> then\n        change [time v] by (1)\n        wait (1) seconds\n    end\nend\n\nwhen backdrop switches to [level 16 v]\nshow variable [time v]\n\nwhen backdrop switches to [level 16 v]\nset [level v] to [16]\n\n@Player\n\ndefine walk (steps)\nswitch costume to (hitbox v)\nchange x by (steps)\nset [ground lift v] to [0]\nrepeat until <<not <touching (ground v)?>> or <(ground lift) = [8]>>\n    change y by (1)\n    change [ground lift v] by (1)\nend\nif <(ground lift) = [8]> then\n    change x by ((-1) * (steps))\n    change y by (-8)\nend\nswitch costume to (stand_1 v)\nchange [frame v] by ((1) / (frames per costume))\nset correct costume\n\ndefine handle ground <moving up>\nswitch costume to (hitbox v)\nrepeat until <not <touching (ground v)?>>\n    if <moving up> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [in air v] to [0]\n    end\n    set [y velocity v] to [0]\nend\nswitch costume to (stand_1 v)\nset correct costume\n\nwhen flag clicked\nset rotation style [don't rotate v]\nswitch costume to (start v)\ngo to x: (-18) y: (-64)\nshow\ngo to [back v] layer\nset size to (45) %\n\nwhen backdrop switches to [level 1 v]\nswitch costume to (the nite looking left v)\nshow\ngo to x: (-203) y: (-82)\nset size to (30) %\nrepeat (10)\n    go to [back v] layer\nend\n\nwhen backdrop switches to [wait. v]\nhide\n\nwhen flag clicked\nset [whirl v] effect to (0)\nforever\n    if <touching (gate v)?> then\n        glide (0.5) secs to (gate v)\n        broadcast (Next level v)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [level reset v]\nif <(Level) = [3]> then\n    switch backdrop to (level 3 v)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [4]> then\n    switch backdrop to (level 4 v)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [5]> then\n    switch backdrop to (level 5 v)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [6]> then\n    switch backdrop to (level 6 v)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [7]> then\n    switch backdrop to (level 7 v)\nend\n\nwhen backdrop switches to [level 7 v]\nset [allowed/no v] to [0]\nset size to (15) %\n\nwhen I receive [level reset v]\nif <(Level) = [8]> then\n    switch backdrop to (level 8 v)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [9]> then\n    switch backdrop to (level 9 v)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [10]> then\n    switch backdrop to (level 10 v)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [11]> then\n    switch backdrop to (level 11 v)\nend\n\nwhen backdrop switches to [level 1 v]\nswitch costume to (cubey v)\n\nwhen backdrop switches to [level 1 v]\nset rotation style [left-right v]\n\nwhen backdrop switches to [level 1 v]\npoint in direction (-90)\nset rotation style [left-right v]\nset [y velocity v] to [0]\nset [frame v] to [0]\nset [frames per costume v] to [4]\nforever\n    change [y velocity v] by (-2)\n    change y by (y velocity)\n    change [in air v] by (1)\n    handle ground <(y velocity) > [0]>\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <(Level) = [13]> then\n        if <(y position) < [-170]> then\n            broadcast (Level Reset v)\n        end\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nset [player animation v] to [1]\nforever\n    if <(Shield) = [0]> then\n        if <(Mobile) = [0]> then\n            if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n                set [player animation v] to [0]\n                set [sword side v] to [1]\n                set [shield side v] to [0]\n                point in direction (-90)\n                if <(Mobile Left Key) = [0]> then\n                    walk (-6)\n                else\n                    walk (-8)\n                end\n            end\n            if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n                set [shield side v] to [1]\n                set [player animation v] to [1]\n                set [sword side v] to [0]\n                point in direction (90)\n                if <(Mobile Right Key) = [0]> then\n                    walk (6)\n                else\n                    walk (8)\n                end\n            end\n            if <<not <<key (a v) pressed?> or <key (left arrow v) pressed?>>> and <not <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n                set [frame v] to [0]\n            end\n            if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n                set [player animation v] to [0]\n                set [shield side v] to [0]\n                set [sword side v] to [1]\n                point in direction (-90)\n                walk (0)\n            end\n            if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n                set [player animation v] to [1]\n                set [sword side v] to [0]\n                set [shield side v] to [1]\n                point in direction (90)\n                walk (0)\n            end\n            if <<not <<key (a v) pressed?> or <key (left arrow v) pressed?>>> and <not <<key (d v) pressed?> or <key (right arrow v) pressed?>>>> then\n                set [frame v] to [0]\n            end\n        end\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <<<key (w v) pressed?> or <<key (up arrow v) pressed?> or <(Mobile Up Key) = [1]>>> and <(in air) < [8]>> then\n        if <(Mobile Up Key) = [0]> then\n            set [y velocity v] to [14]\n        else\n            set [y velocity v] to [16]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (border 2 v)?> then\n        broadcast (Level Reset v)\n    end\nend\n\nwhen flag clicked\nset [player animation v] to [0]\n\nwhen flag clicked\nset [showing arrow v] to [0]\n\nwhen I receive [level reset v]\nif <(Level) = [12]> then\n    switch backdrop to (level 12 v)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [13]> then\n    switch backdrop to (level 13 v)\n    go to [front v] layer\nend\n\nwhen backdrop switches to [level 13 v]\nrepeat (10)\n    go to x: (4) y: (-92)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [14]> then\n    switch backdrop to (level 14 v)\nend\n\nwhen flag clicked\nforever\n    if <key (right arrow v) pressed?> then\n        set [shield side v] to [1]\n        set [player animation v] to [1]\n    end\n    if <key (left arrow v) pressed?> then\n        set [player animation v] to [0]\n        set [shield side v] to [0]\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <(Player Animation) = [1]> then\n        point in direction (90)\n    else\n        point in direction (-90)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Shield) = [1]> then\n        walk (0)\n    end\nend\n\ndefine set correct costume\n\nwhen backdrop switches to [level 1 v]\nset [player animation v] to [1]\nforever\n    if <(Shield Mobile) = [0]> then\n        if <(Mobile Left Key) = [1]> then\n            set [player animation v] to [0]\n            set [sword side v] to [1]\n            set [shield side v] to [0]\n            point in direction (-90)\n            if <(Mobile Left Key) = [0]> then\n                walk (-6)\n            else\n                walk (-7)\n            end\n        end\n        if <(Mobile Right Key) = [1]> then\n            set [player animation v] to [1]\n            set [sword side v] to [0]\n            set [shield side v] to [1]\n            point in direction (90)\n            if <(Mobile Right Key) = [0]> then\n                walk (6)\n            else\n                walk (7)\n            end\n        end\n        if <<(Mobile Left Key) = [1]> and <not <(Mobile Right Key) = [1]>>> then\n            set [frame v] to [0]\n        end\n        if <(Mobile Left Key) = [1]> then\n            set [player animation v] to [0]\n            set [sword side v] to [1]\n            set [shield side v] to [0]\n            point in direction (-90)\n            walk (0)\n        end\n        if <(Mobile Right Key) = [1]> then\n            set [player animation v] to [1]\n            set [sword side v] to [0]\n            set [shield side v] to [1]\n            point in direction (90)\n            walk (0)\n        end\n        if <<not <(Mobile Left Key) = [1]>> and <not <(Mobile Right Key) = [1]>>> then\n            set [frame v] to [0]\n        end\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <(y position) < [-170]> then\n        if <not <(Level) = [13]>> then\n            set y to (170)\n        end\n    end\nend\n\nwhen I receive [level reset v]\nif <(Level) = [15]> then\n    switch backdrop to (level 15 v)\nend\n\nwhen flag clicked\nforever\n    if <key (a v) pressed?> then\n        set [sword side v] to [1]\n        set [player animation v] to [0]\n        set [shield side v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (d v) pressed?> then\n        set [sword side v] to [0]\n        set [shield side v] to [1]\n        set [player animation v] to [1]\n    end\nend\n\nif <(Mobile Up Key) = [0]> then\n    set [y velocity v] to [-14]\nelse\n    set [y velocity v] to [-16]\nend\n\nwhen flag clicked\nforever\n    go [backward v] (99) layers\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    wait (pick random (1) to (3)) seconds\n    switch costume to (cubey2 v)\n    wait (0.4) seconds\n    switch costume to (cubey v)\nend\n\nwhen backdrop switches to [level 1 v]\nrepeat (10)\n    go to x: (-203) y: (-103)\nend\n\nwhen backdrop switches to [level 2 v]\nrepeat (10)\n    go to x: (-203) y: (-103)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [2]> then\n    switch backdrop to (level 2 v)\nend\n\nwhen backdrop switches to [level 3 v]\nrepeat (10)\n    go to x: (-203) y: (-103)\nend\n\nwhen backdrop switches to [level 4 v]\nrepeat (10)\n    go to x: (-203) y: (-103)\nend\n\nwhen backdrop switches to [level 5 v]\nrepeat (10)\n    go to x: (-203) y: (-103)\nend\n\nwhen backdrop switches to [level 6 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\nwhen backdrop switches to [level 7 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\nwhen backdrop switches to [level 8 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\nwhen backdrop switches to [level 9 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\nwhen backdrop switches to [level 10 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\nwhen backdrop switches to [level 11 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\nwhen backdrop switches to [level 12 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\nwhen I receive [level reset v]\nif <(Level) = [13]> then\n    switch backdrop to (level 13 v)\nend\n\nwhen backdrop switches to [level 14 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\nwhen backdrop switches to [level 15 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\nwhen backdrop switches to [level 16 v]\nrepeat (10)\n    go to x: (-203) y: (-90)\nend\n\n@Play Game Button\n\nwhen flag clicked\nswitch backdrop to (story mode selection screen v)\nswitch costume to (costume1 v)\ngo to x: (288) y: (-29)\n\nwhen this sprite clicked\nbroadcast (Game Starts v)\nswitch backdrop to (wait. v)\nwait (pick random (1) to (5)) seconds\nset [music v] to [2]\nwait (pick random (1) to (5)) seconds\nswitch backdrop to (level 1 v)\n\nwhen flag clicked\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (60) %\n    else\n        set size to (50) %\n    end\nend\n\nwhen I receive [menu start v]\nglide (1.2) secs to x: (132) y: (-29)\n\nwhen backdrop switches to [wait. v]\nhide\n\nwhen backdrop switches to [level 1 v]\n\n\n@Instruction Button\n\nwhen flag clicked\nswitch backdrop to (story mode selection screen v)\nswitch costume to (costume1 v)\ngo to x: (288) y: (-111)\n\nwhen this sprite clicked\nbroadcast (Instructions v)\n\nwhen flag clicked\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (60) %\n    else\n        set size to (50) %\n    end\nend\n\nwhen I receive [menu start v]\nglide (1.2) secs to x: (132) y: (-111)\n\nwhen backdrop switches to [wait. v]\nhide\n\nwhen backdrop switches to [level 1 v]\n\n\n@Settings Button\n\nwhen flag clicked\nswitch backdrop to (story mode selection screen v)\nswitch costume to (costume1 v)\ngo to x: (288) y: (55)\n\nwhen this sprite clicked\nbroadcast (Settings v)\n\nwhen flag clicked\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (60) %\n    else\n        set size to (50) %\n    end\nend\n\nwhen I receive [menu start v]\nglide (1.2) secs to x: (132) y: (55)\n\nwhen backdrop switches to [wait. v]\nhide\n\n@Start\n\nwhen I receive [hide message v]\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nset [brightness v] effect to (-100)\nrepeat (100)\n    change [brightness v] effect by (1)\nend\nhide\nbroadcast (Menu Start v)\n\n@Gate\n\nwhen flag clicked\ngo to [front v] layer\nset size to (40) %\nswitch costume to (gate closed v)\ngo to x: (185) y: (-50)\nhide\n\nwhen backdrop switches to [level 1 v]\nshow\nswitch costume to (gate closed v)\nset [level v] to [1]\n\nwhen backdrop switches to [level 2 v]\ngo to x: (185) y: (-54)\nset [level v] to [2]\n\nwhen I receive [next level v]\nif <(Level) = [1]> then\n    switch backdrop to (level 2 v)\nend\n\nwhen I receive [next level v]\nif <(Level) = [2]> then\n    switch backdrop to (level 3 v)\nend\n\nwhen I receive [next level v]\nif <(Level) = [3]> then\n    switch backdrop to (level 4 v)\nend\n\nwhen backdrop switches to [level 3 v]\ngo to x: (185) y: (-54)\nset [level v] to [3]\n\nwhen backdrop switches to [level 4 v]\ngo to x: (148) y: (-52)\nset [level v] to [4]\n\nwhen I receive [next level v]\nif <(Level) = [4]> then\n    switch backdrop to (level 5 v)\nend\n\nwhen backdrop switches to [level 5 v]\ngo to x: (148) y: (-52)\nset [level v] to [5]\n\nwhen I receive [next level v]\nif <(Level) = [5]> then\n    switch backdrop to (level 6 v)\nend\n\nwhen backdrop switches to [level 6 v]\ngo to x: (148) y: (-52)\nset [level v] to [6]\n\nwhen I receive [next level v]\nif <(Level) = [6]> then\n    switch backdrop to (level 7 v)\nend\n\nwhen backdrop switches to [level 7 v]\ngo to x: (187) y: (-52)\nset [level v] to [7]\nset size to (25) %\n\nwhen I receive [next level v]\nif <(Level) = [7]> then\n    switch backdrop to (level 8 v)\nend\n\nwhen backdrop switches to [level 8 v]\ngo to x: (187) y: (-53)\nset [level v] to [8]\n\nwhen backdrop switches to [level 9 v]\ngo to x: (187) y: (-60)\nset [level v] to [9]\n\nwhen I receive [next level v]\nif <(Level) = [9]> then\n    switch backdrop to (level 10 v)\nend\n\nwhen I receive [next level v]\nif <(Level) = [8]> then\n    switch backdrop to (level 9 v)\nend\n\nwhen backdrop switches to [level 10 v]\ngo to x: (206) y: (25)\nset [level v] to [10]\n\nwhen backdrop switches to [level 11 v]\ngo to x: (187) y: (-53)\nset [level v] to [11]\n\nwhen I receive [next level v]\nif <(Level) = [10]> then\n    switch backdrop to (level 11 v)\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <touching (player v)?> then\n        switch costume to (gate opened v)\n        broadcast (Ground Hide v)\n    else\n        broadcast (Ground Show v)\n        switch costume to (gate closed v)\n    end\nend\n\nwhen I receive [next level v]\nif <(Level) = [11]> then\n    switch backdrop to (level 12 v)\nend\n\nwhen backdrop switches to [level 12 v]\ngo to x: (187) y: (-55)\nset [level v] to [12]\n\nwhen backdrop switches to [level 13 v]\ngo to x: (4) y: (130)\nset [level v] to [13]\n\nwhen I receive [next level v]\nif <(Level) = [12]> then\n    switch backdrop to (level 13 v)\nend\n\nwhen backdrop switches to [level 14 v]\ngo to x: (187) y: (-52)\nset [level v] to [14]\n\nwhen I receive [next level v]\nif <(Level) = [13]> then\n    switch backdrop to (level 14 v)\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I receive [next level v]\nif <(Level) = [14]> then\n    switch backdrop to (level 15 v)\nend\n\nwhen I receive [next level v]\nif <(Level) = [15]> then\n    switch backdrop to (level 16 v)\nend\n\nwhen backdrop switches to [level 16 v]\nhide\n\n@Spike\n\nwhen flag clicked\nset size to (100) %\nswitch costume to (costume1 v)\nhide\n\nwhen backdrop switches to [level 2 v]\ngo to x: (-232) y: (-212)\nshow\nforever\n    if <touching (player v)?> then\n        broadcast (Level Reset v)\n    end\nend\n\nwhen backdrop switches to [level 3 v]\nset size to (80) %\nswitch costume to (costume2 v)\ngo to x: (-170) y: (-187)\n\nwhen backdrop switches to [level 4 v]\nset [level v] to [4]\nhide\n\nwhen backdrop switches to [level 7 v]\nshow\nset size to (35) %\ngo to x: (-13) y: (-131)\nswitch costume to (costume3 v)\n\nwhen backdrop switches to [level 8 v]\ngo to x: (-18) y: (-23)\nif <(Mobile) = [0]> then\n    switch costume to (costume4 v)\nelse\n    switch costume to (costume5 v)\nend\n\nwhen backdrop switches to [level 9 v]\nhide\n\nwhen backdrop switches to [level 11 v]\nhide\n\nwhen backdrop switches to [level 12 v]\ngo to x: (-18) y: (-23)\nswitch costume to (costume6 v)\nshow\n\nwhen backdrop switches to [level 13 v]\nhide\n\n@Sword\n\nwhen flag clicked\nset size to (12.5) %\nhide\n\nwhen I receive [slice with sword v]\nwait until <<key (space v) pressed?> or <(Mobile Sword Button) = [1]>>\nif <<(Sword) = [0]> and <(Shield) = [0]>> then\n    show\nend\nbroadcast (sword sound v)\nif <(Sword Side) = [0]> then\n    switch costume to (sword v)\n    point in direction (30)\n    repeat (9)\n        turn right (20) degrees\n    end\n    hide\n    wait (0.7) seconds\nelse\n    switch costume to (sword2 v)\n    point in direction (-30)\n    repeat (9)\n        turn left (20) degrees\n    end\n    hide\n    wait (0.7) seconds\nend\n\nwhen backdrop switches to [level 1 v]\nhide\nbroadcast (Slice with sword v)\nforever\n    glide (0) secs to (player v)\n    if <(Level) < [7]> then\n        if <(Player Animation) = [0]> then\n            change x by (-30)\n            change y by (15)\n        else\n            change x by (30)\n            change y by (15)\n        end\n    else\n        if <(Player Animation) = [0]> then\n            change x by (-15)\n            change y by (7)\n        else\n            change x by (15)\n            change y by (7)\n        end\n    end\nend\n\nwhen I receive [sword sound v]\nstart sound [High Whoosh v]\n\nwhen flag clicked\nset [sword v] to [0]\n\nwhen I receive [level reset v]\nhide\nset [sword v] to [0]\nbroadcast (Slice with sword v)\n\nwhen I receive [next level v]\nbroadcast (Slice with sword v)\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <key (right arrow v) pressed?> then\n        set [sword side v] to [0]\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <key (left arrow v) pressed?> then\n        set [sword side v] to [1]\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    go to [back v] layer\nend\n\nwhen backdrop switches to [level 7 v]\nset size to (7) %\n\nwhen flag clicked\nforever\n    if <touching (catapulter v)?> then\n        play sound [Sword Swipe  v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (skeleton knight v)?> then\n        play sound [Sword Swipe  v] until done\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <not <<touching (gate v)?> or <touching (spike v)?>>> then\n        go to [back v] layer\n    else\n        go to [front v] layer\n    end\nend\n\n@Shield\n\nwhen flag clicked\nset [shield v] to [0]\nset size to (17) %\nhide\ngo to [back v] layer\nforever\n    glide (0) secs to (player v)\nend\n\nwhen backdrop switches to [level 1 v]\nbroadcast (Shield Activate v)\nset [shield size v] to [0]\n\nwhen flag clicked\nset [shield side v] to [0]\nforever\n    if <(Shield Side) = [0]> then\n        switch costume to (shield2 v)\n    else\n        switch costume to (shield v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Player Animation) = [0]> then\n        set [shield side v] to [0]\n    else\n        set [shield side v] to [1]\n    end\nend\n\nwhen backdrop switches to [level 7 v]\nset [shield size v] to [1]\n\nwhen flag clicked\nforever\n    if <(Shield) = [1]> then\n        if <touching (slime v)?> then\n            if <(Shield Side) = [1]> then\n                start sound [Shield Hit v]\n                switch costume to (shield hit v)\n            else\n                start sound [Shield Hit v]\n                switch costume to (shield hit2 v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Shield) = [1]> then\n        if <touching (arrow v)?> then\n            if <(Shield Side) = [1]> then\n                switch costume to (shield hit v)\n                wait (0.3) seconds\n            else\n                switch costume to (shield hit2 v)\n                wait (0.3) seconds\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Shield) = [1]> then\n        if <touching (slime clone v)?> then\n            if <(Shield Side) = [1]> then\n                switch costume to (shield hit v)\n                start sound [Shield Hit v]\n            else\n                switch costume to (shield hit2 v)\n                start sound [Shield Hit v]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Shield) = [1]> then\n        if <touching (war turtle v)?> then\n            if <(Shield Side) = [1]> then\n                switch costume to (shield hit v)\n                start sound [Shield Hit v]\n            else\n                switch costume to (shield hit2 v)\n                start sound [Shield Hit v]\n            end\n        end\n    end\nend\n\nwhen I receive [shield activate v]\nset [sword v] to [0]\nforever\n    if <not <<key (z v) pressed?> or <<<key (q v) pressed?> or <(Shield Mobile) = [1]>> or <(Shield Broke) = [1]>>>> then\n        broadcast (Shield Activate v)\n        set [shield v] to [0]\n        hide\n    end\nend\n\nwhen I receive [shield activate v]\nif <<key (z v) pressed?> or <<key (q v) pressed?> or <(Shield Mobile) = [1]>>> then\n    go to [front v] layer\n    set volume to (100) %\n    play sound [Low Whoosh v] until done\n    set volume to (0) %\nend\n\nwhen I receive [shield activate v]\nbroadcast (Shield Sound v)\n\nwhen I receive [shield sound v]\nforever\n    if <<key (z v) pressed?> or <<key (q v) pressed?> or <(Shield Mobile) = [1]>>> then\n        set volume to (100) %\n        play sound [Low Whoosh v] until done\n        set volume to (0) %\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Shield) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Shield) = [1]> then\n        if <touching (enemy  v)?> then\n            if <(Shield Side) = [1]> then\n                switch costume to (shield hit v)\n                play sound [Shield Hit v] until done\n                wait (0.001) seconds\n                switch costume to (shield v)\n                wait (0.0001) seconds\n            else\n                switch costume to (shield hit2 v)\n                play sound [Shield Hit v] until done\n                wait (0.002) seconds\n                switch costume to (shield2 v)\n                wait (0.002) seconds\n            end\n        end\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <not <<key (z v) pressed?> or <<key (q v) pressed?> or <(Shield Mobile) = [1]>>>> then\n        broadcast (Shield Sound v)\n    end\nend\n\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <(Shield) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Shield) = [1]> then\n        if <touching (skeleton knight v)?> then\n            if <(Shield Side) = [1]> then\n                switch costume to (shield hit v)\n                play sound [Shield Hit v] until done\n                wait (0.002) seconds\n                switch costume to (shield v)\n                wait (0.002) seconds\n            else\n                switch costume to (shield hit2 v)\n                play sound [Shield Hit v] until done\n                wait (0.002) seconds\n                switch costume to (shield2 v)\n                wait (0.002) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [boulder v]\nforever\n    if <(Shield Broke) = [1]> then\n        switch costume to (shield3 v)\n        wait (0.4) seconds\n        stop [this script v]\n    else\n        wait (0.1) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) < [7]> then\n        if <(Player Animation) = [0]> then\n            change x by (-20)\n        else\n            change x by (20)\n        end\n    else\n        if <(Player Animation) = [0]> then\n            change x by (-10)\n        else\n            change x by (10)\n        end\n    end\nend\n\nwhen backdrop switches to [level 7 v]\nset size to (10) %\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen backdrop switches to [level 1 v]\nrepeat (10)\n    set [shield v] to [0]\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    if <(Shield Broke) = [0]> then\n        if <<key (z v) pressed?> or <<key (q v) pressed?> or <(Shield Mobile) = [1]>>> then\n            set [shield v] to [1]\n            set [sword v] to [0]\n            show\n        end\n    else\n        switch costume to (shield3 v)\n        hide\n        set [shield v] to [0]\n    end\nend\n\n@Cooldown\n\nwhen flag clicked\nset size to (16) %\nhide\nswitch costume to (costume7 v)\n\nwhen I receive [next level v]\nbroadcast (Slice with sword v)\nswitch costume to (costume7 v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [slice with sword v]\nwait until <<key (space v) pressed?> or <(Mobile Sword Button) = [1]>>\nset [sword delay 2 v] to [0]\nif <(Sword) = [0]> then\n    if <(Mobile) = [0]> then\n        wait (0.5) seconds\n    else\n        wait (0.7) seconds\n    end\n    show\n    switch costume to (costume1 v)\n    set [sword v] to [1]\n    set [sword delay v] to [1]\n    wait (0.003) seconds\n    switch costume to (costume3 v)\n    wait (0.003) seconds\n    switch costume to (costume4 v)\n    wait (0.003) seconds\n    switch costume to (costume5 v)\n    wait (0.003) seconds\n    switch costume to (costume6 v)\n    wait (0.003) seconds\n    set [sword v] to [0]\n    set [sword delay v] to [0]\n    set [sword delay 2 v] to [0]\n    wait (0.03) seconds\n    switch costume to (costume7 v)\n    wait until <not <key (space v) pressed?>>\n    set [mobile sword button v] to [0]\n    broadcast (Slice with sword v)\nend\n\nwhen flag clicked\nforever\n    if <(Cooldown) = [1]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen backdrop switches to [level 1 v]\nif <(Mobile) = [0]> then\n    go to x: (216) y: (-164)\nelse\n    go to x: (91) y: (-155)\nend\n\nwait (0.3) seconds\n\nwhen backdrop switches to [level 1 v]\nshow\n\nwhen I receive [level reset v]\nswitch costume to (costume7 v)\n\n@Enemy \n\nwhen flag clicked\nforever\n    if <touching (shield v)?> then\n        go to [front v] layer\n    end\nend\n\nwhen backdrop switches to [level 10 v]\ngo to x: (-48) y: (-81)\nset size to (50) %\nshow\nforever\n    if <(Level) = [10]> then\n        switch costume to (knight turning right v)\n        glide (1) secs to x: (-142) y: (-81)\n        switch costume to (knight turning left v)\n        glide (1) secs to x: (-54) y: (-81)\n    end\nend\n\nwhen backdrop switches to [level 7 v]\ngo to x: (-55) y: (-76)\nset size to (50) %\nshow\nforever\n    if <(Level) = [7]> then\n        switch costume to (knight turning left v)\n        glide (1) secs to x: (41) y: (-76)\n        switch costume to (knight turning right v)\n        glide (1) secs to x: (-55) y: (-76)\n    end\nend\n\nwhen backdrop switches to [level 5 v]\nwait (0.0000001) seconds\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [enemy v] to [0]\nset size to (100) %\nhide\ngo to x: (50) y: (-77)\nswitch costume to (knight turning right v)\nforever\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n        end\n    end\nend\n\nwhen backdrop switches to [level 4 v]\nswitch costume to (knight turning left v)\nshow\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        hide\n        start sound [Sword Swipe  v]\n    end\nend\n\nwhen backdrop switches to [level 5 v]\nset rotation style [don't rotate v]\nset [enemy v] to [0]\ngo to x: (44) y: (-86)\nset size to (80) %\nshow\nforever\n    if <(Level) = [5]> then\n        go to [front v] layer\n        switch costume to (knight turning right v)\n        glide (1) secs to x: (-128) y: (-86)\n        switch costume to (knight turning left v)\n        glide (1) secs to x: (44) y: (-86)\n    end\nend\n\nwhen I receive [level reset v]\ngo to x: (50) y: (-77)\n\nwhen backdrop switches to [level 6 v]\nhide\n\nwhen flag clicked\nforever\n    if <(Level) = [4]> then\n        wait (0.3) seconds\n        switch costume to (knight turning right v)\n        wait (0.3) seconds\n        switch costume to (knight turning right2 v)\n    end\nend\n\nwhen I start as a clone\nset size to (80) %\ngo to x: (-100) y: (-87)\nshow\nforever\n    go to [front v] layer\n    switch costume to (knight turning left v)\n    glide (1) secs to x: (44) y: (-86)\n    switch costume to (knight turning right v)\n    glide (1) secs to x: (-128) y: (-86)\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n            delete this clone\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        start sound [Sword Swipe  v]\n        delete this clone\n    end\nend\n\nwhen I receive [level reset v]\ndelete this clone\n\nwhen backdrop switches to [level 6 v]\ndelete this clone\n\nwhen backdrop switches to [level 11 v]\nhide\n\nwhen backdrop switches to [level 12 v]\ngo to x: (25) y: (40)\nset size to (50) %\nshow\nforever\n    if <(Level) = [12]> then\n        switch costume to (knight turning left v)\n        glide (1) secs to x: (76) y: (40)\n        switch costume to (knight turning right v)\n        glide (1) secs to x: (25) y: (40)\n    end\nend\n\nwhen flag clicked\nset [level v] to [0]\n\nwhen I receive [level reset v]\nif <(Level) = [12]> then\n    go to x: (25) y: (49)\nend\n\nwhen backdrop switches to [level 8 v]\nhide\n\nwhen backdrop switches to [level 13 v]\nhide\n\nwhen backdrop switches to [level 4 v]\nswitch costume to (knight turning left2 v)\n\nwhen I start as a clone\nforever\n    go to [front v] layer\nend\n\n@Skeleton Knight\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        start sound [Sword Swipe  v]\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset size to (100) %\nhide\nset [skeleton armour v] to [1]\n\nwhen backdrop switches to [level 6 v]\nset size to (100) %\nset [skeleton armour v] to [1]\ngo to x: (55) y: (-57)\nshow\nforever\n    if <(Level) = [6]> then\n        go to [front v] layer\n        point in direction (-90)\n        glide (3) secs to x: (-131) y: (-57)\n        set rotation style [left-right v]\n        point in direction (90)\n        glide (3) secs to x: (55) y: (-57)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(H.P) = [2]> then\n        switch costume to (walk1 v)\n        repeat (3)\n            wait (0.1) seconds\n            next costume\n        end\n    else\n        switch costume to (e.walk v)\n        repeat (3)\n            wait (0.05) seconds\n            next costume\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (shield v)?> then\n        go to [front v] layer\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n            set [skeleton armour v] to [1]\n        end\n    end\nend\n\nwhen backdrop switches to [level 10 v]\nset size to (60) %\nset [skeleton armour v] to [1]\ngo to x: (2) y: (20)\nshow\nforever\n    if <(Level) = [10]> then\n        go to [front v] layer\n        point in direction (90)\n        glide (3) secs to x: (156) y: (20)\n        set rotation style [left-right v]\n        point in direction (-90)\n        glide (3) secs to x: (2) y: (20)\n    end\nend\n\nwhen backdrop switches to [level 11 v]\nhide\n\nwhen I receive [skeleton armour falls off v]\nset [skeleton armour v] to [0]\n\nwhen I receive [skeleton armour falls off v]\nset [skeleton armour v] to [0]\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        set [skeleton armour v] to [1]\n    end\nend\n\nwhen backdrop switches to [level 6 v]\nset [h.p v] to [2]\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        if <(H.P) = [2]> then\n            set [h.p v] to [1]\n            broadcast (Skeleton Armour falls off v)\n            wait (0.4) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        if <(H.P) = [0]> then\n            hide\n        end\n    end\nend\n\nwhen backdrop switches to [level 10 v]\nset [h.p v] to [2]\n\nwhen I receive [next level v]\nset [h.p v] to [2]\n\nwhen backdrop switches to [level 7 v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        if <(H.P) = [1]> then\n            wait (0.4) seconds\n            set [h.p v] to [0]\n        end\n    end\nend\n\nwhen I receive [level reset v]\nrepeat (10)\n    set [h.p v] to [2]\nend\n\nwhen I receive [level reset v]\nrepeat (10)\n    set [skeleton armour v] to [0]\nend\n\n@Slime\n\nwhen backdrop switches to [level 9 v]\nset rotation style [left-right v]\nshow\ngo to x: (-118) y: (-87)\nset size to (50) %\nforever\n    if <(Level) = [9]> then\n        wait (0.3) seconds\n        point in direction (45)\n        repeat (10)\n            move (15) steps\n        end\n        point in direction (135)\n        repeat (10)\n            move (15) steps\n        end\n        wait (1.7) seconds\n        point in direction (-45)\n        repeat (10)\n            move (15) steps\n        end\n        point in direction (-135)\n        repeat (10)\n            move (15) steps\n        end\n        wait (0.7) seconds\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    switch costume to (costume1 v)\n    wait (0.5) seconds\n    switch costume to (costume2 v)\n    wait (0.2) seconds\n    switch costume to (costume1 v)\n    wait (0.1) seconds\n    switch costume to (costume4 v)\n    wait (0.1) seconds\n    switch costume to (costume1 v)\n    wait (0.05) seconds\n    switch costume to (costume2 v)\n    wait (0.05) seconds\n    switch costume to (costume3 v)\n    wait (0.2) seconds\n    switch costume to (costume2 v)\n    wait (0.1) seconds\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        start sound [Sword Swipe  v]\n        hide\n    end\nend\n\nwhen backdrop switches to [level 11 v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (shield v)?> then\n        go to [front v] layer\n    end\nend\n\nwhen backdrop switches to [level 11 v]\nhide\n\nwhen backdrop switches to [level 10 v]\nhide\n\n@Archer\n\nwhen flag clicked\nset [ghost v] effect to (0)\nset [archer set v] to [0]\nset size to (25) %\ngo to x: (91) y: (-72)\nhide\n\nwhen backdrop switches to [level 11 v]\nshow\nwait (0.1) seconds\nif <(backdrop [number v]) = [10]> then\n    hide\n    broadcast (Archer Set Hide v)\nelse\n    show\nend\n\nwhen backdrop switches to [level 11 v]\nforever\n    if <touching (sword v)?> then\n        if <not <(Level) = [14]>> then\n            hide\n            start sound [Sword Swipe  v]\n            if <(Level) = [11]> then\n                broadcast (Archer Set Hide v)\n            end\n            if <(Level) = [13]> then\n                broadcast (Archer Set Hide v)\n                wait (0.4) seconds\n                set [archer set v] to [1]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nswitch costume to (archer v)\nset rotation style [left-right v]\nforever\n    point towards (player v)\nend\n\nwhen backdrop switches to [level 12 v]\nhide\nbroadcast (Archer Set Hide v)\n\nwhen backdrop switches to [level 14 v]\nhide\n\nwhen backdrop switches to [level 14 v]\nshow\nswitch costume to (archer2 v)\nforever\n    if <(Level) = [14]> then\n        glide (0) secs to (war turtle2 v)\n        go to [front v] layer\n    end\nend\n\nwhen I receive [archer set hide v]\nif <(Level) = [14]> then\n    hide\nend\n\nwhen backdrop switches to [level 15 v]\nhide\nset [ghost v] effect to (100)\n\n@War Turtle\n\nwhen flag clicked\nset rotation style [left-right v]\nswitch costume to (war turtle v)\nset size to (50) %\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        play sound [Sword Swipe  v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    wait (0.15) seconds\n    next costume\nend\n\nwhen backdrop switches to [level 13 v]\nbroadcast (Hurtle move v)\nwait (0.1) seconds\ncreate clone of (_myself_ v)\n\nwhen I receive [hurtle move v]\nshow\ngo to x: (-219) y: (-25)\nforever\n    point in direction (90)\n    glide (3) secs to x: (-147) y: (-25)\n    point in direction (-90)\n    glide (3) secs to x: (-218) y: (-25)\nend\n\nwhen backdrop switches to [level 14 v]\nshow\ndelete this clone\n\nwhen I start as a clone\ngo to x: (218) y: (-25)\nforever\n    if <(Level) = [13]> then\n        point in direction (-90)\n        glide (3) secs to x: (147) y: (-25)\n        point in direction (90)\n        glide (3) secs to x: (218) y: (-25)\n    end\nend\n\nwhen I receive [level reset v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        play sound [Sword Swipe  v] until done\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n        end\n    end\nend\n\nwhen backdrop switches to [level 14 v]\nhide\n\nwhen backdrop switches to [level 14 v]\n\nwhen flag clicked\nwait (0.000001) seconds\nforever\n    if <not <touching (bow v)?>> then\n        go to [front v] layer\n    else\n        go to [back v] layer\n    end\nend\n\n@Catapulter\n\nwhen backdrop switches to [level 15 v]\ngo to x: (113) y: (-65)\nwait (0.1) seconds\nglide (1) secs to x: (81) y: (-65)\n\nwhen flag clicked\nset [catapulter armour v] to [1]\nset [boulder v] to [0]\nhide\n\nwhen I receive [level reset v]\nset [boulder v] to [0]\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        hide\n        set [catapulter armour v] to [0]\n    end\nend\n\nif <(Catapulter Armour) = [1]> then\n    set [catapulter armour v] to [0]\n    broadcast (Armour gone v)\nend\n\nwhen I receive [armour gone v]\nwait (0.4) seconds\nforever\n    if <touching (sword v)?> then\n        if <(Catapulter Armour) = [0]> then\n            hide\n        end\n    end\nend\n\nwait (0.3) seconds\nswitch costume to (costume33 v)\nglide (4) secs to x: (-81) y: (-65)\nswitch costume to (costume34 v)\nglide (4) secs to x: (81) y: (-65)\n\nwhen backdrop switches to [level 15 v]\nset [catapulter armour v] to [1]\nshow\nrepeat (10)\n    switch costume to (costume1 v)\nend\n\nwhen backdrop switches to [level 15 v]\nset [boulder v] to [0]\nwait (1) seconds\nif <(Catapulter Armour) = [1]> then\n    switch costume to (costume1 v)\n    repeat (12)\n        next costume\n    end\n    set [boulder v] to [1]\n    broadcast (boulder v)\n    repeat (19)\n        next costume\n    end\n    wait (0.5) seconds\n    set [boulder v] to [0]\n    wait (pick random (0.5) to (2)) seconds\n    broadcast (BOULDER TIME v)\nend\n\nwhen backdrop switches to [level 16 v]\nhide\n\n@Boulder\n\nwhen I receive [boulder v]\nif <(Level) = [15]> then\n    if <(Catapulter Armour) = [1]> then\n        set rotation style [don't rotate v]\n        switch costume to (costume1 v)\n        go to x: (58) y: (-51)\n        glide (0.5) secs to x: (-36) y: (9)\n        point towards (player v)\n        forever\n            if <not <touching (_edge_ v)?>> then\n                switch costume to (costume2 v)\n                move (10) steps\n            else\n                broadcast (boulder v)\n            end\n        end\n    else\n        hide\n    end\nend\n\nwhen backdrop switches to [level 15 v]\nset [level v] to [15]\nhide\n\nwhen flag clicked\nforever\n    if <(Boulder) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\nforever\n    if <touching (shield v)?> then\n        set [boulder v] to [0]\n    end\nend\n\nwhen flag clicked\nset [shield broke v] to [0]\nhide\nforever\n    if <touching (shield v)?> then\n        broadcast (Shield Broke v)\n    end\nend\n\nwhen I receive [shield broke v]\nwait (0.1) seconds\nset [shield broke v] to [1]\nwait (2.2) seconds\nset [shield broke v] to [0]\n\nwhen flag clicked\nforever\n    if <(Catapulter Armour) = [0]> then\n        set [boulder v] to [0]\n    end\nend\n\nwhen backdrop switches to [level 15 v]\nhide\nforever\n    if <touching (player v)?> then\n        broadcast (Level Reset v)\n    end\nend\n\n@Ground\n\nwhen flag clicked\ngo to x: (143) y: (-186)\nswitch costume to (costume2 v)\nhide\nset size to (50) %\n\nwhen backdrop switches to [level 7 v]\ngo to x: (-73) y: (-193)\n\nwhen backdrop switches to [level 1 v]\ngo to x: (-102) y: (-213)\nshow\nswitch costume to (costume1 v)\nforever\n    if <(Level) = [13]> then\n        set size to (100) %\n    else\n        set size to (50) %\n    end\nend\n\nwhen backdrop switches to [level 3 v]\ngo to [back v] layer\ngo to x: (-102) y: (-213)\nshow\n\nwhen backdrop switches to [level 1 v]\nshow\n\nwhen backdrop switches to [level 10 v]\ngo to x: (-73) y: (-193)\nswitch costume to (costume3 v)\n\nwhen backdrop switches to [level 11 v]\nswitch costume to (costume1 v)\n\nwhen backdrop switches to [level 12 v]\nswitch costume to (costume4 v)\n\nwhen backdrop switches to [level 13 v]\nset size to (100) %\nswitch costume to (costume5 v)\ngo to x: (-7) y: (-118)\n\nwhen I receive [next level v]\nif <(Level) = [12]> then\n    set size to (100) %\n    go to x: (-7) y: (-118)\n    switch costume to (costume5 v)\nend\n\nwhen backdrop switches to [level 14 v]\ngo to x: (-70) y: (-129)\n\nwhen backdrop switches to [level 14 v]\nset size to (50) %\nswitch costume to (costume1 v)\ngo to x: (6) y: (-193)\n\nwhen flag clicked\nforever\n    go [backward v] (99) layers\nend\n\n@Loading\n\nwhen flag clicked\nhide\ngo to x: (138) y: (-208)\nswitch costume to (costume1 v)\nforever\n    wait (0.3) seconds\n    next costume\nend\n\nwhen backdrop switches to [wait. v]\nshow\n\nwhen backdrop switches to [level 1 v]\nhide\n\n@Bow\n\nwhen flag clicked\nset [ghost v] effect to (0)\nset [showing arrow v] to [0]\nswitch costume to (costume1 v)\nset size to (40) %\nhide\ngo to [front v] layer\nforever\n    glide (0) secs to (archer v)\n    point towards (player v)\n    if <(Level) = [14]> then\n        change y by (20)\n        change x by (20)\n    end\nend\n\nwhen backdrop switches to [level 11 v]\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [archer set hide v]\nhide\n\nwhen I receive [show archer shooting arrow v]\nset [showing arrow v] to [1]\nswitch costume to (costume2 v)\nwait (0.2) seconds\nswitch costume to (costume3 v)\nwait (0.1) seconds\nswitch costume to (costume4 v)\nwait (0.2) seconds\nswitch costume to (costume1 v)\n\nwhen I receive [dont show archer shooting arrow v]\nswitch costume to (costume1 v)\nset [showing arrow v] to [3]\n\nwhen I receive [archer set hide v]\nif <(Archer Set) = [1]> then\n    broadcast (Archer Set Hide v)\nend\n\nwhen I receive [archer set hide v]\n\nif <(Level) = [13]> then\n    forever\n        broadcast (Archer Set Hide v)\n        wait (1) seconds\n        stop [this script v]\n    end\nend\n\nwhen backdrop switches to [level 14 v]\nshow\ngo to [front v] layer\n\nwhen I receive [archer set hide v]\nif <(Level) = [14]> then\n    hide\nend\n\nwhen backdrop switches to [level 15 v]\nset [ghost v] effect to (100)\nwait (0.1) seconds\nforever\n    hide\nend\n\n@Arrow\n\nwhen flag clicked\nset [ghost v] effect to (0)\nset [arrow v] to [0]\nhide\nset size to (30) %\n\nwhen backdrop switches to [level 11 v]\nwait (1) seconds\nbroadcast (Shoot Arrow v)\n\nwhen I receive [shoot arrow v]\nglide (0) secs to (bow v)\nbroadcast (Arrow goes to player v)\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(Shield Block) = [1]> then\n            broadcast (Level Reset v)\n            set [showing arrow v] to [0]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (shield v)?> then\n        hide\n        set [shield block v] to [0]\n        set [patch v] to [0]\n        set [showing arrow v] to [0]\n    end\nend\n\nwhen I receive [arrow goes to player v]\nif <<(Level) = [11]> or <(Level) = [14]>> then\n    set [patch v] to [0]\n    set [shield block v] to [1]\n    point towards (player v)\n    change y by (4)\n    broadcast (Show Archer shooting Arrow v)\n    wait (0.5) seconds\n    set [patch v] to [1]\n    set [showing arrow v] to [3]\n    broadcast (Dont show Archer shooting arrow v)\n    if <(Arrow) = [0]> then\n        forever\n            move (20) steps\n        end\n    end\n    set [showing arrow v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <touching (_edge_ v)?> then\n        hide\n        set [showing arrow v] to [0]\n    end\nend\n\nwait (2.5) seconds\nbroadcast (Shoot Arrow v)\n\nwhen backdrop switches to [level 10 v]\nrepeat (9)\n    wait (0.1) seconds\n    set [arrow v] to [1]\nend\n\nwhen backdrop switches to [level 11 v]\nset [arrow v] to [0]\n\nwhen flag clicked\nforever\n    if <(Showing Arrow) = [3]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [level reset v]\nhide\nset [arrow v] to [0]\n\nwhen I receive [archer set hide v]\nforever\n    if <not <(Level) = [14]>> then\n        set [showing arrow v] to [0]\n        hide\n        stop [this script v]\n    else\n        go to [front v] layer\n    end\nend\n\nwait (0.1) seconds\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <touching (_edge_ v)?> then\n        hide\n        set [showing arrow v] to [0]\n        wait (2.5) seconds\n        broadcast (Shoot Arrow v)\n    end\nend\n\nwhen flag clicked\nset [showing arrow v] to [0]\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        hide\n        set [showing arrow v] to [0]\n    end\nend\n\nwhen backdrop switches to [level 14 v]\nset [patch v] to [0]\nwait (0.4) seconds\nset [showing arrow v] to [3]\n\nwhen backdrop switches to [level 14 v]\nset [ghost v] effect to (100)\nwait (1) seconds\nbroadcast (Shoot Arrow v)\nset [ghost v] effect to (0)\n\nwhen I receive [archer set hide v]\nset [reset v] to [0]\nforever\n    if <(Reset) = [0]> then\n        set [showing arrow v] to [0]\n        hide\n    else\n        set [showing arrow v] to [3]\n        show\n    end\nend\n\nwhen backdrop switches to [level 14 v]\nset [showing arrow v] to [3]\n\nwhen I receive [level reset v]\nif <(Level) = [11]> then\n    set [reset v] to [1]\nend\n\nwhen I receive [level reset v]\nif <(Level) = [14]> then\n    set [reset v] to [1]\nend\n\nwhen backdrop switches to [level 11 v]\nset [patch v] to [0]\nset [reset v] to [1]\n\nwhen backdrop switches to [level 13 v]\nset [reset v] to [1]\n\nwhen backdrop switches to [level 14 v]\nset [reset v] to [1]\n\nwhen flag clicked\nforever\n    if <(Patch) = [1]> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (100)\n    end\nend\n\nwhen backdrop switches to [level 15 v]\nforever\n    set [reset v] to [1]\n    set [showing arrow v] to [0]\nend\n\nwhen backdrop switches to [level 15 v]\nforever\n    stop [other scripts in sprite v]\n    hide\nend\n\nwhen backdrop switches to [level 13 v]\nwait (0.000001) seconds\nforever\n    if <(Level) = [13]> then\n        hide\n    end\nend\n\n@Slime Clone\n\nwhen backdrop switches to [level 9 v]\nset rotation style [left-right v]\nshow\ngo to x: (82) y: (-87)\nset size to (50) %\nforever\n    wait (0.3) seconds\n    point in direction (-45)\n    repeat (10)\n        move (15) steps\n    end\n    point in direction (-135)\n    repeat (10)\n        move (15) steps\n    end\n    wait (1.7) seconds\n    point in direction (45)\n    repeat (10)\n        move (15) steps\n    end\n    point in direction (135)\n    repeat (10)\n        move (15) steps\n    end\n    wait (0.7) seconds\nend\n\nwhen flag clicked\nhide\nforever\n    switch costume to (costume2 v)\n    wait (0.5) seconds\n    switch costume to (costume5 v)\n    wait (0.2) seconds\n    switch costume to (costume2 v)\n    wait (0.1) seconds\n    switch costume to (costume8 v)\n    wait (0.1) seconds\n    switch costume to (costume2 v)\n    wait (0.05) seconds\n    switch costume to (costume5 v)\n    wait (0.05) seconds\n    switch costume to (costume6 v)\n    wait (0.2) seconds\n    switch costume to (costume5 v)\n    wait (0.1) seconds\n    switch costume to (costume2 v)\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        start sound [Sword Swipe  v]\n        hide\n    end\nend\n\nwhen backdrop switches to [level 10 v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (shield v)?> then\n        go to [front v] layer\n    end\nend\n\n@Instructions!!!\n\nwhen I receive [instructions v]\nshow\ngo to [front v] layer\n\nwhen flag clicked\nswitch costume to (costume3 v)\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [hide instructions v]\nhide\n\nwhen I receive [next page v]\nswitch costume to (costume2 v)\n\nwhen flag clicked\nforever\n    if <(Instructions) = [1]> then\n        if <(Mobile) = [0]> then\n            switch costume to (costume2 v)\n        else\n            switch costume to (costume3 v)\n        end\n    else\n        if <(Mobile) = [0]> then\n            switch costume to (costume1 v)\n        else\n            switch costume to (costume3 v)\n        end\n    end\nend\n\n@Click To Go Back\n\nwhen flag clicked\nset size to (50) %\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [instructions v]\nshow\ngo to x: (-5) y: (-147)\n\nwhen this sprite clicked\nhide\nbroadcast (Hide Instructions v)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (55) %\n    else\n        set size to (50) %\n    end\nend\n\n@Click For Next Page\n\nwhen flag clicked\nset [instructions v] to [0]\nswitch costume to (costume1 v)\nset size to (50) %\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [instructions v]\nif <(Mobile) = [0]> then\n    show\n    go to x: (148) y: (-142)\nend\n\nwhen this sprite clicked\nif <(Instructions) = [1]> then\n    set [instructions v] to [0]\nelse\n    set [instructions v] to [1]\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (55) %\n    else\n        set size to (50) %\n    end\nend\n\nwhen I receive [hide instructions v]\nhide\n\nwhen this sprite clicked\nif <(Instructions) = [1]> then\n    switch costume to (costume2 v)\nelse\n    switch costume to (costume1 v)\nend\n\n@Settings!!!\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\ngo to [front v] layer\n\nwhen I receive [settings v]\nshow\n\nwhen I receive [hide settings v]\nhide\n\n@Sword Cool Down Settings\n\nwhen I receive [hide settings v]\nhide\n\nwhen flag clicked\nset [cooldown v] to [1]\ngo to x: (184) y: (22)\nhide\n\nwhen I receive [settings v]\nwait (0.1) seconds\nshow\ngo to [front v] layer\n\nwhen this sprite clicked\nif <(Cooldown) = [0]> then\n    set [cooldown v] to [1]\nelse\n    set [cooldown v] to [0]\nend\n\n@Check Mark (Sword Cool Down)\n\nwhen I receive [hide settings v]\nhide\n\nwhen this sprite clicked\nif <(Cooldown) = [0]> then\n    set [cooldown v] to [1]\nelse\n    set [cooldown v] to [0]\nend\n\nwhen flag clicked\ngo to x: (112) y: (89)\nswitch costume to (checkmark2 v)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [settings v]\nshow\nforever\n    if <(Cooldown) = [0]> then\n        switch costume to (checkmark2 v)\n    else\n        switch costume to (checkmark v)\n    end\nend\n\n@Music Settings\n\nwhen I receive [hide settings v]\nhide\n\nwhen flag clicked\ngo to x: (-3) y: (-61)\nhide\n\nwhen I receive [settings v]\nwait (0.1) seconds\nshow\ngo to [front v] layer\n\nwhen this sprite clicked\nif <(Music) = [1]> then\n    set [music v] to [0]\nelse\n    set [music v] to [1]\nend\n\nwhen I receive [hide message v]\nstart sound [Loading Screen Music v]\n\nwhen I receive [settings v]\nstop all sounds\n\nwhen I receive [hide settings v]\nif <(Music) = [1]> then\n    start sound [Loading Screen Music v]\nend\n\n@Check Mark (Music)\n\nwhen I receive [hide settings v]\nhide\n\nwhen this sprite clicked\nif <(Music) = [1]> then\n    set [music v] to [0]\nelse\n    set [music v] to [1]\nend\n\nwhen flag clicked\ngo to x: (-78) y: (6)\nswitch costume to (checkmark2 v)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [settings v]\nshow\nforever\n    if <(Music) = [0]> then\n        switch costume to (checkmark2 v)\n    else\n        switch costume to (checkmark v)\n    end\nend\n\n@Tips Settings\n\nwhen I receive [hide settings v]\ngo to x: (-3) y: (-164)\nhide\n\nwhen flag clicked\nset [tips v] to [1]\nhide\n\nwhen I receive [settings v]\nwait (0.1) seconds\nshow\ngo to [front v] layer\n\nwhen this sprite clicked\nif <(Tips) = [0]> then\n    set [tips v] to [1]\nelse\n    set [tips v] to [0]\nend\n\n@Check Mark (Tips)\n\nwhen I receive [hide settings v]\nhide\n\nwhen this sprite clicked\nif <(Tips) = [1]> then\n    set [tips v] to [0]\nelse\n    set [tips v] to [1]\nend\n\nwhen flag clicked\ngo to x: (-77) y: (-98)\nswitch costume to (checkmark2 v)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [settings v]\nshow\nforever\n    if <(Tips) = [0]> then\n        switch costume to (checkmark2 v)\n    else\n        switch costume to (checkmark v)\n    end\nend\n\n@Tips\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (-157) y: (126)\nhide\nforever\n    go to [back v] layer\nend\n\nwhen backdrop switches to [level 1 v]\nif <(Tips) = [1]> then\n    show\nelse\n    hide\nend\n\nwhen backdrop switches to [level 2 v]\nswitch costume to (costume2 v)\n\nwhen backdrop switches to [level 3 v]\nswitch costume to (costume3 v)\n\nwhen backdrop switches to [level 4 v]\nswitch costume to (costume4 v)\n\nwhen backdrop switches to [level 5 v]\nswitch costume to (costume5 v)\n\nwhen backdrop switches to [level 6 v]\nswitch costume to (costume6 v)\n\nwhen backdrop switches to [level 7 v]\nswitch costume to (costume7 v)\n\nwhen backdrop switches to [level 8 v]\nswitch costume to (costume8 v)\n\nwhen backdrop switches to [level 9 v]\nhide\n\nwhen backdrop switches to [level 10 v]\nif <(Tips) = [1]> then\n    show\n    switch costume to (costume9 v)\nend\n\nwhen backdrop switches to [level 11 v]\nswitch costume to (costume10 v)\n\nwhen backdrop switches to [level 12 v]\nhide\n\nwhen backdrop switches to [level 13 v]\nif <(Tips) = [1]> then\n    show\n    switch costume to (costume11 v)\nend\n\nwhen backdrop switches to [level 14 v]\nswitch costume to (costume12 v)\nshow\n\nwhen backdrop switches to [level 15 v]\nswitch costume to (costume13 v)\n\nwhen backdrop switches to [level 16 v]\nswitch costume to (costume14 v)\n\n@Click To Go Back2\n\nwhen flag clicked\nset size to (50) %\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [settings v]\nshow\ngo to x: (100) y: (-147)\n\nwhen this sprite clicked\nhide\nbroadcast (Hide Settings v)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (55) %\n    else\n        set size to (50) %\n    end\nend\n\n@Skeleton Armour\n\nwhen flag clicked\nhide\nchange [ghost v] effect by (0)\nwait (0.1) seconds\nforever\n    go to [front v] layer\nend\n\nwhen I receive [skeleton armour falls off v]\nwait (0.15) seconds\nset [ghost v] effect to (0)\nglide (0) secs to (skeleton knight v)\nshow\npoint in direction (180)\nrepeat (10)\n    move (10) steps\nend\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nset [ghost v] effect to (0)\n\nwhen I receive [level reset v]\nwait (0.1) seconds\nrepeat (10)\n    hide\nend\n\nwhen I receive [skeleton armour falls off v]\nif <(Level) = [6]> then\n    set size to (100) %\nelse\n    set size to (50) %\nend\n\n@Mobile Sword Button\n\nwhen backdrop switches to [level 1 v]\nif <(Mobile) = [1]> then\n    show\n    go to [front v] layer\nend\n\nwhen flag clicked\ngo to x: (80) y: (-160)\nhide\nset size to (50) %\n\nwhen this sprite clicked\nset [mobile sword button v] to [1]\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set [mobile sword button v] to [1]\n    end\nend\n\n@Mobile Shield Button\n\nwhen backdrop switches to [level 1 v]\nset [shield mobile v] to [0]\nif <(Mobile) = [1]> then\n    show\n    go to [front v] layer\nend\n\nwhen flag clicked\nset [shield v] to [0]\nhide\ngo to x: (143) y: (-160)\n\ngo to x: (169) y: (148)\nset size to (50) %\n\nwhen this sprite clicked\nif <(Shield Mobile) = [1]> then\n    set [shield mobile v] to [0]\nelse\n    set [shield mobile v] to [1]\nend\n\nwhen I receive [level reset v]\nset [shield mobile v] to [0]\n\n@Mobile Instructions\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\nwhen I receive [hide message v]\nhide\n\n@Mobile Pad\n\nwhen flag clicked\nhide\nset [shield v] to [0]\n\nwhen backdrop switches to [level 1 v]\nif <(Mobile) = [1]> then\n    set [mobile left key v] to [0]\n    set [mobile right key v] to [0]\n    set [mobile up key v] to [0]\n    set size to (75) %\n    go to x: (-192) y: (-130)\n    show\n    set [ghost v] effect to (25)\n    go to [front v] layer\nend\n\nwhen flag clicked\nrepeat (10)\n    set [shield v] to [0]\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    go to [front v] layer\nend\n\nwhen backdrop switches to [level 1 v]\nforever\n    go to x: (-192) y: (-130)\n    set [mobile left key v] to [0]\n    set [mobile right key v] to [0]\n    set [mobile up key v] to [0]\n    if <(Mobile) = [0]> then\n        hide\n        stop [this script v]\n    end\n    if <not <mouse down?>> then\n        go to x: (-192) y: (-130)\n        set [mobile left key v] to [0]\n        set [mobile right key v] to [0]\n        set [mobile up key v] to [0]\n    else\n        if <mouse down?> then\n            go to x: (-192) y: (-130)\n            point towards (mouse-pointer v)\n            move (28) steps\n        end\n        if <<(direction) > [-60]> and <(direction) < [60]>> then\n            set [mobile right key v] to [1]\n            set [mobile up key v] to [1]\n            set [mobile left key v] to [1]\n        else\n            if <<(direction) < [-120]> or <(direction) > [120]>> then\n                set [mobile left key v] to [0]\n                set [mobile up key v] to [0]\n                set [mobile right key v] to [1]\n            end\n        end\n        if <<(direction) > [30]> and <(direction) < [150]>> then\n            set [mobile right key v] to [1]\n            set [mobile up key v] to [0]\n            set [mobile left key v] to [0]\n        else\n            if <<(direction) > [-150]> and <(direction) < [-30]>> then\n                set [mobile right key v] to [0]\n                set [mobile up key v] to [0]\n                set [mobile left key v] to [1]\n            end\n            if <<(direction) > [120]> and <(direction) < [60]>> then\n                set [mobile right key v] to [1]\n                set [mobile up key v] to [0]\n                set [mobile left key v] to [0]\n            end\n        end\n    end\nend\n\n@Mobile Pad Outline\n\nwhen flag clicked\nset size to (75) %\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [turn page v]\n\nwhen backdrop switches to [level 1 v]\ngo to x: (-192) y: (-130)\nshow\nset [ghost v] effect to (25)\ngo to [back v] layer\nif <(Mobile) = [0]> then\n    hide\nend\n\n@butterflies\n\nwhen flag clicked\nhide\nswitch costume to (butterflies v)\nforever\n    next costume\n    wait (0.003) seconds\nend\n\nwhen I receive [next level v]\nswitch costume to (butterflies v)\n\nwhen backdrop switches to [level 1 v]\nshow\n\nwhen backdrop switches to [level 1 v]\nswitch costume to (butterflies v)\ngo to x: (42) y: (-25)\nset size to (23) %\n\nwhen backdrop switches to [level 2 v]\nhide\n\nwhen backdrop switches to [level 3 v]\nshow\ngo to x: (-86) y: (-17)\n\nwhen backdrop switches to [level 4 v]\ngo to x: (-54) y: (21)\n\nwhen backdrop switches to [level 5 v]\nhide\n\nwhen I receive [level reset v]\nswitch costume to (butterflies v)\n\nwhen backdrop switches to [level 11 v]\nshow\ngo to x: (-167) y: (-11)\n\nwhen backdrop switches to [level 12 v]\ngo to x: (-20) y: (-43)\n\nwhen backdrop switches to [level 13 v]\nhide\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@PC\n\nwhen flag clicked\ngo to x: (-45) y: (-78)\nshow\nset [mobile v] to [0]\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nset [smh v] to [1]\nset [mobile v] to [0]\nbroadcast (Hide message v)\nhide\n\nwhen I receive [hide message v]\nhide\n\n@Mobile\n\nwhen flag clicked\ngo to x: (76) y: (-77)\nshow\nset [mobile v] to [0]\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nset [smh v] to [1]\nset [mobile v] to [1]\nbroadcast (Hide message v)\nhide\n\nwhen I receive [hide message v]\nhide\n\nwhen flag clicked\nset [smh v] to [0]\nwait (0.2) seconds\nplay sound [Firefly Lullaby v] until done\n\nwhen I receive [hide message v]\nforever\n    stop [other scripts in sprite v]\nend\n\n@Leaves\n\nwhen flag clicked\nset size to (100) %\nset [leaves v] to [0]\nhide\nforever\n    wait (pick random (0.2) to (0.6)) seconds\n    go to x: (pick random (-240) to (240)) y: (180)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(Leaves) = [0]> then\n    show\n    point in direction (140)\n    repeat until <(y position) < [-175]>\n        repeat (2)\n            move (7) steps\n        end\n        repeat (2)\n            turn left (10) degrees\n            move (7) steps\n        end\n        repeat (2)\n            turn left (10) degrees\n            move (5) steps\n        end\n        repeat (5)\n            turn left (0.5) degrees\n            move (3) steps\n        end\n        repeat (2)\n            move (-7) steps\n        end\n        repeat (2)\n            turn left (-10) degrees\n            move (-7) steps\n        end\n        repeat (2)\n            turn left (-10) degrees\n            move (-5) steps\n        end\n        repeat (5)\n            turn left (-0.5) degrees\n            move (-3) steps\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    change y by (pick random (-2) to (-4))\nend\n\nwhen I receive [hide message v]\nset [leaves v] to [1]\nhide\n\nwhen backdrop switches to [level 1 v]\nset [leaves v] to [0]\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen backdrop switches to [level 7 v]\nset size to (60) %\n\nwhen I receive [menu start v]\nset [leaves v] to [0]\n\nwhen I receive [game starts v]\nset [leaves v] to [1]\n\nwhen I receive [hide instructions v]\nset [leaves v] to [0]\n\nwhen I receive [hide settings v]\nset [leaves v] to [0]\n\nwhen I receive [instructions v]\nset [leaves v] to [1]\n\nwhen I receive [settings v]\nset [leaves v] to [1]\n\n@Beam\n\nwhen I receive [hide message v]\nset [sun beam v] to [0]\nhide\n\nwhen backdrop switches to [level 1 v]\nset [sun beam v] to [1]\n\nwhen I receive [menu start v]\nset [sun beam v] to [0]\n\nwhen I receive [hide settings v]\nset [sun beam v] to [1]\n\nwhen I receive [instructions v]\nset [sun beam v] to [0]\n\nwhen I receive [game starts v]\nset [sun beam v] to [0]\n\nwhen I receive [settings v]\nset [sun beam v] to [0]\n\nwhen flag clicked\nset [sun beam v] to [1]\nshow\nwait (0.5) seconds\nforever\n    hide\n    go to [front v] layer\n    clear graphic effects\n    if <(Sun Beam) = [1]> then\n        create clone of (_myself_ v)\n        wait (pick random (1) to (45)) seconds\n    end\nend\n\nwhen I start as a clone\nif <(backdrop [number v]) = [2]> then\n    delete this clone\nelse\n    clear graphic effects\n    point in direction (90)\n    go [forward v] (100) layers\n    switch costume to (pick random (1) to (3))\n    go to x: (240) y: (180)\n    set size to (pick random (150) to (300)) %\n    set [ghost v] effect to (100)\n    show\n    repeat (20)\n        change [ghost v] effect by (-1)\n        if <(costume [number v]) = [1]> then\n            move (-0.5) steps\n        end\n        if <(costume [number v]) = [2]> then\n            move (-1) steps\n        end\n        if <(costume [number v]) = [3]> then\n            move (-2) steps\n        end\n    end\n    repeat until <(x position) < [-240]>\n        if <(costume [number v]) = [1]> then\n            move (-0.5) steps\n        end\n        if <(costume [number v]) = [2]> then\n            move (-1) steps\n        end\n        if <(costume [number v]) = [3]> then\n            move (-2) steps\n        end\n    end\n    repeat (20)\n        change [ghost v] effect by (2)\n        if <(costume [number v]) = [1]> then\n            move (-0.5) steps\n        end\n        if <(costume [number v]) = [2]> then\n            move (-1) steps\n        end\n        if <(costume [number v]) = [3]> then\n            move (-2) steps\n        end\n    end\n    delete this clone\nend\n\nwhen I receive [shake v]\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by ((vibration) * (-1))\nwait (0.01) seconds\nchange x by (vibration)\nwait (0.01) seconds\nchange y by (vibration)\nwait (0.01) seconds\nchange x by ((vibration) * (-1))\nwait (0.01) seconds\n\nwhen I start as a clone\nif <(Level) > [8]> then\n    delete this clone\nend\n\nwhen backdrop switches to [level 1 v]\nset [sun beam v] to [1]\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [2]> then\n        set [sun beam v] to [0]\n        delete this clone\n    else\n        if <(backdrop [number v]) = [3]> then\n            stop [this script v]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(Sun Beam) = [0]>> then\n        go to [front v] layer\n    else\n        go to [back v] layer\n    end\nend\n\n@War Turtle2\n\nwhen backdrop switches to [level 14 v]\ngo to x: (115) y: (-84)\nforever\n    if <(Level) = [14]> then\n        point towards (player v)\n        move (0.5) steps\n        set y to (-84)\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nswitch costume to (war turtle v)\nset size to (50) %\nhide\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (sword v)?> then\n        play sound [Sword Swipe  v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    wait (0.15) seconds\n    next costume\nend\n\nwhen backdrop switches to [level 14 v]\nshow\n\nwhen I start as a clone\nforever\n    if <touching (sword v)?> then\n        play sound [Sword Swipe  v] until done\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <(Shield) = [0]> then\n            broadcast (Level Reset v)\n        end\n    end\nend\n\nwhen backdrop switches to [level 15 v]\nforever\n    stop [other scripts in sprite v]\n    hide\nend\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (102) %\nhide\ngo to [front v] layer\n\n