Totally Normal Platformer- A Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\n\nwhen I receive [white1 v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [end v]\nrepeat (50)\n    change [brightness v] effect by (-2)\nend\nbroadcast (endend v)\n\nwhen I receive [thumbnail v]\nswitch backdrop to (thumbnail v)\nrepeat (50)\n    change [brightness v] effect by (2)\nend\n\n@Sprite1\n\nwhen flag clicked\nclear graphic effects\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (0)\nwait (3.8) seconds\nswitch costume to (costume2 v)\ngo to [front v] layer\ngo [backward v] (1) layers\n\nwhen I receive [start end v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\n\nwhen I receive [am v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\n\n@Dark\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen I receive [start end v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\n\nwhen flag clicked\nshow\ngo to x: (200) y: (-82)\nglide (2) secs to x: (110) y: (-82)\n\nwhen I receive [random message v]\ngo to [front v] layer\n\nwhen I receive [am v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\n\n@Black light\n\nwhen flag clicked\nhide\nwait (3) seconds\ngo to [front v] layer\ngo [forward v] (1) layers\nshow\ngo to x: (110) y: (-82)\nwait (0.8) seconds\nhide\n\nwhen I receive [am v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\n\n@black light 2\n\nwhen flag clicked\nhide\nwait (3) seconds\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\ngo [forward v] (1) layers\nshow\ngo to x: (110) y: (-82)\nglide (0.8) secs to x: (-149) y: (-82)\nbroadcast (random message v)\nrepeat (20)\n    go to [front v] layer\n    change x by (23.25)\n    change y by (8.2)\n    change size by (63.5)\nend\nbroadcast (start end v)\n\nwhen I receive [start end v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\nbroadcast (text stuff v)\n\nwhen I receive [am v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\n\n@Player\n\nwhen flag clicked\nset [1 v] to [0]\nhide\n\nwhen I receive [go v]\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nshow\nset [deaths v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (sprite 2 v)?> then\n        change y by (1)\n        if <touching (sprite 2 v)?> then\n            change y by (1)\n            if <touching (sprite 2 v)?> then\n                change y by (1)\n                if <touching (sprite 2 v)?> then\n                    change y by (1)\n                    if <touching (sprite 2 v)?> then\n                        change y by (1)\n                        if <touching (sprite 2 v)?> then\n                            change y by (-5)\n                            change x by ((Xv) * (-1))\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (sprite 2 v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (sprite 2 v)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [13]\n        end\n    end\n    change y by (1)\n    if <(y position) < [-175]> then\n        change [deaths v] by (1)\n        reset\n    end\nend\n\nwhen I receive [start v]\ngo to x: (-212) y: (-81)\nshow\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\nwhen I receive [go v]\ngo to x: (-212) y: (-81)\nclear graphic effects\nshow\n\ndefine reset\ngo to x: (-212) y: (-81)\nshow\n\nwhen I receive [stop v]\nstop [other scripts in sprite v]\ngo to x: (-212) y: (-127)\n\nwhen I receive [end v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [z v]\nset [1 v] to [0]\nstop [other scripts in sprite v]\nclear graphic effects\nset size to (100) %\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (sprite 2 v)?> then\n        change y by (1)\n        if <touching (sprite 2 v)?> then\n            change y by (1)\n            if <touching (sprite 2 v)?> then\n                change y by (1)\n                if <touching (sprite 2 v)?> then\n                    change y by (1)\n                    if <touching (sprite 2 v)?> then\n                        change y by (1)\n                        if <touching (sprite 2 v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (sprite 2 v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching (sprite 2 v)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [13]\n        end\n    end\n    if <<key (1 v) pressed?> and <(1) = [0]>> then\n        broadcast (protego v)\n        set [1 v] to [1]\n    end\n    if <touching (attack v)?> then\n        change [deaths v] by (1)\n        reset\n        broadcast (No Move z v)\n        stop [this script v]\n    end\n    change y by (1)\n    if <(y position) < [-175]> then\n        change [deaths v] by (1)\n        reset\n    end\nend\n\nwhen I receive [no move v]\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nshow\nset [deaths v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (sprite 2 v)?> then\n        change y by (1)\n        if <touching (sprite 2 v)?> then\n            change y by (1)\n            if <touching (sprite 2 v)?> then\n                change y by (1)\n                if <touching (sprite 2 v)?> then\n                    change y by (1)\n                    if <touching (sprite 2 v)?> then\n                        change y by (1)\n                        if <touching (sprite 2 v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (sprite 2 v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <<(Level) = [3]> and <touching (attack v)?>> then\n        set [yv v] to [20]\n    end\nend\n\nwhen I receive [no move z v]\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nshow\nset [deaths v] to [0]\nset [xv v] to [0]\nset [yv v] to [20]\nforever\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching (sprite 2 v)?> then\n        change y by (1)\n        if <touching (sprite 2 v)?> then\n            change y by (1)\n            if <touching (sprite 2 v)?> then\n                change y by (1)\n                if <touching (sprite 2 v)?> then\n                    change y by (1)\n                    if <touching (sprite 2 v)?> then\n                        change y by (1)\n                        if <touching (sprite 2 v)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <touching (sprite 2 v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <<(Yv) = [0]> and <(y position) < [-50]>> then\n        broadcast (z v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [x v]\nset [1 v] to [0]\nset [2 v] to [0]\nstop [other scripts in sprite v]\nclear graphic effects\nset size to (100) %\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by (1)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (1)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (1)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (1)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (1)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [13]\n        end\n    end\n    if <<key (1 v) pressed?> and <(1) = [0]>> then\n        broadcast (protego v)\n        set [1 v] to [1]\n    end\n    if <<key (2 v) pressed?> and <(2) = [0]>> then\n        broadcast (attack you v)\n        set [2 v] to [1]\n    end\n    if <touching (attack v)?> then\n        change [deaths v] by (1)\n        reset\n        broadcast (No Move x v)\n        stop [this script v]\n    end\n    change y by (1)\n    if <(y position) < [-175]> then\n        change [deaths v] by (1)\n        reset\n    end\nend\n\nwhen I receive [no move x v]\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nshow\nset [deaths v] to [0]\nset [xv v] to [0]\nset [yv v] to [20]\nforever\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by (1)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (1)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (1)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (1)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (1)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <<(Yv) = [0]> and <(y position) < [-50]>> then\n        broadcast (x v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [c v]\nset [1 v] to [0]\nset [2 v] to [0]\nset [3 v] to [0]\nstop [other scripts in sprite v]\nclear graphic effects\nset size to (100) %\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by (1)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (1)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (1)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (1)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (1)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [13]\n        end\n    end\n    if <<key (1 v) pressed?> and <(1) = [0]>> then\n        broadcast (protego v)\n        set [1 v] to [1]\n    end\n    if <<key (2 v) pressed?> and <(2) = [0]>> then\n        broadcast (attack you v)\n        set [2 v] to [1]\n    end\n    if <<key (3 v) pressed?> and <(3) = [0]>> then\n        wait until <not <key (3 v) pressed?>>\n        broadcast (control platform v)\n        set [3 v] to [1]\n    end\n    if <touching (attack v)?> then\n        change [deaths v] by (1)\n        reset\n        broadcast (No Move c v)\n        set [xv v] to [0]\n        set [yv v] to [20]\n        stop [this script v]\n    end\n    change y by (1)\n    if <(y position) < [-175]> then\n        change [deaths v] by (1)\n        reset\n    end\nend\n\nwhen I receive [no move c v]\nstop [other scripts in sprite v]\nset [red attack v] to [1]\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nshow\nset [deaths v] to [0]\nforever\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by (1)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (1)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (1)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (1)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (1)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <<(Yv) = [0]> and <(y position) < [-50]>> then\n        broadcast (c v)\n        set [red attack v] to [0]\n        stop [this script v]\n    end\nend\n\nwhen I receive [v v]\nset [1 v] to [0]\nset [2 v] to [0]\nset [3 v] to [0]\nset [4 v] to [0]\nstop [other scripts in sprite v]\nclear graphic effects\nset size to (100) %\nshow\nset [stunned? v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by (1)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (1)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (1)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (1)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (1)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [13]\n        end\n    end\n    if <<key (1 v) pressed?> and <(1) = [0]>> then\n        broadcast (protego v)\n        set [1 v] to [1]\n    end\n    if <<key (2 v) pressed?> and <(2) = [0]>> then\n        broadcast (attack you v)\n        set [2 v] to [1]\n    end\n    if <<key (3 v) pressed?> and <(3) = [0]>> then\n        wait until <not <key (3 v) pressed?>>\n        broadcast (control platform v)\n        set [3 v] to [1]\n    end\n    if <<key (4 v) pressed?> and <(4) = [0]>> then\n        wait until <not <key (4 v) pressed?>>\n        broadcast (stun v)\n        set [4 v] to [1]\n    end\n    if <touching (attack v)?> then\n        change [deaths v] by (1)\n        reset\n        broadcast (No Move v v)\n        set [xv v] to [0]\n        set [yv v] to [20]\n        stop [this script v]\n    end\n    if <touching (red 2 stun v)?> then\n        change [deaths v] by (1)\n        broadcast (No Move v v)\n        broadcast (you got stunned! v)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [stunned? v] to [1]\n        stop [this script v]\n    end\n    change y by (1)\n    if <(y position) < [-175]> then\n        change [deaths v] by (1)\n        reset\n    end\nend\n\nwhen I receive [no move v v]\nstop [other scripts in sprite v]\nwait (0.5) seconds\nif <(Level) = [15]> then\n    clear graphic effects\n    set size to (100) %\n    go to [front v] layer\n    show\n    set [deaths v] to [0]\n    forever\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (1)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (1)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (1)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (1)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change y by (1)\n                            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [yv v] by (-1)\n        change y by (Yv)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n    end\nelse\n    broadcast (No Move v2 v)\n    set [red attack v] to [1]\n    set [red 2 attack v] to [1]\n    clear graphic effects\n    set size to (100) %\n    go to [front v] layer\n    show\n    set [deaths v] to [0]\n    forever\n        set [xv v] to ((Xv) * (0.9))\n        change x by (Xv)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (1)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (1)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (1)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (1)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change y by (1)\n                            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                                change x by ((Xv) * (-1))\n                                change y by (-5)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        change [yv v] by (-1)\n        change y by (Yv)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by ((Yv) * (-1))\n            set [yv v] to [0]\n        end\n        change y by (-1)\n        change y by (1)\n    end\nend\n\nwhen I receive [no move v2 v]\nforever\n    if <(stunned?) = [0]> then\n        if <<(Yv) = [0]> and <(y position) < [-50]>> then\n            if <(Level) < [15]> then\n                broadcast (v v)\n                set [red attack v] to [0]\n                set [red 2 attack v] to [0]\n                stop [this script v]\n            else\n            end\n        end\n    else\n        wait (3) seconds\n        broadcast (v v)\n        set [red attack v] to [0]\n        set [red 2 attack v] to [0]\n        stop [this script v]\n    end\nend\n\nwhen I receive [endend v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\n@Sprite5\n\nwhen flag clicked\nhide\n\nwhen I receive [3 v]\nswitch costume to (costume1 v)\nbroadcast (Stop v)\nwait (0.1) seconds\nbroadcast (No Move v)\nshow\nclear graphic effects\nset [ghost v] effect to (100)\ngo to x: (99) y: (-127)\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait until <touching (guy guard v)?>\nswitch costume to (costume2 v)\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nbroadcast (Stop v)\nbroadcast (guy v)\n\nwhen I receive [4 v]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (0) y: (-127)\nbroadcast (ATTACK v)\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nset size to (100) %\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nset [yv v] to [0]\nwait until <(Next?) = [0]>\nforever\n    set [xv v] to ((xv) * (0.9))\n    change x by (xv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by (1)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (1)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (1)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (1)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (1)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change x by ((xv) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (yv)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by ((yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\n    if <(y position) < [-175]> then\n        if <(Level) = [11]> then\n            restart\n        end\n    end\nend\n\nwhen I receive [5 v]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (-38) y: (-3)\nbroadcast (ATTACK v)\n\nwhen I receive [6 v]\nswitch costume to (costume1 v)\nwait (0.1) seconds\nshow\nclear graphic effects\ngo to x: (80) y: (-81)\n\nwhen I receive [yellow attack end v]\nset [xv v] to [15]\nset [yv v] to [20]\nswitch costume to (costume2 v)\nforever\n    if <<(y position) < [-50]> and <(yv) < [-23]>> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [7 v]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (60) y: (-80)\nbroadcast (ATTACK v)\n\nwhen I receive [red bye bye bye v]\nset [yv v] to [20]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nwait (0.1) seconds\nstop [other scripts in sprite v]\nset [portal v] to [Open]\ngo to (portal v)\n\nwhen I receive [8 v]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (66) y: (-30)\nbroadcast (ATTACK v)\n\nwhen I receive [9 v]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (-47) y: (62)\nbroadcast (ATTACK v)\n\nwhen I receive [10 v]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (52) y: (0)\nbroadcast (ATTACK v)\n\nwhen I receive [11 v]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (52) y: (0)\nbroadcast (ATTACK v)\nset [xv v] to [0]\nset [yv v] to [0]\nset [start position x v] to [52]\nset [start position y v] to [-10]\nforever\n    wait (1.5) seconds\n    if <(x position) > ([x position v] of [player v])> then\n        if <(distance to [player v]) < [50]> then\n            set [xv v] to [10]\n            set [yv v] to [10]\n        else\n            set [xv v] to [-10]\n            set [yv v] to [15]\n        end\n    end\n    if <([x position v] of [player v]) > (x position)> then\n        if <(distance to [player v]) < [50]> then\n            set [xv v] to [-10]\n            set [yv v] to [10]\n        else\n            set [xv v] to [10]\n            set [yv v] to [15]\n        end\n    end\nend\n\ndefine restart\ngo to x: (start position x) y: (start position y)\nset [xv v] to [0]\nset [yv v] to [0]\n\nwhen I receive [12 v]\nswitch costume to (costume1 v)\nhide\nclear graphic effects\nstop [other scripts in sprite v]\ngo to (portal v)\n\nwhen I receive [13 v]\nswitch costume to (costume1 v)\nhide\nclear graphic effects\nforever\n    go to (red 2 v)\nend\n\nwhen I receive [14 v]\nswitch costume to (costume1 v)\nhide\nclear graphic effects\nforever\n    go to (red 2 v)\nend\n\nwhen I receive [15 v]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (100) y: (50)\npoint in direction (90)\nforever\n    if <<(2) = [1]> or <(4) = [1]>> then\n        broadcast (No Move v v)\n        broadcast (how dare you use.. v)\n        stop [this script v]\n    end\n    if <([x position v] of [player v]) > [0]> then\n        broadcast (No Move v v)\n        broadcast (wait wait wait v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [red fade v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nwait (0.1) seconds\nstop [other scripts in sprite v]\nset [portal v] to [Open]\ngo to (portal v)\nbroadcast (v v)\n\n@Sprite 2\n\nwhen flag clicked\ngo to [back v] layer\nswitch costume to (costume1 v)\nclear graphic effects\nshow\nforever\n    set [level v] to (costume [number v])\nend\n\nwhen I receive [next v]\nset [next? v] to [1]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nnext costume\nclear graphic effects\nwait (1) seconds\nbroadcast (Go v)\nset [next? v] to [0]\n\nwhen I receive [end v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\n@Sprite?\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nclear graphic effects\nshow\nforever\n    go to [back v] layer\nend\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\nwhen I receive [end v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [control platform v]\nforever\n    set [brightness v] effect to (100)\n    if <([x position v] of [player v]) < (x position)> then\n        set [direction v] to [1]\n    else\n        set [direction v] to [2]\n    end\n    if <(direction) = [1]> then\n        set y to (mouse y)\n    else\n        set y to (mouse y)\n    end\n    if <(Next?) = [1]> then\n        clear graphic effects\n        stop [this script v]\n    end\nend\n\nwhen I receive [uncontrol platform v]\nclear graphic effects\nstop [other scripts in sprite v]\nforever\n    go to [back v] layer\n    switch costume to (Level)\n    if <(3) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [you got stunned! v]\nbroadcast (uncontrol platform v)\n\nwhen I receive [ha! v]\nbroadcast (uncontrol platform v)\n\nwhen I receive [go v]\ngo to x: (0) y: (0)\nclear graphic effects\nif <(Level) = [8]> then\n    set x to (-70)\n    set y to (0)\nend\nif <(Level) = [9]> then\n    set x to (80)\n    set y to (-111)\nend\nif <(Level) = [10]> then\n    set x to (-58)\n    set y to (0)\nend\nif <(Level) = [12]> then\n    set x to (37)\n    set y to (43)\nend\nif <(Level) = [13]> then\n    set x to (0)\n    set y to (25)\nend\nif <(Level) = [14]> then\n    set x to (170)\n    set y to (-88)\nend\n\nwhen I receive [go v]\nif <(Level) = [1]> then\n\n@Portal\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [start v]\nset [portal v] to [Open]\nclear graphic effects\ngo to x: (210) y: (-75)\ngo to [back v] layer\nshow\n\nwhen I receive [go v]\nclear graphic effects\nforever\n    if <(Portal) = [Open]> then\n        switch costume to (costume2 v)\n        if <touching (player v)?> then\n            if <(Level) = [15]> then\n                broadcast (End v)\n                stop [this script v]\n            else\n                broadcast (Next v)\n                stop [this script v]\n            end\n        end\n    else\n        switch costume to (costume1 v)\n    end\nend\n\nwhen I receive [open v]\nset [portal v] to [Open]\n\nwhen I receive [close v]\nset [portal v] to [Close]\n\nwhen I receive [go v]\nif <(Level) = [2]> then\n    set [portal v] to [Open]\n    go to x: (210) y: (-20)\n    broadcast (2 v)\n    stop [this script v]\nend\nif <(Level) = [3]> then\n    set [portal v] to [Open]\n    go to x: (210) y: (-111)\n    broadcast (3 v)\n    stop [this script v]\nend\nif <(Level) = [4]> then\n    set [portal v] to [Open]\n    go to x: (210) y: (-35)\n    broadcast (4 v)\n    stop [this script v]\nend\nif <(Level) = [5]> then\n    set [portal v] to [Open]\n    go to x: (200) y: (69)\n    broadcast (5 v)\n    stop [this script v]\nend\nif <(Level) = [6]> then\n    set [portal v] to [Closed]\n    go to x: (0) y: (0)\n    broadcast (6 v)\n    stop [this script v]\nend\nif <(Level) = [7]> then\n    set [portal v] to [Closed]\n    go to x: (200) y: (-50)\n    broadcast (7 v)\n    stop [this script v]\nend\nif <(Level) = [8]> then\n    set [portal v] to [Closed]\n    go to x: (190) y: (-110)\n    broadcast (8 v)\n    stop [this script v]\nend\nif <(Level) = [9]> then\n    set [portal v] to [Closed]\n    go to x: (-212) y: (150)\n    broadcast (9 v)\n    stop [this script v]\nend\nif <(Level) = [10]> then\n    set [portal v] to [Closed]\n    go to x: (200) y: (2)\n    broadcast (10 v)\n    stop [this script v]\nend\nif <(Level) = [11]> then\n    set [portal v] to [Closed]\n    go to x: (210) y: (75)\n    broadcast (11 v)\n    stop [this script v]\nend\nif <(Level) = [12]> then\n    set [portal v] to [Closed]\n    go to x: (-200) y: (120)\n    broadcast (12 v)\n    stop [this script v]\nend\nif <(Level) = [13]> then\n    set [portal v] to [Closed]\n    go to x: (0) y: (145)\n    broadcast (13 v)\n    stop [this script v]\nend\nif <(Level) = [14]> then\n    set [portal v] to [Closed]\n    go to x: (60) y: (130)\n    broadcast (14 v)\n    stop [this script v]\nend\nif <(Level) = [15]> then\n    set [portal v] to [Closed]\n    go to x: (200) y: (60)\n    broadcast (15 v)\n    stop [this script v]\nend\n\nwhen I receive [next v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\nwhen I receive [end v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nstop [other scripts in sprite v]\nhide\nstop [this script v]\n\n@Sprite2\n\nwhen flag clicked\ngo to [back v] layer\nclear graphic effects\nshow\ngo to x: (0) y: (0)\n\nwhen I receive [white1 v]\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nbroadcast (Go v)\nbroadcast (Start v)\nbroadcast (Allow v)\n\n@Sprite3\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nhide\n\nwhen I receive [text stuff v]\ngo to [front v] layer\ngo [backward v] (1) layers\nclear graphic effects\ngo to x: (0) y: (-384)\nset [ghost v] effect to (100)\nshow\nrepeat (400)\n    change [ghost v] effect by (-0.25)\n    change y by (0.96)\nend\nrepeat (400)\n    change [ghost v] effect by (0.25)\n    change y by (0.96)\nend\n\nwhen I receive [am v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nhide\n\nwhen I receive [text stuff v]\nswitch costume to (costume1 v)\ngo to [front v] layer\ngo [backward v] (1) layers\nclear graphic effects\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset size to (50) %\nshow\nwait (22) seconds\nrepeat (100)\n    change [ghost v] effect by (-1)\n    change size by (1)\nend\nwait (3) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\n    change size by (-0.5)\nend\nnext costume\nrepeat (20)\n    change [ghost v] effect by (-5)\n    change size by (0.5)\nend\nwait (3) seconds\nbroadcast (white1 v)\n\nwhen I receive [endend v]\nswitch costume to (4 v)\ngo to [front v] layer\nclear graphic effects\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nset size to (50) %\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\n    change size by (1)\nend\nwait (3) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\n    change size by (-0.5)\nend\nnext costume\nrepeat (20)\n    change [ghost v] effect by (-5)\n    change size by (0.5)\nend\nwait (3) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\n    change size by (-1)\nend\nbroadcast (thumbnail v)\n\nwhen I receive [am v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nclear graphic effects\n\n@Voices\n\nwhen I start as a clone\nletter\n\nwhen flag clicked\nhide\nswitch costume to (last v)\n\nwhen I receive [text v]\nwait (0) seconds\nset [# v] to [0]\nrepeat (length of (Text))\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\nset [# v] to [0]\n\nwhen I receive [text v]\ndelete this clone\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nset size to (100) %\n\ndefine letter\ngo to x: (-230) y: (160)\nswitch costume to (letter (#) of (Text))\nrepeat (#)\n    change x by (12)\n    if <(x position) > [230]> then\n        change y by (-20)\n        set x to (-219)\n    end\nend\nshow\n\nwhen I receive [3 v]\nwait (1) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [text v] to [where do you think you're going?]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [never mind.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [you're not going to get past me.]\nbroadcast (Text v)\nwait (1.3) seconds\nbroadcast (first attack v)\nwait (1) seconds\n\nwhen I receive [text 2 v]\nwait (0) seconds\nset [# v] to [0]\nrepeat (length of (Text))\n    change [# v] by (1)\n    create clone of (_myself_ v)\nend\nset [# v] to [0]\n\nwhen I receive [text 2 v]\ndelete this clone\n\nwhen flag clicked\nset [person v] to [me]\n\nwhen I receive [key open talk v]\nbroadcast (Stop v)\nhide\nswitch costume to (last v)\nset [text v] to [Great! Now I can go!]\nbroadcast (Text 2 v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text 2 v)\nwait (1) seconds\nhide\nbroadcast (Open v)\nbroadcast (Allow v)\nstop [this script v]\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [key open v]\nbroadcast (Open v)\nif <(Level) < [12]> then\n    broadcast (Allow v)\n    stop [this script v]\nelse\n    broadcast (z v)\n    stop [this script v]\nend\n\nwhen I receive [first attack reply v]\nwait (1) seconds\nhide\nswitch costume to (last v)\nset [brightness v] effect to (100)\nset [text v] to [ow]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (ow v)\n\nwhen I receive [ow v]\nhide\nswitch costume to (last v)\nclear graphic effects\nset [text v] to [want another?]\nbroadcast (Text v)\nwait (3) seconds\nbroadcast (second attack v)\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [guy v]\nhide\nswitch costume to (last v)\nset [brightness v] effect to (-100)\nset [text v] to [i'll give you help when you need it.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [press "1" to block attacks.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [i'm not saying that that will save you at all times though.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nhide\nbroadcast (z v)\nstop [this script v]\n\nwhen I receive [4 v]\nbroadcast (z v)\nstop [this script v]\n\nwhen I receive [5 v]\nbroadcast (z v)\nstop [this script v]\n\nwhen I receive [6 v]\nwait (0.1) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [text v] to [i've got you!]\nbroadcast (Text v)\nwait (2) seconds\nbroadcast (third attack v)\nset [color v] effect to (35)\nset [text v] to [no you haven't!]\nbroadcast (Text v)\nwait (1) seconds\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [yellow attack end v]\nhide\nswitch costume to (last v)\nclear graphic effects\nset [text v] to [no...]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (2) seconds\nbroadcast (yellow chat v)\n\nwhen I receive [yellow chat v]\nhide\nswitch costume to (last v)\nset [color v] effect to (35)\nwait (2) seconds\nset [text v] to [and who are you?]\nbroadcast (Text v)\nwait (2) seconds\nset [brightness v] effect to (100)\nwait (2) seconds\nset [text v] to [i'm uh...]\nbroadcast (Text v)\nwait (2) seconds\nset [brightness v] effect to (0)\nset [text v] to [at least you don't seem like one of them.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [if you're after them as well,]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [remember that i'm on your side.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [i'll always be around.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (yellow dissipate v)\n\nwhen I receive [7 v]\nwait (0.1) seconds\nbroadcast (Stop v)\nhide\nswitch costume to (last v)\nset [brightness v] effect to (-100)\nset [text v] to [it is me again.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [in case you meet any of those red people again,]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [press "2".]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (x v)\nstop [this script v]\n\nwhen I receive [8 v]\nbroadcast (x v)\nhide\nswitch costume to (last v)\nset [brightness v] effect to (-100)\nwait (2) seconds\nset [text v] to [can't get past, huh?]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [press "3" and see what happens.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [press "3" again to stop what happens.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (c v)\n\nwhen I receive [9 v]\nbroadcast (c v)\nwait (0.2) seconds\nset [red byebye v] to [0]\nstop [this script v]\n\nwhen I receive [10 v]\nbroadcast (c v)\nwait (0.2) seconds\nset [red byebye v] to [0]\nstop [this script v]\n\nwhen I receive [11 v]\nbroadcast (c v)\nwait (0.2) seconds\nset [red byebye v] to [-1]\nstop [this script v]\n\nwhen I receive [12 v]\nbroadcast (c v)\nwait (0.2) seconds\nstop [this script v]\n\nwhen I receive [red 2 talk 1 v]\nhide\nswitch costume to (last v)\nclear graphic effects\nset [text v] to [i knew you were coming.]\nbroadcast (Text v)\nwait (3) seconds\nset [brightness v] effect to (100)\nset [text v] to [i can't move...]\nbroadcast (Text v)\nwait (3) seconds\nclear graphic effects\nset [text v] to [it's over.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (red 2 talk 2 v)\n\nwhen I receive [red 2 talk 3 v]\nhide\nswitch costume to (last v)\nclear graphic effects\nset [text v] to [aarrgghh!!!]\nbroadcast (Text v)\nwait (1) seconds\nbroadcast (retreat v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [red 2 talk 4 v]\nhide\nswitch costume to (last v)\nset [color v] effect to (35)\nset [text v] to [close call, huh?]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (yellow dissipate v)\n\nwhen I receive [power 12 v]\nwait (1) seconds\nhide\nswitch costume to (last v)\nset [brightness v] effect to (-100)\nset [text v] to [you got hit by a stunning attack there.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [press "4" to throw stunning attacks at enemies.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [stunning attacks block stunning attacks.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [good luck.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (v v)\nset [portal v] to [Open]\n\nwhen I receive [13 v]\nbroadcast (v v)\nset [red 2 bye v] to [0]\nwait (0.2) seconds\nstop [this script v]\n\nwhen I receive [14 v]\nbroadcast (v v)\nset [red 2 bye v] to [0]\nwait (0.2) seconds\nstop [this script v]\n\nwhen I receive [15 v]\nbroadcast (No Move v v)\nhide\nswitch costume to (last v)\nset [brightness v] effect to (-100)\nset [text v] to [great job on making it this far.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [just go through the portal.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [let us chat again at the other side.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (v v)\n\nwhen I receive [how dare you use.. v]\nhide\nswitch costume to (last v)\nclear graphic effects\nset [text v] to [how dare you use your powers on me when i'm not even threating you.]\nbroadcast (Text v)\nwait (5) seconds\nset [text v] to [i'm here to warn you.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [what lies inside is not pretty.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [brace yourself.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [seriously.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (red fade v)\nset [red 2 bye v] to [1]\n\nwhen I receive [wait wait wait v]\nhide\nswitch costume to (last v)\nclear graphic effects\nset [text v] to [stop right there.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [i'm here to warn you.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [what lies inside is not pretty.]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [brace yourself.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [seriously.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (red fade v)\nset [red 2 bye v] to [1]\n\n@Attack\n\nwhen flag clicked\nset [next? v] to [0]\nhide\n\nwhen I receive [first attack v]\npoint in direction (90)\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (99) y: (-127)\ngo to [front v] layer\nglide (0.4) secs to x: (-190) y: (-126)\nrepeat (25)\n    change [ghost v] effect by (4)\nend\nhide\nbroadcast (first attack reply v)\n\nwhen I receive [second attack v]\npoint in direction (90)\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (99) y: (-127)\ngo to [front v] layer\nglide (0.8) secs to x: (0) y: (-126)\nswitch costume to (costume2 v)\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [attack v]\nforever\n    if <(red attack) = [0]> then\n        if <(red byebye) < [0]> then\n            go to [back v] layer\n            wait (0.1) seconds\n            create clone of (_myself_ v)\n        else\n            if <(red byebye) = [0]> then\n                go to [back v] layer\n                wait (1) seconds\n                if <(red attack) = [0]> then\n                    create clone of (_myself_ v)\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<<<<touching (protego v)?> or <touching (sprite 2 v)?>> or <(Next?) = [1]>> or <touching (attack you v)?>> or <touching (sprite? v)?>> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to (sprite5 v)\npoint towards (player v)\nturn right (180) degrees\nglide (0.3) secs to (player v)\ndelete this clone\n\nwhen I receive [next v]\nwait (0.1) seconds\nset [red attack v] to [0]\nset [red byebye v] to [0]\nset [red 2 attack v] to [0]\nset [red 2 bye v] to [0]\nstop [other scripts in sprite v]\n\nwhen I receive [third attack v]\npoint in direction (90)\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to (sprite5 v)\ngo to [front v] layer\nglide (0.2) secs to x: (0) y: (-81)\nhide\n\nwhen I receive [red bye bye v]\nchange [red byebye v] by (1)\nif <(red byebye) > [0]> then\n    broadcast (red bye bye bye v)\nend\n\nwhen I receive [stop attacks v]\nwait (0.1) seconds\nstop [other scripts in sprite v]\n\nwhen I receive [red 2 byebye v]\nbroadcast (stop attacks v)\n\n@guy guard\n\nwhen flag clicked\nhide\n\nwhen I receive [second attack v]\nshow\ngo to x: (-240) y: (180)\nclear graphic effects\nset size to (67) %\nrepeat (20)\n    change x by (8)\n    change size by (5)\nend\nrepeat (20)\n    change x by (8)\n    change y by (-8)\n    change [ghost v] effect by (5)\nend\n\n@protego\n\nwhen flag clicked\nclear graphic effects\nhide\nforever\n    go to (player v)\nend\n\nwhen I receive [protego v]\nclear graphic effects\nset size to (100) %\nshow\nwait (2) seconds\nhide\nwait (0.5) seconds\nset [1 v] to [0]\n\n@patronus\n\nwhen flag clicked\nclear graphic effects\nhide\nforever\n    go to (player v)\nend\n\nwhen I receive [patronus v]\nclear graphic effects\nset size to (10) %\nshow\nrepeat (18)\n    change size by (5)\nend\nwait (0.5) seconds\nrepeat (18)\n    change size by (-5)\nend\nhide\nset [? v] to [0]\n\n@Yellow\n\nwhen flag clicked\nhide\n\nwhen I receive [6 v]\nswitch costume to (costume1 v)\nbroadcast (Stop v)\nwait (0.1) seconds\nbroadcast (No Move v)\nshow\nclear graphic effects\ngo to x: (-63) y: (-81)\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\nwhen I receive [yellow chat v]\nglide (1) secs to x: (-90) y: (-81)\n\nwhen I receive [yellow dissipate v]\nrepeat (15)\n    change [ghost v] effect by (6.6)\nend\nhide\nclear graphic effects\n\nwhen I receive [yellow show! v]\nclear graphic effects\nshow\ngo to x: (95) y: (83)\nwait (5.2) seconds\nglide (0.2) secs to x: (85) y: (83)\n\nwhen I receive [red 2 dissipate v]\nwait (3) seconds\nglide (1) secs to x: (95) y: (83)\nbroadcast (red 2 talk 4 v)\n\n@yellow patronus\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [third attack v]\ngo to (yellow v)\nclear graphic effects\nset size to (50) %\nshow\nrepeat (13)\n    change size by (10)\nend\nrepeat (5)\n    change size by (-26)\nend\nhide\nbroadcast (yellow attack v)\n\nwhen I receive [yellow dissipate v]\nset [ghost v] effect to (100)\ngo to (yellow v)\nclear graphic effects\nset size to (50) %\nshow\nrepeat (20)\n    change size by (6)\n    change [ghost v] effect by (-5)\nend\nrepeat (5)\n    change size by (-5)\n    change [ghost v] effect by (5)\nend\nhide\nif <(Level) = [6]> then\n    broadcast (z v)\n    set [portal v] to [Open]\nend\nif <(Level) = [12]> then\n    broadcast (power 12 v)\nend\n\nwhen I receive [yellow to the rescue v]\nclear graphic effects\ngo to x: (95) y: (83)\nset size to (0) %\nset [ghost v] effect to (100)\nshow\nrepeat (5)\n    change size by (29)\n    change [ghost v] effect by (-20)\nend\nbroadcast (yellow show! v)\nrepeat (5)\n    change size by (-10)\n    change [ghost v] effect by (20)\nend\nhide\n\n@yellow\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nhide\n\nwhen I receive [yellow attack v]\nwait (0.5) seconds\nclear graphic effects\nset size to (100) %\nshow\nwait (0.2) seconds\nhide\n\n@yellow2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nhide\n\nwhen I receive [yellow attack v]\ngo to x: (0) y: (0)\nwait (0.5) seconds\nclear graphic effects\nset size to (100) %\nshow\nglide (0.2) secs to x: (137) y: (0)\nhide\nbroadcast (yellow attack end v)\n\nwhen I receive [yellow show! v]\ngo to x: (140) y: (162)\nclear graphic effects\nset size to (100) %\nshow\nglide (0.1) secs to x: (84) y: (162)\nwait (0.5) seconds\nglide (2) secs to x: (80) y: (162)\nwait (0.5) seconds\nglide (2) secs to x: (100) y: (162)\nwait (0.2) seconds\nglide (1) secs to x: (77) y: (162)\n\nwhen I receive [retreat v]\nwait (1) seconds\nglide (5) secs to x: (-103) y: (162)\n\nwhen I receive [red 2 dissipate v]\nglide (0.1) secs to x: (-240) y: (162)\nhide\n\n@Attack You\n\nwhen flag clicked\nhide\n\nwhen I receive [attack you v]\ngo to [back v] layer\ncreate clone of (_myself_ v)\nwait (1) seconds\nset [2 v] to [0]\n\nwhen I start as a clone\nforever\n    if <<touching (red 2 v)?> or <<<touching (protego red v)?> or <<<<touching (attack v)?> or <touching (sprite5 v)?>> or <(Next?) = [1]>> or <touching (sprite 2 v)?>>> or <touching (sprite? v)?>>> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to (player v)\npoint towards (sprite5 v)\nturn right (180) degrees\nglide (0.3) secs to (sprite5 v)\ndelete this clone\n\nwhen I receive [next v]\nwait (0.1) seconds\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nforever\n    if <touching (sprite5 v)?> then\n        broadcast (red bye bye v)\n        stop [this script v]\n    end\n    if <touching (red 2 v)?> then\n        broadcast (red 2 bye v)\n        set [red 2 bye v] to [1]\n        stop [this script v]\n    end\nend\n\n@protego red\n\nwhen flag clicked\nclear graphic effects\nhide\nforever\n    go to (sprite5 v)\nend\n\nwhen I receive [attack you v]\nif <[12] > (Level)> then\n    if <(red byebye) < [1]> then\n        clear graphic effects\n        set size to (100) %\n        show\n        set [red attack v] to [1]\n        wait (0.5) seconds\n        set [red attack v] to [0]\n        hide\n    end\nend\nif <(Level) > [12]> then\n    if <(red 2 bye) < [1]> then\n        clear graphic effects\n        set size to (100) %\n        show\n        set [red 2 attack v] to [1]\n        wait (0.5) seconds\n        set [red 2 attack v] to [0]\n        hide\n    end\nend\n\nwhen I receive [yellow attack v]\nshow\nforever\n    if <touching (yellow2 v)?> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Control Zap\n\nwhen flag clicked\nclear graphic effects\nhide\nforever\n    go to (player v)\nend\n\nwhen I receive [control platform v]\nshow\n\nwhen I receive [control platform v]\nforever\n    if <(direction) = [1]> then\n        point towards (mouse-pointer v)\n        if <<[-180] < (direction)> and <(direction) < [0]>> then\n            point in direction ((direction) * (-1))\n        else\n            point towards (mouse-pointer v)\n        end\n        if <key (3 v) pressed?> then\n            wait until <not <key (3 v) pressed?>>\n            broadcast (uncontrol platform v)\n            set [3 v] to [0]\n            hide\n            stop [this script v]\n        end\n    else\n        point towards (mouse-pointer v)\n        if <<[0] < (direction)> and <(direction) < [180]>> then\n            point in direction ((direction) * (-1))\n        else\n            point towards (mouse-pointer v)\n        end\n        if <key (3 v) pressed?> then\n            wait until <not <key (3 v) pressed?>>\n            broadcast (uncontrol platform v)\n            set [3 v] to [0]\n            hide\n            stop [this script v]\n        end\n    end\n    if <(Next?) = [1]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [uncontrol platform v]\nhide\n\n@Red 2\n\nwhen flag clicked\nhide\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nset [yv2 v] to [0]\nwait until <(Next?) = [0]>\nforever\n    set [xv2 v] to ((xv2) * (0.9))\n    change x by (xv2)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by (1)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (1)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (1)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (1)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (1)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change x by ((xv2) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv2 v] by (-1)\n    change y by (yv2)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by ((yv2) * (-1))\n        set [yv2 v] to [0]\n    end\n    change y by (-1)\n    if <<(red 2 stunned) = [0]> and <<(stunned?) = [0]> and <<key (4 v) pressed?> and <<touching (sprite 2 v)?> or <touching (sprite? v)?>>>>> then\n        if <(Level) = [13]> then\n            set [yv2 v] to [13]\n        end\n    end\n    change y by (1)\n    if <(y position) < [-175]> then\n        if <(Level) = []> then\n            restart\n        end\n    end\nend\n\nwhen I receive [red 2 bye v]\nset [yv2 v] to [20]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nwait (0.1) seconds\nstop [other scripts in sprite v]\nset [portal v] to [Open]\ngo to (portal v)\n\nwhen I receive [12 v]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (-100) y: (100)\nwait until <([y position v] of [player v]) > [75]>\nbroadcast (ha! v)\nbroadcast (No Move c v)\nset [xv v] to [60]\nset [yv v] to [10]\nwait (3) seconds\nbroadcast (red 2 talk 1 v)\nstop [this script v]\n\ndefine restart\ngo to x: (start position x) y: (start position y)\nset [xv2 v] to [0]\nset [yv2 v] to [0]\n\nwhen I receive [red 2 talk 2 v]\nglide (2) secs to x: (-20) y: (81)\nbroadcast (yellow to the rescue v)\n\nwhen I receive [yellow show! v]\nwait (1) seconds\nglide (0.2) secs to x: (-10) y: (81)\nglide (1) secs to x: (-20) y: (81)\n\nwhen I receive [retreat v]\nwait (1) seconds\nglide (5) secs to x: (-200) y: (81)\n\nwhen I receive [red 2 dissipate v]\nset [yv2 v] to [15]\nwait (0.7) seconds\nhide\nstop [other scripts in sprite v]\ngo to (portal v)\n\nwhen I receive [13 v]\nset [red 2 bye v] to [0]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (160) y: (-100)\nbroadcast (STUN! v)\n\nwhen I receive [red 2 stunned v]\nbroadcast (stop attacks v)\nset [red 2 stunned v] to [1]\nwait (3) seconds\nset [red 2 stunned v] to [0]\nif <(red 2 bye) = [0]> then\n    broadcast (start attacks v)\nend\n\nwhen I receive [start attacks v]\nif <(Level) = [13]> then\n    broadcast (STUN! v)\nend\nif <(Level) = [14]> then\n    broadcast (ATTACK v)\n    wait (0.5) seconds\n    broadcast (STUN! v)\nend\n\nwhen I receive [14 v]\nset [red 2 bye v] to [0]\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to x: (80) y: (0)\nbroadcast (ATTACK v)\nwait (0.5) seconds\nbroadcast (STUN! v)\n\nwhen I receive [15 v]\ngo to (portal v)\nswitch costume to (costume1 v)\nhide\nclear graphic effects\nstop [other scripts in sprite v]\n\n@red 2 stun\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nhide\n\nwhen I receive [ha! v]\ngo to (red 2 v)\nclear graphic effects\nset size to (100) %\nshow\nglide (0.2) secs to x: (213) y: (130)\nhide\n\nwhen I start as a clone\nforever\n    if <<<touching (player v)?> or <<(Next?) = [1]> or <<touching (sprite 2 v)?> or <touching (sprite? v)?>>>> or <touching (stun you v)?>> then\n        delete this clone\n    end\nend\n\nwhen I receive [next v]\nwait (0.1) seconds\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to (red 2 v)\npoint towards (player v)\nturn right (180) degrees\nglide (0.3) secs to (player v)\ndelete this clone\n\nwhen I receive [stun! v]\nforever\n    if <(red 2 attack) = [0]> then\n        if <(red 2 bye) < [0]> then\n            go to [back v] layer\n            wait (0.1) seconds\n            create clone of (_myself_ v)\n        else\n            if <(red 2 bye) = [0]> then\n                go to [back v] layer\n                wait (0.5) seconds\n                if <(red 2 attack) = [0]> then\n                    create clone of (_myself_ v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [red 2 bye v]\nchange [red 2 bye v] by (1)\nif <(red 2 bye) > [0]> then\n    broadcast (red 2 byebye v)\nend\n\nwhen I receive [stop attacks v]\nwait (0.1) seconds\nstop [other scripts in sprite v]\n\n@red 2 thing\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nhide\n\nwhen I receive [yellow show! v]\nswitch costume to (costume1 v)\ngo to x: (41) y: (-48)\nclear graphic effects\nset size to (100) %\nshow\nrepeat (5)\n    next costume\nend\nwait (0.1) seconds\nswitch costume to (costume5 v)\nwait (0.5) seconds\nglide (2) secs to x: (34) y: (-48)\nwait (0.5) seconds\nswitch costume to (costume7 v)\nglide (2) secs to x: (44) y: (-48)\nwait (0.2) seconds\nswitch costume to (costume5 v)\nglide (1) secs to x: (32) y: (-48)\nbroadcast (red 2 talk 3 v)\n\nwhen I receive [retreat v]\nwait (1) seconds\nglide (5) secs to x: (-148) y: (-48)\n\nwhen I receive [red 2 dissipate v]\nhide\n\n@yellow thing\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nhide\n\nwhen I receive [yellow show! v]\npoint in direction (-90)\nswitch costume to (costume1 v)\ngo to x: (23) y: (-48)\nclear graphic effects\nset size to (100) %\nshow\nrepeat (5)\n    next costume\nend\nwait (0.1) seconds\nswitch costume to (costume7 v)\nwait (0.5) seconds\nglide (2) secs to x: (17) y: (-48)\nwait (0.5) seconds\nswitch costume to (costume5 v)\nglide (2) secs to x: (27) y: (-48)\nwait (0.2) seconds\nswitch costume to (costume7 v)\nglide (1) secs to x: (15) y: (-48)\n\nwhen I receive [retreat v]\nwait (1) seconds\nrepeat (12)\n    next costume\n    wait ((1) / (4)) seconds\nend\nrepeat (6)\n    next costume\n    wait ((1) / (6)) seconds\nend\nbroadcast (red 2 dissipate v)\n\nwhen I receive [red 2 dissipate v]\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nhide\n\n@red stufff\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nhide\n\nwhen I receive [yellow show! v]\ngo to x: (35) y: (162)\nclear graphic effects\nset size to (100) %\nshow\nglide (0.1) secs to x: (84) y: (162)\nwait (0.5) seconds\nglide (2) secs to x: (80) y: (162)\nwait (0.5) seconds\nglide (2) secs to x: (100) y: (162)\nwait (0.2) seconds\nglide (1) secs to x: (77) y: (162)\n\nwhen I receive [retreat v]\nwait (1) seconds\nglide (5) secs to x: (-103) y: (162)\n\nwhen I receive [red 2 dissipate v]\nhide\n\n@red 2 patronus\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [red 2 dissipate v]\nset [ghost v] effect to (100)\ngo to (red 2 v)\nclear graphic effects\nset size to (50) %\nshow\nrepeat (10)\n    change size by (10)\n    change [ghost v] effect by (-10)\nend\nrepeat (10)\n    change size by (-10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [red 2 dissipate v]\nforever\n    go to (red 2 v)\nend\n\n@Stun You\n\nwhen flag clicked\nhide\n\nwhen I receive [stun v]\ngo to [back v] layer\ncreate clone of (_myself_ v)\nwait (0.5) seconds\nset [4 v] to [0]\n\nwhen I start as a clone\nforever\n    if <<<touching (red 2 v)?> or <<(Next?) = [1]> or <<touching (sprite 2 v)?> or <touching (sprite? v)?>>>> or <touching (red 2 stun v)?>> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to (player v)\npoint towards (red 2 v)\nturn right (180) degrees\nglide (0.3) secs to (red 2 v)\ndelete this clone\n\nwhen I receive [next v]\nwait (0.1) seconds\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nforever\n    if <touching (red 2 v)?> then\n        broadcast (red 2 stunned v)\n        stop [this script v]\n    end\nend\n\n@You got stunned!\n\nwhen flag clicked\nclear graphic effects\nhide\nforever\n    go to (player v)\nend\n\nwhen I receive [you got stunned! v]\nshow\nwait (3) seconds\nhide\n\nwhen I receive [next v]\nwait (0.1) seconds\n\n@Sprite6\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    reset timer\nend\n\nwhen [timer v] > (0.01)\ngo to [front v] layer\nclear graphic effects\nshow\nforever\n    next costume\n    wait (0.2) seconds\nend\n\n@skip\n\nwhen flag clicked\nswitch costume to (costume1 v)\nclear graphic effects\nhide\nset size to (50) %\ngo to x: (-220) y: (-169)\nset [ghost v] effect to (100)\nwait (5) seconds\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n        if <mouse down?> then\n            broadcast (am v)\n            hide\n            wait (2) seconds\n            broadcast (white1 v)\n            stop [this script v]\n        end\n    else\n        clear graphic effects\n    end\nend\n\nwhen I receive [white1 v]\nstop [other scripts in sprite v]\nclear graphic effects\nhide\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\n