Climb the Tower v2.0 FINISHED
@Stage\n\nwhen flag clicked\nforever\n    play sound [18 Protoman v] until done\nend\n\n@Explorer\n\ndefine Position Player\ngo to x: ((Player X) - (Next Scr X)) y: ((Player Y) - (Next Scr Y))\n\ndefine None\nchange [player x v] by (sx)\nchange [player y v] by (sy)\nPosition Player\nif <not <touching (sky islands collision v)?>> then\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [player y v] by (1)\n    Position Player\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [player x v] by ((0) - (sx))\nchange [player y v] by ((-6) - (sy))\n\ndefine Game Loop\nforever\n    Do Player Tick\n    broadcast (tick v) and wait\nend\n\nwhen flag clicked\nset [deaths v] to [0]\nset [spawn x v] to [0]\nset [spawn y v] to [30]\nRe Spawn Player\nPosition Player\ngo to [front v] layer\nGame Loop\n\ndefine Re Spawn Player\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [next scr x v] to [0]\nset [next scr y v] to [0]\nset [player x v] to (Spawn X)\nset [player y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nset [frame v] to [0]\nset [outside/inside v] to [outside]\n\nwhen I receive [dead v]\nchange [deaths v] by (1)\nRe Spawn Player\n\ndefine Do Player Tick\nset [ghost v] effect to (100)\nif <key (left arrow v) pressed?> then\n    if <(direction) > [0]> then\n        point in direction (-90)\n    end\n    set [speed x v] to [-8]\n    change [frame v] by (0.5)\nelse\n    if <key (right arrow v) pressed?> then\n        if <(direction) < [0]> then\n            point in direction (90)\n        end\n        set [speed x v] to [8]\n        change [frame v] by (0.5)\n    else\n        set [speed x v] to [0]\n        set [frame v] to [0]\n    end\nend\nif <(Can Jump?) > [0]> then\n    change [can jump? v] by (-1)\n    if <key (up arrow v) pressed?> then\n        set [speed y v] to [9]\n    end\nend\nswitch costume to (megaman_standing v)\nMove Player (Speed X) (0)\nchange [speed y v] by (-1)\nMove Player (0) (Speed Y)\nset [next scr x v] to ((((Scroll X) * (6)) + (Player X)) / (7))\nif <(Next Scr X) < [0]> then\n    set [next scr x v] to [0]\nend\nset [next scr y v] to (round ((((Scroll Y) * (6)) + (Player Y)) / (7)))\nif <(Next Scr Y) < [0]> then\n    set [next scr y v] to [0]\nend\nif <(Player Y) < [-180]> then\n    Re Spawn Player\n    change [deaths v] by (1)\nend\nPosition Player\n\n@sky islands collision\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nDo Cloning\n\ndefine Do Cloning\nswitch costume to ((0) + (0))\nforever\n    go [backward v] (1000) layers\n    set size to (1600) %\n    set [ghost v] effect to (100)\n    set [costume name v] to ([costume name v] of (join [sky islands collision] []))\n    set [offset x v] to ((478) * (letter (1) of (Costume Name)))\n    set [offset y v] to ((360) * (letter (2) of (Costume Name)))\n    if <(costume [number v]) = [1]> then\n        stop [this script v]\n    end\n    create clone of (_myself_ v)\n    switch costume to ((costume [number v]) - (1))\nend\n\nwhen I receive [tick v]\nset [scroll x v] to (Next Scr X)\nset [scroll y v] to (Next Scr Y)\nPosition and Show ([floor v] of ((Offset X) - (Scroll X)) ) ([floor v] of ((Offset Y) - (Scroll Y)) )\n\ndefine None\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\n\n@sky islands ghost\n\nwhen I receive [tick v]\nset [scroll x v] to (Next Scr X)\nset [scroll y v] to (Next Scr Y)\nPosition and Show ([floor v] of ((Offset X) - (Scroll X)) ) ([floor v] of ((Offset Y) - (Scroll Y)) )\n\ndefine None\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nDo Cloning\n\nwhen flag clicked\nforever\nend\n\ndefine Do Cloning\nswitch costume to ((0) + (0))\nforever\n    go [backward v] (1000) layers\n    set size to (1600) %\n    set [costume name v] to ([costume name v] of (join [sky islands ghost] []))\n    set [offset x v] to ((478) * (letter (1) of (Costume Name)))\n    set [offset y v] to ((360) * (letter (2) of (Costume Name)))\n    if <(costume [number v]) = [1]> then\n        stop [this script v]\n    end\n    create clone of (_myself_ v)\n    switch costume to ((costume [number v]) - (1))\nend\n\n@Enemy\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [5]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [5]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\nset [spawn x v] to [920]\nset [spawn y v] to [90]\nRe-Spawn\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-7]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [7]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [5]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\n@Explorer3\n\nwhen I receive [flame sword v]\nswitch costume to (megaman_forwards v)\nwait (0.1) seconds\nswitch costume to (megaman_forwards2 v)\nwait (0.1) seconds\nswitch costume to (megaman_forwards3 v)\nwait (0.1) seconds\nswitch costume to (megaman_forwards4 v)\nwait (0.1) seconds\nswitch costume to (megaman_forwards5 v)\nwait (0.1) seconds\nswitch costume to (megaman_forwards6 v)\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nset [animation? v] to [true]\nset [touchingground v] to [true]\nforever\n    set size to (100) %\n    go to (explorer v)\n    if <(Animation?) = [true]> then\n        if <[7] = ([can jump? v] of [explorer v])> then\n            if <<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> then\n                next costume\n                if <[4] < (costume [number v])> then\n                    switch costume to (megaman_run v)\n                end\n                wait (0.0001) seconds\n            else\n                switch costume to (megaman_standing v)\n            end\n            if <key (left arrow v) pressed?> then\n                point in direction (-90)\n            end\n            if <key (right arrow v) pressed?> then\n                point in direction (90)\n            end\n        else\n            switch costume to (megaman_jump v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (enemy v)?> or <<touching (enemy2 v)?> or <<touching (enemy3 v)?> or <<touching (enemy4 v)?> or <<touching (enemy5 v)?> or <<touching (enemy6 v)?> or <<touching (enemy7 v)?> or <<touching (enemy8 v)?> or <<touching (enemy9 v)?> or <<touching (enemy10 v)?> or <<touching (enemy11 v)?> or <<touching (enemy12 v)?> or <touching (enemy13 v)?>>>>>>>>>>>>> then\n        broadcast (DEAD v)\n        wait (0.3) seconds\n    end\nend\n\n@Enemy2\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\nset [spawn x v] to [1500]\nset [spawn y v] to [90]\nRe-Spawn\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-7]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [7]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\nset [speed y v] to [9]\n\nset [speed y v] to [9]\n\nset [speed y v] to [9]\n\n@Enemy3\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [9]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [9]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\nset [spawn x v] to [1363]\nset [spawn y v] to [370]\nRe-Spawn\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-3]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [3]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [9]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\n@Enemy4\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [9]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [9]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\nset [spawn x v] to [1500]\nset [spawn y v] to [690]\nRe-Spawn\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-5]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [5]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [9]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\n@Enemy5\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [9]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [9]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\nset [spawn x v] to [1677]\nset [spawn y v] to [810]\nRe-Spawn\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-3]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [3]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [9]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\n@Enemy6\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [9]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [9]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\nset [spawn x v] to [2125]\nset [spawn y v] to [810]\nRe-Spawn\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-9]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [9]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [9]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\n@Enemy7\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [11]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [11]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\nset [spawn x v] to [2565]\nset [spawn y v] to [840]\nRe-Spawn\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-9]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [9]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [11]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\n@Enemy8\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [9]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [9]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-3]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [3]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [9]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\nwhen flag clicked\nhide\nset [spawn x v] to [2267]\nset [spawn y v] to [1224]\nRe-Spawn\n\n@Enemy9\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [3]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [3]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-7]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [7]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [3]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\nwhen flag clicked\nhide\nset [spawn x v] to [1883]\nset [spawn y v] to [1214]\nRe-Spawn\n\n@Enemy10\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [3]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [3]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-7]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [7]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [3]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\nwhen flag clicked\nhide\nset [spawn x v] to [1725]\nset [spawn y v] to [1214]\nRe-Spawn\n\n@Enemy11\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [3]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [3]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-7]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [7]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [3]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\nwhen flag clicked\nhide\nset [spawn x v] to [1627]\nset [spawn y v] to [1214]\nRe-Spawn\n\n@Enemy12\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [3]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [3]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-7]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [7]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [3]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\nwhen flag clicked\nhide\nset [spawn x v] to [1469]\nset [spawn y v] to [1214]\nRe-Spawn\n\n@Enemy13\n\ndefine Re-Spawn\nset [enemy x v] to (Spawn X)\nset [enemy y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nhide\n\nwhen I receive [tick v]\nTick\n\ndefine None\nchange [enemy x v] by (sx)\nchange [enemy y v] by (sy)\nPosition Enemy (Scroll X) (Scroll Y)\nif <not <touching (sky islands collision v)?>> then\n    if <<(sx) = [0]> and <(Player Y) > ((Enemy Y) + (16))>> then\n        if <<(Can Jump?) > [0]> and <(Can Jump?) < [6]>> then\n            set [speed y v] to [11]\n        end\n    end\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nrepeat (6)\n    change [enemy y v] by (1)\n    Position Enemy (Scroll X) (Scroll Y)\n    if <not <touching (sky islands collision v)?>> then\n        set [can jump? v] to [7]\n        stop [this script v]\n    end\nend\nchange [enemy x v] by ((0) - (sx))\nchange [enemy y v] by ((-6) - (sy))\nif <(sy) = [0]> then\n    if <<(Can Jump?) > [0]> and <(pick random (1) to (10)) < [10]>> then\n        set [speed y v] to [11]\n    else\n        set [target x v] to ((Enemy X) + ((sx) * (pick random (-8) to (-25))))\n    end\nend\n\ndefine None\nif <(On Screen?) = [1]> then\n    go to x: ((Enemy X) - (scroll x)) y: ((Enemy Y) - (scroll y))\n    show\nelse\n    hide\nend\n\ndefine Tick\ngo to [front v] layer\nif <<(On Screen?) = [0]> or <(pick random (1) to (30)) = [1]>> then\n    set [target x v] to ((Player X) + (pick random (-100) to (100)))\nend\nset [on screen? v] to [0]\nif <([abs v] of ((Enemy X) - (Next Scr X)) ) < [220]> then\n    if <([abs v] of ((Enemy Y) - (Next Scr Y)) ) < [160]> then\n        set [on screen? v] to [1]\n        set [speed x v] to [0]\n        if <((Target X) + (5)) < (Enemy X)> then\n            set [speed x v] to [-14]\n        else\n            if <((Target X) - (5)) > (Enemy X)> then\n                set [speed x v] to [14]\n            else\n                set [target x v] to ((Player X) + (pick random (-100) to (100)))\n            end\n        end\n        if <(Can Jump?) > [0]> then\n            change [can jump? v] by (-1)\n            if <(pick random (1) to (47)) = [1]> then\n                set [speed y v] to [11]\n            end\n        end\n        Move Enemy (Speed X) (0)\n        change [speed y v] by (-1)\n        Move Enemy (0) (Speed Y)\n        if <(Enemy Y) < [-180]> then\n            Re-Spawn\n        end\n    end\nend\nPosition Enemy (Next Scr X) (Next Scr Y)\n\nwhen flag clicked\nhide\nset [spawn x v] to [899]\nset [spawn y v] to [1086]\nRe-Spawn\n\n
Climb up the tower to show your bravery.\nUse your arrow keys to move\nAvoid the guards\nGET TO THE WIN ZONE\nCompare your deaths with others and become the best tower climber.\nRemember this IS possible\nTip: lure guards into holes or pits to get rid of them.\n\nWhen remixing to make it easier take out the TICK block from the enemies, this will stop them from spawning