HARD platformer + 2 players (V2.1)
@Stage\n\n@Intro\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (intro v)\nshow\nwait (1.5) seconds\nswitch costume to (intro2 v)\nstart sound [Hit v]\nwait (0.2) seconds\nswitch costume to (intro3 v)\nstart sound [Hit v]\nwait (0.2) seconds\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [front v] layer\nset [ghost v] effect to (50)\nswitch costume to (intro4 v)\ngo to x: (-267) y: (15)\nstart sound [Cling v]\nglide (0.7) secs to x: (267) y: (15)\nwait (0.5) seconds\nbroadcast (efeito jogo v)\ndelete this clone\n\nwhen I receive [menu v]\nhide\n\n@Dano\n\nwhen flag clicked\nhide\nswitch costume to (pano de fundo9 v)\ngo to x: (0) y: (0)\n\nwhen I receive [iniciar jogo v]\nshow\nset [clone vermelho v] to [0]\nswitch costume to (level1 v)\ncreate clone of (_myself_ v)\nforever\n    if <(item (5) of [movimentotela v]) < ((-480) * (9))> then\n        Movimentação (X, Y, Level) [10] [2] [13]\n    else\n        if <(item (5) of [movimentotela v]) < ((-480) * (7))> then\n            Movimentação (X, Y, Level) [8] [1] [10]\n        else\n            if <(item (5) of [movimentotela v]) < ((-480) * (5))> then\n                Movimentação (X, Y, Level) [6] [0] [7]\n            else\n                if <(item (5) of [movimentotela v]) < ((-480) * (3))> then\n                    Movimentação (X, Y, Level) [4] [0] [5]\n                else\n                    if <[480] < ((item (5) of [movimentotela v]) * (-1))> then\n                        Movimentação (X, Y, Level) [2] [0] [3]\n                    else\n                        if <((item (5) of [movimentotela v]) * (-1)) < [480]> then\n                            Movimentação (X, Y, Level) [0] [0] [1]\n                        else\n                            hide\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone Vermelho) = [0]> then\n    set [clone vermelho v] to [1]\n    create clone of (_myself_ v)\n    forever\n        if <(item (5) of [movimentotela v]) < ((-480) * (8))> then\n            Movimentação (X, Y, Level) [9] [2] [12]\n        else\n            if <(item (5) of [movimentotela v]) < ((-480) * (6))> then\n                Movimentação (X, Y, Level) [7] [1] [9]\n            else\n                if <((4) * (-480)) > (item (5) of [movimentotela v])> then\n                    Movimentação (X, Y, Level) [5] [0] [6]\n                else\n                    if <((2) * (-480)) > (item (5) of [movimentotela v])> then\n                        Movimentação (X, Y, Level) [3] [0] [4]\n                    else\n                        if <[0] > (item (5) of [movimentotela v])> then\n                            Movimentação (X, Y, Level) [1] [0] [2]\n                        else\n                            hide\n                        end\n                    end\n                end\n            end\n        end\n    end\nelse\n    forever\n        if <(item (5) of [movimentotela v]) < ((-480) * (9))> then\n            Movimentação (X, Y, Level) [10] [1] [14]\n        else\n            if <(item (5) of [movimentotela v]) < ((-480) * (7))> then\n                Movimentação (X, Y, Level) [8] [2] [11]\n            else\n                if <(item (5) of [movimentotela v]) < ((-480) * (5))> then\n                    Movimentação (X, Y, Level) [6] [1] [8]\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\ndefine Movimentação (X, Y, Level) (x) (y) (level)\nswitch costume to (level)\ngo to x: ((item (5) of [movimentotela v]) + ((480) * (x))) y: ((item (6) of [movimentotela v]) + ((360) * (y)))\nif <<<((-480) * ((x) - (1))) > (item (5) of [movimentotela v])> and <(item (5) of [movimentotela v]) > ((-480) * ((x) + (1)))>> and <<((-360) * ((y) - (1))) > (item (6) of [movimentotela v])> and <(item (6) of [movimentotela v]) > ((-360) * ((y) + (1)))>>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [efeito inicial v]\nswitch costume to (level1 v)\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [efeito inicial v]\nset [ghost v] effect to (0)\nshow\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nbroadcast (iniciar jogo v)\n\nwhen I receive [efeito jogo v]\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nwait (0.5) seconds\nbroadcast (Menu v)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Sprite2\n\nwhen flag clicked\nhide\nreplace item (1) of [movimentotela v] with [0]\nreplace item (2) of [movimentotela v] with [0]\nreplace item (3) of [movimentotela v] with [0]\nreplace item (4) of [movimentotela v] with [0]\nreplace item (5) of [movimentotela v] with [0]\nreplace item (6) of [movimentotela v] with [0]\n\nwhen I receive [iniciar jogo v]\nshow\nset [clone v] to [0]\nswitch costume to (level1 v)\ncreate clone of (_myself_ v)\nforever\n    if <(jogando) = [1]> then\n        replace item (5) of [movimentotela v] with ((item (5) of [movimentotela v]) + ((item (1) of [movimentotela v]) / (-10)))\n        replace item (6) of [movimentotela v] with ((item (6) of [movimentotela v]) + ((item (2) of [movimentotela v]) / (-10)))\n    end\n    if <(jogando) = [2]> then\n        replace item (5) of [movimentotela v] with ((item (5) of [movimentotela v]) + (((item (1) of [movimentotela v]) + (item (3) of [movimentotela v])) / (-6)))\n        replace item (6) of [movimentotela v] with ((item (6) of [movimentotela v]) + (((item (2) of [movimentotela v]) + (item (4) of [movimentotela v])) / (-6)))\n    end\n    if <(item (5) of [movimentotela v]) < ((-480) * (9))> then\n        Movimentação (X, Y, Level) [10] [2] [13]\n    else\n        if <(item (5) of [movimentotela v]) < ((-480) * (7))> then\n            Movimentação (X, Y, Level) [8] [1] [10]\n        else\n            if <(item (5) of [movimentotela v]) < ((-480) * (5))> then\n                Movimentação (X, Y, Level) [6] [0] [7]\n            else\n                if <(item (5) of [movimentotela v]) < ((-480) * (3))> then\n                    Movimentação (X, Y, Level) [4] [0] [5]\n                else\n                    if <[480] < ((item (5) of [movimentotela v]) * (-1))> then\n                        Movimentação (X, Y, Level) [2] [0] [3]\n                    else\n                        if <((item (5) of [movimentotela v]) * (-1)) < [480]> then\n                            Movimentação (X, Y, Level) [0] [0] [1]\n                        else\n                            hide\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone) = [0]> then\n    set [clone v] to [1]\n    create clone of (_myself_ v)\n    forever\n        if <(item (5) of [movimentotela v]) < ((-480) * (8))> then\n            Movimentação (X, Y, Level) [9] [2] [12]\n        else\n            if <(item (5) of [movimentotela v]) < ((-480) * (6))> then\n                Movimentação (X, Y, Level) [7] [1] [9]\n            else\n                if <((4) * (-480)) > (item (5) of [movimentotela v])> then\n                    Movimentação (X, Y, Level) [5] [0] [6]\n                else\n                    if <((2) * (-480)) > (item (5) of [movimentotela v])> then\n                        Movimentação (X, Y, Level) [3] [0] [4]\n                    else\n                        if <[0] > (item (5) of [movimentotela v])> then\n                            Movimentação (X, Y, Level) [1] [0] [2]\n                        else\n                            hide\n                        end\n                    end\n                end\n            end\n        end\n    end\nelse\n    forever\n        if <(item (5) of [movimentotela v]) < ((-480) * (9))> then\n            Movimentação (X, Y, Level) [10] [1] [14]\n        else\n            if <(item (5) of [movimentotela v]) < ((-480) * (7))> then\n                Movimentação (X, Y, Level) [8] [2] [11]\n            else\n                if <(item (5) of [movimentotela v]) < ((-480) * (5))> then\n                    Movimentação (X, Y, Level) [6] [1] [8]\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\ndefine Movimentação (X, Y, Level) (x) (y) (level)\nswitch costume to ((level) + (1))\ngo to x: ((item (5) of [movimentotela v]) + ((480) * (x))) y: ((item (6) of [movimentotela v]) + ((360) * (y)))\nif <<<((-480) * ((x) - (1))) > (item (5) of [movimentotela v])> and <(item (5) of [movimentotela v]) > ((-480) * ((x) + (1)))>> and <<((-360) * ((y) - (1))) > (item (6) of [movimentotela v])> and <(item (6) of [movimentotela v]) > ((-360) * ((y) + (1)))>>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [efeito inicial v]\nswitch costume to (level1 v)\n\nwhen I receive [menu v]\nshow\nswitch costume to (pano de fundo2 v)\ngo to x: (0) y: (0)\n\n@button\n\nwhen I receive [efeito inicial v]\nhide\n\nwhen I start as a clone\nswitch costume to (traje2 v)\ngo to x: (175) y: (-90)\nshow\nforever\n    if <<(x position) = [175]> and <touching (mouse-pointer v)?>> then\n        start sound [Botão v]\n    end\n    if <not <(x position) = [175]>> then\n        go to x: (175) y: (-90)\n    end\n    if <touching (mouse-pointer v)?> then\n        set x to (185)\n        if <mouse down?> then\n            start sound [Botão Precionado v]\n            broadcast (efeito inicial v)\n            wait (0.5) seconds\n            if <(jogando) = [0]> then\n                set [jogando v] to [2]\n                hide\n            end\n        end\n    end\n    if <(jogando) > [0]> then\n        delete this clone\n    end\nend\n\nwhen I receive [menu v]\nset [jogando v] to [0]\ncreate clone of (_myself_ v)\nswitch costume to (traje1 v)\ngo to x: (196) y: (-55)\nshow\nforever\n    if <<(x position) = [175]> and <touching (mouse-pointer v)?>> then\n        start sound [Botão v]\n    end\n    if <not <(x position) = [175]>> then\n        go to x: (175) y: (-55)\n    end\n    if <touching (mouse-pointer v)?> then\n        set x to (185)\n        if <mouse down?> then\n            start sound [Botão Precionado v]\n            broadcast (efeito inicial v)\n            broadcast (J2D v)\n            wait (0.5) seconds\n            if <(jogando) = [0]> then\n                hide\n                set [jogando v] to [1]\n            end\n        end\n    end\n    if <(jogando) > [0]> then\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\n\n@button2\n\nwhen I receive [iniciar jogo v]\nhide\n\nwhen I receive [efeito inicial v]\nhide\n\nwhen I start as a clone\ngo to x: (-77) y: (-97)\nshow\nforever\n    if <<(x position) = [-77]> and <touching (mouse-pointer v)?>> then\n        start sound [Botão v]\n    end\n    if <not <(x position) = [175]>> then\n        go to x: (-77) y: (-97)\n    end\n    if <touching (mouse-pointer v)?> then\n        set x to (-68)\n        if <mouse down?> then\n            start sound [Botão Precionado v]\n            change [personagem2 v] by (1)\n            if <(Personagem1) = [14]> then\n                set [personagem1 v] to [1]\n            end\n            wait until <not <mouse down?>>\n        end\n    end\n    if <(jogando) > [0]> then\n        delete this clone\n    end\nend\n\nwhen I receive [menu v]\nset [personagem1 v] to [1]\nset [personagem2 v] to [1]\nset [jogando v] to [0]\nswitch costume to (traje1 v)\ncreate clone of (_myself_ v)\ngo to x: (-97) y: (-40)\nshow\nforever\n    if <<(x position) = [-97]> and <touching (mouse-pointer v)?>> then\n        start sound [Botão v]\n    end\n    if <not <(x position) = [175]>> then\n        go to x: (-97) y: (-40)\n    end\n    if <touching (mouse-pointer v)?> then\n        set x to (-90)\n        if <mouse down?> then\n            start sound [Botão Precionado v]\n            change [personagem1 v] by (1)\n            if <(Personagem1) = [14]> then\n                set [personagem1 v] to [1]\n            end\n            wait until <not <mouse down?>>\n        end\n    end\n    if <(jogando) > [0]> then\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\n\n@Chekpoint\n\nwhen flag clicked\nhide\nswitch costume to (pano de fundo9 v)\ngo to x: (0) y: (0)\n\nwhen I receive [iniciar jogo v]\nshow\nset [clone azul v] to [0]\nswitch costume to (level1 v)\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\nif <(Clone Azul) = [0]> then\n    set [clone azul v] to [1]\n    create clone of (_myself_ v)\n    forever\n        if <(item (5) of [movimentotela v]) < ((-480) * (8))> then\n            Movimentação (X, Y, Level) [9] [2] [12]\n        else\n            if <(item (5) of [movimentotela v]) < ((-480) * (6))> then\n                Movimentação (X, Y, Level) [7] [1] [9]\n            else\n                if <((4) * (-480)) > (item (5) of [movimentotela v])> then\n                    Movimentação (X, Y, Level) [5] [0] [6]\n                else\n                    if <((2) * (-480)) > (item (5) of [movimentotela v])> then\n                        Movimentação (X, Y, Level) [3] [0] [4]\n                    else\n                        if <[0] > (item (5) of [movimentotela v])> then\n                            Movimentação (X, Y, Level) [1] [0] [2]\n                        else\n                            hide\n                        end\n                    end\n                end\n            end\n        end\n    end\nelse\n    if <(Clone Azul) = [1]> then\n        set [clone azul v] to [2]\n        create clone of (_myself_ v)\n        forever\n            if <(item (5) of [movimentotela v]) < ((-480) * (9))> then\n                Movimentação (X, Y, Level) [10] [1] [14]\n            else\n                if <(item (5) of [movimentotela v]) < ((-480) * (7))> then\n                    Movimentação (X, Y, Level) [8] [2] [11]\n                else\n                    if <(item (5) of [movimentotela v]) < ((-480) * (5))> then\n                        Movimentação (X, Y, Level) [6] [1] [8]\n                    else\n                        hide\n                    end\n                end\n            end\n        end\n    else\n        forever\n            if <(item (5) of [movimentotela v]) < ((-480) * (9))> then\n                Movimentação (X, Y, Level) [10] [2] [13]\n            else\n                if <(item (5) of [movimentotela v]) < ((-480) * (7))> then\n                    Movimentação (X, Y, Level) [8] [1] [10]\n                else\n                    if <(item (5) of [movimentotela v]) < ((-480) * (5))> then\n                        Movimentação (X, Y, Level) [6] [0] [7]\n                    else\n                        if <(item (5) of [movimentotela v]) < ((-480) * (3))> then\n                            Movimentação (X, Y, Level) [4] [0] [5]\n                        else\n                            if <[480] < ((item (5) of [movimentotela v]) * (-1))> then\n                                Movimentação (X, Y, Level) [2] [0] [3]\n                            else\n                                if <((item (5) of [movimentotela v]) * (-1)) < [480]> then\n                                    Movimentação (X, Y, Level) [0] [0] [1]\n                                else\n                                    hide\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Movimentação (X, Y, Level) (x) (y) (level)\nswitch costume to (level)\ngo to x: ((item (5) of [movimentotela v]) + ((480) * (x))) y: ((item (6) of [movimentotela v]) + ((360) * (y)))\nif <touching (_edge_ v)?> then\n    hide\nelse\n    show\nend\nif <<<touching (jogador 1 v)?> and <<(jogando) = [1]> or <(Save2J) > ((level) - (1))>>> or <<touching (jogador 2 v)?> and <<(jogando) = [2]> and <(Save1J) > ((level) - (1))>>>> then\n    if <<(level) = [1]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-295]\n        replace item (2) of [save v] with [109]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [2]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-834]\n        replace item (2) of [save v] with [109]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [3]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-1287]\n        replace item (2) of [save v] with [109]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [4]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-1773]\n        replace item (2) of [save v] with [109]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [5]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-2243]\n        replace item (2) of [save v] with [109]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [6]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-2757]\n        replace item (2) of [save v] with [109]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [7]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-2751]\n        replace item (2) of [save v] with [-260]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [8]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-3175]\n        replace item (2) of [save v] with [-260]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [9]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-3688]\n        replace item (2) of [save v] with [-260]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [10]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-3792]\n        replace item (2) of [save v] with [-600]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [12]> and <(level) > (item (3) of [save v])>> then\n        replace item (1) of [save v] with [-4628]\n        replace item (2) of [save v] with [-615]\n        replace item (3) of [save v] with (level)\n    end\n    if <<(level) = [13]> and <(level) > (item (3) of [save v])>> then\n        set [jogo completado v] to [1]\n        replace item (1) of [save v] with [0]\n        replace item (2) of [save v] with [0]\n        replace item (3) of [save v] with [0]\n    end\nend\nif <<(jogando) = [2]> and <touching (jogador 2 v)?>> then\n    set [save2j v] to (level)\nend\nif <<(jogando) = [2]> and <touching (jogador 1 v)?>> then\n    set [save1j v] to (level)\nend\n\nwhen I receive [efeito inicial v]\nswitch costume to (level1 v)\n\nwhen flag clicked\nreplace item (1) of [save v] with [0]\nreplace item (2) of [save v] with [0]\nreplace item (3) of [save v] with [0]\nset [save2j v] to [0]\nset [save1j v] to [0]\n\n@Fundo do Jogo\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nforever\n    set [cronometrado v] to ((timer) + (0.2))\nend\n\nwhen I receive [menu v]\nforever\n    play sound [Xenogenesis v] until done\nend\n\n@Jogador 1\n\nwhen I receive [menu v]\nhide\ngo to x: (-155) y: (-40)\nshow\nforever\n    if <(jogando) = [0]> then\n        switch costume to (Personagem1)\n    end\nend\n\nwhen flag clicked\nset size to (50) %\nhide\n\nwhen I receive [iniciar jogo v]\nset [movimentotelax v] to [0]\nset [movimentotelay v] to [0]\nforever\n    point in direction (90)\n    switch costume to (traje1 v)\n    change x by ((item (5) of [movimentotela v]) - (MovimentoTelaX))\n    change y by ((item (6) of [movimentotela v]) - (MovimentoTelaY))\n    set [movimentotelax v] to (item (5) of [movimentotela v])\n    set [movimentotelay v] to (item (6) of [movimentotela v])\n    clear graphic effects\n    if <<touching (dano v)?> or <key (space v) pressed?>> then\n        switch costume to (Personagem1)\n        start sound [Im Leaved Damage v]\n        repeat (10)\n            change [ghost v] effect by (10)\n            change x by ((item (5) of [movimentotela v]) - (MovimentoTelaX))\n            change y by ((item (6) of [movimentotela v]) - (MovimentoTelaY))\n            set [movimentotelax v] to (item (5) of [movimentotela v])\n            set [movimentotelay v] to (item (6) of [movimentotela v])\n        end\n        set [movimentox v] to [0]\n        set [movimentoy v] to [0]\n        set x to ((item (5) of [movimentotela v]) - (item (1) of [save v]))\n        set y to ((item (6) of [movimentotela v]) - (item (2) of [save v]))\n        replace item (1) of [movimentotela v] with (x position)\n        replace item (2) of [movimentotela v] with ((y position) + (20))\n        if <(jogando) = [1]> then\n            repeat until <<<(x position) < [120]> and <(x position) > [-120]>> and <<[-70] < (y position)> and <(y position) < [70]>>>\n                set x to ((item (5) of [movimentotela v]) - (item (1) of [save v]))\n                set y to ((item (6) of [movimentotela v]) - (item (2) of [save v]))\n                replace item (1) of [movimentotela v] with (x position)\n                replace item (2) of [movimentotela v] with ((y position) + (20))\n            end\n        end\n        if <(jogando) = [2]> then\n            repeat until <<<(x position) < [173]> and <(x position) > [-173]>> and <<[-125] < (y position)> and <(y position) < [125]>>>\n                set x to ((item (5) of [movimentotela v]) - (item (1) of [save v]))\n                set y to ((item (6) of [movimentotela v]) - (item (2) of [save v]))\n                replace item (1) of [movimentotela v] with (x position)\n                replace item (2) of [movimentotela v] with ((y position) + (20))\n            end\n        end\n        set [movimentotelax v] to (item (5) of [movimentotela v])\n        set [movimentotelay v] to (item (6) of [movimentotela v])\n        clear graphic effects\n    end\n    if <key (right arrow v) pressed?> then\n        change [movimentox v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [movimentox v] by (-1)\n    end\n    set [movimentox v] to ((MovimentoX) * (0.9))\n    if <touching (sprite2 v)?> then\n        change x by (1)\n        if <touching (sprite2 v)?> then\n            change x by (1)\n            if <touching (sprite2 v)?> then\n                change x by (1)\n                if <touching (sprite2 v)?> then\n                    change x by (-3)\n                end\n            end\n        end\n    end\n    if <touching (sprite2 v)?> then\n        change x by (-1)\n        if <touching (sprite2 v)?> then\n            change x by (-1)\n            if <touching (sprite2 v)?> then\n                change x by (-1)\n                if <touching (sprite2 v)?> then\n                    change x by (3)\n                end\n            end\n        end\n    end\n    change x by (MovimentoX)\n    if <touching (sprite2 v)?> then\n        change y by (1)\n        if <touching (sprite2 v)?> then\n            change y by (1)\n            if <touching (sprite2 v)?> then\n                change y by (1)\n                if <touching (sprite2 v)?> then\n                    change y by (1)\n                    if <touching (sprite2 v)?> then\n                        change y by (1)\n                        if <touching (sprite2 v)?> then\n                            change x by ((MovimentoX) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(MovimentoX) > [0]> then\n                                    set [movimentox v] to [-5]\n                                else\n                                    set [movimentox v] to [5]\n                                end\n                                set [movimentoy v] to [10]\n                            else\n                                set [movimentox v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [movimentoy v] by (-1)\n    change y by (MovimentoY)\n    if <touching (sprite2 v)?> then\n        change y by ((MovimentoY) * (-1))\n        set [movimentoy v] to [0]\n    end\n    change y by (-1)\n    if <touching (sprite2 v)?> then\n        if <key (up arrow v) pressed?> then\n            set [movimentoy v] to [13]\n        end\n    end\n    change y by (1)\n    replace item (1) of [movimentotela v] with (x position)\n    replace item (2) of [movimentotela v] with ((y position) + (20))\n    switch costume to (Personagem1)\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (90)\n    end\nend\n\n@Jogador 2\n\nwhen I receive [menu v]\nhide\ngo to x: (-135) y: (-97)\nset [color v] effect to (125)\nshow\nforever\n    if <(jogando) = [0]> then\n        switch costume to (Personagem2)\n    end\nend\n\nwhen flag clicked\nset size to (50) %\nhide\n\nwhen I receive [iniciar jogo v]\nset [movimentotelax v] to [0]\nset [movimentotelay v] to [0]\nset [color v] effect to (125)\nif <(jogando) = [2]> then\n    forever\n        point in direction (90)\n        switch costume to (traje1 v)\n        change x by ((item (5) of [movimentotela v]) - (MovimentoTelaX))\n        change y by ((item (6) of [movimentotela v]) - (MovimentoTelaY))\n        set [movimentotelax v] to (item (5) of [movimentotela v])\n        set [movimentotelay v] to (item (6) of [movimentotela v])\n        clear graphic effects\n        if <<touching (dano v)?> or <key (space v) pressed?>> then\n            switch costume to (Personagem2)\n            set [color v] effect to (125)\n            start sound [Im Leaved Damage v]\n            repeat (10)\n                change [ghost v] effect by (10)\n                change x by ((item (5) of [movimentotela v]) - (MovimentoTelaX))\n                change y by ((item (6) of [movimentotela v]) - (MovimentoTelaY))\n                set [movimentotelax v] to (item (5) of [movimentotela v])\n                set [movimentotelay v] to (item (6) of [movimentotela v])\n            end\n            set [movimentox v] to [0]\n            set [movimentoy v] to [0]\n            set x to ((item (5) of [movimentotela v]) - (item (1) of [save v]))\n            set y to ((item (6) of [movimentotela v]) - (item (2) of [save v]))\n            replace item (3) of [movimentotela v] with (x position)\n            replace item (4) of [movimentotela v] with ((y position) + (20))\n            repeat until <<<(x position) < [173]> and <(x position) > [-173]>> and <<[-125] < (y position)> and <(y position) < [125]>>>\n                set x to ((item (5) of [movimentotela v]) - (item (1) of [save v]))\n                set y to ((item (6) of [movimentotela v]) - (item (2) of [save v]))\n                replace item (3) of [movimentotela v] with (x position)\n                replace item (4) of [movimentotela v] with ((y position) + (20))\n            end\n            set [movimentotelax v] to (item (5) of [movimentotela v])\n            set [movimentotelay v] to (item (6) of [movimentotela v])\n            clear graphic effects\n        end\n        if <key (d v) pressed?> then\n            change [movimentox v] by (1)\n        end\n        if <key (a v) pressed?> then\n            change [movimentox v] by (-1)\n        end\n        set [movimentox v] to ((MovimentoX) * (0.9))\n        if <touching (sprite2 v)?> then\n            change x by (1)\n            if <touching (sprite2 v)?> then\n                change x by (1)\n                if <touching (sprite2 v)?> then\n                    change x by (1)\n                    if <touching (sprite2 v)?> then\n                        change x by (-3)\n                    end\n                end\n            end\n        end\n        if <touching (sprite2 v)?> then\n            change x by (-1)\n            if <touching (sprite2 v)?> then\n                change x by (-1)\n                if <touching (sprite2 v)?> then\n                    change x by (-1)\n                    if <touching (sprite2 v)?> then\n                        change x by (3)\n                    end\n                end\n            end\n        end\n        change x by (MovimentoX)\n        if <touching (sprite2 v)?> then\n            change y by (1)\n            if <touching (sprite2 v)?> then\n                change y by (1)\n                if <touching (sprite2 v)?> then\n                    change y by (1)\n                    if <touching (sprite2 v)?> then\n                        change y by (1)\n                        if <touching (sprite2 v)?> then\n                            change y by (1)\n                            if <touching (sprite2 v)?> then\n                                change x by ((MovimentoX) * (-1))\n                                change y by (-5)\n                                if <key (w v) pressed?> then\n                                    if <(MovimentoX) > [0]> then\n                                        set [movimentox v] to [-5]\n                                    else\n                                        set [movimentox v] to [5]\n                                    end\n                                    set [movimentoy v] to [10]\n                                else\n                                    set [movimentox v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [movimentoy v] by (-1)\n        change y by (MovimentoY)\n        if <touching (sprite2 v)?> then\n            change y by ((MovimentoY) * (-1))\n            set [movimentoy v] to [0]\n        end\n        change y by (-1)\n        if <touching (sprite2 v)?> then\n            if <key (w v) pressed?> then\n                set [movimentoy v] to [13]\n            end\n        end\n        change y by (1)\n        replace item (3) of [movimentotela v] with (x position)\n        replace item (4) of [movimentotela v] with ((y position) + (20))\n        switch costume to (Personagem2)\n        set [color v] effect to (125)\n    end\nelse\n    hide\nend\n\nwhen I receive [j2d v]\nhide\n\n@Letras\n\nwhen flag clicked\nhide\nswitch costume to (pano de fundo2 v)\ngo to x: (0) y: (0)\n\nwhen I receive [iniciar jogo v]\nset [clone letras v] to [0]\nswitch costume to (level1 v)\ncreate clone of (_myself_ v)\nhide\n\nwhen I start as a clone\nif <(Clone letras) = [0]> then\n    set [clone letras v] to [1]\n    create clone of (_myself_ v)\n    forever\n        if <(item (5) of [movimentotela v]) < ((-480) * (8))> then\n            Movimentação (X, Y, Level) [9] [2] [12]\n        else\n            if <(item (5) of [movimentotela v]) < ((-480) * (6))> then\n                Movimentação (X, Y, Level) [7] [1] [9]\n            else\n                if <((4) * (-480)) > (item (5) of [movimentotela v])> then\n                    Movimentação (X, Y, Level) [5] [0] [6]\n                else\n                    if <((2) * (-480)) > (item (5) of [movimentotela v])> then\n                        Movimentação (X, Y, Level) [3] [0] [4]\n                    else\n                        if <[0] > (item (5) of [movimentotela v])> then\n                            Movimentação (X, Y, Level) [1] [0] [2]\n                        else\n                            hide\n                        end\n                    end\n                end\n            end\n        end\n    end\nelse\n    if <(Clone letras) = [1]> then\n        set [clone letras v] to [2]\n        create clone of (_myself_ v)\n        forever\n            if <(item (5) of [movimentotela v]) < ((-480) * (9))> then\n                Movimentação (X, Y, Level) [10] [1] [14]\n            else\n                if <(item (5) of [movimentotela v]) < ((-480) * (7))> then\n                    Movimentação (X, Y, Level) [8] [2] [11]\n                else\n                    if <(item (5) of [movimentotela v]) < ((-480) * (5))> then\n                        Movimentação (X, Y, Level) [6] [1] [8]\n                    else\n                        hide\n                    end\n                end\n            end\n        end\n    else\n        forever\n            if <(item (5) of [movimentotela v]) < ((-480) * (9))> then\n                Movimentação (X, Y, Level) [10] [2] [13]\n            else\n                if <(item (5) of [movimentotela v]) < ((-480) * (7))> then\n                    Movimentação (X, Y, Level) [8] [1] [10]\n                else\n                    if <(item (5) of [movimentotela v]) < ((-480) * (5))> then\n                        Movimentação (X, Y, Level) [6] [0] [7]\n                    else\n                        if <(item (5) of [movimentotela v]) < ((-480) * (3))> then\n                            Movimentação (X, Y, Level) [4] [0] [5]\n                        else\n                            if <[480] < ((item (5) of [movimentotela v]) * (-1))> then\n                                Movimentação (X, Y, Level) [2] [0] [3]\n                            else\n                                if <((item (5) of [movimentotela v]) * (-1)) < [480]> then\n                                    Movimentação (X, Y, Level) [0] [0] [1]\n                                else\n                                    hide\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Movimentação (X, Y, Level) (x) (y) (level)\nif <not <(level) = [14]>> then\n    switch costume to (level)\nelse\n    if <(Jogo completado) = [1]> then\n        switch costume to (pano de fundo14 v)\n    else\n        switch costume to (level3 v)\n    end\nend\ngo to x: ((item (5) of [movimentotela v]) + ((480) * (x))) y: ((item (6) of [movimentotela v]) + ((360) * (y)))\nif <<<((-480) * ((x) - (1))) > (item (5) of [movimentotela v])> and <(item (5) of [movimentotela v]) > ((-480) * ((x) + (1)))>> and <<((-360) * ((y) - (1))) > (item (6) of [movimentotela v])> and <(item (6) of [movimentotela v]) > ((-360) * ((y) + (1)))>>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [efeito inicial v]\nswitch costume to (level1 v)\n\nwhen I receive [efeito inicial v]\nshow\n\n
Controls:\nPlayer 1: Arrow keys\nPlayer 2: w,a,s,d\nPrees space bar to reset if something goes wrong\nTouch the blue squares to save\n