Powers 3 (A Platformer)

Instructions: Scroll down ↓ for password in level 6 medium or hard mode, and other stuff.\n**********************************************************\nPart 1: https://scratch.mit.edu/projects/472144496/\nPart 2: https://scratch.mit.edu/projects/572496167/\n**********************************************************\nEasy mode: If you are new to this series (recommended)\nMedium mode: If you have played Powers 1 & 2 already\nHard mode: If you're really good\n***********************************************************\nArrow keys to move.\n1 to defend.\n2 to attack.\n3 to move platforms.\n6 to jump midair.\n7(4) to teleport to mouse (there is a distance restriction)\n***********************************************************\nLove fave follow for part 4.\n***********************************************************\nCheck out my other projects here:\nhttps://scratch.mit.edu/studios/4685976/\n***********************************************************\nPASSWORD: 104729 (the 10,000th prime number)\n***********************************************************\nOnce you collect the key, you need to find the other chamber (don't worry there are signs).\nCollect the first orb on level 8 by moving the controllable platform.\nCollect the second one on level 11 if it appears. You need to have had at least 30 hp remaining in total after you defeat the enemies on level 10 and 11.\nFind the third on level 13 by swooping past the portal into a hidden path. It'll only appear if you have under 10 deaths up to the level in medium mode or 50 in hard.\nIf you're playing on hard mode, collect all orbs, enter the path on the left on level 15, and click the platform 10 times in the path on the right when told to, you will find the secret ending...but be warned, it may not be good...\n**********************************************************\nPASSWORD: 104729 (the 10,000th prime number)

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop2 v)\nset volume to (100) %\nstop all sounds\n\nwhen I receive [an v]\nclear graphic effects\nwait (3) seconds\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [Wow this is depressing v] until done\nend\n\nwhen I receive [end v]\nset [stop clickin v] to [1]\nif <(15 die?) = [0]> then\n    repeat (50)\n        change [brightness v] effect by (-2)\n    end\nelse\n    repeat (200)\n        change [brightness v] effect by (-0.5)\n    end\nend\nbroadcast (endend v)\n\nwhen I receive [thumbnail v]\nswitch backdrop to (thumb 3 v)\nrepeat (50)\n    change [brightness v] effect by (2)\nend\n\nwhen I receive [6a v]\nswitch backdrop to (6a v)\n\nwhen I receive [6 special v]\nif <(6d found) = [0]> then\n    switch backdrop to (6c v)\nend\nif <(6d found) = [1]> then\n    switch backdrop to (6c2 v)\nend\n\nwhen I receive [6 o v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [6d v]\nswitch backdrop to (6d v)\n\nwhen I receive [6b v]\nif <(6d found) = [0]> then\n    switch backdrop to (6b v)\nend\nif <(6d found) = [1]> then\n    switch backdrop to (6b2 v)\nend\n\nwhen I receive [an v]\nset volume to (100) %\nforever\n    if <(Level) = [19]> then\n        set [pitch v] effect to (-5)\n    else\n        if <(Level) = [20]> then\n            set [pitch v] effect to (-10)\n        else\n            if <(Level) = [21]> then\n                set [pitch v] effect to (20)\n            else\n                clear sound effects\n            end\n        end\n    end\n    if <(Level) = [15]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [6e v]\nswitch backdrop to (6e v)\n\nwhen I receive [7 v]\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [next v]\nif <(Level) = [21]> then\n    switch backdrop to (backdrop1 v)\nend\nif <(Level) = [23]> then\n    repeat (80)\n        change volume by (-1.25)\n    end\n    set volume to (0) %\nend\n\nwhen I receive [15 v]\nset [pitch v] effect to (100)\nset volume to (0) %\nrepeat (80)\n    change volume by (1.25)\nend\n\nwhen I receive [15a v]\nif <(6e9) = [0]> then\n    switch backdrop to (156e9no v)\nelse\n    if <(15b done) = [0]> then\n        switch backdrop to (156e9yes v)\n    else\n        switch backdrop to (156e9yesdone v)\n    end\nend\n\nwhen I receive [15 last v]\nswitch backdrop to (backdrop3 v)\n\nwhen I receive [end v]\nrepeat (160)\n    change volume by (-0.625)\nend\nstop all sounds\n\nwhen I receive [15b v]\nswitch backdrop to (backdrop4 v)\n\nwhen I receive [15 last v]\nif <<(6e9) = [1]> and <<(all?) = [1]> and <(mode) = [hard]>>> then\n    set [15 click v] to [0]\n    wait until <(15...end?) = [1]>\n    forever\n        if <(stop clickin) = [1]> then\n            set [15 click v] to [0]\n            stop [this script v]\n        end\n        if <<mouse down?> and <(mouse y) < [35]>> then\n            wait until <not <mouse down?>>\n            if <(stop clickin) = [1]> then\n                set [15 click v] to [0]\n                stop [this script v]\n            end\n            change [15 click v] by (1)\n            broadcast (click v)\n            if <(15 click) = [10]> then\n                broadcast (15 clicked 10 v)\n                switch backdrop to (backdrop5 v)\n                stop all sounds\n                stop [other scripts in sprite v]\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [15a2 v]\nswitch backdrop to (backdrop5 v)\n\nwhen I receive [15a3 v]\nswitch backdrop to (backdrop6 v)\nif <(15a3firsttime) = [1]> then\n    clear sound effects\n    set volume to (0) %\n    repeat (80)\n        change volume by (1.25)\n    end\nend\n\nset [6e9 v] to [1]\nset [all? v] to [1]\nset [mode v] to [hard]\n\nwhen I receive [15a3firsttime v]\nforever\n    play sound [\[Event\] I am v] until done\nend\n\nwhen I receive [15a3 v]\nif <(15a3firsttime) = [1]> then\n    broadcast (15a3firsttime v)\nend\n\nwhen flag clicked\nset [stop clickin v] to [0]\n\nwhen I receive [15 return to main v]\nswitch backdrop to (156e9yesdone2 v)\n\nwhen I receive [15 o ready too portal v]\nswitch backdrop to (backdrop5 v)\n\nset volume to (0) %\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    start sound [Click 3 v]\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 [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 volume to (100) %\nset [person v] to [me]\n\nwhen I receive [end v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [white1 v]\nwait (5) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [get to the portal to use your powers again.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [2a v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [oh yeah, no more stunning so pressing 4 doesn't work anymore]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nstop [this script v]\n\nwhen I receive [ac v]\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [who's there?]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nset [text v] to [there's gotta be someone...]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (ad v)\n\nwhen I receive [ah v]\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [well, well, well...]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [look who it is.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nset [text v] to [we meet again.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (ai v)\n\nwhen I receive [al v]\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [it's over man.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nset [text v] to [any last words?]\nbroadcast (Text v)\nwait (2) seconds\n\nwhen I receive [an v]\nstop [other scripts in sprite v]\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [ao v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [same controls as usual.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [ap v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [why isn't the portal opening?]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [3 v]\nwait (0.2) seconds\nbroadcast (n v)\nstop [this script v]\n\nwhen I receive [4 v]\nwait (0.2) seconds\nbroadcast (n v)\nstop [this script v]\n\nwhen I receive [4d v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [now how do i get past those laser beams...]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [5 v]\nwait (0.2) seconds\nbroadcast (n v)\nstop [this script v]\n\nwhen I receive [5b v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [if only i could teleport...]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nset [v? v] to [1]\n\nwhen I receive [6 v]\nwait (0.2) seconds\nbroadcast (n v)\nset [v? v] to [1]\nstop [this script v]\n\nwhen I receive [6d1 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [what's this place...]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [it's a bit creepy]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (5) seconds\nbroadcast (6d2 v)\n\nwhen I receive [6d3 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [password?]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nrepeat until <<(answer) = [104729]> or <(answer) = [0]>>\n    ask [6 digit password from Powers 2 level 14 \(or look in instructions\) Type 0 if you give up. ] and wait\n    if <(answer) = [104729]> then\n        broadcast (6d4 v)\n    end\n    if <(answer) = [0]> then\n        broadcast (6d5 v)\n    end\nend\nstop [this script v]\n\nwhen I receive [6d5b v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [you may return...]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nset [6d go back allow v] to [1]\n\nwhen I receive [6d4b v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [there's a few things you deserve to know...]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (6d thing v)\n\nwhen I receive [6d6b v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [that'll help you later]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nset [6d go back allow v] to [1]\n\nwhen I receive [6e2 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [another hidden chamber?]\nbroadcast (Text v)\nwait (2) seconds\nwait until <key (6 v) pressed?>\nset [text v] to [and i can't even get out...]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (2) seconds\nbroadcast (6e3 v)\n\nwhen I receive [6e5 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [this is what you needed to know.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [your strongest ally... ]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [...is dead]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (2) seconds\n\nwhen I receive [6e8 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [but he did leave you something]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (2) seconds\n\nwhen I receive [7 v]\nwait (0.2) seconds\nbroadcast (n v)\nset [v? v] to [2]\nstop [this script v]\n\nwhen I receive [7a v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [from this level on, ]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [press 4 instead of 7 to teleport]\nbroadcast (Text v)\nwait (2) seconds\nwait until <key (4 v) pressed?>\nset [text v] to []\nbroadcast (Text v)\nbroadcast (7b v)\n\nwhen I receive [8 v]\nwait (0.2) seconds\nbroadcast (n v)\nset [v? v] to [2]\nstop [this script v]\n\nwhen I receive [9 v]\nwait (0.2) seconds\nbroadcast (n v)\nset [v? v] to [2]\nstop [this script v]\n\nwhen I receive [10 v]\nwait (0.2) seconds\nbroadcast (n v)\nset [v? v] to [2]\nstop [this script v]\n\nwhen I receive [11 v]\nwait (0.2) seconds\nbroadcast (n v)\nset [v? v] to [2]\nstop [this script v]\n\nwhen I receive [12 v]\nwait (0.2) seconds\nbroadcast (n v)\nset [v? v] to [2]\nstop [this script v]\n\nwhen I receive [13 v]\nwait (0.2) seconds\nbroadcast (n v)\nset [v? v] to [2]\nstop [this script v]\n\nwhen I receive [14 v]\nwait (0.2) seconds\nbroadcast (n v)\nset [v? v] to [2]\nstop [this script v]\n\nwhen I receive [15 v]\nwait (0.2) seconds\nset [v? v] to [0]\nstop [this script v]\n\nwhen I receive [15 last2 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [congratulations.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [you've performed brilliantly.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [head in to the portal.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [i'll see you at the other side.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nbroadcast (15 last3 v)\n\nwhen I receive [15b2 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [you're here for a reason]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [and you know why i'm not]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [i can only guide you through a memory]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [but i'll try my best]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [there were 3 orbs for you to find across this area]\nbroadcast (Text v)\nwait (4) seconds\nif <(things) = [0]> then\n    broadcast (15b no things v)\nelse\n    if <(things) = [3]> then\n        broadcast (15b all v)\n    else\n        broadcast (15b things v)\n    end\nend\nstop [this script v]\n\nwhen flag clicked\nset [things v] to [0]\n\nwhen I receive [15b no things v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [it seems like you missed them all]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [it's okay though]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [you may go now.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nbroadcast (15b3 v)\n\nwhen I receive [15b things v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to (join [you collected ] (join (things) [ of them]))\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nset [all? v] to [0]\nbroadcast (15 things code v)\n\nwhen I receive [15b all v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [you collected all of them]\nbroadcast (Text v)\nwait (4) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nset [all? v] to [1]\nbroadcast (15 things code v)\n\nwhen I receive [15 v]\nforever\n    set [things v] to ((8 thing) + ((11 thing) + (13 thing)))\nend\n\nwhen I receive [15b5 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [just a bit more]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [but a great accomplishment]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [i know that you are strong enough to defeat the enemy]\nbroadcast (Text v)\nwait (4) seconds\nset [text v] to [i believe in you]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [good luck]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [and know that i'll always be with you supporting you on your way]\nbroadcast (Text v)\nwait (4) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nbroadcast (15b3 v)\n\nwhen I receive [15b6 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [astounding]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [you've got talent]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [it'll only be a matter of time before you defeat the enemy]\nbroadcast (Text v)\nwait (4) seconds\nset [text v] to [i can now fully assure myself that i'll be able to rest in peace]\nbroadcast (Text v)\nwait (4) seconds\nset [text v] to [all thanks to you]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [i believe in you]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [good luck]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [and know that i'll always be with you supporting you on your way]\nbroadcast (Text v)\nwait (4) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nbroadcast (15b7 v)\n\nwhen I receive [15b9 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [one last thing]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [did you find the 5 digit code at the bottom right of the screen right after you left the area you collected the key?]\nbroadcast (Text v)\nwait (4) seconds\nrepeat until <<(answer) = [yes]> or <(answer) = [no]>>\n    ask [yes/no] and wait\n    if <(answer) = [yes]> then\n        broadcast (15b9y v)\n    end\n    if <(answer) = [no]> then\n        broadcast (15b9n v)\n    end\nend\n\nwait (1) seconds\nbroadcast (15b7 v)\n\nwhen I receive [15b9y v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [good to hear that]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [you may go now]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nbroadcast (15b10 v)\n\nwhen I receive [15b9n v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [it was 28561 \(press space if you got it\)]\nbroadcast (Text v)\nwait (2) seconds\nwait until <key (space v) pressed?>\nset [text v] to [you may go now]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nbroadcast (15b10 v)\n\nwhen flag clicked\nset [all? v] to [0]\n\nwhen I receive [15 last4 v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [were you talking to someone back there?]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [nevermind]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [but be careful with who you trust]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [i'll see you at the other side.]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to []\nbroadcast (Text v)\nwait (1) seconds\nbroadcast (15 last3 v)\n\nwhen I receive [15a5b v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [i sense something peculiar...]\nbroadcast (Text v)\nwait (4) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (15a5c v)\n\nwhen I receive [15a5e v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [wow]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [i did not think i'd see you here]\nbroadcast (Text v)\nwait (4) seconds\nset [text v] to [come closer will you?]\nbroadcast (Text v)\nbroadcast (15a5f v)\nwait until <<([y position v] of [player v]) > [30]> and <[61] > ([x position v] of [player v])>>\nset [15 control yes? v] to [0]\nbroadcast (15 player pause v)\nwait (1) seconds\nset [text v] to [you know who i am]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [i've guided you all the way]\nbroadcast (Text v)\nwait (2) seconds\nset [text v] to [it was my plan all along to get you on my side]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [you were supposed to enter the portal]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [but you ignored me and you're here]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [you made the wrong decision]\nbroadcast (Text v)\nwait (3) seconds\nbroadcast (15a5g v)\nwait (4) seconds\nif <(Deaths) = [0]> then\n    broadcast (15a5ggood v)\nelse\n    broadcast (15a5gbad v)\nend\n\nwhen I receive [15a5gbad v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [it's a pity you know,]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [you could have made an amazing sidekick]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (15a5i v)\nwait (2) seconds\nbroadcast (15a5h v)\n\nwhen I receive [15a5ggood v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [it's a pity you know,]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [you could have made an amazing sidekick]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [should i destroy you, it would be a great loss for my side as well]\nbroadcast (Text v)\nwait (5) seconds\nset [text v] to [i'm going to give you 5 seconds,]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to [to make a run for it]\nbroadcast (Text v)\nbroadcast (15a5g2 v)\nset [15 control yes? v] to [1]\nset [15 good stuff v] to [1]\nwait (5) seconds\nif <[26] < ([costume # v] of [sprite 2 v])> then\n    set [15 control yes? v] to [0]\n    wait (2) seconds\n    if <[26] < ([costume # v] of [sprite 2 v])> then\n        broadcast (15a5j v)\n    else\n        set [15 control yes? v] to [1]\n    end\nend\n\nwhen flag clicked\nset [15 good stuff v] to [0]\n\nwhen I receive [15a4 v]\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [15 return to main v]\nset [text v] to []\nbroadcast (Text v)\n\nwhen I receive [15a5k v]\nwait (0.2) seconds\nhide\nswitch costume to (last v)\nclear graphic effects\nset [brightness v] effect to (-100)\nset [text v] to [too slow]\nbroadcast (Text v)\nwait (3) seconds\nbroadcast (15a5l v)\n\nwhen I receive [15a5m v]\nset [text v] to [nice knowing you]\nbroadcast (Text v)\nwait (3) seconds\nset [text v] to []\nbroadcast (Text v)\nbroadcast (15a5i v)\nwait (2) seconds\nbroadcast (15a5n v)\n\n@Sprite1\n\nwhen flag clicked\nclear graphic effects\nswitch costume to (costume2 v)\nshow\ngo to x: (0) y: (0)\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 [an v]\nstop [other scripts in sprite v]\nclear graphic effects\nhide\n\n@Dark\n\nwhen flag clicked\nhide\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\nbroadcast (text stuff v)\n\nwhen flag clicked\nwait (3) seconds\nswitch costume to (costume3 v)\ngo to x: (-240) y: (-15)\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nshow\nset [xv v] to [0]\nset [yv v] to [0]\nbroadcast (aa v)\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)\nend\n\nwhen I receive [aa v]\nset [xv v] to [3]\nwait (3) seconds\nbroadcast (ab v)\n\nwhen I receive [ad v]\nwait (1) seconds\nrepeat (10)\n    set [xv v] to [3]\nend\nbroadcast (ae v)\n\nwhen I receive [ai v]\nset [xv v] to [30]\nset [yv v] to [20]\n\nwhen I receive [af v]\nset [xv v] to [-5]\nswitch costume to (costume2 v)\n\nwhen I receive [aj v]\nset [dx v] to ((x position) + (0))\nset [dy v] to ((y position) + (10))\nwait (0.1) seconds\nswitch costume to (costume4 v)\nstop [other scripts in sprite v]\n\nwhen I receive [ak v]\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 (-2)\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)\nend\n\nwhen I receive [an v]\nstop [other scripts in sprite v]\nclear graphic effects\nhide\n\n@Dark2\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\nswitch costume to (costume1 v)\ngo to x: (103) y: (-124)\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nshow\nset [xx v] to [0]\nset [yy v] to [0]\nforever\n    set [xx v] to ((xx) * (0.9))\n    change x by (xx)\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 ((xx) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yy v] by (-1)\n    change y by (yy)\n    if <touching (sprite 2 v)?> then\n        change y by ((yy) * (-1))\n        set [yy v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\nend\n\nwhen I receive [af v]\nset [xx v] to [-10]\nset [yy v] to [3]\n\nwhen I receive [an v]\nstop [other scripts in sprite v]\nclear graphic effects\nhide\n\nwhen I receive [15a5 v]\ngo to x: (-226) y: (-95)\nclear graphic effects\nshow\nset [xx v] to [0]\nset [yy v] to [0]\nforever\n    set [xx v] to ((xx) * (0.9))\n    change x by (xx)\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 ((xx) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yy v] by (-1)\n    change y by (yy)\n    if <touching (sprite 2 v)?> then\n        change y by ((yy) * (-1))\n        set [yy v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\nend\n\nwhen I receive [15a5c v]\nwait (2) seconds\nset [xx v] to [19]\nset [yy v] to [18]\nwait (2) seconds\nbroadcast (15a5d v)\n\nwhen I receive [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 [15a4 v]\nstop [other scripts in sprite v]\nset [xx v] to [0]\nset [yy v] to [0]\nhide\n\nwhen I receive [15 return to main v]\nstop [other scripts in sprite v]\nset [xx v] to [0]\nset [yy v] to [0]\nhide\n\nwhen I receive [15a5l v]\nif <([costume # v] of [sprite 2 v]) = [27]> then\n    go to x: (-43) y: (-117)\n    clear graphic effects\n    show\nend\nif <([costume # v] of [sprite 2 v]) = [28]> then\n    go to x: (-3) y: (15)\n    clear graphic effects\n    show\nend\nif <([costume # v] of [sprite 2 v]) = [29]> then\n    set [xx v] to [12]\n    set [yy v] to [8]\nend\nwait (3) seconds\nbroadcast (15a5m v)\n\n@light\n\nwhen flag clicked\nhide\nclear graphic effects\nforever\n    go to (dark v)\n    go to [back v] layer\nend\n\nwhen I receive [aa v]\nswitch costume to (costume1 v)\nset size to (100) %\nclear graphic effects\nset [ghost v] effect to (100)\nshow\nrepeat (50)\n    change [ghost v] effect by (-1)\nend\nforever\n    repeat (50)\n        change [ghost v] effect by (0.04)\n        change size by (0.2)\n    end\n    wait (0.1) seconds\n    repeat (50)\n        change [ghost v] effect by (-0.04)\n        change size by (-0.2)\n    end\n    wait (0.1) seconds\nend\n\nwhen I receive [af v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [ah v]\nhide\nclear graphic effects\nforever\n    go to (dark2 v)\n    go to [back v] layer\nend\n\nwhen I receive [ah v]\nswitch costume to (costume2 v)\nset size to (100) %\nclear graphic effects\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-2)\nend\n\nwhen I receive [an v]\nstop [other scripts in sprite v]\nclear graphic effects\nhide\n\nwhen I receive [6e v]\nswitch costume to (costume3 v)\nclear graphic effects\nset [ghost v] effect to (100)\nshow\nset [brightness v] effect to (0)\nset size to (50) %\n\nforever\nend\n\ngo to [back v] layer\ngo [forward v] (40) layers\ngo to (player v)\n\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\n\nwhen I receive [6e v]\n\n@text place\n\nwhen flag clicked\nhide\n\nwhen I receive [ab v]\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (209)\nrepeat (23)\n    change y by (-3)\nend\nbroadcast (ac v)\n\nwhen I receive [ad v]\nrepeat (23)\n    change y by (3)\nend\nhide\n\nwhen I receive [ag v]\nswitch costume to (costume2 v)\nshow\ngo to x: (0) y: (209)\nrepeat (23)\n    change y by (-3)\nend\nbroadcast (ah v)\n\nwhen I receive [ai v]\nrepeat (23)\n    change y by (3)\nend\nhide\n\nwhen I receive [ak v]\nswitch costume to (costume2 v)\nshow\ngo to x: (0) y: (209)\nrepeat (23)\n    change y by (-3)\nend\nbroadcast (al v)\n\nwhen I receive [an v]\nstop [other scripts in sprite v]\nclear graphic effects\nhide\n\nwhen I receive [start v]\nswitch costume to (you v)\nshow\ngo to x: (0) y: (209)\nrepeat (10)\n    change y by (-7)\nend\nbroadcast (ao v)\nwait (3) seconds\nrepeat (10)\n    change y by (7)\nend\nhide\nwait (1) seconds\nshow\nrepeat (10)\n    change y by (-7)\nend\nbroadcast (ap v)\nwait (3) seconds\nrepeat (10)\n    change y by (7)\nend\nhide\nset [mode v] to [0]\nrepeat until <not <(mode) = [0]>>\n    ask [easy/medium/hard     Which mode?] and wait\n    if <<<(answer) = [easy]> or <(answer) = [e]>> or <(answer) = [E]>> then\n        set [mode v] to [beginner]\n    end\n    if <<<(answer) = [medium]> or <(answer) = [m]>> or <(answer) = [M]>> then\n        set [mode v] to [easy]\n    end\n    if <<<(answer) = [hard]> or <(answer) = [h]>> or <(answer) = [H]>> then\n        set [mode v] to [hard]\n    end\nend\nbroadcast (aq v)\n\nwhen I receive [4c v]\nwait (2) seconds\nif <(Level) = [4]> then\n    switch costume to (you v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (4d v)\n    wait (3) seconds\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [5a v]\nwait (2) seconds\nif <(Level) = [5]> then\n    switch costume to (you v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (5b v)\n    wait (2) seconds\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [6d v]\nwait (2) seconds\nif <(Level) = [20]> then\n    switch costume to (you v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (6d1 v)\n    wait (5) seconds\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [6d2 v]\nwait (2) seconds\nif <(Level) = [20]> then\n    switch costume to (costume2 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (6d3 v)\n    wait (3) seconds\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [2 v]\nif <(mode) = [hard]> then\n    broadcast (n v)\n    wait (2) seconds\n    if <(Level) = [2]> then\n        switch costume to (you v)\n        show\n        go to x: (0) y: (209)\n        repeat (10)\n            change y by (-7)\n        end\n        broadcast (2a v)\n        wait (4) seconds\n        repeat (10)\n            change y by (7)\n        end\n        hide\n    end\nend\nif <<(mode) = [easy]> or <(mode) = [beginner]>> then\n    broadcast (2b v)\nend\n\nwhen I receive [6d5 v]\nwait (2) seconds\nif <(Level) = [20]> then\n    switch costume to (costume2 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (6d5b v)\n    wait (3) seconds\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [6d4 v]\nwait (2) seconds\nif <(Level) = [20]> then\n    switch costume to (costume2 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (6d4b v)\n    wait (4) seconds\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [6d6 v]\nwait (2) seconds\nif <(Level) = [20]> then\n    switch costume to (costume2 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (6d6b v)\n    wait (3) seconds\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [6e v]\nwait (5) seconds\nif <(Level) = [21]> then\n    go to [front v] layer\n    switch costume to (you v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (6e2 v)\nend\n\nwhen I receive [6e3 v]\nif <(Level) = [21]> then\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\nwait (5) seconds\nbroadcast (6e4 v)\n\nwhen I receive [6e4 v]\nif <(Level) = [21]> then\n    go to [front v] layer\n    switch costume to (costume2 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (6e5 v)\n    wait (9) seconds\n    repeat (10)\n        change y by (7)\n    end\n    hide\n    broadcast (6e6 v)\nend\n\nwhen I receive [6e7 v]\nif <(Level) = [21]> then\n    go to [front v] layer\n    switch costume to (costume2 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (6e8 v)\n    wait (3) seconds\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\nbroadcast (6e9 v)\n\nwhen I receive [7 v]\nwait (2) seconds\nif <(Level) = [7]> then\n    switch costume to (you v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (7a v)\nend\n\nwhen I receive [7b v]\nif <(Level) = [7]> then\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\n\nwhen I receive [15 last v]\nwait (2) seconds\nif <(Level) = [24]> then\n    switch costume to (costume2 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    if <(all?) = [0]> then\n        broadcast (15 last2 v)\n    end\n    if <(all?) = [1]> then\n        broadcast (15 last4 v)\n    end\nend\n\nwhen I receive [15 last3 v]\nif <(Level) = [24]> then\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\nwait (1) seconds\nset [portal v] to [open]\nset [15...end? v] to [1]\n\nwhen I receive [15b v]\nwait (5) seconds\nif <(Level) = [25]> then\n    switch costume to (costume1 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (15b2 v)\nend\n\nwhen I receive [15b3 v]\nif <(Level) = [25]> then\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\nset [15b done v] to [1]\n\nwhen I receive [15 things code v]\nif <(Level) = [25]> then\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\nwait until <(things) = [0]>\nbroadcast (15b4 v)\n\nwhen I receive [15b4 v]\nwait (2) seconds\nif <(Level) = [25]> then\n    switch costume to (costume1 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    if <(all?) = [0]> then\n        broadcast (15b5 v)\n    end\n    if <(all?) = [1]> then\n        broadcast (15b6 v)\n    end\nend\n\nwhen I receive [15b7 v]\nif <(Level) = [25]> then\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\nwait until <([x position v] of [player v]) > [220]>\nbroadcast (15b8 v)\n\nwhen I receive [15b8 v]\nwait (1) seconds\nif <(Level) = [25]> then\n    switch costume to (costume1 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (15b9 v)\nend\n\nwhen I receive [15b10 v]\nif <(Level) = [25]> then\n    repeat (10)\n        change y by (7)\n    end\n    hide\nend\nwait (1) seconds\nset [15b done v] to [1]\n\nwhen flag clicked\nset [15...end? v] to [0]\n\nwhen I receive [15a5 v]\nwait (2) seconds\nif <([costume # v] of [sprite 2 v]) = [29]> then\n    switch costume to (you v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (15a5b v)\nend\n\nwhen I receive [15a5c v]\nrepeat (10)\n    change y by (7)\nend\nhide\n\nwhen I receive [15a5d v]\nwait (2) seconds\nif <([costume # v] of [sprite 2 v]) = [29]> then\n    switch costume to (costume2 v)\n    show\n    go to x: (0) y: (209)\n    repeat (10)\n        change y by (-7)\n    end\n    broadcast (15a5e v)\nend\n\nwhen I receive [15a5i v]\nrepeat (10)\n    change y by (7)\nend\nhide\n\nwhen I receive [15a4 v]\nhide\n\nwhen I receive [15 return to main v]\nhide\n\nwhen I receive [15a5j v]\nwait (2) seconds\nswitch costume to (costume2 v)\nshow\ngo to x: (0) y: (209)\nrepeat (10)\n    change y by (-7)\nend\nbroadcast (15a5k v)\n\n@black missile\n\nwhen flag clicked\nset [m speed v] to [800]\nset [my variable v] to [0]\nhide\n\nwhen I receive [ae v]\nswitch costume to (costume1 v)\nset size to (80) %\ngo to (dark2 v)\nclear graphic effects\ngo to [back v] layer\npoint in direction (112)\nshow\nbroadcast (af v)\nglide (0.2) secs to x: (-232) y: (31)\nstart sound [Glass Breaking v]\nhide\n\nwhen I receive [ai v]\nwait (0.2) seconds\nswitch costume to (costume2 v)\nset size to (80) %\ngo to (dark2 v)\nclear graphic effects\ngo to [front v] layer\nshow\nbroadcast (aj v)\nstart sound [Rip v]\nglide (0.1) secs to x: ((dx) + (20)) y: (dy)\nhide\nwait (1) seconds\nbroadcast (ak v)\n\nwhen I receive [al v]\nswitch costume to (costume1 v)\nset size to (80) %\ngo to (dark2 v)\nclear graphic effects\ngo to [front v] layer\npoint in direction (110)\nchange x by (-10)\nchange x by (3)\nshow\nwait (6) seconds\nbroadcast (am v)\n\nwhen I receive [an v]\nstop [other scripts in sprite v]\nclear graphic effects\nhide\nforever\n    if <<<<touching (sprite? v)?> or <touching (sprite 2 v)?>> and <not <touching (red 3 v)?>>> or <touching (_edge_ v)?>> then\n        set [bmx v] to (x position)\n        set [bm touch v] to [1]\n        hide\n    end\nend\n\nwhen I receive [red 3 missile v]\nswitch costume to (costume3 v)\nset size to (80) %\ngo to (red 3 v)\nmove (-10) steps\nchange y by (3)\nclear graphic effects\ngo to [front v] layer\npoint in direction (-90)\nshow\nbroadcast (red 3 missile go v)\nglide (0.2) secs to x: (-232) y: (y position)\nhide\n\nwhen I receive [red 3 m 5 v]\nswitch costume to (costume4 v)\nset size to (80) %\ngo to (red 3 v)\nclear graphic effects\ngo to [front v] layer\nshow\nbroadcast (red 3 missile go v)\nset [bm touch v] to [0]\nif <([x position v] of [player v]) < ([x position v] of [red 3 v])> then\n    point in direction (-90)\n    glide (((x position) - (-240)) / (m speed)) secs to x: (-240) y: (y position)\n    if <(bm touch) = [0]> then\n        set [bmx v] to [-232]\n    end\nelse\n    point in direction (90)\n    glide (((240) - (x position)) / (m speed)) secs to x: (240) y: (y position)\n    if <(bm touch) = [0]> then\n        set [bmx v] to [232]\n    end\nend\nhide\n\nwhen I receive [red 3 m 8 v]\nbroadcast (red 3 missile go v)\nset [bm touch v] to [0]\nif <([y position v] of [red 3 v]) < ([y position v] of [player v])> then\n    if <([x position v] of [player v]) < ([x position v] of [red 3 v])> then\n        switch costume to (costume4 v)\n        set size to (80) %\n        go to (red 3 v)\n        point towards (player v)\n        clear graphic effects\n        go to [front v] layer\n        show\n        set [red 3 m angle v] to (((direction) * (-1)) + (90))\n        glide (([sqrt v] of ((((x position) - (-240)) * ((x position) - (-240))) + ((((x position) - (-240)) * ([tan v] of (red 3 m angle) )) * (((x position) - (-240)) * ([tan v] of (red 3 m angle) )))) ) / (m speed)) secs to x: (-240) y: (((y position) - (((x position) - (-240)) * ([tan v] of (red 3 m angle) ))) - (my variable))\n        if <(bm touch) = [0]> then\n            set [bmx v] to [-232]\n        end\n    else\n        switch costume to (costume4 v)\n        set size to (80) %\n        go to (red 3 v)\n        point towards (player v)\n        clear graphic effects\n        go to [front v] layer\n        show\n        set [red 3 m angle v] to (((direction) * (-1)) + (90))\n        glide (([sqrt v] of ((((240) - (x position)) * ((240) - (x position))) + ((((240) - (x position)) * ([tan v] of (red 3 m angle) )) * (((240) - (x position)) * ([tan v] of (red 3 m angle) )))) ) / (m speed)) secs to x: (240) y: (((y position) + (((240) - (x position)) * ([tan v] of (red 3 m angle) ))) - (my variable))\n        if <(bm touch) = [0]> then\n            set [bmx v] to [232]\n        end\n    end\n    hide\nend\nif <<([y position v] of [player v]) < ([y position v] of [red 3 v])> or <([y position v] of [player v]) = ([y position v] of [red 3 v])>> then\n    if <([x position v] of [player v]) < ([x position v] of [red 3 v])> then\n        switch costume to (costume4 v)\n        set size to (80) %\n        go to (red 3 v)\n        point towards (player v)\n        clear graphic effects\n        go to [front v] layer\n        show\n        set [red 3 m angle v] to (((direction) * (-1)) + (90))\n        glide (([sqrt v] of ((((x position) - (-240)) * ((x position) - (-240))) + ((((x position) - (-240)) * ([tan v] of (red 3 m angle) )) * (((x position) - (-240)) * ([tan v] of (red 3 m angle) )))) ) / (m speed)) secs to x: (-240) y: (((y position) - (((x position) - (-240)) * ([tan v] of (red 3 m angle) ))) - (my variable))\n        if <(bm touch) = [0]> then\n            set [bmx v] to [-232]\n        end\n    else\n        switch costume to (costume4 v)\n        set size to (80) %\n        go to (red 3 v)\n        point towards (player v)\n        clear graphic effects\n        go to [front v] layer\n        show\n        set [red 3 m angle v] to (((direction) * (-1)) + (90))\n        glide (([sqrt v] of ((((240) - (x position)) * ((240) - (x position))) + ((((240) - (x position)) * ([tan v] of (red 3 m angle) )) * (((240) - (x position)) * ([tan v] of (red 3 m angle) )))) ) / (m speed)) secs to x: (240) y: (((y position) + (((240) - (x position)) * ([tan v] of (red 3 m angle) ))) - (my variable))\n        if <(bm touch) = [0]> then\n            set [bmx v] to [232]\n        end\n    end\n    hide\nend\n\nwhen I receive [15 v]\nstop [other scripts in sprite v]\n\nwhen I receive [15a5g v]\nswitch costume to (costume1 v)\nset size to (80) %\ngo to (dark2 v)\nclear graphic effects\ngo to [front v] layer\npoint in direction (-90)\nchange x by (7)\nset [brightness v] effect to (100)\nshow\nrepeat (50)\n    change [brightness v] effect by (-2)\nend\n\nwhen I receive [15a5h v]\nglide (0.1) secs to x: (41) y: (30)\nbroadcast (15 blaam v)\nstart sound [Cymbal v]\nhide\n\nwhen I receive [15 return to main v]\nhide\n\nwhen I receive [15a4 v]\nhide\n\nwhen I receive [15a5ggood v]\nforever\n    go to (dark2 v)\n    change x by (7)\nend\n\nwhen I receive [15a5m v]\nif <([costume # v] of [sprite 2 v]) = [29]> then\n    point towards (player v)\n    turn right (180) degrees\nelse\n    switch costume to (costume1 v)\n    set size to (80) %\n    go to (dark2 v)\n    clear graphic effects\n    go to [front v] layer\n    point towards (player v)\n    turn right (180) degrees\n    change x by (7)\n    set [brightness v] effect to (100)\n    show\n    repeat (50)\n        change [brightness v] effect by (-2)\n    end\nend\n\nwhen I receive [15a5n v]\nglide (0.1) secs to (player v)\nbroadcast (15 blaam v)\nstart sound [Cymbal v]\nhide\n\n@64461\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <([costume # v] of [sprite 2 v]) = [30]> then\n    set [brightness v] effect to (-100)\n    go to x: (-240) y: (31)\nelse\n    if <(Level) = [3]> then\n        clear graphic effects\n        go to x: (-230) y: ([y position v] of [black missile v])\n    else\n        if <<(Level) = [5]> or <(Level) = [6]>> then\n            clear graphic effects\n            go to x: (bmx) y: ([y position v] of [black missile v])\n        else\n            if <<<<<<(Level) = [8]> or <(Level) = [9]>> or <(Level) = [10]>> or <(Level) = [12]>> or <(Level) = [13]>> or <(Level) = [14]>> then\n                clear graphic effects\n                go to x: (bmx) y: ([y position v] of [black missile v])\n            else\n                if <([costume # v] of [sprite 2 v]) > [26]> then\n                    set [brightness v] effect to (100)\n                    go to (player v)\n                else\n                end\n            end\n        end\n    end\nend\npoint in direction (pick random (40) to (180))\nshow\nif <([costume # v] of [sprite 2 v]) = [29]> then\n    set [speed x v] to (pick random (5) to (10))\n    set [speed y v] to (pick random (15) to (-15))\nelse\n    if <<([costume # v] of [sprite 2 v]) > [26]> and <not <([costume # v] of [sprite 2 v]) = [29]>>> then\n        set [speed x v] to (pick random (-5) to (-10))\n        set [speed y v] to (pick random (15) to (-15))\n    else\n        set [speed x v] to (pick random (1) to (5))\n        set [speed y v] to (pick random (1) to (20))\n    end\nend\nrepeat (200)\n    Tick\nend\ndelete this clone\n\ndefine Tick\nswitch costume to (ball v)\nchange [speed y v] by (-0.5)\nchange x by (speed x)\nchange y by (speed y)\nif <not <touching (sprite 2 v)?>> then\n    stop [this script v]\nend\nset [count v] to [0]\nrepeat until <not <touching (sprite 2 v)?>>\n    change x by ((speed x) * (-0.1))\n    change y by ((speed y) * (-0.1))\n    change [count v] by (1)\n    if <(count) > [20]> then\n        delete this clone\n    end\nend\nFind Normal\nbounce ([sin v] of (ball: dir) ) ([cos v] of (ball: dir) )\nswitch costume to (ball v)\nrepeat (10)\n    change x by ((0.5) * ([sin v] of (ball: dir) ))\n    change y by ((0.5) * ([cos v] of (ball: dir) ))\n    if <not <touching (sprite 2 v)?>> then\n        stop [this script v]\n    end\nend\ndelete this clone\n\ndefine Find Normal\nswitch costume to (normal v)\nset [ball: dir v] to [0]\npoint in direction (ball: dir)\nif <touching (sprite 2 v)?> then\n    repeat until <not <touching (sprite 2 v)?>>\n        rotate [15]\n    end\n    set [dir start v] to ((ball: dir) - (15))\nelse\n    repeat until <touching (sprite 2 v)?>\n        rotate [-15]\n    end\n    set [dir start v] to (ball: dir)\n    set [ball: dir v] to [0]\n    point in direction (ball: dir)\nend\nrepeat until <touching (sprite 2 v)?>\n    rotate [15]\nend\nset [ball: dir v] to (((ball: dir) + (dir Start)) / (2))\n\ndefine rotate (by)\nchange [ball: dir v] by (by)\npoint in direction (ball: dir)\nif <([abs v] of (ball: dir) ) > [720]> then\n    change [red missile dot count v] by (-1)\n    delete this clone\nend\n\ndefine bounce (nx) (ny)\nset [dot product v] to (((speed x) * (nx)) + ((speed y) * (ny)))\nchange [speed x v] by ((-1.6) * ((nx) * (dot product)))\nchange [speed y v] by ((-1.6) * ((ny) * (dot product)))\n\nwhen I start as a clone\nforever\n    if <touching (sprite 2 v)?> then\n        change [red missile dot count v] by (-1)\n        delete this clone\n    end\nend\n\nwhen I receive [ae v]\nwait (0.1) seconds\nrepeat (20)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [red 3 missile go v]\nif <(Level) = [3]> then\n    wait (0.1) seconds\n    set [red missile dot count v] to [0]\n    repeat until <(red missile dot count) = [10]>\n        create clone of (_myself_ v)\n        change [red missile dot count v] by (1)\n    end\nelse\n    wait (0.1) seconds\n    repeat (10)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nif <(Level) = [3]> then\n    wait (2) seconds\n    delete this clone\nelse\n    wait (1) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        change [playr hp v] by (-1)\n        delete this clone\n    end\nend\n\ngo to x: (41) y: (30)\n\nwhen I receive [15 blaam v]\nwait (0.1) seconds\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\n@6661626242422222122\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 (an v)\n            hide\n            stop [this script v]\n        end\n    else\n        clear graphic effects\n    end\nend\n\nbroadcast (am v)\n\nwhen I receive [an 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\nwhen I receive [4b v]\nif <(4 switch) = [0]> then\n    if <<(mode) = [easy]> or <(mode) = [beginner]>> then\n        switch costume to (costume2 v)\n        clear graphic effects\n        show\n        set size to (50) %\n        go to x: (-165) y: (169)\n        forever\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (20)\n                if <mouse down?> then\n                    switch costume to (costume3 v)\n                end\n            else\n                switch costume to (costume2 v)\n                clear graphic effects\n            end\n        end\n    end\nend\n\nwhen I receive [5 v]\nwait until <(v?) = [1]>\nswitch costume to (costume2 v)\nclear graphic effects\nshow\nset size to (50) %\ngo to x: (-220) y: (-169)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (20)\n        if <mouse down?> then\n            switch costume to (costume4 v)\n        end\n    else\n        switch costume to (costume2 v)\n        clear graphic effects\n    end\nend\n\nwhen I receive [4a v]\nhide\n\nwhen I receive [11 v]\nif <(mode) = [easy]> then\n    switch costume to (costume2 v)\n    clear graphic effects\n    show\n    set size to (50) %\n    go to x: (-220) y: (-169)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (20)\n            if <mouse down?> then\n                switch costume to (costume5 v)\n            end\n        else\n            switch costume to (costume2 v)\n            clear graphic effects\n        end\n        if <(red 3 move) = [0]> then\n            hide\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [10 v]\nif <(6e9) = [1]> then\n    switch costume to (costume6 v)\n    clear graphic effects\n    show\n    set size to (50) %\n    go to x: (-220) y: (-169)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (20)\n            if <mouse down?> then\n                switch costume to (costume7 v)\n            end\n        else\n            switch costume to (costume6 v)\n            clear graphic effects\n        end\n    end\nend\n\nwhen I receive [2b v]\nbroadcast (n v)\nif <<(mode) = [beginner]> or <(mode) = [easy]>> then\n    switch costume to (costume2 v)\n    clear graphic effects\n    show\n    set size to (50) %\n    go to x: (-165) y: (169)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (20)\n            if <mouse down?> then\n                switch costume to (costume8 v)\n            end\n        else\n            switch costume to (costume2 v)\n            clear graphic effects\n        end\n    end\nend\n\nwhen I receive [3 v]\nif <<(mode) = [beginner]> or <(mode) = [easy]>> then\n    forever\n        if <(red 3 move) = [1]> then\n            switch costume to (costume2 v)\n            clear graphic effects\n            show\n            set size to (50) %\n            go to x: (-165) y: (169)\n            forever\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (20)\n                    if <mouse down?> then\n                        switch costume to (costume9 v)\n                    end\n                else\n                    switch costume to (costume2 v)\n                    clear graphic effects\n                end\n            end\n        else\n            hide\n        end\n    end\nend\n\n@black screen\n\nwhen I receive [am v]\ngo to [front v] layer\nclear graphic effects\ngo to x: (0) y: (0)\nhide\nset [ghost v] effect to (100)\nshow\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nbroadcast (an v)\n\nwhen flag clicked\nswitch costume to (costume1 v)\nshow\ngo to [back v] layer\nclear graphic effects\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [an v]\ngo to [front v] layer\nclear graphic effects\ngo to x: (0) y: (0)\nshow\nwait (3) seconds\nrepeat (100)\n    change [ghost v] effect by (1)\nend\nbroadcast (Go v)\nbroadcast (Start v)\nbroadcast (Allow v)\n\nwhen I receive [6e v]\nswitch costume to (costume1 v)\nclear graphic effects\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (4)\n\nwhen I receive [6e6 v]\nrepeat (40)\n    change [ghost v] effect by (.5)\nend\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\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 (14) 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 [skip intro v]\nstop [other scripts in sprite v]\nhide\nbroadcast (white1 v)\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 [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <(15 control yes?) = [1]> then\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    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 <(15 control yes?) = [1]> then\n            if <key (up arrow v) pressed?> then\n                set [yv v] to [13]\n            end\n        end\n    end\n    change y by (1)\n    if <<(y position) < [-175]> and <<<<<<([costume # v] of [sprite 2 v]) = [29]> and <(15 die?) = [0]>> or <<([costume # v] of [sprite 2 v]) = [28]> and <(15 die?) = [0]>>> or <<([costume # v] of [sprite 2 v]) = [27]> and <(15 die?) = [0]>>> or <<([costume # v] of [sprite 2 v]) = [26]> and <(15 good stuff) = [1]>>> or <<([costume # v] of [sprite 2 v]) = [15]> and <(15 good stuff) = [1]>>>> then\n        reset down\n    end\n    if <<(y position) < [-175]> and <(Level) = [15]>> then\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]\nreset\n\ndefine reset\nbroadcast (player reset v)\nswitch costume to (costume1 v)\nset [xv v] to [0]\nset [yv v] to [0]\nif <(Level) = [2]> then\n    go to x: (-212) y: (-81)\n    clear graphic effects\n    show\n    playr hp [100] [50] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [10] [30] [10]\n    end\nend\nif <(Level) = [3]> then\n    go to x: (-212) y: (-81)\n    clear graphic effects\n    show\n    playr hp [200] [100] [200]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [10] [50] [10]\n    end\nend\nif <(Level) = [4]> then\n    go to x: (-212) y: (-81)\n    clear graphic effects\n    show\n    playr hp [100] [100] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [20] [50] [10]\n    end\nend\nif <(Level) = [16]> then\n    if <(4 switch) = [0]> then\n        go to x: (212) y: (-154)\n    else\n        go to x: (-167) y: (46)\n    end\n    clear graphic effects\n    show\n    playr hp [100] [50] [100]\nend\nif <(Level) = [5]> then\n    go to x: (0) y: (-130)\n    clear graphic effects\n    show\n    playr hp [100] [100] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [50] [50] [30]\n    end\nend\nif <(Level) = [6]> then\n    go to x: (0) y: (-130)\n    clear graphic effects\n    show\n    playr hp [100] [100] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [30] [50] [20]\n    end\nend\nif <(Level) = [17]> then\n    go to x: (-220) y: (-80)\n    clear graphic effects\n    show\n    playr hp [100] [100] []\nend\nif <(Level) = [18]> then\n    go to x: (-220) y: (-18)\n    clear graphic effects\n    show\n    playr hp [100] [100] []\nend\nif <(Level) = [19]> then\n    go to x: (220) y: (76)\n    clear graphic effects\n    show\nend\nif <(Level) = [20]> then\n    go to x: (-220) y: (-18)\n    clear graphic effects\n    show\nend\nif <(Level) = [21]> then\n    go to x: (129) y: (-137)\n    show\nend\nif <(Level) = [7]> then\n    go to x: (-178) y: (-156)\n    clear graphic effects\n    show\n    playr hp [100] [40] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [50] [30] [20]\n    end\nend\nif <(Level) = [8]> then\n    go to x: (212) y: (140)\n    clear graphic effects\n    show\n    playr hp [100] [50] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [30] [30] [20]\n    end\nend\nif <(Level) = [9]> then\n    go to x: (-206) y: (-80)\n    clear graphic effects\n    show\n    playr hp [100] [200] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [50] [80] [20]\n    end\nend\nif <(Level) = [10]> then\n    go to x: (-98) y: (-36)\n    clear graphic effects\n    show\n    playr hp [30] [100] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [30] [70] [30]\n    end\nend\nif <(Level) = [11]> then\n    go to x: (0) y: (-150)\n    clear graphic effects\n    show\n    playr hp [50] [50] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [30] [30] [30]\n    end\nend\nif <(Level) = [12]> then\n    go to x: (-212) y: (-81)\n    clear graphic effects\n    show\n    playr hp [100] [150] [100]\n    if <(red 3 hp) > [0]> then\n        broadcast (12 code v)\n        red 3 hp [100] [90] [30]\n    end\nend\nif <(Level) = [13]> then\n    go to x: (-170) y: (-131)\n    clear graphic effects\n    show\n    playr hp [100] [200] [100]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [80] [100] [30]\n    end\nend\nif <(Level) = [22]> then\n    go to x: (-220) y: (98)\n    show\nend\nif <(Level) = [14]> then\n    go to x: (-170) y: (-131)\n    clear graphic effects\n    show\n    playr hp [100] [300] [150]\n    if <(red 3 hp) > [0]> then\n        red 3 hp [100] [100] [60]\n    end\nend\nif <(Level) = [15]> then\n    go to x: (0) y: (-124)\n    clear graphic effects\n    show\n    set [playr hp v] to [1]\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 [endend v]\nhide\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen I receive [n v]\nset [1 v] to [0]\nset [2 v] to [0]\nset [3 v] to [0]\nset [4 v] to [0]\nset [5 v] to [0]\nset [6 v] to [0]\nstop [other scripts in sprite v]\nbroadcast (n code v)\nswitch costume to (costume1 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    change y by (1)\n    if <(y position) < [-175]> then\n        if <not <(Level) = [23]>> then\n            reset\n            change [deaths v] by (1)\n        end\n    end\nend\n\nwhen I receive [n code v]\nforever\n    if <not <(Level) = [21]>> then\n        if <<key (6 v) pressed?> and <(6) = [0]>> then\n            wait until <not <key (6 v) pressed?>>\n            set [6 v] to [1]\n            change y by (-1)\n            if <<not <touching (sprite 2 v)?>> and <not <touching (sprite? v)?>>> then\n                set [yv v] to ((Yv) + (10))\n            end\n            wait (0.1) seconds\n            set [6 v] to [0]\n        end\n    end\nend\n\nwhen I receive [no move n v]\nstop [other scripts in sprite v]\nwait (0.5) seconds\nbroadcast (no move n2 v)\nset [red attack v] to [1]\nset [red 2 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)\nend\n\nwhen I receive [no move n2 v]\nforever\n    wait (1) seconds\n    if <(stunned?) = [0]> then\n        broadcast (n v)\n        set [red attack v] to [0]\n        set [red shoot allowed? v] to [1]\n        stop [this script v]\n    else\n        wait (3) seconds\n        broadcast (n v)\n        set [red attack v] to [0]\n        stop [this script v]\n    end\nend\n\nwhen I receive [red 3 player v]\n\nchange [player hp v] by (-1)\nchange [xv v] by (-1)\nchange [yv v] by (3)\nswitch costume to (costume2 v)\nwait (0.1) seconds\nswitch costume to (costume1 v)\n\nwhen flag clicked\nset [deaths v] to [-1]\nswitch costume to (costume1 v)\n\nwhen flag clicked\nset [15 die? v] to [0]\nset [15 control yes? v] to [1]\nset [red3 go2 v] to [0]\n\nwhen I receive [red 3 bye v]\nset [red3 go2 v] to [0]\n\nwhen I receive [n code v]\nforever\n    if <touching (attack red v)?> then\n        change [playr hp v] by (-10)\n        if <(playr hp) < [1]> then\n            set [red shoot allowed? v] to [0]\n            set [xv v] to [0]\n            set [yv v] to [20]\n            switch costume to (costume2 v)\n            wait (1) seconds\n            reset\n            change [deaths v] by (1)\n            broadcast (No move n v)\n        else\n            switch costume to (costume3 v)\n            wait (0.1) seconds\n            switch costume to (costume1 v)\n        end\n    end\n    if <touching (black missile v)?> then\n        wait until <not <touching (black missile v)?>>\n        change [playr hp v] by (-40)\n        if <(playr hp) < [1]> then\n            switch costume to (costume2 v)\n            reset\n            change [deaths v] by (1)\n            broadcast (No move n v)\n            wait (2) seconds\n        else\n            if <([direction v] of [black missile v]) > [0]> then\n                set [xv v] to [50]\n            end\n            if <[0] > ([direction v] of [black missile v])> then\n                set [xv v] to [-50]\n            end\n            set [yv v] to [5]\n            switch costume to (costume3 v)\n            wait (0.1) seconds\n            switch costume to (costume1 v)\n        end\n    end\n    if <(playr hp) < [1]> then\n        set [red shoot allowed? v] to [0]\n        set [xv v] to [0]\n        set [yv v] to [0]\n        switch costume to (costume2 v)\n        wait (1) seconds\n        reset\n        change [deaths v] by (1)\n        broadcast (No move n v)\n    end\nend\n\nwhen I receive [n code v]\nforever\n    if <<key (3 v) pressed?> and <(3) = [0]>> then\n        if <<(Level) = [2]> or <<<(Level) = [8]> and <(red 3 move) = [0]>> or <(Level) = [14]>>> then\n            wait until <not <key (3 v) pressed?>>\n            broadcast (control platform v)\n            set [3 v] to [1]\n        end\n    end\nend\n\nwhen I receive [n code v]\nforever\n    if <<key (5 v) pressed?> and <(5) = [0]>> then\n        wait until <not <key (5 v) pressed?>>\n        broadcast (shoot v)\n        set [5 v] to [1]\n    end\nend\n\nwhen I receive [4a v]\nset [red 3 hp v] to [0]\nset [red 3 move v] to [0]\ngo to x: (212) y: (-154)\n\nwhen I receive [4b v]\nif <(Level) = [16]> then\n    set [red 3 hp v] to [0]\n    set [red 3 move v] to [0]\n    go to x: (-212) y: (-154)\nend\n\nwhen [7 v] key pressed\nwait until <not <key (7 v) pressed?>>\nif <(v?) = [1]> then\n    if <(Next?) = [0]> then\n        if <(distance to [mouse-pointer v]) < [160]> then\n            set [orig x v] to (x position)\n            set [orig y v] to (y position)\n            go to (mouse-pointer v)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                go to x: (orig x) y: (orig y)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [deaths v] to [0]\nset [v? v] to [0]\n\ndefine red 3 hp (re) (rh) (rb)\nif <(mode) = [easy]> then\n    set [red 3 hp v] to (re)\nend\nif <(mode) = [hard]> then\n    set [red 3 hp v] to (rh)\nend\nif <(mode) = [beginner]> then\n    set [red 3 hp v] to (rb)\nend\n\ndefine playr hp (pe) (ph) (pb)\nif <(mode) = [easy]> then\n    set [playr hp v] to (pe)\nend\nif <(mode) = [hard]> then\n    set [playr hp v] to (ph)\nend\nif <(mode) = [beginner]> then\n    set [playr hp v] to (pb)\nend\n\nwhen I receive [6a v]\nset [v? v] to [0]\nset [red 3 hp v] to [0]\nset [red 3 move v] to [0]\nif <(Xv) < [0]> then\n    if <(y position) < [0]> then\n        go to x: (220) y: (-20)\n    end\n    if <<[-1] < (y position)> and <(y position) < [19]>> then\n        go to x: (220) y: (19)\n    end\n    if <[18] < (y position)> then\n        go to x: (220) y: (y position)\n    end\nend\nif <[0] < (Xv)> then\n    go to x: (-220) y: (y position)\nend\n\nwhen I receive [6 o v]\nif <(Level) = [17]> then\n    set [v? v] to [1]\n    set [red 3 hp v] to [0]\n    set [red 3 move v] to [0]\n    go to x: (220) y: (-80)\nend\n\nwhen I receive [6b v]\nset [red 3 hp v] to [0]\nset [red 3 move v] to [0]\ngo to x: (-220) y: (y position)\n\nwhen I receive [6 special v]\nset [v? v] to [0]\nset [red 3 hp v] to [0]\nset [red 3 move v] to [0]\ngo to x: (220) y: (y position)\n\nwhen I receive [6d v]\nset [v? v] to [0]\nset [red 3 hp v] to [0]\nset [red 3 move v] to [0]\ngo to x: (-220) y: (y position)\n\nwhen I receive [6a v]\nclear graphic effects\n\nwhen I receive [6 special v]\nset [brightness v] effect to (-20)\n\nwhen I receive [6d v]\nset [brightness v] effect to (-40)\n\nwhen I receive [6e v]\nset [v? v] to [0]\nset [red 3 hp v] to [0]\nset [red 3 move v] to [0]\ngo to x: (x position) y: (170)\n\nwhen I receive [6e v]\nset [brightness v] effect to (-60)\n\nwhen I receive [6b v]\nclear graphic effects\n\nwhen [4 v] key pressed\nwait until <not <key (4 v) pressed?>>\nif <(v?) = [2]> then\n    if <(Next?) = [0]> then\n        if <(distance to [mouse-pointer v]) < [160]> then\n            set [orig x v] to (x position)\n            set [orig y v] to (y position)\n            go to (mouse-pointer v)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                go to x: (orig x) y: (orig y)\n            end\n        end\n    end\nend\n\nwhen I receive [n code v]\nforever\n    set [dis to 0,0 v] to (distance to [black screen v])\nend\n\nbroadcast (12 code v)\n\nwhen I receive [13b v]\nset [red 3 hp v] to [0]\nset [red 3 move v] to [0]\ngo to x: (-220) y: (98)\n\nwhen I receive [13a v]\nif <(Level) = [22]> then\n    set [red 3 hp v] to [0]\n    set [red 3 move v] to [0]\n    go to x: (220) y: (98)\nend\n\nwhen I receive [14a v]\nif <(Level) = [23]> then\n    set [red 3 hp v] to [0]\n    set [red 3 move v] to [0]\n    go to x: (x position) y: (178)\nend\n\nwhen I receive [14b v]\nset [red 3 hp v] to [0]\nset [red 3 move v] to [0]\ngo to x: (x position) y: (-170)\n\nwhen I receive [15 last v]\ngo to x: (-220) y: (62)\n\nwhen I receive [15b v]\ngo to x: (220) y: (62)\n\nwhen I receive [15a v]\nif <(15b done) = [1]> then\n    go to x: (-220) y: (62)\nend\n\nwhen [r v] key pressed\nreset\n\nwhen I receive [15o v]\nif <([costume # v] of [sprite 2 v]) = [26]> then\n    go to x: (220) y: (y position)\nend\n\nwhen I receive [15a2 v]\nif <([costume # v] of [sprite 2 v]) = [24]> then\n    go to x: (-220) y: (y position)\nend\nif <([costume # v] of [sprite 2 v]) = [27]> then\n    go to x: (110) y: (-162)\nend\n\nwhen I receive [15a3 v]\nif <([costume # v] of [sprite 2 v]) = [26]> then\n    go to x: (x position) y: (169)\nend\nif <([costume # v] of [sprite 2 v]) = [28]> then\n    go to x: (-210) y: (y position)\nend\n\nwhen I receive [15a4 v]\nif <([costume # v] of [sprite 2 v]) = [27]> then\n    go to x: (220) y: (y position)\nend\nif <([costume # v] of [sprite 2 v]) = [29]> then\n    go to x: (-210) y: (y position)\nend\n\ndefine reset down\nset [xv v] to [0]\nset [yv v] to [0]\nif <(15 good stuff) = [0]> then\n    if <([costume # v] of [sprite 2 v]) = [27]> then\n        go to x: (153) y: (-61)\n    end\n    if <([costume # v] of [sprite 2 v]) = [28]> then\n        go to x: (215) y: (-32)\n    end\n    if <([costume # v] of [sprite 2 v]) = [29]> then\n        go to x: (215) y: (-94)\n    end\n    change [deaths v] by (1)\nelse\n    if <([costume # v] of [sprite 2 v]) = [26]> then\n        go to x: (102) y: (-161)\n    end\n    if <([costume # v] of [sprite 2 v]) = [27]> then\n        go to x: (-215) y: (-32)\n    end\n    if <([costume # v] of [sprite 2 v]) = [28]> then\n        go to x: (-215) y: (-92)\n    end\n    if <([costume # v] of [sprite 2 v]) = [29]> then\n        go to x: (57) y: (31)\n    end\n    if <([costume # v] of [sprite 2 v]) = [15]> then\n        go to x: (0) y: (-124)\n    end\nend\n\nwhen I receive [15a5 v]\nif <([costume # v] of [sprite 2 v]) = [28]> then\n    go to x: (220) y: (y position)\nend\n\nwhen I receive [15 move go v]\nforever\n    if <[27] > ([costume # v] of [sprite 2 v])> then\n        set [brightness v] effect to (0)\n    end\n    if <([costume # v] of [sprite 2 v]) > [26]> then\n        if <(15 die?) = [0]> then\n            set [brightness v] effect to ((y position) * (0.8))\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [15a5f v]\nforever\n    if <(15 control yes?) = [1]> then\n        if <<key (6 v) pressed?> and <(6) = [0]>> then\n            wait until <not <key (6 v) pressed?>>\n            set [6 v] to [1]\n            change y by (-1)\n            if <<not <touching (sprite 2 v)?>> and <not <touching (sprite? v)?>>> then\n                set [yv v] to ((Yv) + (10))\n            end\n            wait (0.1) seconds\n            set [6 v] to [0]\n        end\n    end\nend\n\nwhen I receive [15a5 v]\nset [15 control yes? v] to [0]\nreset down\n\nwhen I receive [15a5f v]\nset [15 control yes? v] to [1]\nreset down\n\nwhen I receive [15 player pause v]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (57) y: (31)\n\nwhen I receive [15 blaam v]\nset [15 die? v] to [1]\nswitch costume to (costume2 v)\nif <(x position) > ([x position v] of [dark2 v])> then\n    set [xv v] to [-7]\n    set [yv v] to [18]\nelse\n    set [xv v] to [7]\n    set [yv v] to [18]\nend\nwait until <(y position) < [-170]>\nstop [other scripts in sprite v]\nhide\nwait (2) seconds\nbroadcast (End v)\n\nwhen I receive [15 move go v]\nset [deaths v] to [-2]\n\nwhen I receive [15 return to main v]\ngo to x: (x position) y: (-175)\n\nwhen I receive [15 o ready too portal v]\nif <([costume # v] of [sprite 2 v]) = [15]> then\n    go to x: (-220) y: (y position)\nend\nif <([costume # v] of [sprite 2 v]) = [26]> then\n    go to x: (220) y: (y position)\nend\n\n@Sprite 2\n\nwhen I receive [next v]\nset [next? v] to [1]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nif <(Level) = [21]> then\n    switch costume to (costume7 v)\nelse\n    if <(Level) = [23]> then\n        switch costume to (costume15 v)\n    else\n        next costume\n    end\nend\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\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nswitch costume to (a v)\nclear graphic effects\nshow\nforever\n    go to [back v] layer\n    go to x: (0) y: (0)\n    set [level v] to (costume [number v])\nend\n\nwhen I receive [an v]\nswitch costume to (costume1 v)\n\nwhen I receive [4a v]\nswitch costume to (4a v)\n\nwhen I receive [4b v]\nswitch costume to (costume4 v)\n\nwhen I receive [6a v]\nswitch costume to (6a v)\n\nwhen I receive [6 o v]\nswitch costume to (costume6 v)\n\nwhen I receive [6b v]\nswitch costume to (6b v)\n\nwhen I receive [6 special v]\nswitch costume to (6c v)\n\nwhen I receive [6d v]\nswitch costume to (6d v)\n\nwhen I receive [6e v]\nswitch costume to (6e v)\n\nwhen I receive [13a v]\nswitch costume to (costume13 v)\n\nwhen I receive [13b v]\nswitch costume to (13a v)\n\nwhen I receive [14a v]\nswitch costume to (costume14 v)\n\nwhen I receive [14b v]\nswitch costume to (14a v)\n\nwhen I receive [15a v]\nswitch costume to (costume15 v)\n\nwhen I receive [15 last v]\nswitch costume to (15a v)\n\nwhen I receive [15b v]\nswitch costume to (15b v)\n\nwhen I receive [15 clicked 10 v]\nset [plat down v] to [1]\nset [portal v] to [closed]\nstop [other scripts in sprite v]\nrepeat (19)\n    change y by ((plat down) * (-1))\n    change [plat down v] by (1)\nend\nstart sound [Door Closing v]\nwait (2) seconds\nbroadcast (15 move go v)\n\nwhen I receive [15o v]\nswitch costume to (15a v)\ngo to x: (0) y: (-190)\n\nwhen I receive [15a2 v]\nswitch costume to (15a2 v)\ngo to x: (0) y: (0)\n\nwhen I receive [15a3 v]\nswitch costume to (15a3 v)\ngo to x: (0) y: (0)\n\nwhen I receive [15a4 v]\nswitch costume to (15a4 v)\ngo to x: (0) y: (0)\n\nwhen I receive [15a5 v]\nswitch costume to (15a5 v)\ngo to x: (0) y: (0)\n\nwhen I receive [15 return to main v]\nswitch costume to (costume15 v)\ngo to x: (0) y: (0)\n\nwhen I receive [15 o ready too portal v]\nswitch costume to (15a v)\ngo to x: (0) y: (-190)\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 [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]\nif <(Level) = [1]> then\n\nwhen I receive [control platform v]\nforever\n    switch costume to (Level)\n    if <(Level) = [2]> then\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            if <<(mouse y) < [-46]> and <[-120] < (mouse y)>> then\n                set y to (mouse y)\n            else\n                if <[-47] < (mouse y)> then\n                    set y to (-47)\n                else\n                    if <(mouse y) < [-119]> then\n                        set y to (-119)\n                    end\n                end\n            end\n        else\n            if <<(mouse y) < [-7]> and <[-120] < (mouse y)>> then\n                set y to (mouse y)\n            else\n                if <[-6] < (mouse y)> then\n                    set y to (-7)\n                else\n                    if <(mouse y) < [-119]> then\n                        set y to (-119)\n                    end\n                end\n            end\n        end\n        if <(Next?) = [1]> then\n            clear graphic effects\n            stop [this script v]\n        end\n    end\n    if <(Level) = [8]> then\n        if <(red 3 move) = [0]> then\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 <<[-237] < (mouse x)> and <(mouse x) < [-124]>> then\n                set x to (mouse x)\n            else\n                if <(mouse x) < [-236]> then\n                    set x to (-236)\n                else\n                    if <[-125] < (mouse x)> then\n                        set x to (-125)\n                    end\n                end\n            end\n        end\n        if <(Next?) = [1]> then\n            clear graphic effects\n            stop [this script v]\n        end\n    end\n    if <(Level) = [14]> then\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 <(x position) = [101]> then\n            if <<[-153] < (mouse y)> and <(mouse y) < [130]>> then\n                set y to (mouse y)\n            else\n                if <[129] < (mouse y)> then\n                    set y to (129)\n                else\n                    if <(mouse y) < [-152]> then\n                        set y to (-152)\n                    end\n                end\n            end\n        end\n        if <(x position) = [-90]> then\n            if <<[-153] < (mouse y)> and <(mouse y) < [56]>> then\n                set y to (mouse y)\n            else\n                if <[55] < (mouse y)> then\n                    set y to (55)\n                else\n                    if <(mouse y) < [-152]> then\n                        set y to (-152)\n                    end\n                end\n            end\n        end\n        if <(distance to [mouse-pointer v]) < [100]> then\n            if <(y position) = [-152]> then\n                if <<[-91] < (mouse x)> and <(mouse x) < [102]>> then\n                    set x to (mouse x)\n                else\n                    if <(mouse x) < [-90]> then\n                        set x to (-90)\n                    else\n                        if <[101] < (mouse x)> then\n                            set x to (101)\n                        end\n                    end\n                end\n            end\n        end\n        if <(Next?) = [1]> then\n            clear graphic effects\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [go v]\ngo to x: (0) y: (0)\nclear graphic effects\nif <(Level) = [2]> then\n    switch costume to (costume2 v)\n    set x to (-50)\n    set y to (-47)\nend\nif <(Level) = [8]> then\n    show\n    switch costume to (costume8 v)\n    set x to (-236)\n    set y to (-100)\nend\nif <(Level) = [14]> then\n    switch costume to (costume14 v)\n    show\n    set x to (101)\n    set y to (-153)\nend\n\nwhen I receive [14 v]\nbroadcast (uncontrol platform v)\n\n@Portal\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [start v]\nset [portal v] to [Closed]\nclear graphic effects\ngo to x: (210) y: (-75)\ngo to [back v] layer\nshow\n\nwhen I receive [go v]\nswitch costume to (costume1 v)\nclear graphic effects\nwait (0.01) seconds\nforever\n    if <(Portal) = [Open]> then\n        switch costume to (costume2 v)\n        if <touching (player v)?> then\n            if <(Level) = [24]> 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 [Closed]\n\nwhen I receive [go v]\nif <(Level) = [2]> then\n    set [portal v] to [Closed]\n    go to x: (198) y: (-126)\n    broadcast (2 v)\n    stop [this script v]\nend\nif <(Level) = [3]> then\n    set [portal v] to [Closed]\n    go to x: (181) y: (-129)\n    broadcast (3 v)\n    stop [this script v]\nend\nif <(Level) = [4]> then\n    set [portal v] to [Closed]\n    go to x: (181) y: (67)\n    broadcast (4 v)\n    stop [this script v]\nend\nif <(Level) = [5]> then\n    set [portal v] to [Closed]\n    go to x: (0) y: (130)\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: (130)\n    broadcast (6 v)\n    stop [this script v]\nend\nif <(Level) = [7]> then\n    show\n    set [portal v] to [Closed]\n    go to x: (-181) y: (115)\n    broadcast (7 v)\n    stop [this script v]\nend\nif <(Level) = [8]> then\n    set [portal v] to [Closed]\n    go to x: (-181) y: (115)\n    broadcast (8 v)\n    stop [this script v]\nend\nif <(Level) = [9]> then\n    set [portal v] to [Closed]\n    go to x: (0) y: (-123)\n    broadcast (9 v)\n    stop [this script v]\nend\nif <(Level) = [10]> then\n    set [portal v] to [Closed]\n    go to x: (0) y: (-139)\n    broadcast (10 v)\n    stop [this script v]\nend\nif <(Level) = [11]> then\n    set [portal v] to [Closed]\n    go to x: (193) y: (-126)\n    broadcast (11 v)\n    stop [this script v]\nend\nif <(Level) = [12]> then\n    set [portal v] to [Closed]\n    go to x: (210) y: (80)\n    broadcast (12 v)\n    broadcast (12 code v)\n    stop [this script v]\nend\nif <(Level) = [13]> then\n    set [portal v] to [Closed]\n    go to x: (170) y: (111)\n    broadcast (13 v)\n    stop [this script v]\nend\nif <(Level) = [14]> then\n    hide\n    set [portal v] to [Closed]\n    go to x: (-203) y: (111)\n    broadcast (14 v)\n    stop [this script v]\nend\nif <(Level) = [15]> then\n    hide\n    set [portal v] to [Closed]\n    go to x: (169) y: (109)\n    broadcast (15 v)\n    broadcast (15a v)\n    stop [this script v]\nend\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide variable [player hp v]\nhide variable [red 3 hp v]\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\nwhen flag clicked\nhide variable [player hp v]\nhide variable [red 3 hp v]\n\nwhen I receive [aq v]\nwait (1) seconds\nrepeat (3)\n    switch costume to (costume2 v)\n    wait (0.5) seconds\nend\nset [portal v] to [Open]\n\nwhen I receive [2 v]\nset [portal v] to [Closed]\n\nwhen I receive [4b v]\nforever\n    if <<([x position v] of [player v]) < [-235]> and <([y position v] of [player v]) < [-150]>> then\n        broadcast (4a v)\n        hide\n        stop [this script v]\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [4a v]\nforever\n    if <<[235] < ([x position v] of [player v])> and <([y position v] of [player v]) < [-150]>> then\n        broadcast (4b v)\n        set [portal v] to [Open]\n        show\n        stop [this script v]\n    end\nend\n\nwhen I receive [6 red defeated v]\nbroadcast (6 o v)\n\nwhen I receive [6a v]\nforever\n    if <<[235] < ([x position v] of [player v])> and <[-21] < ([y position v] of [player v])>> then\n        broadcast (6b v)\n        hide\n        stop [this script v]\n    end\n    if <<([x position v] of [player v]) < [-235]> and <<[-82] < ([y position v] of [player v])> and <([y position v] of [player v]) < [-74]>>> then\n        broadcast (6 o v)\n        show\n        stop [this script v]\n    end\n    if <<([x position v] of [player v]) < [-235]> and <<[74] < ([y position v] of [player v])> and <([y position v] of [player v]) < [82]>>> then\n        broadcast (6 special v)\n        hide\n        stop [this script v]\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [6 o v]\nforever\n    if <<[235] < ([x position v] of [player v])> and <<[-82] < ([y position v] of [player v])> and <([y position v] of [player v]) < [-74]>>> then\n        broadcast (6a v)\n        hide\n        stop [this script v]\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [6b v]\nforever\n    if <<([x position v] of [player v]) < [-235]> and <[-21] < ([y position v] of [player v])>> then\n        broadcast (6a v)\n        hide\n        stop [this script v]\n    end\n    if <(6d found) = [1]> then\n        if <<[128] < ([x position v] of [player v])> and <([y position v] of [player v]) < [-155]>> then\n            broadcast (6e v)\n            hide\n            stop [this script v]\n        end\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [6 special v]\nforever\n    if <<[235] < ([x position v] of [player v])> and <<[74] < ([y position v] of [player v])> and <([y position v] of [player v]) < [82]>>> then\n        broadcast (6a v)\n        hide\n        stop [this script v]\n    end\n    if <(6d go back allow) = [0]> then\n        if <<[235] < ([x position v] of [player v])> and <<[-21] < ([y position v] of [player v])> and <([y position v] of [player v]) < [40]>>> then\n            broadcast (6d v)\n            hide\n            stop [this script v]\n        end\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [6d v]\nwait until <(6d go back allow) = [1]>\nforever\n    if <<([x position v] of [player v]) < [-235]> and <<[-21] < ([y position v] of [player v])> and <([y position v] of [player v]) < [40]>>> then\n        broadcast (6 special v)\n        hide\n        stop [this script v]\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [6 v]\nset [6d go back allow v] to [0]\n\nwhen I receive [13a v]\nforever\n    if <[230] < ([x position v] of [player v])> then\n        broadcast (13b v)\n        hide\n        stop [this script v]\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [13b v]\nforever\n    if <([x position v] of [player v]) < [-230]> then\n        broadcast (13a v)\n        show\n        stop [this script v]\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [14a v]\nforever\n    if <[182] < ([y position v] of [player v])> then\n        broadcast (14b v)\n        show\n        stop [this script v]\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [14b v]\nforever\n    if <([y position v] of [player v]) < [-177]> then\n        broadcast (14a v)\n        hide\n        stop [this script v]\n    end\n    if <(Next?) = [1]> then\n        stop [this script v]\n    end\nend\n\nwhen I receive [15a v]\nforever\n    if <[235] < ([x position v] of [player v])> then\n        broadcast (15 last v)\n        show\n        stop [this script v]\n    end\n    if <<<([x position v] of [player v]) < [-235]> and <(6e9) = [1]>> and <(15b done) = [0]>> then\n        broadcast (15b v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [15b v]\nwait until <(15b done) = [1]>\nforever\n    if <[235] < ([x position v] of [player v])> then\n        broadcast (15a v)\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [15 v]\nset [15b done v] to [0]\n\nwhen I receive [15 clicked 10 v]\nrepeat (10)\n    change y by (3)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [15 move go v]\nset [15a3firsttime v] to [1]\nbroadcast (15o v)\n\nwhen I receive [15a2 v]\nwait (0.1) seconds\nforever\n    if <([y position v] of [player v]) < [-170]> then\n        if <(15 good stuff) = [0]> then\n            broadcast (15a3 v)\n            stop [this script v]\n        end\n    end\n    if <([x position v] of [player v]) < [-230]> then\n        if <(15 good stuff) = [0]> then\n            broadcast (15o v)\n            stop [this script v]\n        else\n            broadcast (15 o ready too portal v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [15o v]\nwait (0.1) seconds\nforever\n    if <[230] < ([x position v] of [player v])> then\n        broadcast (15a2 v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [15a3 v]\nwait (0.1) seconds\nset [15a3firsttime v] to [0]\nforever\n    if <[170] < ([y position v] of [player v])> then\n        broadcast (15a2 v)\n        stop [this script v]\n    end\n    if <([x position v] of [player v]) < [-230]> then\n        broadcast (15a4 v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [15a4 v]\nwait (0.1) seconds\nforever\n    if <[230] < ([x position v] of [player v])> then\n        broadcast (15a3 v)\n        stop [this script v]\n    end\n    if <([x position v] of [player v]) < [-230]> then\n        if <(15 good stuff) = [0]> then\n            broadcast (15a5 v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [15a5 v]\nwait (0.1) seconds\nwait until <(15 good stuff) = [1]>\nforever\n    if <[230] < ([x position v] of [player v])> then\n        broadcast (15a4 v)\n        stop [this script v]\n    end\n    if <[170] < ([y position v] of [player v])> then\n        broadcast (15 return to main v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [15 o ready too portal v]\nwait (0.1) seconds\nrepeat (10)\n    change y by (-3)\n    change [ghost v] effect by (-10)\nend\nset [portal v] to [open]\n\nwhen I receive [15 return to main v]\nwait (0.1) seconds\nforever\n    if <[170] < ([x position v] of [player v])> then\n        broadcast (15 o ready too portal v)\n        stop [this script v]\n    end\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@Attack You\n\nwhen flag clicked\nhide\n\nwhen I receive [attack you v]\nif <(red 3 move) = [1]> then\n    go to [back v] layer\n    create clone of (_myself_ v)\n    wait (0.4) seconds\n    set [2 v] to [0]\nend\n\nwhen I start as a clone\nforever\n    if < or < or <<touching (red 3 b v)?> or <<touching (protego red3 v)?> or <<<touching (protego red v)?> or <<<<touching (attack red 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\nif <(Level) < [16]> then\n    switch costume to (costume1 v)\n    show\n    clear graphic effects\n    go to (player v)\n    point towards (red 3 v)\n    glide ((distance to [red 3 v]) / (800)) secs to (red 3 v)\nend\ndelete this clone\n\npoint towards (mouse-pointer v)\nturn right (180) degrees\nglide (([abs v] of ((((mouse y) - ([y position v] of [player v])) / ((mouse x) - ([x position v] of [player v]))) * ((240) - ([x position v] of [player v]))) ) / (100)) secs to x: (240) y: (([y position v] of [player v]) + ((((mouse y) - ([y position v] of [player v])) / ((mouse x) - ([x position v] of [player v]))) * ((240) - ([x position v] of [player v]))))\nwait (0.01) seconds\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 3 v)?> then\n        if <(red 3 move) = [1]> then\n            broadcast (red3 -10 v)\n        end\n        delete this clone\n    end\nend\n\nif <((mouse x) - ([x position v] of [player v])) > [0]> then\n\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to (player v)\npoint towards (red 3 v)\nturn right (180) degrees\nglide (0.2) secs to (red 3 v)\nwait (0.01) seconds\ndelete this clone\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\nif <[16] > (Level)> then\nend\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@Dot you\n\nwhen flag clicked\nhide\n\nwhen I receive [shoot v]\nif <(red 3 move) = [1]> then\n    go to [back v] layer\n    repeat (10)\n        wait (0.05) seconds\n        create clone of (_myself_ v)\n    end\n    set [5 v] to [0]\nend\n\nwhen I start as a clone\nforever\n    if <<touching (red 3 b v)?> or <<<touching (protego red v)?> or <<<<touching (attack red 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 receive [next v]\nwait (0.1) seconds\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nforever\n    if <touching (protego red3 v)?> then\n        broadcast (protego red2 hp v)\n        delete this clone\n    end\n    if <touching (red 2 v)?> then\n        broadcast (red2 hp v)\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nif <(Level) < [16]> then\n    clear graphic effects\n    go to [front v] layer\n    go to (player v)\n    show\n    glide (0.5) secs to (red 3 v)\n    wait (0.01) seconds\n    delete this clone\nend\n\nwhen I start as a clone\nforever\n    if <touching color (#ff0000)?> then\n        wait (0.01) seconds\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (red 3 v)?> then\n        if <(red 3 move) = [1]> then\n            broadcast (red3 -1 v)\n        end\n        delete this clone\n    end\nend\n\n@Stun You\n\nwhen flag clicked\nhide\n\nwhen I receive [stun v]\n\ngo to [back v] layer\ncreate clone of (_myself_ v)\nif <(mode) = [easy]> then\n    wait (2) seconds\nend\nif <(mode) = [hard]> then\n    wait (3) seconds\nend\nset [4 v] to [0]\n\nwhen I start as a clone\n\nforever\n    if <<touching (red 3 b v)?> or <<touching (protego red3 v)?> or >> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\n\nswitch costume to (costume1 v)\nshow\nclear graphic effects\ngo to (player v)\nglide (0.2) secs to (red 3 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\n\nforever\n    if <touching (red 3 v)?> then\n        broadcast (red 3 stop v)\n        stop [this script v]\n    end\nend\n\n@You got stunned!\n\nwhen flag clicked\nhide\n\nwhen I receive [you got stunned! v]\n\nclear graphic effects\nhide\nforever\n    go to (player v)\nend\n\nshow\nwait (3) seconds\nhide\n\nwhen I receive [next v]\n\nwait (0.1) seconds\n\n@Red 3\n\nwhen flag clicked\nhide\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nif <[23] > (Level)> then\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    set [xv2 v] to [0]\n    set [yv2 v] to [0]\n    wait until <(Next?) = [0]>\n    broadcast (red3 go v)\nelse\n    if <(Level) = [23]> then\n        set [red 3 move v] to [0]\n        switch costume to (costume1 v)\n        go to x: (148) y: (-127)\n        point in direction (90)\n        clear graphic effects\n        set size to (100) %\n        hide\n    end\n    stop [this script v]\nend\n\nset [red 3 hp v] to [10]\nset size to (100) %\ngo to x: (99) y: (-30)\nswitch costume to (costume1 v)\nshow\npoint in direction (90)\nclear graphic effects\n\ndefine restart\nif <(Level) = [13]> then\n    set [red 3 m ready? v] to [0]\nend\nset [xv2 v] to [0]\nset [yv2 v] to [0]\ngo to x: (start position x) y: (start position y)\nif <(Level) = [13]> then\n    wait (3) seconds\n    set [red 3 m ready? v] to [1]\nend\n\nwhen I receive [2 v]\nswitch costume to (costume1 v)\ngo to x: (154) y: (26)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nforever\n    if <(mode) = [hard]> then\n        if <(red 3 move) = [1]> then\n            set [yv2 v] to [15]\n            wait (1.2) seconds\n            wait until <(yv2) = [0]>\n        end\n    end\nend\n\nwhen I receive [2 v]\nset [red 3 move v] to [1]\nred 3 hp [10] [30] [10] player hp [100] [50] [100]\nset [start position x v] to [154]\nset [start position y v] to [26]\n\nwhen I receive [red3 -1 v]\nchange [red 3 hp v] by (-1)\nif <(red 3 hp) < [1]> then\n    set [red 3 hp v] to [0]\n    set [red 3 move v] to [0]\n    if <(Level) = [4]> then\n        broadcast (4b v)\n        broadcast (4c v)\n    end\n    if <(Level) = [6]> then\n        if <not <(mode) = [beginner]>> then\n            broadcast (6 red defeated v)\n        end\n    end\n    stop [other scripts in sprite v]\n    switch costume to (costume2 v)\n    clear graphic effects\n    repeat (25)\n        turn right (60) degrees\n        change [ghost v] effect by (4)\n        change size by (-2)\n    end\n    hide\n    go to (portal v)\n    set [portal v] to [Open]\n    if <(Level) = [5]> then\n        wait until <<([x position v] of [player v]) = [0]> and <([y position v] of [player v]) < [-135]>>\n        broadcast (5a v)\n    end\n    if <(Level) = [10]> then\n        set [lvl10,11 hp v] to (playr hp)\n        if <<<(playr hp) = [100]> and <(mode) = [hard]>> or <<(playr hp) = [30]> and <(mode) = [easy]>>> then\n            set [lvl10,11 hp v] to [0]\n        end\n    end\n    if <(Level) = [11]> then\n        if <not <<<(playr hp) = [50]> and <(mode) = [hard]>> or <<(playr hp) = [50]> and <(mode) = [easy]>>>> then\n            change [lvl10,11 hp v] by (playr hp)\n        end\n        broadcast (11 r3 done v)\n    end\n    if <(Level) = [13]> then\n        broadcast (13a v)\n    end\n    if <(Level) = [14]> then\n        broadcast (14a v)\n    end\nend\n\nwhen I receive [red3 -10 v]\nset [yv2 v] to [5]\nchange [red 3 hp v] by (-10)\nif <(red 3 hp) < [1]> then\n    set [red 3 hp v] to [0]\n    set [red 3 move v] to [0]\n    if <(Level) = [4]> then\n        broadcast (4b v)\n        broadcast (4c v)\n    end\n    if <(Level) = [6]> then\n        if <not <(mode) = [beginner]>> then\n            broadcast (6 red defeated v)\n        end\n    end\n    stop [other scripts in sprite v]\n    switch costume to (costume2 v)\n    clear graphic effects\n    repeat (25)\n        turn right (60) degrees\n        change [ghost v] effect by (4)\n        change size by (-2)\n    end\n    hide\n    go to (portal v)\n    set [portal v] to [Open]\n    if <(Level) = [5]> then\n        wait until <<([x position v] of [player v]) = [0]> and <([y position v] of [player v]) < [-135]>>\n        broadcast (5a v)\n    end\n    if <(Level) = [10]> then\n        set [lvl10,11 hp v] to (playr hp)\n        if <<<(playr hp) = [100]> and <(mode) = [hard]>> or <<(playr hp) = [30]> and <(mode) = [easy]>>> then\n            set [lvl10,11 hp v] to [0]\n        end\n    end\n    if <(Level) = [11]> then\n        if <not <<<(playr hp) = [50]> and <(mode) = [hard]>> or <<(playr hp) = [50]> and <(mode) = [easy]>>>> then\n            change [lvl10,11 hp v] by (playr hp)\n        end\n        broadcast (11 r3 done v)\n    end\n    if <(Level) = [13]> then\n        broadcast (13a v)\n    end\n    if <(Level) = [14]> then\n        broadcast (14a v)\n    end\nend\n\nwhen I receive [red3 go v]\nset [r3 gr v] to [1]\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 (r3 gr)\n        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n            change y by (r3 gr)\n            if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                change y by (r3 gr)\n                if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                    change y by (r3 gr)\n                    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                        change y by (r3 gr)\n                        if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n                            change x by ((xv2) * (-1))\n                            change y by ((r3 gr) * (-5))\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv2 v] by ((r3 gr) * (-1))\n    change y by (yv2)\n    if <<touching (sprite 2 v)?> or <touching (sprite? v)?>> then\n        change y by ((yv2) * ((r3 gr) * (-1)))\n        set [yv2 v] to [0]\n    end\n    change y by ((r3 gr) * (-1))\n    change y by (r3 gr)\n    if <(y position) < [-175]> then\n        restart\n    end\nend\n\nwhen I receive [red3 go v]\nif <(Portal) = [Closed]> then\n    switch costume to (costume1 v)\n    point in direction (90)\n    clear graphic effects\n    set size to (100) %\n    show\n    if <(Level) = [2]> then\n        broadcast (ATTACK v)\n    end\n    if <(Level) = [3]> then\n        forever\n            if <(red 3 move) = [1]> then\n                wait (2.1) seconds\n                if <(mode) = [beginner]> then\n                    wait (0.9) seconds\n                end\n                broadcast (red 3 missile v)\n            end\n        end\n    end\n    if <(Level) = [4]> then\n        broadcast (ATTACK v)\n    end\nend\nif <(Level) = [5]> then\n    broadcast (ATTACK v)\n    if <(mode) = [hard]> then\n        forever\n            if <(red 3 move) = [1]> then\n                wait (1.5) seconds\n                broadcast (red 3 m 5 v)\n            end\n        end\n    end\nend\nif <<<(Level) = [6]> or <(Level) = [13]>> or <(Level) = [14]>> then\n    broadcast (ATTACK v)\n    forever\n        if <(red 3 move) = [1]> then\n            if <(mode) = [hard]> then\n                wait (1.5) seconds\n                broadcast (red 3 m 5 v)\n            end\n            if <<(mode) = [easy]> or <(mode) = [beginner]>> then\n                wait (3) seconds\n                broadcast (red 3 m 5 v)\n            end\n        end\n    end\nend\nif <<(Level) = [7]> or <<(Level) = [8]> or <(Level) = [11]>>> then\n    broadcast (ATTACK v)\nend\nif <(Level) = [9]> then\n    broadcast (ATTACK v)\n    forever\n        if <(red 3 move) = [1]> then\n            if <(mode) = [hard]> then\n                wait (3) seconds\n                broadcast (red 3 m 8 v)\n            end\n            if <(mode) = [easy]> then\n                wait (3) seconds\n                broadcast (red 3 m 5 v)\n            end\n        end\n    end\nend\nif <(Level) = [10]> then\n    broadcast (ATTACK v)\n    forever\n        if <(red 3 move) = [1]> then\n            if <(mode) = [hard]> then\n                wait (1.5) seconds\n                broadcast (red 3 m 8 v)\n            end\n            if <(mode) = [beginner]> then\n                wait (3) seconds\n                broadcast (red 3 m 5 v)\n            end\n        end\n    end\nend\nif <(Level) = [12]> then\n    broadcast (ATTACK v)\n    forever\n        if <(red 3 move) = [1]> then\n            if <(mode) = [hard]> then\n                wait (1.5) seconds\n                if <<([y position v] of [player v]) > [25]> and <(12 switch) = [2]>> then\n                    broadcast (red 3 m 8 v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [player reset v]\nrestart\n\nwhen I receive [red 3 stop v]\nset [red 3 move v] to [0]\nswitch costume to (costume3 v)\nwait (2) seconds\nif <[0] < (red 3 hp)> then\n    set [red 3 move v] to [1]\n    switch costume to (costume1 v)\nend\n\nwhen I receive [3 v]\nswitch costume to (costume1 v)\ngo to x: (215) y: (-33)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\n\nwhen I receive [3 v]\nset [red 3 move v] to [1]\nred 3 hp [10] [50] [10] player hp [200] [100] [200]\nset [start position x v] to [215]\nset [start position y v] to [-33]\n\nwhen I receive [4 v]\nswitch costume to (costume1 v)\ngo to x: (-215) y: (-153)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nforever\n    if <(red 3 move) = [1]> then\n        if <([x position v] of [player v]) > (x position)> then\n            set [xv2 v] to [5]\n            wait (1) seconds\n        else\n            set [xv2 v] to [-5]\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I receive [4 v]\nset [red 3 move v] to [1]\nred 3 hp [20] [50] [10] player hp [100] [100] [100]\nset [start position x v] to [-215]\nset [start position y v] to [-153]\n\nwhen I receive [5 v]\nswitch costume to (costume1 v)\ngo to x: (32) y: (30)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nforever\n    if <(red 3 move) = [1]> then\n        if <(y position) < [-100]> then\n            if <([y position v] of [player v]) > ((y position) + (100))> then\n                wait until <(y position) = [-142]>\n                glide (1) secs to x: (0) y: (y position)\n                set [yv2 v] to [25]\n                wait until <(y position) > [0]>\n                if <([x position v] of [player v]) > (x position)> then\n                    set [xv2 v] to [20]\n                else\n                    set [xv2 v] to [-20]\n                end\n            else\n                if <([x position v] of [player v]) > (x position)> then\n                    set [yv2 v] to [7]\n                    set [xv2 v] to [5]\n                    wait (1) seconds\n                else\n                    set [yv2 v] to [7]\n                    set [xv2 v] to [-5]\n                    wait (1) seconds\n                end\n            end\n        else\n            if <<[-50] < (y position)> and <(y position) < [-40]>> then\n                if <([y position v] of [player v]) > ((y position) + (100))> then\n                    wait until <(y position) = [-49]>\n                    if <(x position) > [0]> then\n                        glide (1) secs to x: (190) y: (-49)\n                    else\n                        glide (1) secs to x: (-190) y: (-49)\n                    end\n                    set [yv2 v] to [25]\n                    wait until <(y position) > [100]>\n                    if <([x position v] of [player v]) > (x position)> then\n                        set [xv2 v] to [5]\n                    else\n                        set [xv2 v] to [-5]\n                    end\n                else\n                    if <([x position v] of [player v]) > (x position)> then\n                        set [yv2 v] to [15]\n                        set [xv2 v] to [5]\n                        wait (1) seconds\n                    else\n                        set [yv2 v] to [15]\n                        set [xv2 v] to [-5]\n                        wait (1) seconds\n                    end\n                end\n            else\n                if <([x position v] of [player v]) > (x position)> then\n                    set [yv2 v] to [7]\n                    set [xv2 v] to [5]\n                    wait (1) seconds\n                else\n                    set [yv2 v] to [7]\n                    set [xv2 v] to [-5]\n                    wait (1) seconds\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [5 v]\nset [red 3 move v] to [1]\nred 3 hp [50] [50] [30] player hp [100] [100] [100]\nset [start position x v] to [32]\nset [start position y v] to [30]\n\ndefine red 3 hp (re) (rh) (rb) player hp (pe) (ph) (pb)\nif <(mode) = [easy]> then\n    set [red 3 hp v] to (re)\n    set [playr hp v] to (pe)\nend\nif <(mode) = [hard]> then\n    set [red 3 hp v] to (rh)\n    set [playr hp v] to (ph)\nend\nif <(mode) = [beginner]> then\n    set [red 3 hp v] to (rb)\n    set [playr hp v] to (pb)\nend\n\nwhen I receive [6 v]\nset [red 3 move v] to [1]\nred 3 hp [30] [50] [20] player hp [100] [100] [100]\nset [start position x v] to [0]\nset [start position y v] to [-33]\n\nwhen I receive [6 v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (-33)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nforever\n    if <(red 3 move) = [1]> then\n        wait (3) seconds\n        if <([y position v] of [player v]) < [-82]> then\n            go to x: ((pick random (-1) to (1)) * (90)) y: (-120)\n        end\n        if <<[-82] < ([y position v] of [player v])> and <([y position v] of [player v]) < [-70]>> then\n            go to x: ((pick random (-1) to (1)) * (200)) y: (-80)\n        end\n        if <<[-44] < ([y position v] of [player v])> and <([y position v] of [player v]) < [70]>> then\n            go to x: ((pick random (-1) to (1)) * (200)) y: (-42)\n        end\n        if <[114] < ([y position v] of [player v])> then\n            go to x: ((pick random (-1) to (1)) * (200)) y: (114)\n        end\n    end\nend\n\nif <<[73] < ([y position v] of [player v])> and <([y position v] of [player v]) < [85]>> then\n    go to x: ((pick random (-1) to (1)) * (200)) y: (75)\nend\n\nwhen I receive [7 v]\nset [red 3 move v] to [1]\nred 3 hp [50] [30] [20] player hp [100] [40] [100]\nset [start position x v] to [180]\nset [start position y v] to [83]\n\nwhen I receive [7 v]\nswitch costume to (costume1 v)\ngo to x: (180) y: (83)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nwait until <key (4 v) pressed?>\nforever\n    if <(red 3 move) = [1]> then\n        if <(mode) = [beginner]> then\n            wait (3) seconds\n        end\n        if <(mode) = [easy]> then\n            wait (2) seconds\n        end\n        if <(mode) = [hard]> then\n            wait (1.5) seconds\n        end\n        set [r3 lvl7 x v] to (pick random (1) to (4))\n        set [r3 lvl7 y v] to (pick random (-1) to (1))\n        go to x: (((120) * (r3 lvl7 x)) - (299)) y: (((120) * (r3 lvl7 y)) - (35))\n    end\nend\n\nwhen I receive [8 v]\nset [red 3 move v] to [1]\nred 3 hp [30] [30] [20] player hp [100] [50] [100]\nset [start position x v] to [212]\nset [start position y v] to [-18]\n\nwhen I receive [8 v]\nswitch costume to (costume1 v)\ngo to x: (212) y: (-18)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nforever\n    if <(red 3 move) = [1]> then\n        if <(mode) = [beginner]> then\n            if <(distance to [player v]) < [50]> then\n                wait (1) seconds\n                go to x: ((x position) * (-1)) y: (-18)\n            end\n        end\n        if <not <(mode) = [beginner]>> then\n            if <(distance to [player v]) < [50]> then\n                wait (0.2) seconds\n                go to x: ((x position) * (-1)) y: (-18)\n            end\n        end\n    end\nend\n\nwhen I receive [9 v]\nset [red 3 move v] to [1]\nred 3 hp [50] [80] [20] player hp [100] [200] [100]\nset [start position x v] to [0]\nset [start position y v] to [-49]\n\nwhen I receive [9 v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (-49)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nforever\n    if <<(mode) = [easy]> or <(mode) = [beginner]>> then\n        wait (2) seconds\n    end\n    if <(mode) = [hard]> then\n        wait (1) seconds\n    end\n    if <(red 3 move) = [1]> then\n        if <[135] < ([y position v] of [player v])> then\n            go to x: ((-50) + ((100) * (pick random (0) to (1)))) y: (136)\n        end\n        if <<[60] < ([y position v] of [player v])> and <([y position v] of [player v]) < [136]>> then\n            go to x: ((-108) + ((216) * (pick random (0) to (1)))) y: (61)\n        end\n        if <<[-16] < ([y position v] of [player v])> and <([y position v] of [player v]) < [61]>> then\n            go to x: ((-152) + ((304) * (pick random (0) to (1)))) y: (-16)\n        end\n        if <([y position v] of [player v]) < [-17]> then\n            go to x: (0) y: (-49)\n            if <(distance to [player v]) < [10]> then\n                set [yv2 v] to [10]\n            end\n        end\n    end\nend\n\nwhen I receive [10 v]\nset [lvl10,11 hp v] to [0]\nset [red 3 move v] to [1]\nred 3 hp [30] [70] [30] player hp [30] [100] [100]\nset [start position x v] to [98]\nset [start position y v] to [105]\n\nwhen I receive [10 v]\nswitch costume to (costume1 v)\ngo to x: (98) y: (105)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\n\nwhen I receive [11 v]\nset [red 3 move v] to [1]\nred 3 hp [30] [30] [30] player hp [50] [50] [100]\nset [start position x v] to [0]\nset [start position y v] to [-44]\n\nwhen I receive [11 v]\nswitch costume to (costume1 v)\ngo to x: (0) y: (-44)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nforever\n    if <(mode) = [beginner]> then\n        wait (2) seconds\n    end\n    if <(mode) = [easy]> then\n        wait (1) seconds\n    end\n    if <(mode) = [hard]> then\n        wait (0.5) seconds\n    end\n    if <(red 3 move) = [1]> then\n        if <(dis to 0,0) < [55]> then\n            set x to (pick random (-95) to (95))\n            set y to (((-1) * ([sqrt v] of (((95) * (95)) - ((x position) * (x position))) )) + ((pick random (0) to (1)) * ((2) * ([sqrt v] of (((95) * (95)) - ((x position) * (x position))) ))))\n        end\n        if <<[54] < (dis to 0,0)> and <(dis to 0,0) < [105]>> then\n            set x to (pick random (-150) to (150))\n            set y to (((-1) * ([sqrt v] of (((145) * (145)) - ((x position) * (x position))) )) + ((pick random (0) to (1)) * ((2) * ([sqrt v] of (((145) * (145)) - ((x position) * (x position))) ))))\n        end\n        if <<[104] < (dis to 0,0)> and <(dis to 0,0) < [160]>> then\n            set x to (pick random (-41) to (41))\n            set y to (((-1) * ([sqrt v] of (((41) * (41)) - ((x position) * (x position))) )) + ((pick random (0) to (1)) * ((2) * ([sqrt v] of (((41) * (41)) - ((x position) * (x position))) ))))\n        end\n    end\nend\n\nwhen I receive [12 v]\nswitch costume to (costume1 v)\ngo to x: (212) y: (31)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nset [xv2 v] to [0]\nforever\n    if <(red 3 move) = [1]> then\n        if <[25] < ([y position v] of [player v])> then\n            wait (1) seconds\n            set [xv2 v] to [-10]\n            wait (1) seconds\n            set [xv2 v] to [10]\n        end\n    end\nend\n\nwhen I receive [12 v]\nset [red 3 move v] to [1]\nred 3 hp [100] [90] [30] player hp [100] [150] [100]\nset [start position x v] to [212]\nset [start position y v] to [31]\n\nwhen I receive [13 v]\nset [red 3 move v] to [1]\nred 3 hp [80] [100] [30] player hp [100] [200] [100]\nset [start position x v] to [130]\nset [start position y v] to [98]\n\nwhen I receive [13 v]\nset [red 3 m ready? v] to [0]\nswitch costume to (costume1 v)\ngo to x: (130) y: (98)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nset [xv2 v] to [0]\nwait (2) seconds\nset [red 3 m ready? v] to [1]\nforever\n    if <(red 3 move) = [1]> then\n        wait (1) seconds\n        if <(red 3 m ready?) = [1]> then\n            if <([y position v] of [player v]) < [-97]> then\n                go to x: (x position) y: (-135)\n                if <(x position) > [178]> then\n                    set x to (178)\n                end\n            end\n            if <<[-19] < ([y position v] of [player v])> and <([y position v] of [player v]) < [19]>> then\n                go to x: (x position) y: (-20)\n                if <(x position) > [178]> then\n                    set x to (178)\n                end\n                if <(x position) < [-175]> then\n                    set x to (-175)\n                end\n            end\n            if <[97] < ([y position v] of [player v])> then\n                go to x: (x position) y: (97)\n                if <(x position) < [-175]> then\n                    set x to (-175)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [13 v]\nforever\n    if <(red 3 move) = [1]> then\n        if <(mode) = [beginner]> then\n            set [xv2 v] to ((([x position v] of [player v]) - (x position)) / (60))\n        end\n        if <(mode) = [easy]> then\n            set [xv2 v] to ((([x position v] of [player v]) - (x position)) / (40))\n        end\n        if <(mode) = [hard]> then\n            set [xv2 v] to ((([x position v] of [player v]) - (x position)) / (20))\n        end\n    end\nend\n\nwhen I receive [14 v]\nswitch costume to (costume1 v)\ngo to x: (148) y: (-127)\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nshow\nset [xv2 v] to [0]\nset [yv2 v] to [0]\nforever\n    if <(red 3 move) = [1]> then\n        set [xv2 v] to [6]\n        repeat (60)\n        set [xv2 v] to [0]\n        set x to (220)\n        set [pick 1 or 2 v] to (pick random (1) to (2))\n        if <(pick 1 or 2) = [1]> then\n            set [yv2 v] to [16]\n        end\n        if <(pick 1 or 2) = [2]> then\n            set [yv2 v] to [22]\n        end\n        repeat (15)\n        set [xv2 v] to [-6]\n        repeat (60)\n        set [xv2 v] to [0]\n        set x to (168)\n    end\nend\n\nwhen I receive [14 v]\nset [red 3 move v] to [1]\nred 3 hp [100] [100] [60] player hp [100] [300] [150]\nset [start position x v] to [148]\nset [start position y v] to [-127]\n\nif <(Level) = [15]> then\n    stop [other scripts in sprite v]\n    hide\nend\n\n@Attack Red\n\nwhen flag clicked\nset [next? v] to [0]\nhide\n\nwhen I receive [attack v]\ngo to (red 3 v)\nset [red shoot allowed? v] to [1]\nforever\n    if <(Portal) = [Closed]> then\n        if <[0] < (red 3 hp)> then\n            if <(red shoot allowed?) = [1]> then\n                if <(red 3 move) = [1]> then\n                    if <(mode) = [beginner]> then\n                        wait (1) seconds\n                    end\n                    if <(mode) = [easy]> then\n                        if <(Level) = [7]> then\n                            wait (0.2) seconds\n                        else\n                            if <(Level) = [12]> then\n                                if <(12 switch) = [2]> then\n                                    wait (0.2) seconds\n                                else\n                                    wait (1) seconds\n                                end\n                            else\n                                wait (0.5) seconds\n                            end\n                        end\n                    end\n                    if <(mode) = [hard]> then\n                        wait (0.2) seconds\n                    end\n                    go to [back v] layer\n                    create clone of (_myself_ v)\n                end\n            else\n                wait (1) seconds\n            end\n        else\n            wait (1) seconds\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if  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 (red 3 v)\npoint towards (player v)\nglide ((distance to [player v]) / (1200)) secs to (player v)\ndelete this clone\n\nif <(Level) = [8]> then\n    switch costume to (costume2 v)\nelse\nend\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 [stop attacks v]\nwait (1) seconds\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nforever\n    if <(stunned?) = [1]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nwait (3) seconds\ndelete this clone\n\nif <([x position v] of [player v]) < ([x position v] of [red 3 v])> then\n    switch costume to (costume1 v)\n    go to (red 3 v)\n    point towards (player v)\n    set [red 3 arrow angle v] to ((direction) + (90))\n    clear graphic effects\n    go to [front v] layer\n    show\n    glide (0.3) secs to x: (-232) y: ((y position) + (((x position) - (-232)) * ([tan v] of (red 3 arrow angle) )))\nelse\n    switch costume to (costume1 v)\n    go to (red 3 v)\n    point towards (player v)\n    set [red 3 arrow angle v] to ((90) - (direction))\n    clear graphic effects\n    go to [front v] layer\n    show\n    glide (0.3) secs to x: (232) y: ((y position) + (((232) - (x position)) * ([tan v] of (red 3 arrow angle) )))\nend\ndelete this clone\n\nif <(Level) = [12]> then\n    wait (0.1) seconds\nelse\nend\n\n@protego red\n\nwhen flag clicked\nclear graphic effects\nhide\nforever\n    go to (red 3 v)\n    if <(red 3 hp) < [1]> then\n        hide\n    end\nend\n\nwhen I receive [next v]\nforever\n    if <[0] < (red 3 hp)> then\n        if <<(2) = [1]> or <(5) = [1]>> then\n            if <(red 3 move) = [1]> then\n                clear graphic effects\n                set size to (100) %\n                show\n            end\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\n\nwait (0.5) seconds\nset [red protego available v] to [1]\n\nwhen I receive [next v]\nset [red protego available v] to [1]\n\nif <(red protego available) = [1]> then\n    set [red protego available v] to [0]\nelse\n    wait (0.5) seconds\n    set [red protego available v] to [1]\nend\n\n@red 3 stun\n\nwhen flag clicked\ngo to x: (0) y: (0)\nclear graphic effects\nhide\n\nwhen I start as a clone\nforever\n    if <<(red 2 stunned) = [1]> or <<(stunned?) = [1]> or <<<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\n    if <(red byebye) > [0]> then\n        wait (1) seconds\n        stop [this script v]\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\nwhen I receive [stop attacks v]\ndelete this clone\n\nwhen I receive [next v]\ndelete this clone\n\n@red 2 patronus\n\nwhen flag clicked\nclear graphic effects\nhide\n\n@Red 3 B\n\nwhen flag clicked\nhide\n\nwhen I receive [4 v]\nswitch costume to (costume2 v)\ngo to x: (0) y: (0)\nset size to (100) %\nclear graphic effects\nshow\nforever\n    if <touching (player v)?> then\n        change [playr hp v] by (-10)\n    end\n    if <([costume # v] of [sprite 2 v]) = [4]> then\n        if <(4 switch) = [0]> then\n            switch costume to (costume2 v)\n            show\n        else\n            hide\n        end\n    end\n    if <([costume # v] of [sprite 2 v]) = [16]> then\n        switch costume to (costume3 v)\n        show\n    end\nend\n\nwhen I receive [5 v]\nswitch costume to (costume4 v)\ngo to x: (0) y: (0)\nset size to (100) %\nclear graphic effects\nhide\nwait until <(Portal) = [Open]>\nshow\nforever\n    if <touching (player v)?> then\n        change [playr hp v] by (-10)\n    end\nend\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [10 v]\nswitch costume to (costume5 v)\ngo to x: (0) y: (0)\nset size to (100) %\nclear graphic effects\nshow\nforever\n    if <touching (player v)?> then\n        change [playr hp v] by (-5)\n    end\nend\n\nwhen I receive [12 v]\nswitch costume to (6 v)\ngo to x: (0) y: (0)\nset size to (100) %\nclear graphic effects\nshow\nforever\n    if <touching (player v)?> then\n        change [playr hp v] by (-5)\n    end\n    if <(12 switch) = [2]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [12 v]\nforever\n    switch costume to (6 v)\n    wait (0.1) seconds\n    switch costume to (7 v)\n    wait (0.1) seconds\n    switch costume to (8 v)\n    wait (0.1) seconds\n    switch costume to (9 v)\n    wait (0.1) seconds\n    switch costume to (10 v)\n    wait (0.1) seconds\n    switch costume to (9 v)\n    wait (0.1) seconds\n    switch costume to (8 v)\n    wait (0.1) seconds\n    switch costume to (7 v)\n    wait (0.1) seconds\nend\n\n@Yellow\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\n\nwhen I receive [7chat13 v]\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nshow\nset [xxxxxxxxxxxxx v] to [0]\nset [yyyyyyyyyyyyyy v] to [0]\nforever\n    set [xxxxxxxxxxxxx v] to ((xxxxxxxxxxxxx) * (0.9))\n    change x by (xxxxxxxxxxxxx)\nend\n\nwhen I receive [7chat end v]\nstop [other scripts in sprite v]\nclear graphic effects\nset size to (100) %\ngo to [front v] layer\nshow\nset [xxxxxxxxxxxxx v] to [0]\nset [yyyyyyyyyyyyyy v] to [0]\nforever\n    set [xxxxxxxxxxxxx v] to ((xxxxxxxxxxxxx) * (0.9))\n    change x by (xxxxxxxxxxxxx)\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 ((xxxxxxxxxxxxx) * (-1))\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yyyyyyyyyyyyyy v] by (-1)\n    change y by (yyyyyyyyyyyyyy)\n    if <touching (sprite 2 v)?> then\n        change y by ((yyyyyyyyyyyyyy) * (-1))\n        set [yyyyyyyyyyyyyy v] to [0]\n    end\n    change y by (-1)\n    change y by (1)\nend\n\nwhen I receive [6e v]\ngo to [back v] layer\nclear graphic effects\nset size to (100) %\nshow\ngo to x: (-158) y: (-104)\nset [brightness v] effect to (-70)\n\nwhen I receive [6e6 v]\nrepeat (40)\n    change [brightness v] effect by (1)\nend\nwait (2) seconds\nbroadcast (6e7 v)\n\n@yellow patronus\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [af v]\nclear graphic effects\nset size to (100) %\ngo to [back v] layer\nshow\ngo to (dark v)\nwait (0.2) seconds\nhide\nbroadcast (ag v)\n\n@black 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@switch\n\nwhen flag clicked\nset [4 switch v] to [0]\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [4a v]\ngo to [back v] layer\ngo to x: (-170) y: (46)\nshow\nif <(4 switch) = [0]> then\n    switch costume to (costume1 v)\nelse\n    switch costume to (costume2 v)\nend\n\nwhen I receive [4b v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [4 v]\nset [4 switch v] to [0]\n\nwhen I receive [4a v]\nforever\n    if <(4 switch) = [0]> then\n        if <<touching (player v)?> and <key (space v) pressed?>> then\n            wait until <not <key (space v) pressed?>>\n            set [4 switch v] to [1]\n            switch costume to (costume2 v)\n        end\n    end\n    if <(4 switch) = [1]> then\n        if <<touching (player v)?> and <key (space v) pressed?>> then\n            wait until <not <key (space v) pressed?>>\n            set [4 switch v] to [0]\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nwhen I receive [4a v]\nforever\n    if <(4 switch) = [0]> then\n        if <<touching (player v)?> and <key (space v) pressed?>> then\n            wait until <not <key (space v) pressed?>>\n            set [4 switch v] to [1]\n            switch costume to (costume2 v)\n        end\n    end\n    if <(4 switch) = [1]> then\n        if <<touching (player v)?> and <key (space v) pressed?>> then\n            wait until <not <key (space v) pressed?>>\n            set [4 switch v] to [0]\n            switch costume to (costume1 v)\n        end\n    end\nend\n\nwhen I receive [12 code v]\nset [12 switch v] to [2]\nswitch costume to (costume2 v)\ngo to [back v] layer\ngo to x: (68) y: (-134)\nshow\n\nwhen I receive [12 code v]\nforever\n    if <(12 switch) = [1]> then\n        if <<touching (player v)?> and <key (space v) pressed?>> then\n            wait until <not <key (space v) pressed?>>\n            set [12 switch v] to [2]\n        end\n    end\n    if <(12 switch) = [2]> then\n        if <<touching (player v)?> and <key (space v) pressed?>> then\n            wait until <not <key (space v) pressed?>>\n            set [12 switch v] to [1]\n        end\n    end\n    switch costume to (12 switch)\nend\n\nwhen I receive [next v]\nif <(Level) = [12]> then\n    stop [other scripts in sprite v]\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    hide\nend\n\n@Key\n\nwhen flag clicked\nset [6d found v] to [0]\nhide\n\nwhen I receive [6d thing v]\nswitch costume to (key v)\nclear graphic effects\nset [ghost v] effect to (100)\nset [brightness v] effect to (-70)\nshow\nset size to (50) %\npoint in direction (90)\ngo to x: (0) y: (160)\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\n\nwhen I receive [6d thing v]\nforever\n    if <touching (player v)?> then\n        hide\n        set [6d found v] to [1]\n        broadcast (6d6 v)\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\n@Sprite6\n\nwhen flag clicked\ngo to x: (0) y: (0)\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\nswitch costume to (thumb v)\n\nforever\n    next costume\n    wait (0.2) seconds\nend\n\n@Number\n\nwhen I receive [go v]\nforever\n    if <not <<(Level) = [1]> or <<(Level) = [15]> or <(Level) > [16]>>>> then\n        clear graphic effects\n        show\n        set size to (100) %\n        if <(playr hp) < [1000]> then\n            show\n            go to x: (-230) y: (170)\n            switch costume to (letter (1) of (playr hp))\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\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\n\n@Number2\n\nwhen I receive [go v]\nforever\n    if <not <<(Level) = [1]> or <<(Level) = [15]> or <(Level) > [16]>>>> then\n        clear graphic effects\n        show\n        set size to (100) %\n        if <(playr hp) < [10]> then\n            hide\n        else\n            if <<[9] < (playr hp)> and <(playr hp) < [1000]>> then\n                show\n                go to x: (-215) y: (170)\n                switch costume to (letter (2) of (playr hp))\n            else\n            end\n        end\n    else\n        hide\n    end\nend\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\n\n@Number3\n\nwhen I receive [go v]\nforever\n    if <not <<(Level) = [1]> or <<(Level) = [15]> or <(Level) > [16]>>>> then\n        clear graphic effects\n        show\n        set size to (100) %\n        if <(playr hp) < [100]> then\n            hide\n        else\n            if <<[99] < (playr hp)> and <(playr hp) < [1000]>> then\n                show\n                go to x: (-200) y: (170)\n                switch costume to (letter (3) of (playr hp))\n            else\n            end\n        end\n    else\n        hide\n    end\nend\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\n\n@Number4\n\nwhen I receive [go v]\nforever\n    if <not <<(Level) = [1]> or <<(Level) = [15]> or <(Level) > [16]>>>> then\n        clear graphic effects\n        show\n        set size to (100) %\n        show\n        go to x: (220) y: (170)\n        if <(red 3 hp) < [10]> then\n            switch costume to (letter (1) of (red 3 hp))\n        else\n            if <<[9] < (red 3 hp)> and <(red 3 hp) < [100]>> then\n                switch costume to (letter (2) of (red 3 hp))\n            else\n                if <<[99] < (red 3 hp)> and <(red 3 hp) < [1000]>> then\n                    switch costume to (letter (3) of (red 3 hp))\n                end\n            end\n        end\n    else\n        hide\n    end\nend\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\n\n@Number5\n\nwhen I receive [go v]\nforever\n    if <not <<(Level) = [1]> or <<(Level) = [15]> or <(Level) > [16]>>>> then\n        clear graphic effects\n        show\n        set size to (100) %\n        if <<[9] < (red 3 hp)> and <(red 3 hp) < [100]>> then\n            show\n            go to x: (205) y: (170)\n            switch costume to (letter (1) of (red 3 hp))\n        else\n            if <<[99] < (red 3 hp)> and <(red 3 hp) < [1000]>> then\n                show\n                go to x: (205) y: (170)\n                switch costume to (letter (2) of (red 3 hp))\n            else\n                hide\n            end\n        end\n    else\n        hide\n    end\nend\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\n\n@Number6\n\nwhen I receive [go v]\nforever\n    if <not <<(Level) = [1]> or <<(Level) = [15]> or <(Level) > [16]>>>> then\n        clear graphic effects\n        show\n        set size to (100) %\n        if <<[99] < (red 3 hp)> and <(red 3 hp) < [1000]>> then\n            show\n            go to x: (190) y: (170)\n            switch costume to (letter (1) of (red 3 hp))\n        else\n            hide\n        end\n    else\n        hide\n    end\nend\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\n\n@6e9\n\nwhen flag clicked\nset [6e9 v] to [0]\nset [8 thing v] to [0]\nset [11 thing v] to [0]\nset [13 thing v] to [0]\nclear graphic effects\nhide\n\nwhen I receive [6e9 v]\nwait (2) seconds\nswitch costume to (1 v)\nclear graphic effects\nhide\nset [ghost v] effect to (100)\ngo to x: (0) y: (-88)\nset size to (70) %\nshow\nrepeat until <touching (player v)?>\n    change [ghost v] effect by (-10)\n    turn right (5) degrees\nend\nset [6e9 v] to [1]\nbroadcast (Next v)\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nstop [this script v]\n\nwhen I receive [8 v]\nset [8 thing v] to [0]\nhide\nif <(6e9) = [1]> then\n    wait (0.1) seconds\n    wait until <(red 3 move) = [0]>\n    wait until <<([x position v] of [sprite? v]) = [-142]> or <([x position v] of [sprite? v]) > [-143]>>\n    switch costume to (2 v)\n    clear graphic effects\n    go to x: (([x position v] of [sprite? v]) - (100)) y: (-100)\n    set size to (70) %\n    show\n    go to [back v] layer\n    forever\n        set x to (([x position v] of [sprite? v]) - (100))\n        if <(x position) < [-242]> then\n            hide\n        else\n            show\n            if <touching (player v)?> then\n                set [8 thing v] to [1]\n                hide\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [next v]\nif <<(Level) = [8]> or <(Level) = [11]>> then\n    stop [other scripts in sprite v]\n    repeat (50)\n        change [ghost v] effect by (2)\n    end\n    hide\n    stop [this script v]\nend\n\nwhen I receive [11 r3 done v]\nset [11 thing v] to [0]\nhide\nif <(6e9) = [1]> then\n    if <<(lvl10,11 hp) = [30]> or <(lvl10,11 hp) > [30]>> then\n        switch costume to (3 v)\n        clear graphic effects\n        go to x: (-193) y: (-126)\n        set size to (70) %\n        show\n        go to [back v] layer\n        forever\n            if <touching (player v)?> then\n                set [11 thing v] to [1]\n                hide\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [13a v]\nhide\n\nwhen I receive [13b v]\nif <(6e9) = [1]> then\n    if <(13 thing) = [0]> then\n        if <<<(deaths) < [10]> and <(mode) = [easy]>> or <<(deaths) < [50]> and <(mode) = [hard]>>> then\n            switch costume to (4 v)\n            clear graphic effects\n            go to x: (204) y: (-117)\n            set size to (70) %\n            show\n            go to [back v] layer\n            forever\n                if <touching (player v)?> then\n                    set [13 thing v] to [1]\n                    hide\n                    stop [this script v]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [13 v]\nset [13 thing v] to [0]\nhide\n\nif <not <(Level) = [8]>> then\n    hide\n    stop [this script v]\nend\n\n@15 thing 1\n\nwhen flag clicked\nhide\n\nwhen I receive [15b v]\ngo to [back v] layer\nswitch costume to (1 v)\nclear graphic effects\ngo to x: (-153) y: (22)\n\nwhen I receive [15 things code v]\nshow\nwait until <touching (player v)?>\nif <(8 thing) = [1]> then\n    switch costume to (2 v)\nend\nset [8 thing v] to [0]\nstop [this script v]\n\nset [8 thing v] to [1]\n\nwhen I receive [15a v]\nhide\n\n@15 thing 2\n\nwhen flag clicked\nhide\n\nwhen I receive [15b v]\ngo to [back v] layer\nswitch costume to (1 v)\nclear graphic effects\ngo to x: (-153) y: (22)\n\nwhen I receive [15 things code v]\nshow\nwait until <touching (player v)?>\nif <(11 thing) = [1]> then\n    switch costume to (2 v)\nend\nset [11 thing v] to [0]\nstop [this script v]\n\nset [11 thing v] to [1]\n\nwhen I receive [15a v]\nhide\n\n@15 thing 3\n\nwhen flag clicked\nhide\n\nwhen I receive [15b v]\ngo to [back v] layer\nif <(mode) = [easy]> then\n    switch costume to (1e v)\nend\nif <(mode) = [hard]> then\n    switch costume to (1h v)\nend\nclear graphic effects\ngo to x: (-153) y: (22)\n\nwhen I receive [15 things code v]\nshow\nwait until <touching (player v)?>\nif <(13 thing) = [1]> then\n    switch costume to (2 v)\nend\nset [13 thing v] to [0]\nstop [this script v]\n\nset [13 thing v] to [1]\n\nwhen I receive [15a v]\nhide\n\n@help\n\nwhen flag clicked\nhide\n\nwhen I receive [4a v]\ngo to x: (-169) y: (8)\nclear graphic effects\nhide\nforever\n    set [ghost v] effect to (40)\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (30)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [4b v]\nswitch costume to (4b v)\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [4a v]\nswitch costume to (4b v)\nforever\n    if <<<(distance to [player v]) < [50]> and <(4 switch) = [0]>> and <<(mode) = [beginner]> or <(mode) = [easy]>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [2b v]\nswitch costume to (2 v)\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nforever\n    go to [back v] layer\n    set [ghost v] effect to (40)\n    if <touching (player v)?> then\n        set [brightness v] effect to (10)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [next v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [14a v]\nif <<(mode) = [beginner]> or <(mode) = [easy]>> then\n    wait until <(red 3 move) = [0]>\n    switch costume to (14 v)\n    go to x: (44) y: (120)\n    clear graphic effects\n    show\n    forever\n        go to [back v] layer\n        set [ghost v] effect to (40)\n        if <touching (player v)?> then\n            set [brightness v] effect to (10)\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [14b v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [15 v]\nif <<(6e9) = [0]> and <<(mode) = [easy]> or <(mode) = [hard]>>> then\n    if <(6d found) = [0]> then\n        switch costume to (15 v)\n    end\n    if <(6d found) = [1]> then\n        switch costume to (15 missed 6e9 v)\n    end\n    go to x: (0) y: (0)\n    clear graphic effects\n    show\n    forever\n        go to [back v] layer\n        set [ghost v] effect to (40)\n        if <touching (player v)?> then\n            set [brightness v] effect to (10)\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nelse\n    if <(mode) = [beginner]> then\n        switch costume to (15 beg v)\n        go to x: (0) y: (0)\n        clear graphic effects\n        show\n        forever\n            go to [back v] layer\n            set [ghost v] effect to (40)\n            if <touching (player v)?> then\n                set [brightness v] effect to (10)\n            else\n                set [brightness v] effect to (0)\n            end\n        end\n    end\nend\n\nwhen I receive [15 last v]\nstop [other scripts in sprite v]\nhide\nif <<(6e9) = [1]> and <<(all?) = [1]> and <(mode) = [hard]>>> then\n    wait until <(15...end?) = [1]>\n    go to x: (0) y: (0)\n    clear graphic effects\n    set [ghost v] effect to (90)\n    switch costume to (costume1 v)\n    show\nend\n\nwhen I receive [15 clicked 10 v]\nhide\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen I receive [6 red defeated v]\nstop [other scripts in sprite v]\nif <<(mode) = [hard]> or <(mode) = [easy]>> then\n    switch costume to (6 v)\n    go to x: (198) y: (-83)\n    clear graphic effects\n    show\n    forever\n        go to [back v] layer\n        set [ghost v] effect to (40)\n        if <touching (player v)?> then\n            set [brightness v] effect to (10)\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [6a v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [6b v]\nif <(6d found) = [1]> then\n    switch costume to (6b 6dfound v)\n    go to x: (75) y: (-81)\n    clear graphic effects\n    show\n    forever\n        go to [back v] layer\n        set [ghost v] effect to (40)\n        if <touching (player v)?> then\n            set [brightness v] effect to (10)\n        else\n            set [brightness v] effect to (0)\n        end\n    end\nend\n\nwhen I receive [6e v]\nstop [other scripts in sprite v]\nhide\n\nwhen I receive [3 v]\nswitch costume to (3 v)\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nforever\n    go to [back v] layer\n    set [ghost v] effect to (40)\n    if <touching (player v)?> then\n        set [brightness v] effect to (10)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [6 v]\nswitch costume to (6 remember 7 v)\ngo to x: (-174) y: (125)\nclear graphic effects\nshow\nforever\n    go to [back v] layer\n    set [ghost v] effect to (40)\n    if <touching (player v)?> then\n        set [brightness v] effect to (10)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\n@click count\n\nwhen I receive [15 last v]\nif <<(6e9) = [1]> and <<(all?) = [1]> and <(mode) = [hard]>>> then\n    clear graphic effects\n    wait until <(15...end?) = [1]>\n    forever\n        set [ghost v] effect to (90)\n        switch costume to (15 click)\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (-70)\nset size to (500) %\nhide\n\nwhen I receive [15 clicked 10 v]\nstop [other scripts in sprite v]\nhide\nclear graphic effects\n\nwhen I receive [click v]\nwait (0.1) seconds\nshow\nwait (0.1) seconds\nhide\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\n