Captain America Platformer

Instructions: Arrow keys. All Levels Are Possible. \nYou can use W A S and D to aim and the Space to throw your shield. \nYou must throw your shield and hit the Hydra soldiers to kill them. \nYou must hit Red Skull three times to kill him. \nThrow your shield at doors to bust them open. \nL to reduce lag. \n\n\n  \n 

@Stage\n\nwhen flag clicked\nset [ghost v] effect to (40)\nwait (2) seconds\nforever\n    play sound [Captain America  The Winter Soldier Main Theme.mp3 v] until done\nend\n\n@Captain America\n\nwhen flag clicked\nhide\nwait (9) seconds\nset [color v] effect to (0)\ngo to x: (-220) y: (100)\nset size to (40) %\nswitch costume to (costume2 v)\nshow\nforever\n    Action\nend\n\nwhen I receive [message1 v]\ngo to x: (-220) y: (100)\n\nwhen I receive [costume2 v]\nswitch costume to (costume2 v)\nset [t/f v] to [0]\n\ndefine Action\nset rotation style [left-right v]\nif <key (right arrow v) pressed?> then\n    point in direction (90)\n    change [ballx v] by (1.1)\nelse\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [ballx v] by (-1.1)\n    end\nend\nif <(T/F) = [0]> then\n    switch costume to (costume2 v)\nelse\n    switch costume to (costume3 v)\nend\nset [ballx v] to ((BallX) * (0.87))\nchange x by (BallX)\nif <<touching (level v)?> or <touching (door v)?>> then\n    change y by (1)\nend\nif <<touching (level v)?> or <touching (door v)?>> then\n    change x by ((BallX) * (-1))\n    change y by (-1)\n    if <key (up arrow v) pressed?> then\n        if <(BallY) > [0]> then\n            set [ballx v] to [-5]\n        else\n            set [ballx v] to [5]\n        end\n        set [bally v] to [10]\n    else\n        set [bally v] to [0]\n    end\nend\nchange [bally v] by (-1)\nchange y by (BallY)\nif <<touching (level v)?> or <touching (door v)?>> then\n    change y by ((BallY) * (-1))\n    set [bally v] to [0]\nend\nchange y by (-1)\nif <<touching (level v)?> or <touching (door v)?>> then\n    if <key (up arrow v) pressed?> then\n        set [bally v] to [15]\n    end\nend\nchange y by (1)\n\ndefine Fight\nif <key (space v) pressed?> then\n    switch costume to (costume3 v)\n    set [t/f v] to [1]\nend\n\nif <(T/F) = [0]> then\n    switch costume to (costume4 v)\nelse\n    switch costume to (costume5 v)\nend\n\nwhen I receive [oh-snap! v]\ngo to x: (-220) y: (100)\nbroadcast (Restart v)\n\nwhen I receive [danger v]\nif <(Shoot) = [1]> then\n    if <touching (bullet v)?> then\n        go to x: (-220) y: (100)\n        broadcast (Restart v)\n    end\nend\nif <(Shoot2) = [1]> then\n    if <touching (bullet2 v)?> then\n        go to x: (-220) y: (100)\n        broadcast (Restart v)\n    end\nend\nif <(Shoot3) = [1]> then\n    if <touching (bullet3 v)?> then\n        go to x: (-220) y: (100)\n        broadcast (Restart v)\n    end\nend\nif <(Shoot4) = [1]> then\n    if <touching (bullet4 v)?> then\n        go to x: (-220) y: (100)\n        broadcast (Restart v)\n    end\nend\nif <(Shoot5) = [1]> then\n    if <touching (bullet5 v)?> then\n        go to x: (-220) y: (100)\n        broadcast (Restart v)\n    end\nend\n\nwhen flag clicked\nforever\n    Fight\nend\n\nwhen flag clicked\nforever\n    if <(y position) < [-160]> then\n        go to x: (-220) y: (100)\n        broadcast (Restart v)\n    end\n    if <touching (red skull v)?> then\n        go to x: (-220) y: (100)\n        broadcast (Restart v)\n    end\nend\n\nif <(distance to [bullet4 v]) < [30]> then\n    go to x: (-220) y: (100)\n    broadcast (Restart v)\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [230]> then\n        if <(Level) < [25]> then\n            broadcast (NewScene v)\n            go to x: (-220) y: (100)\n        else\n            broadcast (stay v)\n        end\n    end\nend\n\n@Sprite3\n\nwhen I start as a clone\ngo to x: (pick random (-220) to (220)) y: (150)\nshow\nforever\n    repeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n        change y by (-5)\n    end\n    if <<touching (_edge_ v)?> or <touching (level v)?>> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\nset [t/f v] to [1]\nforever\n    if <(t/f) = [1]> then\n        wait (0.01) seconds\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (l v) pressed?> then\n        wait until <not <key (l v) pressed?>>\n        if <(t/f) = [1]> then\n            set [t/f v] to [0]\n        else\n            set [t/f v] to [1]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <key (l v) pressed?> then\n        delete this clone\n    end\nend\n\n@Shield\n\ndefine Shield\nshow\npoint towards (target v)\nrepeat until <<touching (level v)?> or <<(x position) > [230]> or <<(y position) > [170]> or <(T/F) = [0]>>>>\n    move (15) steps\n    next costume\n    create clone of (_myself_ v)\n    if <(distance to [red skull v]) < [20]> then\n        repeat until <not <(distance to [red skull v]) < [20]>>\n            move (15) steps\n        end\n        change [red skull life v] by (-1)\n    end\n    hide\nend\nbroadcast (Costume2 v)\n\nwhen flag clicked\nhide\nset size to (17) %\ngo to (captain america v)\nforever\n    go to (captain america v)\n    if <(T/F) = [0]> then\n        go to (captain america v)\n    else\n        Shield\n    end\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (0)\nrepeat (5)\n    change [ghost v] effect by (20)\nend\ndelete this clone\n\nwhen I receive [stop! v]\nset [t/f v] to [0]\nif <(T/F) = [0]> then\n    go to (captain america v)\nelse\n    Shield\nend\n\nwhen I receive [restart v]\nhide\nset size to (20) %\ngo to (captain america v)\nforever\n    go to (captain america v)\n    if <(T/F) = [0]> then\n        go to (captain america v)\n    else\n        Shield\n    end\nend\n\n@Hydra\n\nwhen flag clicked\nset [color v] effect to (0)\ngo to x: (-220) y: (100)\nset size to (40) %\nhide\nswitch costume to (costume2 v)\nset [shoot v] to [0]\nset [var1 v] to [0]\nforever\n    if <(Level) = [7]> then\n        go to x: (225) y: (50)\n        set [shoot v] to [1]\n        show\n        set [var1 v] to [1]\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [7]>\n        end\n    end\n    if <(Level) = [8]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [10]> then\n        go to x: (224) y: (15)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [10]>\n        end\n    end\n    if <(Level) = [11]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [12]> then\n        go to x: (223) y: (40)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [12]>\n        end\n    end\n    if <(Level) = [13]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [14]> then\n        go to x: (226) y: (6)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [14]>\n        end\n    end\n    if <(Level) = [15]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [18]> then\n        go to x: (219) y: (58)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [18]>\n        end\n    end\n    if <(Level) = [19]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [20]> then\n        go to x: (217) y: (90)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [20]>\n        end\n    end\n    if <(Level) = [21]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [25]> then\n        go to x: (180) y: (-146)\n        set [hit v] to [0]\n        set [var1 v] to [1]\n        set [shoot v] to [1]\n        switch costume to (costume2 v)\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [25]>\n        end\n    end\nend\n\nwhen I receive [restart v]\nset [var1 v] to [0]\nforever\n    if <(Level) = [7]> then\n        go to x: (225) y: (50)\n        set [shoot v] to [1]\n        show\n        set [var1 v] to [1]\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [7]>\n        end\n    end\n    if <(Level) = [8]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [10]> then\n        go to x: (224) y: (15)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [10]>\n        end\n    end\n    if <(Level) = [11]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [12]> then\n        go to x: (223) y: (40)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [12]>\n        end\n    end\n    if <(Level) = [13]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [14]> then\n        go to x: (226) y: (6)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [14]>\n        end\n    end\n    if <(Level) = [15]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [18]> then\n        go to x: (219) y: (58)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [18]>\n        end\n    end\n    if <(Level) = [19]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [20]> then\n        go to x: (217) y: (90)\n        set [shoot v] to [1]\n        set [var1 v] to [1]\n        show\n        set [hit v] to [0]\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [20]>\n        end\n    end\n    if <(Level) = [21]> then\n        hide\n        set [var1 v] to [0]\n    end\n    if <(Level) = [25]> then\n        go to x: (180) y: (-146)\n        set [hit v] to [0]\n        set [var1 v] to [1]\n        set [shoot v] to [1]\n        switch costume to (costume2 v)\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit v] to [1]\n            set [var1 v] to [0]\n            set [shoot v] to [0]\n            wait until <(Level) > [25]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<(Shoot) = []> or <<(Shoot2) = []> or <<(Shoot3) = []> or <<(Shoot4) = []> or <(Shoot5) = []>>>>> then\n        broadcast (Danger v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (target v)?> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\n@Hydra2\n\nwhen flag clicked\nset [color v] effect to (0)\ngo to x: (-220) y: (100)\nset size to (40) %\nswitch costume to (costume2 v)\nhide\nset [var2 v] to [0]\nforever\n    if <(Level) = [10]> then\n        go to x: (120) y: (15)\n        set [hit2 v] to [0]\n        set [var2 v] to [1]\n        set [shoot2 v] to [1]\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit2 v] to [1]\n            set [var2 v] to [0]\n            set [shoot2 v] to [0]\n            wait until <(Level) > [10]>\n        end\n    end\n    if <(Level) = [11]> then\n        hide\n        set [var2 v] to [0]\n    end\n    if <(Level) = [18]> then\n        go to x: (-214) y: (-66)\n        set [hit2 v] to [0]\n        set [var2 v] to [1]\n        set [shoot2 v] to [1]\n        switch costume to (costume3 v)\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit2 v] to [1]\n            set [var2 v] to [0]\n            set [shoot2 v] to [0]\n            wait until <(Level) > [18]>\n        end\n    end\n    if <(Level) = [19]> then\n        hide\n        set [var2 v] to [0]\n    end\n    if <(Level) = [20]> then\n        show\n        go to x: (222) y: (-88)\n        set [hit2 v] to [0]\n        set [var2 v] to [1]\n        set [shoot2 v] to [1]\n        switch costume to (costume2 v)\n        if <touching (shield v)?> then\n            hide\n            set [hit2 v] to [1]\n            set [var2 v] to [0]\n            set [shoot2 v] to [0]\n            wait until <(Level) > [20]>\n        end\n    end\n    if <(Level) = [21]> then\n        hide\n        set [var2 v] to [0]\n    end\n    if <(Level) = [25]> then\n        go to x: (169) y: (105)\n        set [hit2 v] to [0]\n        set [var2 v] to [1]\n        set [shoot2 v] to [1]\n        switch costume to (costume2 v)\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit2 v] to [1]\n            set [var2 v] to [0]\n            set [shoot2 v] to [0]\n            wait until <(Level) > [25]>\n        end\n    end\nend\n\nwhen I receive [restart v]\nset [var2 v] to [0]\nforever\n    if <(Level) = [10]> then\n        go to x: (120) y: (15)\n        set [hit2 v] to [0]\n        set [var2 v] to [1]\n        set [shoot2 v] to [1]\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit2 v] to [1]\n            set [var2 v] to [0]\n            set [shoot2 v] to [0]\n            wait until <(Level) > [10]>\n        end\n    end\n    if <(Level) = [11]> then\n        hide\n        set [var2 v] to [0]\n    end\n    if <(Level) = [18]> then\n        go to x: (-214) y: (-66)\n        set [hit2 v] to [0]\n        set [var2 v] to [1]\n        set [shoot2 v] to [1]\n        switch costume to (costume3 v)\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit2 v] to [1]\n            set [var2 v] to [0]\n            set [shoot2 v] to [0]\n            wait until <(Level) > [18]>\n        end\n    end\n    if <(Level) = [19]> then\n        hide\n        set [var2 v] to [0]\n    end\n    if <(Level) = [20]> then\n        show\n        go to x: (222) y: (-88)\n        set [hit2 v] to [0]\n        set [var2 v] to [1]\n        set [shoot2 v] to [1]\n        switch costume to (costume2 v)\n        if <touching (shield v)?> then\n            hide\n            set [hit2 v] to [1]\n            set [var2 v] to [0]\n            set [shoot2 v] to [0]\n            wait until <(Level) > [20]>\n        end\n    end\n    if <(Level) = [20]> then\n        hide\n        set [var2 v] to [0]\n    end\n    if <(Level) = [25]> then\n        go to x: (169) y: (105)\n        set [hit2 v] to [0]\n        set [var2 v] to [1]\n        set [shoot2 v] to [1]\n        switch costume to (costume2 v)\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit2 v] to [1]\n            set [var2 v] to [0]\n            set [shoot2 v] to [0]\n            wait until <(Level) > [25]>\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (target v)?> then\n        switch costume to (costume4 v)\n    else\n        if <(Level) = [18]> then\n            if <touching (target v)?> then\n                switch costume to (costume5 v)\n            else\n                switch costume to (costume3 v)\n            end\n        else\n            switch costume to (costume2 v)\n        end\n    end\nend\n\n@Bullet\n\nwhen flag clicked\nset size to (20) %\ngo to (rifle v)\nhide\nforever\n    go to (rifle v)\n    hide\n    if <<(Level) = [7]> or <<(Level) = [10]> or <<(Level) = [12]> or <<(Level) = [14]> or <<(Level) = [18]> or <<(Level) = [20]> or <(Level) = [25]>>>>>>> then\n        go to (rifle v)\n        hide\n        if <(Shoot) = [1]> then\n            go to (rifle v)\n            Shoot\n        else\n            point towards (rifle v)\n            hide\n        end\n        if <(Hit) = [1]> then\n            hide\n        end\n        if <touching (rifle v)?> then\n            show\n        else\n            hide\n        end\n    else\n        go to (rifle v)\n        hide\n    end\nend\n\ndefine Shoot\nwait (0.001) seconds\ngo to (rifle v)\nhide\nwait (pick random (0.5) to (1)) seconds\nif <(Shoot) = [0]> then\n    hide\n    go to (rifle v)\nelse\n    if <(Hit) = [0]> then\n        hide\n        go to (rifle v)\n    else\n        go to (rifle v)\n        show\n        start sound [Pistol Gunshot 2 v]\n        point towards (captain america v)\n        repeat until <<(distance to [shield v]) < [20]> or <<touching (captain america v)?> or <<touching (level v)?> or <touching (_edge_ v)?>>>>\n            move (8) steps\n            broadcast (Danger v)\n        end\n        go to (rifle v)\n        hide\n    end\n    show\n    start sound [Pistol Gunshot 2 v]\n    point towards (captain america v)\n    repeat until <<(distance to [shield v]) < [20]> or <<touching (captain america v)?> or <<touching (level v)?> or <touching (_edge_ v)?>>>>\n        move (8) steps\n        broadcast (Danger v)\n    end\n    go to (rifle v)\n    hide\nend\n\nwhen I receive [restart v]\nforever\n    go to (rifle v)\n    hide\n    if <<(Level) = [7]> or <<(Level) = [10]> or <<(Level) = [12]> or <<(Level) = [14]> or <<(Level) = [18]> or <<(Level) = [20]> or <(Level) = [25]>>>>>>> then\n        go to (rifle v)\n        hide\n        if <(Shoot) = [1]> then\n            go to (rifle v)\n            Shoot\n        else\n            point towards (rifle v)\n            hide\n        end\n        if <(Hit) = [1]> then\n            hide\n        end\n        if <touching (rifle v)?> then\n            show\n        else\n            hide\n        end\n    else\n        go to (rifle v)\n        hide\n    end\nend\n\nwhen I receive [nope v]\ngo to (rifle v)\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        hide\n        go to (rifle v)\n    end\nend\n\n@Bullet2\n\nwhen flag clicked\ngo to (rifle2 v)\nset size to (20) %\nhide\nforever\n    go to (rifle2 v)\n    hide\n    if <<(Level) = [10]> or <<(Level) = [18]> or <<(Level) = [20]> or <(Level) = [25]>>>> then\n        hide\n        if <(Shoot2) = [1]> then\n            Shoot\n        else\n            go to (rifle2 v)\n            hide\n        end\n        if <(Hit2) = [1]> then\n            hide\n        end\n        go to (rifle2 v)\n    else\n        hide\n    end\nend\n\nwhen I receive [restart v]\nforever\n    go to (rifle2 v)\n    hide\n    if <<(Level) = [10]> or <<(Level) = [18]> or <<(Level) = [20]> or <(Level) = [25]>>>> then\n        hide\n        if <(Shoot2) = [1]> then\n            Shoot\n        else\n            go to (rifle2 v)\n            hide\n        end\n        if <(Hit2) = [1]> then\n            hide\n        end\n        go to (rifle2 v)\n    else\n        hide\n    end\nend\n\nwhen I receive [nope2 v]\ngo to (rifle2 v)\n\nwait (0.1) seconds\n\ndefine Shoot\nwait (0.001) seconds\ngo to (rifle2 v)\nhide\nwait (pick random (0.5) to (1)) seconds\nif <(Shoot2) = [0]> then\n    hide\n    go to (rifle2 v)\nelse\n    if <(Hit2) = [0]> then\n        hide\n        go to (rifle2 v)\n    else\n        go to (rifle2 v)\n        show\n        start sound [Pistol Gunshot 2 v]\n        point towards (captain america v)\n        repeat until <<(distance to [shield v]) < [20]> or <<touching (captain america v)?> or <<touching (level v)?> or <touching (_edge_ v)?>>>>\n            move (8) steps\n            broadcast (Danger v)\n        end\n        go to (rifle2 v)\n        hide\n    end\n    show\n    start sound [Pistol Gunshot 2 v]\n    point towards (captain america v)\n    repeat until <<(distance to [shield v]) < [20]> or <<touching (captain america v)?> or <<touching (level v)?> or <touching (_edge_ v)?>>>>\n        move (8) steps\n        broadcast (Danger v)\n    end\n    go to (rifle2 v)\n    hide\nend\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        hide\n        go to (rifle2 v)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nhide\nwait (2) seconds\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nwait (7) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Rifle\n\nwhen flag clicked\nset size to (18) %\ngo to (hydra v)\nforever\n    go to [front v] layer\n    go to (hydra v)\n    point towards (captain america v)\n    if <<(Level) = [7]> or <<(Level) = [10]> or <<(Level) = [12]> or <<(Level) = [14]> or <<<(Level) = [18]> or <(Level) = [20]>> or <(Level) = [25]>>>>>> then\n        show\n        if <(Hit) = [1]> then\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [restart v]\nforever\n    go to [front v] layer\n    go to (hydra v)\n    point towards (captain america v)\n    if <<(Level) = [7]> or <<(Level) = [10]> or <<(Level) = [12]> or <<(Level) = [14]> or <<<(Level) = [18]> or <(Level) = [20]>> or <(Level) = [25]>>>>>> then\n        show\n        if <(Hit) = [1]> then\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        set [shoot v] to [0]\n    end\nend\n\n@Rifle2\n\nwhen flag clicked\nset size to (18) %\ngo to (hydra2 v)\nforever\n    go to (hydra2 v)\n    point towards (captain america v)\n    if <<(Level) = [10]> or <<(Level) = [18]> or <<(Level) = [20]> or <(Level) = [25]>>>> then\n        show\n        if <(Hit2) = [1]> then\n            hide\n        end\n    else\n        hide\n    end\n    if <(Level) = [18]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen I receive [restart v]\nforever\n    go to (hydra2 v)\n    point towards (captain america v)\n    if <<(Level) = [10]> or <<(Level) = [18]> or <<(Level) = [20]> or <(Level) = [25]>>>> then\n        show\n        if <(Hit2) = [1]> then\n            hide\n        end\n    else\n        hide\n    end\n    if <(Level) = [18]> then\n        switch costume to (costume3 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        set [shoot2 v] to [0]\n    end\nend\n\n@Cover\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset size to (100) %\ngo to x: (0) y: (0)\nwait (2) seconds\nhide\n\n@Level\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide variable [level v]\nset [level v] to [0]\nwait (9) seconds\nforever\n    set [level v] to (costume [number v])\n    if <(Red Skull Life) < [1]> then\n        switch costume to (costume26 v)\n        broadcast (26 v)\n    end\n    if <(Level) = [26]> then\n        broadcast (26 v)\n    end\n    if <touching (shield v)?> then\n        broadcast (stop! v)\n    end\n    if <touching (bullet v)?> then\n        broadcast (nope v)\n    else\n        if <touching (bullet2 v)?> then\n            broadcast (nope2 v)\n        else\n            if <touching (bullet3 v)?> then\n                broadcast (nope3 v)\n            else\n                if <touching (bullet4 v)?> then\n                    broadcast (nope4 v)\n                else\n                    if <touching (bullet5 v)?> then\n                        broadcast (nope5 v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [stay v]\nswitch costume to (costume25 v)\n\nwhen I receive [newscene v]\nif <(Level) < [25]> then\n    next costume\nelse\n    if <(Red Skull Life) > [0]> then\n        next costume\n    else\n        switch costume to (costume25 v)\n    end\nend\n\nwhen flag clicked\n\nforever\n    if <<(Hit) = [1]> and <<(Hit2) = [1]> and <<(Hit3) = [1]> and <(Hit4) = [1]>>>> then\n        switch costume to (costume27 v)\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    if <(Level) = [26]> then\n        show\n    else\n        hide\n    end\nend\n\n@Red Skull\n\nwhen flag clicked\nset [color v] effect to (0)\nset size to (40) %\nswitch costume to (costume2 v)\nhide\nset [red skull life v] to [3]\nset [var5 v] to [0]\nforever\n    if <(Level) = [25]> then\n        show\n        if <(Hit4) = [0]> then\n            go to x: (-192) y: (-146)\n        end\n    else\n        hide\n        set [red skull life v] to [3]\n    end\n    if <(Level) = [25]> then\n        if <<(Hit) = [1]> and <<(Hit2) = [1]> and <<(Hit3) = [1]> and <(Hit4) = [1]>>>> then\n            switch costume to (costume3 v)\n            set [var5 v] to [1]\n            if <(pick random (1) to (4)) = [1]> then\n                wait (pick random (2) to (3)) seconds\n                create clone of (_myself_ v)\n                go to x: (183) y: (105)\n                set [ghost v] effect to (100)\n                repeat (10)\n                    change [ghost v] effect by (-10)\n                end\n            else\n                if <(pick random (1) to (4)) = [2]> then\n                    wait (pick random (2) to (3)) seconds\n                    create clone of (_myself_ v)\n                    go to x: (17) y: (-36)\n                    set [ghost v] effect to (100)\n                    repeat (10)\n                        change [ghost v] effect by (-10)\n                    end\n                else\n                    if <(pick random (1) to (4)) = [3]> then\n                        wait (pick random (2) to (3)) seconds\n                        create clone of (_myself_ v)\n                        go to x: (194) y: (8)\n                        set [ghost v] effect to (100)\n                        repeat (10)\n                            change [ghost v] effect by (-10)\n                        end\n                    else\n                        if <(pick random (1) to (4)) = [3]> then\n                            wait (pick random (2) to (3)) seconds\n                            create clone of (_myself_ v)\n                            go to x: (184) y: (-146)\n                            set [ghost v] effect to (100)\n                            repeat (10)\n                                change [ghost v] effect by (-10)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nif  then\nelse\nend\n\nwhen I receive [26 v]\nhide\n\nset [y/n v] to [0]\n\nwhen flag clicked\nforever\n    if <(Red Skull Life) = [0]> then\n        set [var5 v] to [0]\n    end\nend\n\nset [var5 v] to [0]\n\nwhen I receive [restart v]\nset [red skull life v] to [3]\nset [var5 v] to [0]\nswitch costume to (costume2 v)\nforever\n    if <(Level) = [25]> then\n        show\n        if <(Hit4) = [0]> then\n            go to x: (-192) y: (-146)\n        end\n    else\n        hide\n        set [red skull life v] to [3]\n    end\n    if <(Level) = [25]> then\n        if <<(Hit) = [1]> and <<(Hit2) = [1]> and <<(Hit3) = [1]> and <(Hit4) = [1]>>>> then\n            switch costume to (costume3 v)\n            set [var5 v] to [1]\n            if <(pick random (1) to (4)) = [1]> then\n                wait (pick random (2) to (3)) seconds\n                create clone of (_myself_ v)\n                go to x: (183) y: (105)\n                set [ghost v] effect to (100)\n                repeat (10)\n                    change [ghost v] effect by (-10)\n                end\n            else\n                if <(pick random (1) to (4)) = [2]> then\n                    wait (pick random (2) to (3)) seconds\n                    create clone of (_myself_ v)\n                    go to x: (17) y: (-36)\n                    set [ghost v] effect to (100)\n                    repeat (10)\n                        change [ghost v] effect by (-10)\n                    end\n                else\n                    if <(pick random (1) to (4)) = [3]> then\n                        wait (pick random (2) to (3)) seconds\n                        create clone of (_myself_ v)\n                        go to x: (194) y: (8)\n                        set [ghost v] effect to (100)\n                        repeat (10)\n                            change [ghost v] effect by (-10)\n                        end\n                    else\n                        if <(pick random (1) to (4)) = [3]> then\n                            wait (pick random (2) to (3)) seconds\n                            create clone of (_myself_ v)\n                            go to x: (184) y: (-146)\n                            set [ghost v] effect to (100)\n                            repeat (10)\n                                change [ghost v] effect by (-10)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nif  then\nelse\nend\n\n@Rifle3\n\nwhen flag clicked\nset size to (18) %\ngo to (hydra3 v)\nforever\n    go to (hydra3 v)\n    point towards (captain america v)\n    if <(Level) = [25]> then\n        show\n        if <(Hit3) = [1]> then\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen I receive [restart v]\nforever\n    go to (hydra3 v)\n    point towards (captain america v)\n    if <(Level) = [25]> then\n        show\n        if <(Hit3) = [1]> then\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        set [shoot3 v] to [0]\n    end\nend\n\n@Hydra3\n\nwhen flag clicked\nset [color v] effect to (0)\ngo to x: (208) y: (8)\nset size to (40) %\nswitch costume to (costume2 v)\nhide\nset [var3 v] to [0]\nforever\n    if <(Level) = [25]> then\n        set [hit3 v] to [0]\n        set [var3 v] to [1]\n        set [shoot3 v] to [1]\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit3 v] to [1]\n            set [var3 v] to [0]\n            set [shoot3 v] to [0]\n            wait until <(Level) > [100]>\n        end\n    else\n        hide\n        set [shoot3 v] to [0]\n    end\nend\n\nwhen I receive [restart v]\nset [var3 v] to [0]\nforever\n    if <(Level) = [25]> then\n        set [hit3 v] to [0]\n        set [var3 v] to [1]\n        set [shoot3 v] to [1]\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit3 v] to [1]\n            set [var3 v] to [0]\n            set [shoot3 v] to [0]\n            wait until <(Level) > [100]>\n        end\n    else\n        hide\n        set [shoot3 v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (target v)?> then\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\n@Hydra4\n\nwhen flag clicked\nset [color v] effect to (0)\nset size to (40) %\nswitch costume to (costume2 v)\ngo to x: (15) y: (-36)\nhide\nset [var4 v] to [0]\nforever\n    if <(Level) = [25]> then\n        set [hit4 v] to [0]\n        set [var4 v] to [1]\n        set [shoot4 v] to [1]\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit4 v] to [1]\n            set [var4 v] to [0]\n            set [shoot4 v] to [0]\n            wait until <(Level) > [100]>\n        end\n    else\n        hide\n        set [shoot4 v] to [0]\n    end\nend\n\nwhen I receive [restart v]\nset [var4 v] to [0]\nforever\n    if <(Level) = [25]> then\n        set [hit4 v] to [0]\n        set [var4 v] to [1]\n        set [shoot4 v] to [1]\n        show\n        if <touching (shield v)?> then\n            hide\n            set [hit4 v] to [1]\n            set [var4 v] to [0]\n            set [shoot4 v] to [0]\n            wait until <(Level) > [100]>\n        end\n    else\n        hide\n        set [shoot4 v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (target v)?> then\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n    end\nend\n\n@Bullet3\n\nwhen flag clicked\ngo to (rifle3 v)\nset size to (20) %\nhide\nforever\n    go to (rifle3 v)\n    hide\n    if <(Level) = [25]> then\n        hide\n        if <(Shoot3) = [1]> then\n            Shoot\n        else\n            go to (rifle3 v)\n            hide\n        end\n        if <(Hit3) = [1]> then\n            hide\n        end\n        go to (rifle3 v)\n    else\n        hide\n    end\nend\n\ndefine Shoot\nwait (0.001) seconds\ngo to (rifle3 v)\nhide\nwait (pick random (0.5) to (1)) seconds\nif <(Shoot3) = [0]> then\n    hide\n    go to (rifle3 v)\nelse\n    if <(Hit3) = [0]> then\n        hide\n        go to (rifle3 v)\n    else\n        go to (rifle3 v)\n        show\n        start sound [Pistol Gunshot 2 v]\n        point towards (captain america v)\n        repeat until <<(distance to [shield v]) < [20]> or <<touching (captain america v)?> or <<(distance to [level v]) < [10]> or <touching (_edge_ v)?>>>>\n            move (8) steps\n        end\n        go to (rifle3 v)\n        hide\n    end\n    show\n    start sound [Pistol Gunshot 2 v]\n    point towards (captain america v)\n    repeat until <<(distance to [shield v]) < [20]> or <<touching (captain america v)?> or <<(distance to [level v]) < [10]> or <touching (_edge_ v)?>>>>\n        move (8) steps\n    end\n    go to (rifle3 v)\n    hide\nend\n\nwhen I receive [restart v]\nforever\n    go to (rifle3 v)\n    hide\n    if <(Level) = [25]> then\n        hide\n        if <(Shoot3) = [1]> then\n            Shoot\n        else\n            go to (rifle3 v)\n            hide\n        end\n        if <(Hit3) = [1]> then\n            hide\n        end\n        go to (rifle3 v)\n    else\n        hide\n    end\nend\n\nwhen I receive [nope3 v]\nShoot\n\nbroadcast (Danger4 v)\n\npoint towards (captain america v)\n\nshow\n\nbroadcast (Danger4 v)\n\ngo to (rifle3 v)\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        hide\n        go to (rifle3 v)\n    end\nend\n\n@Bullet4\n\nwhen flag clicked\ngo to (rifle4 v)\nset size to (20) %\nhide\nforever\n    go to (rifle4 v)\n    hide\n    if <(Level) = [25]> then\n        hide\n        if <(Shoot4) = [1]> then\n            Shoot\n        else\n            go to (rifle4 v)\n            hide\n        end\n        if <(Hit4) = [1]> then\n            hide\n        end\n        go to (rifle4 v)\n    else\n        hide\n    end\nend\n\ndefine Shoot\nwait (0.001) seconds\ngo to (rifle4 v)\nhide\nwait (pick random (0.5) to (1)) seconds\nif <(Shoot4) = [0]> then\n    hide\n    go to (rifle4 v)\nelse\n    if <(Hit4) = [0]> then\n        hide\n        go to (rifle4 v)\n    else\n        go to (rifle4 v)\n        show\n        start sound [Pistol Gunshot 2 v]\n        point towards (captain america v)\n        repeat until <<(distance to [shield v]) < [20]> or <<touching (captain america v)?> or <<(distance to [level v]) < [10]> or <touching (_edge_ v)?>>>>\n            move (8) steps\n            broadcast (Danger4 v)\n        end\n        go to (rifle4 v)\n        hide\n    end\n    show\n    start sound [Pistol Gunshot 2 v]\n    point towards (captain america v)\n    repeat until <<(distance to [shield v]) < [20]> or <<touching (captain america v)?> or <<(distance to [level v]) < [10]> or <touching (_edge_ v)?>>>>\n        move (8) steps\n        broadcast (Danger4 v)\n    end\n    go to (rifle4 v)\n    hide\nend\n\nwhen I receive [restart v]\nforever\n    go to (rifle4 v)\n    hide\n    if <(Level) = [25]> then\n        hide\n        if <(Shoot4) = [1]> then\n            Shoot\n        else\n            go to (rifle4 v)\n            hide\n        end\n        if <(Hit4) = [1]> then\n            hide\n        end\n        go to (rifle4 v)\n    else\n        hide\n    end\nend\n\nwhen I receive [nope4 v]\ngo to (rifle4 v)\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        hide\n        go to (rifle4 v)\n    end\nend\n\n@Rifle4\n\nwhen flag clicked\nset size to (18) %\ngo to (hydra2 v)\nforever\n    go to [front v] layer\n    go to (hydra4 v)\n    point towards (captain america v)\n    if <(Level) = [25]> then\n        show\n        if <(Hit4) = [1]> then\n            hide\n        end\n    else\n        hide\n    end\nend\n\nif <(Level) = [18]> then\n    switch costume to (costume3 v)\nelse\n    switch costume to (costume2 v)\nend\n\nwhen I receive [restart v]\ngo to [front v] layer\ngo to (hydra4 v)\npoint towards (captain america v)\nif <(Level) = [25]> then\n    show\n    if <(Hit4) = [1]> then\n        hide\n    end\nelse\n    hide\nend\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        set [shoot4 v] to [0]\n    end\nend\n\n@Door\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nforever\n    if <(Level) = [22]> then\n        show\n    else\n        hide\n    end\n    if <touching (shield v)?> then\n        repeat (5)\n            next costume\n        end\n        wait until <(Level) > [22]>\n    end\nend\n\nwait (0.001) seconds\n\n@Rifle5\n\nwhen flag clicked\nset size to (18) %\ngo to (hydra v)\nset [shoot5 v] to [0]\nforever\n    if <<(Level) = [25]> and <(Red Skull Life) > [0]>> then\n        go to [front v] layer\n        go to (red skull v)\n        point towards (captain america v)\n        show\n        if <<(Hit) = [1]> and <<(Hit2) = [1]> and <<(Hit3) = [1]> and <(Hit4) = [1]>>>> then\n            set [shoot5 v] to [1]\n        end\n    else\n        hide\n        set [shoot5 v] to [0]\n    end\nend\n\nwhen I receive [restart v]\nforever\nend\n\ngo to [front v] layer\ngo to (red skull v)\npoint towards (captain america v)\n\nif <(Hit) = [1]> then\n    hide\nend\n\nwhen I receive [restart v]\nset [shoot5 v] to [0]\nif <<(Level) = [25]> and <(Red Skull Life) > [0]>> then\n    go to [front v] layer\n    go to (red skull v)\n    point towards (captain america v)\n    show\n    if <<(Hit) = [1]> and <<(Hit2) = [1]> and <<(Hit3) = [1]> and <(Hit4) = [1]>>>> then\n        set [shoot5 v] to [1]\n    end\nelse\n    hide\n    set [shoot5 v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        set [shoot5 v] to [0]\n    end\nend\n\n@Bullet5\n\nwhen flag clicked\ngo to (rifle5 v)\nset size to (20) %\nhide\nforever\n    if <(Shoot5) = [1]> then\n        wait (0.5) seconds\n        create clone of (_myself_ v)\n    else\n        hide\n    end\nend\n\ndefine Shoot\ngo to (rifle5 v)\nshow\nstart sound [Pistol Gunshot 2 v]\npoint towards (captain america v)\nforever\n    repeat until <(distance to [shield v]) < [20]>\n        move (8) steps\n        broadcast (Danger4 v)\n        if <touching (captain america v)?> then\n            broadcast (Oh-Snap! v)\n        end\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nShoot\n\nforever\n    go to (rifle4 v)\n    hide\n    if <(Level) = [25]> then\n        go to (rifle5 v)\n        hide\n        if <(Shoot4) = [0]> then\n            hide\n            go to (rifle5 v)\n        else\n            if <(Hit4) = [0]> then\n                hide\n                go to (rifle5 v)\n            else\n            end\n            show\n            point towards (captain america v)\n            repeat until <<(distance to [shield v]) < [10]> or <<(distance to [captain america v]) < [10]> or <<(distance to [level v]) < [10]> or <touching (_edge_ v)?>>>>\n                move (15) steps\n                broadcast (Danger4 v)\n            end\n            go to (rifle5 v)\n            hide\n        end\n        hide\n        if <(Shoot4) = [1]> then\n            Shoot\n        else\n            go to (rifle4 v)\n            hide\n        end\n        if <(Hit4) = [1]> then\n            hide\n        end\n        go to (rifle4 v)\n    else\n        hide\n    end\nend\n\nwait (0.1) seconds\n\nwhen I receive [nope5 v]\ndelete this clone\n\ngo to (rifle4 v)\nhide\nif <(Level) = [25]> then\n    hide\n    if <(Shoot4) = [1]> then\n    else\n        go to (rifle4 v)\n        hide\n    end\n    if <(Hit4) = [1]> then\n        hide\n    end\n    go to (rifle4 v)\nelse\n    hide\nend\n\nwhen I receive [26 v]\ndelete this clone\n\nwhen flag clicked\nforever\n    if <touching (level v)?> then\n        hide\n        go to (rifle5 v)\n    end\nend\n\n@Target\n\nwhen flag clicked\nset size to (35) %\nhide\ngo to x: (0) y: (0)\nwait (7) seconds\nshow\ngo to [front v] layer\nforever\n    if <key (w v) pressed?> then\n        change y by (12)\n        set [ghost v] effect to (0)\n    else\n        if <key (s v) pressed?> then\n            change y by (-12)\n            set [ghost v] effect to (0)\n        end\n    end\n    if <key (d v) pressed?> then\n        change x by (12)\n        set [ghost v] effect to (0)\n    else\n        if <key (a v) pressed?> then\n            change x by (-12)\n            set [ghost v] effect to (0)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (hydra v)?> or <<touching (hydra2 v)?> or <<touching (hydra3 v)?> or <<touching (hydra4 v)?> or <touching (red skull v)?>>>>> then\n        switch costume to (costume2 v)\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<not <key (w v) pressed?>> and <<not <key (s v) pressed?>> and <<not <key (d v) pressed?>> and <<not <key (a v) pressed?>> and <<not <touching (hydra v)?>> and <<not <touching (hydra2 v)?>> and <<not <touching (sprite3 v)?>> and <<not <touching (hydra4 v)?>> and <not <touching (red skull v)?>>>>>>>>>> then\n        set [ghost v] effect to (60)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(var5) = [1]> then\n        if <(distance to [red skull v]) < [70]> then\n            go to (red skull v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(var1) = [1]> then\n        if <(distance to [hydra v]) < [70]> then\n            go to (hydra v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(var3) = [1]> then\n        if <(distance to [hydra3 v]) < [70]> then\n            go to (hydra3 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(var4) = [1]> then\n        if <(distance to [hydra4 v]) < [70]> then\n            go to (hydra4 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <(var2) = [1]> then\n        if <(distance to [hydra2 v]) < [70]> then\n            go to (hydra2 v)\n        end\n    end\nend\n\n