Color in Grey || Online Multiplayer Platformer                       #games

Instructions: ★★ Color in Grey ★★\n- 17 normal levels\n- 2 resting points\n- 1 miniboss\n- 1 boss\n\nNOTICE: This is my first online game, please be nice :)\n@StratfordJames loved! :D\n\n★ Try in 2 TABS! Play with your family and friends!★\n\n>>> IF YOU CAN'T GET IN:\nYou may be a New Scratcher, only Scratchers can access cloud variables.\nIf not, try reloading the page.\n\n★ Controls ★\n[Arrow keys] to move\n[T] to open chat\n[1,2,3,4,5,6,7,8,9,Z,X] to select words if chat is open\n[R] restart level if you are stuck\n[P] go to previous level\n[S] if died 3 times, skip\n\n★ Credits ★\n@TimMcCool for the cloud system (I edited)\n@StratfordJames for the chat design (I edited)\nfreemusicarchive.org / FMA for the music\nMe, myself, and I for everything else.\n\n★ Tags ★\n#um #yeah #games #all #trending #explore #do #these #work #recent #i #hope #they #work #this #is #honestly #wasting #my #time #and #your #time #if #you #are #reading #this #xD #ok #now #what #uh #gaming #play #playing #platform #platformer #platforming #studio #studios #fun #cloud #multiplayer #online #working #chat #chatting #kraken #master #krakenmaster

@Stage\n\nwhen I receive [start v]\nforever\n    if <not <(Level) = [20]>> then\n        stop all sounds\n        repeat until <(Level) = [20]>\n            play sound [Scott_Holmes_-_07_-_Inspirational_Outlook v] until done\n        end\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Level) = [20]> then\n        stop all sounds\n        repeat until <not <(Level) = [20]>>\n            play sound [BoxCat_Games_-_05_-_Battle_Boss v] until done\n        end\n    end\nend\n\n@connecting\n\nif <(length of [cloud list v]) = [0]> then\n\n\ndefine connecttest (@slot)\nif <not <(item (((@PlayerSlot) * (8)) - (4)) of [cloud list v]) = (item (4) of [my list v])>> then\n    wait (1) seconds\n    delete all of [my list v]\n    add (x position) to [my list v]\n    add (y position) to [my list v]\n    add (pick random (999) to (99999)) to [my list v]\n    add (x2) to [my list v]\n    add [0] to [my list v]\n    add (chat.output) to [my list v]\n    add (chat.mode) to [my list v]\n    add [4] to [my list v]\n    broadcast (Tick v) and wait\n    broadcast (Get Data v) and wait\n    if <not <(item (((@PlayerSlot) * (8)) - (4)) of [cloud list v]) = (item (4) of [my list v])>> then\n        broadcast (failed v)\n    end\nend\n\nwhen I receive [initialise  v]\nswitch costume to (connecting v)\nshow\nclear graphic effects\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [full? v] to [False]\nset [kick v] to [False]\nset [moved? v] to [800]\n\nwhen flag clicked\nset [ghost v] effect to (0)\nbroadcast (Initialise  v) and wait\nGet Player Slot\nset [moved? v] to [600]\nif <not <(@PlayerSlot) > [0]>> then\n    set [full? v] to [True]\nelse\n    switch costume to (connected! v)\n    wait (1) seconds\n    go to [front v] layer\n    set [started v] to [1]\n    broadcast (start v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\nhide\nforever\n    broadcast (Tick v) and wait\nend\n\ndefine Get Player Slot\nset [@playerslot v] to [0]\nbroadcast (Get Data v) and wait\nset [moved? v] to [0]\ndelete all of [check v]\nif <(length of [cloud list v]) = [0]> then\n    set [@playerslot v] to [1]\nelse\n    repeat (10)\n        change [moved? v] by (1)\n        add (item (((Moved?) * (8)) - (5)) of [cloud list v]) to [check v]\n    end\n    wait (2) seconds\n    broadcast (Get Data v) and wait\n    set [moved? v] to [1]\n    repeat until <(item (((Moved?) * (8)) - (5)) of [cloud list v]) = (item (Moved?) of [check v])>\n        change [moved? v] by (1)\n    end\n    set [@playerslot v] to (Moved?)\n    delete all of [my list v]\n    add (x position) to [my list v]\n    add (y position) to [my list v]\n    add (pick random (999) to (99999)) to [my list v]\n    add (x2) to [my list v]\n    add [0] to [my list v]\n    add (chat.output) to [my list v]\n    add (chat.mode) to [my list v]\n    add [4] to [my list v]\n    broadcast (Tick v) and wait\n    broadcast (Get Data v) and wait\n    connecttest (@PlayerSlot)\nend\n\nwhen flag clicked\nset [started v] to [0]\n\nwhen I receive [start v]\nset [started v] to [1]\n\nwhen I receive [aw v]\nshow\ngo to [front v] layer\nswitch costume to (full2 v)\nstop [all v]\n\nwhen flag clicked\nforever\n    if <(Full?) = [True]> then\n        go to [front v] layer\n        switch costume to (full v)\n        show\n        stop [all v]\n    end\nend\n\nwhen I receive [failed v]\nshow\ngo to [front v] layer\nswitch costume to (failed v)\nstop [all v]\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Players\n\ndefine Movement (id)\nset size to (60) %\nshow\nchange [y2 v] by (-1)\nif <(chat.output) > [0]> then\n    say (item ((chat.output) + ((chat.mode) * (9))) of [chat v])\nelse\n    think []\nend\nif <<key (s v) pressed?> and <(Skip) > [2]>> then\n    if <not <(Level) = [21]>> then\n        set [opened? v] to [0]\n        set [y2 v] to [-20]\n        set [x2 v] to [0]\n        change [level v] by (1)\n        go to x: (-200) y: (50)\n        set [skip v] to [0]\n    else\n        set [opened? v] to [0]\n        set [y2 v] to [-20]\n        set [x2 v] to [0]\n        set [level v] to [1]\n        go to x: (-200) y: (50)\n        set [skip v] to [0]\n    end\n    wait until <not <key (s v) pressed?>>\nend\nif <key (r v) pressed?> then\n    set [boss! v] to [3]\n    set [opened? v] to [0]\n    set [y2 v] to [-20]\n    set [x2 v] to [0]\n    go to x: (-200) y: (50)\nend\nif <(PlayerHealth) < [1]> then\n    set [boss! v] to [3]\n    set [playerhealth v] to [1]\n    set [opened? v] to [0]\n    set [y2 v] to [-20]\n    set [x2 v] to [0]\n    go to x: (-200) y: (50)\nend\nif <(x position) > [230]> then\n    if <not <(Level) = [21]>> then\n        set [opened? v] to [0]\n        set [y2 v] to [-20]\n        set [x2 v] to [0]\n        change [level v] by (1)\n        go to x: (-200) y: (50)\n        set [skip v] to [0]\n    else\n        set [opened? v] to [0]\n        set [y2 v] to [-20]\n        set [x2 v] to [0]\n        set [level v] to [1]\n        go to x: (-200) y: (50)\n        set [skip v] to [0]\n    end\nend\nif <<<<(mouse x) < (x position)> and <mouse down?>> or <key (left arrow v) pressed?>> or <key (a v) pressed?>> then\n    set [last.activity v] to (timer)\n    change [x2 v] by (-0.6)\n    switch costume to (2 v)\nelse\n    if <<<(x position) < (mouse x)> and <mouse down?>> or <key (right arrow v) pressed?>> then\n        set [last.activity v] to (timer)\n        change [x2 v] by (0.6)\n        switch costume to (1 v)\n    else\n        switch costume to (3 v)\n    end\nend\nset [x2 v] to ((x2) * (0.9))\nchange x by (x2)\nSave My Data\nif <<touching (figur9 v)?> or <touching (moving v)?>> then\n    change y by (1)\nend\nif <<touching (figur9 v)?> or <touching (moving v)?>> then\n    change y by (1)\nend\nif <<touching (figur9 v)?> or <touching (moving v)?>> then\n    change y by (1)\nend\nif <<touching (figur9 v)?> or <touching (moving v)?>> then\n    change y by (1)\nend\nif <<touching (figur9 v)?> or <touching (moving v)?>> then\n    change y by (-4)\n    change x by ((x2) * (-1))\nend\nchange y by (y2)\nSave My Data\nif <<touching (figur9 v)?> or <touching (moving v)?>> then\n    change y by ((0) - (y2))\n    set [y2 v] to [1]\nend\nchange y by (-1)\nif <<<<(y position) < (mouse y)> and <mouse down?>> or <key (up arrow v) pressed?>> and <<touching (figur9 v)?> or <touching (moving v)?>>> then\n    set [last.activity v] to (timer)\n    set [y2 v] to [15]\nend\nchange y by (1)\nif <(y position) > [180]> then\n    set [y2 v] to [0]\nend\nif <<<<<<touching (lasers v)?> or <(y position) < [-175]>> or <touching (gears v)?>> or <touching (laserwall v)?>> or <touching (laserwall3 v)?>> or <touching (laserwall4 v)?>> then\n    set [opened? v] to [0]\n    go to x: (-192) y: (-180)\n    set [x2 v] to [0]\n    set [y2 v] to [0]\n    change [skip v] by (1)\n    fiind\nend\nif <key (p v) pressed?> then\n    if <(Level) > [1]> then\n        set [opened? v] to [0]\n        set [y2 v] to [-20]\n        set [x2 v] to [0]\n        change [level v] by (-1)\n        set [skip v] to [0]\n        go to x: (220) y: (5)\n    end\n    wait until <not <key (p v) pressed?>>\nend\nif <<touching color (#ff4141)?> and <(y position) > ([y position v] of [moving2 v])>> then\n    go to x: (-192) y: (-180)\n    set [x2 v] to [0]\n    set [y2 v] to [0]\n    change [miniboss v] by (-1)\n    fiind\nelse\n    if <touching (moving2 v)?> then\n        go to x: (-192) y: (-180)\n        set [x2 v] to [0]\n        set [y2 v] to [0]\n        set [miniboss v] to [3]\n        fiind\n    end\nend\nif <<<(Faze1) = [4]> and <touching (moving3 v)?>> and <<touching color (#ffffff)?> and <(y position) > ([y position v] of [moving2 v])>>> then\n    go to x: (-192) y: (-180)\n    set [faze1 v] to [1]\n    set [x2 v] to [0]\n    set [y2 v] to [0]\n    change [boss! v] by (-1)\n    fiind\nend\nif <<touching color (#343434)?> and <touching (sprite1 v)?>> then\n    set [y2 v] to [20]\nend\nif <<touching color (#262626)?> and <touching (moving v)?>> then\n    set x to ([x position v] of [moving v])\nend\nif <(PlayerHealth) = [0]> then\n    go to x: (-192) y: (-180)\n    set [x2 v] to [0]\n    set [y2 v] to [0]\n    set [boss! v] to [0]\n    set [playerhealth v] to [3]\n    fiind\nend\nSave My Data\n\nwhen I receive [initialise  v]\nhide\nset [username v] to (username)\nset [clone id v] to [0]\nrepeat (10)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\n\ndefine (id)\nif <(item (id) of [active check v]) = [Off]> then\n    hide\nelse\n    if <(item (((id) * (8)) - (3)) of [cloud list v]) = (Level)> then\n        switch costume to ((item (((id) * (8)) - (0)) of [cloud list v]) + (4))\n        set [ghost v] effect to (0)\n        show\n        set size to (60) %\n        think (item (((id) * (8)) - (4)) of [cloud list v])\n        change x by (((x position) - (item (((id) * (8)) - (7)) of [cloud list v])) / (-2.5))\n        change y by (((y position) - (item (((id) * (8)) - (6)) of [cloud list v])) / (-2.5))\n        if <(item (((id) * (8)) - (2)) of [cloud list v]) > [0]> then\n            say (item ((item (((id) * (8)) - (2)) of [cloud list v]) + ((item (((id) * (8)) - (1)) of [cloud list v]) * (9))) of [chat v])\n        end\n        set [ghost v] effect to (0)\n    else\n        if <(item (((id) * (8)) - (3)) of [cloud list v]) > (Level)> then\n            go to x: (250) y: (item (((id) * (8)) - (6)) of [cloud list v])\n        else\n            go to x: (-250) y: (item (((id) * (8)) - (6)) of [cloud list v])\n        end\n        set [ghost v] effect to (100)\n        think (item (((id) * (8)) - (4)) of [cloud list v])\n        if <(item (((id) * (8)) - (2)) of [cloud list v]) > [0]> then\n            say (item ((item (((id) * (8)) - (2)) of [cloud list v]) + ((item (((id) * (8)) - (1)) of [cloud list v]) * (9))) of [chat v])\n        end\n    end\nend\n\ngo to x: (item (((id) * (8)) - (7)) of [cloud list v]) y: (item (((id) * (8)) - (6)) of [cloud list v])\n\ndefine Save My Data\ndelete all of [my list v]\nadd (x position) to [my list v]\nadd (y position) to [my list v]\nadd (pick random (999) to (99999)) to [my list v]\nadd (username) to [my list v]\nadd (Level) to [my list v]\nadd (chat.output) to [my list v]\nadd (chat.mode) to [my list v]\nadd (costume [name v]) to [my list v]\n\ndefine Tick\nif <(Clone ID) = (@PlayerSlot)> then\n    Movement (Clone ID)\nelse\n    (Clone ID)\nend\n\nwhen I start as a clone\nwait until <(started) = [1]>\nif <not <(Clone ID) = (@PlayerSlot)>> then\n    go to x: (item (((Clone ID) * (8)) - (7)) of [cloud list v]) y: (item (((Clone ID) * (8)) - (6)) of [cloud list v])\nend\nif <(Clone ID) = (@PlayerSlot)> then\n    go to x: (-192) y: (0)\nend\nforever\n    Tick\nend\n\n\n\nwhen I receive [start v]\nshow variable [players v]\n\nwhen flag clicked\nhide variable [players v]\n\nwhen flag clicked\nset [chat v] to [0]\nset [chat1 v] to [1: Hi!]\nset [chat2 v] to [2: No.]\nset [chat3 v] to [3: Come to me!]\nset [chat4 v] to [4: Stay here!]\nset [chat5 v] to [5: I commented on your profile!]\nset [chat6 v] to [6: Watch me!]\nset [chat7 v] to [7: How do you beat this level?]\nset [chat8 v] to [8: I'm coming!!]\nset [chat9 v] to [9: Wait for me!]\nset [chat10 v] to [Z: Noooooo!]\nset [chat11 v] to [X: Ok!]\nset [chat12 v] to [C: Thank you!]\nset [chat13 v] to [V: No problem!]\ndelete all of [chat v]\nadd [Hi!] to [chat v]\nadd [No.] to [chat v]\nadd [Come to me!] to [chat v]\nadd [Stay here!] to [chat v]\nadd [I commented on your profile!] to [chat v]\nadd [Watch me!] to [chat v]\nadd [How do you beat this level?] to [chat v]\nadd [I'm coming!] to [chat v]\nadd [Wait for me!] to [chat v]\nadd [Noooooo!] to [chat v]\nadd [Ok!] to [chat v]\nadd [Thank you!] to [chat v]\nadd [No problem!] to [chat v]\n\nwhen [t v] key pressed\nif <(chat) = [1]> then\n    set [chat v] to [0]\nelse\n    set [chat v] to [1]\nend\n\nwhen I receive [start v]\nforever\n    if <(chat) = [1]> then\n        if <key (1 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [1]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (2 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [2]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (3 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [3]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (4 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [4]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (5 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [5]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (6 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [6]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (7 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [7]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (8 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [8]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (9 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [9]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (z v) pressed?> then\n            hide vars\n            set [chat.mode v] to [1]\n            set [chat.output v] to [1]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (x v) pressed?> then\n            hide vars\n            set [chat.mode v] to [1]\n            set [chat.output v] to [2]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (c v) pressed?> then\n            hide vars\n            set [chat.mode v] to [1]\n            set [chat.output v] to [3]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (v v) pressed?> then\n            hide vars\n            set [chat.mode v] to [1]\n            set [chat.output v] to [4]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n    else\n        hide vars\n    end\nend\n\nshow variable [chat1 v]\nshow variable [chat2 v]\nshow variable [chat3 v]\nshow variable [chat4 v]\nshow variable [chat5 v]\nshow variable [chat6 v]\nshow variable [chat7 v]\nshow variable [chat8 v]\nshow variable [chat9 v]\nshow variable [chat10 v]\nshow variable [chat11 v]\n\ndefine hide vars\nset [chat v] to [0]\nhide variable [chat1 v]\nhide variable [chat2 v]\nhide variable [chat3 v]\nhide variable [chat4 v]\nhide variable [chat5 v]\nhide variable [chat6 v]\nhide variable [chat7 v]\nhide variable [chat8 v]\nhide variable [chat9 v]\nhide variable [chat10 v]\nhide variable [chat11 v]\n\nwhen flag clicked\nset [chat.output v] to [0]\n\nwhen I receive [start v]\nwait (4) seconds\nforever\n    if <not <(item (((@PlayerSlot) * (8)) - (4)) of [cloud list v]) = (item (4) of [my list v])>> then\n        broadcast (aw v)\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nset [last.activity v] to [1]\n\nwhen flag clicked\nset [chat.output v] to [0]\n\ndefine fiind\nrepeat until <not <<touching (figur9 v)?> or <touching (moving v)?>>>\n    change y by (1)\nend\n\ngo to [front v] layer\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Cloud\n\ndefine Decode (data)\ndelete all of [cloud list v]\nset [output v] to []\nset [i v] to [0]\nrepeat ((length of (data)) / (2))\n    change [i v] by (2)\n    switch costume to (join (letter ((I) - (1)) of (data)) (letter (I) of (data)))\n    if <(costume [name v]) = [~]> then\n        add (Output) to [cloud list v]\n        set [output v] to []\n    else\n        set [output v] to (join (Output) (costume [name v]))\n    end\nend\n\ndefine Encode\nset [output v] to []\nset [n v] to [0]\nrepeat (length of [my list v])\n    set [i v] to [0]\n    change [n v] by (1)\n    repeat (length of (item (n) of [my list v]))\n        change [i v] by (1)\n        switch costume to (letter (I) of (item (n) of [my list v]))\n        if <(costume [number v]) < [10]> then\n            set [output v] to (join (Output) (join [0] (costume [number v])))\n        else\n            set [output v] to (join (Output) (costume [number v]))\n        end\n    end\n    set [output v] to (join (Output) [53])\nend\n\ndefine Update Players List (id)\nif <(id) = [1]> then\n    set [player list v] to [0]\n    delete all of [check v]\n    repeat (10)\n        change [player list v] by (1)\n        add (item (((Player List) * (8)) - (5)) of [cloud list v]) to [check v]\n    end\nelse\n    if <(id) = [2]> then\n        set [player list v] to [0]\n        repeat (10)\n            change [player list v] by (1)\n            if <not <(@PlayerSlot) = (Player List)>> then\n                if <(item (Player List) of [check v]) = (item (((Player List) * (8)) - (5)) of [cloud list v])> then\n                    replace item (Player List) of [active check v] with [Off]\n                else\n                    replace item (Player List) of [active check v] with [On]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [initialise  v]\ndelete all of [active check v]\nrepeat (10)\n    add [off] to [active check v]\nend\n\nwhen I receive [start v]\nforever\n    Update Players List [1]\n    wait (0.3) seconds\n    Update Players List [2]\nend\n\nwhen I receive [get data v]\nDecode Data\n\ndefine Save Data (id)\nEncode\nif <(timer) < ((last.activity) + (60))> then\n    if <(id) = [1]> then\n        set [☁ p1 v] to (Output)\n    else\n        if <(id) = [2]> then\n            set [☁ p2 v] to (Output)\n        else\n            if <(id) = [3]> then\n                set [☁ p3 v] to (Output)\n            else\n                if <(id) = [4]> then\n                    set [☁ p4 v] to (Output)\n                else\n                    if <(id) = [5]> then\n                        set [☁ p5 v] to (Output)\n                    else\n                        if <(id) = [6]> then\n                            set [☁ p6 v] to (Output)\n                        else\n                            if <(id) = [7]> then\n                                set [☁ p7 v] to (Output)\n                            else\n                                if <(id) = [8]> then\n                                    set [☁ p8 v] to (Output)\n                                else\n                                    if <(id) = [9]> then\n                                        set [☁ p9 v] to (Output)\n                                    else\n                                        if <(id) = [10]> then\n                                            set [☁ p10 v] to (Output)\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [tick v]\nDecode Data\nSave Data (@PlayerSlot)\nDetermine Players\n\ndefine Decode Data\nDecode (join (☁ P1) (join (☁ P2) (join (☁ P3) (join (☁ P4) (join (☁ P5) (join (☁ P6) (join (☁ P7) (join (☁ P8) (join (☁ P9) (☁ P10))))))))))\n\ndefine Determine Players\nset [players v] to [1]\nset [i v] to [0]\nrepeat (10)\n    change [i v] by (1)\n    if <(item (I) of [active check v]) = [On]> then\n        change [players v] by (1)\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Figur9\n\nwhen I receive [start v]\nshow\n\nwhen I receive [start v]\nset [level v] to [1]\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Lasers\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\nwait (0.05) seconds\nnext costume\n\nset [ghost v] effect to (0)\n\ngo to [back v] layer\n\nwhen I receive [start v]\ngo to x: (0) y: (-160)\n\nwhen flag clicked\nshow\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Sprite1\n\ngo to [back v] layer\n\nwhen I receive [start v]\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nwait (1) seconds\nif <(Players) = [1]> then\n    go to x: (0) y: (100)\n    switch costume to (alone v)\n    set [ghost v] effect to (0)\n    show\n    repeat (100)\n        set y to ((y position) / (10))\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\nend\n\nwhen I receive [start v]\nwait (2) seconds\nset [pp v] to (Players)\nforever\n    if <(pp) < (Players)> then\n        wait (2) seconds\n        if <(pp) < (Players)> then\n            broadcast (joined v)\n            go to x: (0) y: (100)\n            set [pp v] to (Players)\n            switch costume to (joined v)\n            show\n            set [ghost v] effect to (0)\n            repeat (100)\n                set y to ((y position) / (10))\n            end\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            hide\n        end\n    end\n    if <(Players) < (pp)> then\n        wait (2) seconds\n        if <(Players) < (pp)> then\n            broadcast (left v)\n            go to x: (0) y: (100)\n            set [pp v] to (Players)\n            switch costume to (left v)\n            set [ghost v] effect to (0)\n            show\n            repeat (100)\n                set y to ((y position) / (10))\n            end\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            hide\n        end\n    end\nend\n\nwhen I receive [start v]\nwait (1) seconds\nset voice to (tenor v)::tts\nspeak (join (username) (join [, You are player ] (@PlayerSlot)))::tts\n\nspeak [You are player]::tts\nspeak (@PlayerSlot)::tts\n\nwhen I receive [joined v]\nspeak [Someone joined the game!]::tts\n\nwhen I receive [left v]\nspeak [Someone left the game.]::tts\n\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Sprite5\n\nwhen flag clicked\nhide variable [time v]\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I receive [start v]\nreset timer\n\nwhen I receive [win v]\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (0)\nset [time v] to (timer)\n\nwhen I receive [start v]\nshow variable [shownplayers v]\n\nhide variable [time v]\n\n@Sprite2\n\nwhen flag clicked\nhide variable [shownplayers v]\n\nwhen I receive [start v]\nshow variable [shownplayers v]\nforever\n    set [ghost v] effect to (100)\n    if <touching (mouse-pointer v)?> then\n        set [shownplayers v] to (join (Players) [ - Online])\n    else\n        set [shownplayers v] to (Players)\n    end\nend\n\n@Chat\n\nwhen flag clicked\nforever\n    if <(chat) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\n@Sprite3\n\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [level v] to [1]\ngo to [back v] layer\nswitch costume to (costume2 v)\nwait until <(Level) = [21]>\ngo to [front v] layer\nset [ghost v] effect to (0)\nshow\nset size to (1) %\nrepeat until <(size) > [99]>\n    change size by (10)\nend\nswitch costume to (costume33 v)\nwait (2) seconds\nswitch costume to (costume34 v)\nrepeat (5)\n    wait (0.03) seconds\n    next costume\nend\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nset size to (100) %\n\n@Gears\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    turn right (7) degrees\n    if <(Level) = [2]> then\n        go to x: (60) y: (-100)\n        show\n    else\n        if <(Level) = [3]> then\n            go to x: (60) y: (52)\n            show\n        else\n            if <(Level) = [4]> then\n                go to x: (-88) y: (31)\n                show\n            else\n                if <(Level) = [5]> then\n                    go to x: (120) y: (107)\n                    show\n                else\n                    if <(Level) = [8]> then\n                        go to x: (-51) y: (-106)\n                        show\n                    else\n                        if <(Level) = [12]> then\n                            go to x: (-51) y: (-106)\n                            show\n                            set [m1 v] to [0]\n                            repeat until <<(M1) = [30]> or <not <(Level) = [12]>>>\n                                turn right (7) degrees\n                                change x by (5)\n                                change [m1 v] by (1)\n                            end\n                            repeat until <<(M1) = [0]> or <not <(Level) = [12]>>>\n                                turn right (7) degrees\n                                change x by (-5)\n                                change [m1 v] by (-1)\n                            end\n                        else\n                            if <(Level) = [13]> then\n                                go to x: (-1) y: (-50)\n                                show\n                                set [m1 v] to [0]\n                                repeat until <<(M1) = [24]> or <not <(Level) = [13]>>>\n                                    turn right (7) degrees\n                                    change y by (8)\n                                    change [m1 v] by (1)\n                                end\n                                repeat until <<(M1) = [0]> or <not <(Level) = [13]>>>\n                                    turn right (7) degrees\n                                    change y by (-8)\n                                    change [m1 v] by (-1)\n                                end\n                            else\n                                if <(Level) = [14]> then\n                                    go to x: (-57) y: (-98)\n                                    show\n                                else\n                                    if <(Level) = [15]> then\n                                        go to x: (34) y: (99)\n                                        show\n                                    else\n                                        if <(Level) = [16]> then\n                                            go to x: (45) y: (103)\n                                            show\n                                        else\n                                            hide\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nrepeat (30)\n\nrepeat (30)\n    turn right (7) degrees\n    change x by (-5)\nend\n\nhide\n\ngo to (random position v)\n\nrepeat (24)\nrepeat (24)\n    turn right (7) degrees\n    change y by (-8)\nend\n\ngo to [back v] layer\n\nshow\n\n@Lasers2\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\nwait (0.05) seconds\nnext costume\n\ngo to [back v] layer\n\nwhen I receive [start v]\ngo to x: (0) y: (-160)\n\nwhen flag clicked\nshow\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\nwhen I receive [start v]\nset [ghost v] effect to (0)\nforever\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\n@LaserWall\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\n    if <<(Level) = [15]> and <(Opened?) = [0]>> then\n        go to x: (0) y: (0)\n        show\n    else\n        if <<(Level) = [16]> and <(Opened?) = [0]>> then\n            go to x: (0) y: (0)\n            show\n        else\n            if <<(Level) = [17]> and <(Opened?) = [0]>> then\n                go to x: (0) y: (0)\n                show\n            else\n                hide\n            end\n        end\n    end\nend\n\n@LaserWall2\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\n    if <<(Level) = [15]> and <(Opened?) = [0]>> then\n        go to x: (0) y: (0)\n        show\n    else\n        if <<(Level) = [16]> and <(Opened?) = [0]>> then\n            go to x: (0) y: (0)\n            show\n        else\n            if <<(Level) = [17]> and <(Opened?) = [0]>> then\n                go to x: (0) y: (0)\n                show\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen I receive [start v]\nshow\nforever\n    if <(Opened?) = [0]> then\n        if <touching color (#ffdb00)?> then\n            set [opened? v] to [1]\n        end\n    end\nend\n\n@Moving\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    if <(Level) = [18]> then\n        go to x: (-40) y: (-127)\n        show\n        change x by (3)\n        repeat until <<touching (figur9 v)?> or <not <(Level) = [18]>>>\n            change x by (3)\n        end\n        wait (1) seconds\n        change x by (-3)\n        repeat until <<touching (figur9 v)?> or <not <(Level) = [18]>>>\n            change x by (-3)\n        end\n        wait (1) seconds\n    else\n        hide\n    end\nend\n\nrepeat (30)\n\nrepeat (30)\n    turn right (7) degrees\n    change x by (-5)\nend\n\nhide\n\nwhen I receive [start v]\nshow\n\nrepeat (24)\nrepeat (24)\n    turn right (7) degrees\n    change y by (-8)\nend\n\ngo to [front v] layer\n\nshow\n\nshow\n\nset rotation style [left-right v]\n\nif <key (space v) pressed?> then\n    go to (mouse-pointer v)\nend\n\nwhen I receive [start v]\nshow\nforever\n    if <(Level) = [18]> then\n        show\n    else\n        hide\n    end\nend\n\n@Moving2\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    if <<(Level) = [19]> and <(Miniboss) > [0]>> then\n        go to x: (-94) y: (-97)\n        show\n        switch costume to (costume2 v)\n        change x by (6)\n        repeat until <<touching (figur9 v)?> or <not <(Level) = [19]>>>\n            change x by (6)\n        end\n        switch costume to (costume3 v)\n        change x by (-6)\n        repeat until <<touching (figur9 v)?> or <not <(Level) = [19]>>>\n            change x by (-6)\n        end\n    else\n        hide\n    end\nend\n\nrepeat (30)\n\nrepeat (30)\n    turn right (7) degrees\n    change x by (-5)\nend\n\nhide\n\nwhen I receive [start v]\nshow\n\nrepeat (24)\nrepeat (24)\n    turn right (7) degrees\n    change y by (-8)\nend\n\ngo to [front v] layer\n\nshow\n\nshow\n\nset rotation style [left-right v]\n\nwhen I receive [start v]\nshow\nforever\n    if <<(Level) = [19]> and <(Miniboss) > [0]>> then\n        show\n    else\n        hide\n    end\nend\n\nshow\n\ngo to [back v] layer\n\nwhen I receive [start v]\nshow\nforever\n    if <(Level) = [19]> then\n        set [miniboss v] to [3]\n        wait until <not <(Level) = [19]>>\n    end\nend\n\n@Sprite6\n\nwhen I receive [start v]\nshow\nforever\n    if <<(Level) = [19]> and <(Miniboss) > [0]>> then\n        show\n        go to (moving2 v)\n        switch costume to (Miniboss)\n    else\n        hide\n    end\nend\n\n@LaserWall3\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\n    if <<(Level) = [19]> and <(Miniboss) > [0]>> then\n        go to x: (0) y: (0)\n        show\n    else\n        hide\n    end\nend\n\n@Moving3\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    if <<(Level) = [20]> and <(Boss!) > [0]>> then\n        go to x: (0) y: (0)\n        show\n        set [faze1 v] to [1]\n        switch costume to (costume3 v)\n        create clone of (_myself_ v)\n        wait (6) seconds\n        set [faze1 v] to [2]\n        broadcast (KABOOM v)\n        wait (4) seconds\n        set [faze1 v] to [3]\n        broadcast (KOWABUNGA! v)\n        wait (3) seconds\n        set [faze1 v] to [4]\n        switch costume to (costume5 v)\n        wait (6) seconds\n    else\n        hide\n    end\nend\n\nrepeat (30)\n\nrepeat (30)\n    turn right (7) degrees\n    change x by (-5)\nend\n\nhide\n\nwhen I receive [start v]\nshow\n\nrepeat (24)\nrepeat (24)\n    turn right (7) degrees\n    change y by (-8)\nend\n\ngo to [front v] layer\n\nshow\n\nshow\n\nset rotation style [left-right v]\n\nwhen I receive [start v]\nshow\nforever\n    if <<(Level) = [20]> and <(Boss!) > [0]>> then\n        show\n    else\n        hide\n    end\nend\n\nshow\n\ngo to [back v] layer\n\nwhen I receive [start v]\nshow\nforever\n    if <(Level) = [20]> then\n        set [boss! v] to [3]\n        wait until <not <(Level) = [20]>>\n    end\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (0) y: (0)\nshow\nswitch costume to (costume1 v)\nset [ghost v] effect to (0)\npoint in direction (180)\nwait (3) seconds\nrepeat until <touching (figur9 v)?>\n    move (30) steps\nend\nswitch costume to (costume2 v)\nset [ghost v] effect to (50)\nwait (1) seconds\nrepeat (5)\n    change [ghost v] effect by (-10)\nend\nswitch costume to (costume4 v)\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nwait (0.1) seconds\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nwait (0.1) seconds\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nwait (0.1) seconds\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwait (0.3) seconds\n\n@Sprite7\n\nwhen flag clicked\nhide\n\nwhen I receive [kaboom v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nswitch costume to (costume1 v)\nset [ghost v] effect to (0)\nwait (1) seconds\nset [ghost v] effect to (100)\nswitch costume to (costume2 v)\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nwait (0.1) seconds\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nwait (0.1) seconds\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nwait (0.1) seconds\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwait (0.3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\n\n@Sprite8\n\nwhen flag clicked\nhide\n\nwhen I receive [kowabunga! v]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nswitch costume to (costume1 v)\nset [ghost v] effect to (0)\nwait (1) seconds\nset [ghost v] effect to (100)\nswitch costume to (costume2 v)\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nwait (0.1) seconds\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nwait (0.1) seconds\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nwait (0.1) seconds\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\n@Sprite9\n\nwhen I receive [start v]\nshow\nforever\n    if <<(Level) = [20]> and <(Boss!) > [0]>> then\n        show\n        go to (moving3 v)\n        switch costume to (Boss!)\n    else\n        hide\n    end\nend\n\n@Moving4\n\nwhen flag clicked\nhide\n\nrepeat (30)\n\nrepeat (30)\n    turn right (7) degrees\n    change x by (-5)\nend\n\nhide\n\nwhen I receive [start v]\nshow\n\nrepeat (24)\nrepeat (24)\n    turn right (7) degrees\n    change y by (-8)\nend\n\ngo to [front v] layer\n\nshow\n\nshow\n\nset rotation style [left-right v]\n\nwhen I receive [start v]\nshow\nforever\n    if <<<(Level) = [20]> and <(Boss!) > [0]>> and <(Faze1) = [1]>> then\n        show\n    else\n        hide\n    end\nend\n\nshow\n\ngo to [back v] layer\n\ngo [forward v] (1) layers\n\nwhen I receive [start v]\nshow\n\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\n\n@Moving5\n\nwhen flag clicked\nhide\n\nrepeat (30)\n\nrepeat (30)\n    turn right (7) degrees\n    change x by (-5)\nend\n\nhide\n\nwhen I receive [start v]\nshow\n\nrepeat (24)\nrepeat (24)\n    turn right (7) degrees\n    change y by (-8)\nend\n\ngo to [front v] layer\n\nshow\n\nshow\n\nset rotation style [left-right v]\n\nwhen I receive [start v]\nshow\nforever\n    if <<<(Level) = [20]> and <(Boss!) > [0]>> and <(Faze1) = [4]>> then\n        show\n    else\n        hide\n    end\nend\n\nshow\n\ngo to [back v] layer\n\ngo [forward v] (1) layers\n\nwhen I receive [start v]\nshow\n\nif <touching color (#ffdb00)?> then\n    set [playerhealth v] to [0]\nend\n\n@LaserWall4\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\n    if <<(Level) = [20]> and <(Boss!) > [0]>> then\n        go to x: (0) y: (0)\n        show\n    else\n        hide\n    end\nend\n\n@Sprite10\n\ngo to [back v] layer\n\nwhen I receive [start v]\nshow\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\n    if <touching color (#ffdb00)?> then\n        set [ghost v] effect to (0)\n    else\n        set [ghost v] effect to (40)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Sprite11\n\nwhen flag clicked\nset [skip v] to [0]\nforever\n    if <(Skip) > [2]> then\n        show\n        set [ghost v] effect to (0)\n        wait (1) seconds\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        wait until <not <(Skip) > [2]>>\n    else\n        hide\n    end\nend\n\n