☁online among us cloud platformer
@Stage\n\nwhen flag clicked\n\nwhen I receive [start v]\nset volume to (70) %\nforever\n    play sound [AMONG US - Menu Theme v] until done\nend\n\nwait (2) seconds\n\n@blank\n\n@player\n\nwhen flag clicked\nset [ghost v] effect to (100)\nswitch backdrop to (backdrop2 v)\nbroadcast (LVsilvers v) and wait\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [begin v]\nforever\n    player tick\n    send cloud data\nend\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ p8 v] to (value)\n                            else\n                                if <(player) = [9]> then\n                                    set [☁ p9 v] to (value)\n                                else\n                                    set [☁ p10 v] to (value)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine send cloud data\nif <(MY PLAYER #) < [1]> then\n    stop [this script v]\nend\nadd (x) to [buffer v]\nadd (y) to [buffer v]\nadd (costume [number v]) to [buffer v]\nadd (direction) to [buffer v]\nchange [cloud timer v] by (1)\nif <(cloud timer) < [4]> then\n    stop [this script v]\nend\nset [cloud timer v] to [0]\nset [encoded v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nrepeat (length of [buffer v])\n    write (item (1) of [buffer v]) to encoded\n    delete (1) of [buffer v]\nend\nset cloud # (MY PLAYER #) to (encoded)\n\ndefine player tick\ngo to x: ((x) - (scroll x)) y: ((y) - (scroll y))\nif <(died?) = [0]> then\n    if <(run?) = [1]> then\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > [10]>>> then\n            point in direction (90)\n            change [xv v] by (1)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < [-10]>>> then\n            point in direction (-90)\n            change [xv v] by (-1)\n        end\n    end\n    change x by (Xv)\n    set [xv v] to ((Xv) * (0.9))\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change x by ((Xv) * (-1.25))\n                            change y by (-5)\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-10]\n                                else\n                                    set [xv v] to [10]\n                                end\n                                set [yv v] to [15]\n                            else\n                                set [xv v] to [0]\n                            end\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 (ground v)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(run?) = [1]> then\n            if <touching (ground v)?> then\n                set [yv v] to [11.5]\n            end\n        end\n    end\n    change y by (1)\n    change [x v] by (round ((x position) - ((x) - (scroll x))))\n    change [y v] by (round ((y position) - ((y) - (scroll y))))\n    change [scroll x v] by (round (((x) - (scroll x)) / (10)))\n    change [scroll y v] by (round (((y) - (scroll y)) / (10)))\n    if <<key (space v) pressed?> or <(kill?) = [1]>> then\n        if <(pol) = [impostor]> then\n            set [costume# v] to [7]\n        end\n    else\n        if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n            change [costume# v] by (0.3)\n            if <(costume#) > [4]> then\n                set [costume# v] to [1]\n            end\n        else\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                change [costume# v] by (0.3)\n                if <(costume#) > [4]> then\n                    set [costume# v] to [1]\n                end\n            else\n                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                    set [costume# v] to [5]\n                else\n                    set [costume# v] to [6]\n                end\n            end\n        end\n    end\n    switch costume to (costume#)\nend\n\nswitch costume to (costume3 v)\n\ndefine move (x) (y)\ngo to x: (((x) + (x)) - (scroll x)) y: (((y) + (y)) - (scroll y))\nif <not <touching color (#000000)?>> then\n    change [x v] by (x)\n    change [y v] by (y)\nend\n\nwhen I receive [begin v]\nset [checkpoint v] to [0]\nforever\n    if <<<touching color (#8b8794)?> or <touching color (#efe8ff)?>> or <(y) < [-700]>> then\n        set [x v] to [0]\n        set [y v] to [0]\n        set [scroll x v] to [-5]\n        set [scroll y v] to [30]\n        if <(checkpoint) = [1]> then\n            set [x v] to [1048]\n            set [y v] to [523]\n            set [scroll x v] to [1044]\n            set [scroll y v] to [526]\n        end\n        if <(checkpoint) = [2]> then\n            set [x v] to [2056]\n            set [y v] to [871]\n            set [scroll x v] to [2052]\n            set [scroll y v] to [876]\n        end\n        if <(checkpoint) = [3]> then\n            set [x v] to [-919]\n            set [y v] to [1346]\n            set [scroll x v] to [-914]\n            set [scroll y v] to [1351]\n        end\n    end\n    if <(scroll y) < [-1605]> then\n        set [scroll y v] to [-1605]\n    end\n    if <(scroll y) > [1605]> then\n        set [scroll y v] to [1605]\n    end\n    if <(scroll x) < [-2147]> then\n        set [scroll x v] to [-2147]\n    end\n    if <(scroll x) > [2147]> then\n        set [scroll x v] to [2147]\n    end\n    set [check v] to (checkpoint)\nend\n\nwhen I receive [game v]\nset [ghost v] effect to (100)\nshow\ngo to x: (0) y: (0)\nset [task1 v] to [1]\nset [task2 v] to [1]\nset [task3 v] to [1]\nset [task4 v] to [1]\nset [check v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [checkpoint v] to [0]\nset [max player v] to [8]\nset [my player # v] to [0]\ndelete all of [buffer v]\nbroadcast (setup - opponent v) and wait\nswitch backdrop to (joining v)\nbroadcast (join game v) and wait\nif <(MY PLAYER #) > [0]> then\n    broadcast (Connected v)\nelse\n    broadcast (Full v)\nend\n\nwhen I receive [begin v]\nforever\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > [10]>>> then\n        if <(Yv) = [0]> then\n            play sound [Hallway6 v] until done\n        end\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < [-10]>>> then\n        if <(Yv) = [0]> then\n            play sound [Hallway6 v] until done\n        end\n    end\nend\n\nif  then\n\nwhen I receive [kill v]\nset [died? v] to [1]\nset [costume# v] to [8]\nswitch costume to (costume#)\nwait (5) seconds\nstop [other scripts in sprite v]\n\nwhen I receive [begin v]\nforever\n    if <(pol) = [impostor]> then\n        if <<touching (opponent v)?> and <key (space v) pressed?>> then\n            play sound [Kill v] until done\n        end\n    end\nend\n\nwhen flag clicked\n\nwait (5) seconds\nbroadcast (Connecting v) and wait\n\nwhen I receive [start v]\nset [ghost v] effect to (0)\nswitch backdrop to (blank v)\nbroadcast (begin v)\n\nwhen I receive [toch v]\n\nset [costume# v] to [7]\n\nset [costume# v] to [7]\n\nwhen flag clicked\nset [died? v] to [0]\n\nbroadcast (begin v) and wait\n\nwhen [space v] key pressed\nif <not <<(red) = [1]> and <<(yellow) = [1]> and <(green) = [1]>>>> then\n    if <not <(pol) = [impostor]>> then\n        if <(task1) > [0]> then\n            if <touching (task1 v)?> then\n                broadcast (task1 v)\n                set [task1 v] to [0]\n            end\n        else\n            broadcast (exit task1 v)\n            set [task1 v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nset [red v] to [0]\nset [yellow v] to [0]\nset [green v] to [0]\n\nwhen [space v] key pressed\nif <not <(-\(among\)-) = [1]>> then\n    if <not <(pol) = [impostor]>> then\n        if <(task2) > [0]> then\n            if <touching (task2 v)?> then\n                broadcast (task2 v)\n                set [task2 v] to [0]\n            end\n        else\n            broadcast (exit task2 v)\n            set [task2 v] to [1]\n        end\n    end\nend\n\nwhen [space v] key pressed\n\nwhen I receive [toch task? v]\nif <not <<(red) = [1]> and <<(yellow) = [1]> and <(green) = [1]>>>> then\n    if <not <(pol) = [impostor]>> then\n        if <(task1) > [0]> then\n            if <touching (task1 v)?> then\n                broadcast (task1 v)\n                set [task1 v] to [0]\n            end\n        else\n            broadcast (exit task1 v)\n            set [task1 v] to [1]\n        end\n    end\nend\n\nwhen I receive [toch task? v]\nif <not <(-\(among\)-) = [1]>> then\n    if <not <(pol) = [impostor]>> then\n        if <(task2) > [0]> then\n            if <touching (task2 v)?> then\n                broadcast (task2 v)\n                set [task2 v] to [0]\n            end\n        else\n            broadcast (exit task2 v)\n            set [task2 v] to [1]\n        end\n    end\nend\n\nwhen [space v] key pressed\nif <(completed scaner) = [0]> then\n    if <not <(pol) = [impostor]>> then\n        if <(task3) > [0]> then\n            if <touching (task3 v)?> then\n                broadcast (task3 v)\n                set [task3 v] to [0]\n            end\n        else\n            broadcast (exit task2 v)\n            set [task3 v] to [1]\n        end\n    end\nend\n\nwhen I receive [toch task? v]\nif <(completed scaner) = [0]> then\n    if <not <(pol) = [impostor]>> then\n        if <(task3) > [0]> then\n            if <touching (task3 v)?> then\n                broadcast (task3 v)\n                set [task3 v] to [0]\n            end\n        else\n            broadcast (exit task2 v)\n            set [task3 v] to [1]\n        end\n    end\nend\n\nwhen [space v] key pressed\nif <not <(course) = [10]>> then\n    if <not <(pol) = [impostor]>> then\n        if <(task4) > [0]> then\n            if <touching (task4 v)?> then\n                broadcast (task4 v)\n                set [task4 v] to [0]\n            end\n        else\n            broadcast (exit task4 v)\n            set [task4 v] to [1]\n        end\n    end\nend\n\nwhen I receive [stop v]\nset [x v] to [-543]\nset [y v] to [-367]\n\nwhen I receive [toch task? v]\nif <not <(course) = [10]>> then\n    if <not <(pol) = [impostor]>> then\n        if <(task4) > [0]> then\n            if <touching (task4 v)?> then\n                broadcast (task4 v)\n                set [task4 v] to [0]\n            end\n        else\n            broadcast (exit task4 v)\n            set [task4 v] to [1]\n        end\n    end\nend\n\n@opponent\n\ndefine begin decoded of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine val=read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\ndefine setup players\ndelete all of [buffer v]\nset [color v] effect to (0)\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYER) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        tick\n        position ((x) - (scroll x)) and ((y) - (scroll y))\n    end\nend\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ P9)\n                                else\n                                    set [value v] to (☁ P10)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup - opponent v]\nsetup players\n\ndefine tick\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        start sound [Player_SpawnIn2 v]\n        show\n    end\n    set [offline v] to [0]\n    begin decoded of (value)\n    val=read from encoded\n    say (join (player #) (join [ : ] (value)))\n    val=read from encoded\n    val=read from encoded\n    repeat until <(value) = []>\n        add (value) to [buffer v]\n        val=read from encoded\n    end\n    switch costume to (value)\n    val=read from encoded\n    broadcast (decode chat v)\n    if <(pol) = [crewmate]> then\n        if <<touching (player v)?> and <(costume [number v]) = [7]>> then\n            broadcast (kill v)\n        end\n    end\nend\nif <(length of [buffer v]) > [0]> then\n    set [x v] to (item (1) of [buffer v])\n    delete (1) of [buffer v]\n    set [y v] to (item (1) of [buffer v])\n    delete (1) of [buffer v]\n    switch costume to (item (1) of [buffer v])\n    delete (1) of [buffer v]\n    point in direction (item (1) of [buffer v])\n    delete (1) of [buffer v]\nend\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\nset x to (-203)\n\nset y to (180)\n\ndelete (1) of [buffer v]\ndelete (1) of [buffer v]\n\ndefine position (x) and (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (100)\nend\n\nsay (value) for (4) seconds\nval=read from encoded\n\nwhen I receive [decode chat v]\ndecode chat (value)\n\ndefine decode chat (chat)\nif <(chat) = [1]> then\n    say (item (1) of [chat v]) for (2) seconds\nelse\n    if <(chat) = [2]> then\n        say (item (2) of [chat v]) for (2) seconds\n    else\n        if <(chat) = [3]> then\n            say (item (3) of [chat v]) for (2) seconds\n        end\n    end\nend\n\n@ground\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\nset size to (1000) %\nswitch costume to (costume1 v)\nforever\n    go to x: ((x) - (scroll x)) y: ((y) - (scroll y))\n    go to [back v] layer\nend\n\nwhen I receive [begin v]\nshow\n\nwhen I receive [win v]\nhide\n\n@Sprite4\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\n\n@background\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\nset size to (1000) %\nswitch costume to (costume1 v)\nforever\n    go to x: ((x) - (scroll x)) y: ((y) - (scroll y))\n    go to [back v] layer\nend\n\nwhen I receive [begin v]\nshow\n\nwhen I receive [win v]\nhide\n\n@LVsilvers\n\nwhen I start as a clone\nshow\nif <(id) = [1]> then\n    switch costume to (2 v)\n    go to x: (-240) y: (0)\n    glide (1) secs to x: (-30) y: (0)\nend\nif <(id) = [2]> then\n    switch costume to (3 v)\n    go to x: (240) y: (0)\n    glide (1) secs to x: (30) y: (0)\nend\nif <(id) = [3]> then\n    switch costume to (4 v)\n    start sound [Ricochet v]\n    go to x: (240) y: (-40)\n    glide (0.3) secs to x: (30) y: (-40)\n    wait (1) seconds\n    broadcast (game v)\n    broadcast (Connecting v)\nend\n\nwhen I receive [lvsilvers v]\nrepeat (2)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\nwait (1) seconds\nchange [id v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [id v] to [0]\ndelete this clone\n\nwhen I receive [game v]\ndelete this clone\n\n@Joining\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nhide\n\nwhen I receive [connecting v]\nswitch costume to (joining v)\nshow\n\nwhen I receive [connected v]\ngo [forward v] (1322) layers\nstart sound [Connect v]\nswitch costume to (connected v)\nshow\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (romdom v)\n\nwhen I receive [full v]\nswitch costume to (full  v)\nshow\n\n@Loading\n\nwhen flag clicked\ngo [forward v] (213) layers\nset size to (100) %\nhide\npoint in direction (90)\nclear graphic effects\ngo to x: (0) y: (-80)\n\nwhen I receive [connecting v]\nrepeat (11)\n    create clone of (_myself_ v)\n    turn right (40) degrees\nend\n\nwhen I receive [connected v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (100)\nforever\n    repeat (20)\n        turn right (7.5) degrees\n        change [ghost v] effect by (-6)\n        change size by (1)\n    end\n    repeat (20)\n        turn right (7.5) degrees\n        change [ghost v] effect by (6)\n        change size by (-1)\n    end\nend\n\nbroadcast (romdom v)\n\nwhen I receive [connecting v]\nwait (8) seconds\n\n@1\n\nwhen I receive [kill v]\nshow\nstart sound [301abd81-edc2-4c2a-a341-e2f09c9935bd v]\nswitch costume to (1 v)\nrepeat (4)\n    next costume\n    wait (0.0) seconds\nend\nbroadcast (gif v)\n\nwhen flag clicked\nhide\n\nwhen I receive [gif hide v]\nhide\nwait (8) seconds\nstop [all v]\n\n@gif\n\nwhen I receive [gif v]\nshow\nswitch costume to (89b33ada4012ac281f51376ac03992da v)\nrepeat (46)\n    next costume\n    wait (0.1) seconds\nend\nhide\nbroadcast (gif hide v)\n\nwhen flag clicked\nhide\n\n@Sprite1\n\nwhen I receive [romdom v]\ngo to [front v] layer\nshow\nif <(pick random (1) to (4)) = [1]> then\n    switch costume to (costume2 v)\n    set [pol v] to [impostor]\nelse\n    switch costume to (costume1 v)\n    set [pol v] to [crewmate]\nend\nplay sound [get_info v] until done\nbroadcast (start v)\nhide\n\nwhen flag clicked\nhide\n\n@costume1\n\nwhen flag clicked\nset [kill? v] to [0]\nhide\n\nwhen I receive [start v]\ngo to [front v] layer\nif <(pol) = [impostor]> then\n    go to x: (101) y: (-137)\n    show\nelse\n    hide\nend\n\nwhen this sprite clicked\nset [kill? v] to [1]\nwait (0.5) seconds\nset [kill? v] to [0]\n\nbroadcast (toch v)\n\n@use\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\ngo to x: (187) y: (-136)\ngo to [front v] layer\nshow\n\nwhen this sprite clicked\nbroadcast (toch task? v)\n\nwhen I receive [task1 v]\nhide\n\nwhen I receive [task2 v]\nhide\n\nwhen I receive [task4 v]\nhide\n\nwhen I receive [exit task1 v]\ngo to x: (187) y: (-136)\ngo to [front v] layer\nshow\n\nwhen I receive [exit task2 v]\ngo to x: (187) y: (-136)\ngo to [front v] layer\nshow\n\nwhen I receive [exit task4 v]\ngo to x: (187) y: (-136)\ngo to [front v] layer\nshow\n\nwhen I receive [task completed v]\ngo to x: (187) y: (-136)\ngo to [front v] layer\nshow\n\nwhen I receive [task completed2 v]\ngo to x: (187) y: (-136)\ngo to [front v] layer\nshow\n\nwhen I receive [task completed4 v]\ngo to x: (187) y: (-136)\ngo to [front v] layer\nshow\n\n@task1\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\nset size to (100) %\nswitch costume to (costume1 v)\nset [x v] to [-305]\nset [y v] to [260]\nforever\n    go to x: ((x) - (scroll x)) y: ((y) - (scroll y))\n    go to [back v] layer\n    if <(costume [number v]) = [2]> then\n        if <touching (_edge_ v)?> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I receive [begin v]\nshow\n\nwhen I receive [task completed v]\nswitch costume to (costume2 v)\n\n@Sprite5\n\nwhen I receive [task1 v]\nset [run? v] to [0]\nset [click? v] to [0]\nswitch costume to (fg v)\nstart sound [Open v]\nshow\nforever\n    if <<(red) = [1]> and <<(yellow) = [1]> and <(green) = [1]>>> then\n        broadcast (task completed v) and wait\n    end\nend\n\nwhen I receive [exit task1 v]\nset [run? v] to [1]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nerase all\nif <(id) = [1]> then\n    go to x: (-150) y: (100)\n    show\n    go to [front v] layer\n    switch costume to (2r v)\n    point in direction (-90)\nend\nif <(id) = [2]> then\n    go to x: (-130) y: (100)\n    show\n    go to [front v] layer\n    switch costume to (2l v)\n    point in direction (90)\nend\nif <(id) = [3]> then\n    go to x: (-150) y: (0)\n    show\n    go to [front v] layer\n    switch costume to (2r2 v)\n    point in direction (-90)\nend\nif <(id) = [4]> then\n    go to x: (-130) y: (0)\n    show\n    go to [front v] layer\n    switch costume to (2l2 v)\n    point in direction (90)\nend\nif <(id) = [5]> then\n    go to x: (-150) y: (-100)\n    show\n    go to [front v] layer\n    switch costume to (2r3 v)\n    point in direction (-90)\nend\nif <(id) = [6]> then\n    go to x: (-130) y: (-100)\n    show\n    go to [front v] layer\n    switch costume to (2l3 v)\n    point in direction (90)\nend\n\nwhen I receive [task1 v]\nset [id v] to [0]\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nchange [id v] by (1)\ncreate clone of (_myself_ v)\n\nchange [id v] by (1)\ncreate clone of (_myself_ v)\n\nif <key (space v) pressed?> then\n    broadcast (exit task1 v)\nend\n\nwait (1) seconds\n\nwhen this sprite clicked\nif <(id) = [2]> then\n    set [click? v] to [1]\nend\nif <(id) = [4]> then\n    set [click? v] to [2]\nend\nif <(id) = [6]> then\n    set [click? v] to [3]\nend\n\ngo to (mouse-pointer v)\n\nset [☁ p1 v] to [0]\n\ncreate clone of (_myself_ v)\n\npoint towards (mouse-pointer v)\nmove (4) steps\n\ngo to x: (-130) y: (100)\npoint in direction (90)\nerase all\n\nrepeat until <mouse down?>\nset [red v] to [0]\n\nif <(id) = [0]> then\n    show\n    go to [front v] layer\n    switch costume to (2l v)\nend\n\nset [red v] to [1]\n\nwhen I receive [task completed v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@red\n\nwhen I receive [task1 v]\nset [red v] to [0]\nshow\nforever\n    if <(click?) = [1]> then\n        repeat until <not <mouse down?>>\n            point towards (mouse-pointer v)\n            move (5) steps\n            create clone of (_myself_ v)\n            if <touching (red2 v)?> then\n                set [red v] to [1]\n                stop [this script v]\n            end\n        end\n    end\n    go to x: (-130) y: (100)\n    point in direction (90)\n    delete this clone\nend\n\nwhen flag clicked\nerase all\nhide\n\nwhen I receive [exit task1 v]\nhide\nset [red v] to [0]\ndelete this clone\n\nwhen this sprite clicked\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nforever\n    repeat until <not <mouse down?>>\n        if <(red) = [1]> then\n            stop [this script v]\n        end\n    end\n    delete this clone\nend\n\nwhen I receive [task completed v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@red2\n\nwhen I receive [task1 v]\ngo to x: (140) y: (0)\nshow\n\nwhen I receive [exit task1 v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [task completed v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@yellow\n\nwhen I receive [task1 v]\ngo to x: (140) y: (100)\nshow\n\nwhen I receive [exit task1 v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [task completed v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@yellow2\n\nwhen I receive [task1 v]\nset [yellow v] to [0]\nshow\nforever\n    if <(click?) = [2]> then\n        repeat until <not <mouse down?>>\n            point towards (mouse-pointer v)\n            move (5) steps\n            create clone of (_myself_ v)\n            if <touching (yellow v)?> then\n                set [yellow v] to [1]\n                stop [this script v]\n            end\n        end\n    end\n    go to x: (-130) y: (0)\n    point in direction (90)\n    delete this clone\nend\n\nwhen flag clicked\nerase all\nhide\n\nwhen I receive [exit task1 v]\nhide\nset [yellow v] to [0]\ndelete this clone\n\nwhen this sprite clicked\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nforever\n    repeat until <not <mouse down?>>\n        if <(red) = [1]> then\n            stop [this script v]\n        end\n    end\n    delete this clone\nend\n\nwhen I receive [task completed v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@green\n\nwhen I receive [task1 v]\ngo to x: (140) y: (-100)\nshow\n\nwhen I receive [exit task1 v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [task completed v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@green2\n\nwhen I receive [task1 v]\nset [green v] to [0]\nshow\nforever\n    if <(click?) = [3]> then\n        repeat until <not <mouse down?>>\n            point towards (mouse-pointer v)\n            move (5) steps\n            create clone of (_myself_ v)\n            if <touching (green v)?> then\n                set [green v] to [1]\n                stop [this script v]\n            end\n        end\n    end\n    go to x: (-130) y: (-100)\n    point in direction (90)\n    delete this clone\nend\n\nwhen flag clicked\nerase all\nhide\n\nwhen I receive [exit task1 v]\nhide\nset [green v] to [0]\ndelete this clone\n\nwhen this sprite clicked\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nforever\n    repeat until <not <mouse down?>>\n        if <(green) = [1]> then\n            stop [this script v]\n        end\n    end\n    delete this clone\nend\n\nwhen I receive [task completed v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@task_finished\n\nwhen flag clicked\nhide\n\nwhen I receive [task completed v]\nset [run? v] to [1]\nshow\nstart sound [task_complete v]\ngo to x: (0) y: (-500)\nrepeat (5)\n    change y by (40)\nend\nwait (1) seconds\nhide\n\nwhen I receive [task completed2 v]\nset [run? v] to [1]\nshow\nstart sound [task_complete v]\ngo to x: (0) y: (-500)\nrepeat (5)\n    change y by (40)\nend\nwait (1) seconds\nhide\n\nwhen I receive [task completed3 v]\nshow\nset [run? v] to [1]\nstart sound [task_complete v]\ngo to x: (0) y: (-500)\nrepeat (5)\n    change y by (40)\nend\nwait (1) seconds\nhide\n\nwhen I receive [task completed4 v]\nset [run? v] to [1]\nshow\nstart sound [task_complete v]\ngo to x: (0) y: (-500)\nrepeat (5)\n    change y by (40)\nend\nwait (1) seconds\nhide\n\n@task2\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\nset size to (100) %\nswitch costume to (costume1 v)\nset [x v] to [900]\nset [y v] to [-50]\nforever\n    go to x: ((x) - (scroll x)) y: ((y) - (scroll y))\n    go to [back v] layer\n    if <(costume [number v]) = [2]> then\n        if <touching (_edge_ v)?> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nset [x v] to [305]\nset [y v] to [0]\n\nwhen I receive [begin v]\nshow\n\nwhen I receive [task completed2 v]\nswitch costume to (costume2 v)\n\n@Sprite13\n\nwhen I receive [task2 v]\nset [run? v] to [0]\nset [id v] to [0]\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nchange [id v] by (1)\ncreate clone of (_myself_ v)\nset [id v] to [0]\n\nwhen I start as a clone\nswitch costume to (costume2 v)\ngo to x: (26) y: (-30)\ngo to [front v] layer\nshow\n\nwhen flag clicked\nset [run? v] to [1]\nset [-\(among\)- v] to [0]\nhide\n\nwhen this sprite clicked\nif <(id) = [1]> then\n    repeat until <not <mouse down?>>\n        go to (mouse-pointer v)\n        if <<(x position) > [-30]> and <<(x position) < [30]> and <<(y position) > [-30]> and <(y position) < [30]>>>> then\n            set [-\(among\)- v] to [1]\n            broadcast (task completed2 v) and wait\n        end\n    end\nend\n\nwhen I receive [exit task2 v]\nset [run? v] to [1]\nhide\ndelete this clone\n\nwhen I receive [task completed2 v]\nhide\ndelete this clone\n\n@task3\n\nwhen flag clicked\nhide\nswitch costume to (costume2 v)\nset size to (100) %\nswitch costume to (costume1 v)\nset [x v] to [-550]\nset [y v] to [-390]\nforever\n    go to x: ((x) - (scroll x)) y: ((y) - (scroll y))\n    go to [back v] layer\n    if <(costume [number v]) = [2]> then\n        if <touching (_edge_ v)?> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nset [x v] to [-900]\nset [y v] to [-150]\n\nwhen I receive [begin v]\nshow\n\nwhen I receive [task completed3 v]\nswitch costume to (costume2 v)\n\n@scaner\n\nwhen I receive [task3 v]\ngo to x: (0) y: (-20)\nshow\nrepeat (20)\n    change y by (1)\n    set [scroll x v] to [-546]\n    set [scroll y v] to [-362]\n    broadcast (stop v)\nend\nrepeat (20)\n    change y by (-1)\n    set [scroll x v] to [-546]\n    set [scroll y v] to [-362]\n    broadcast (stop v)\nend\nrepeat (20)\n    change y by (1)\n    set [scroll x v] to [-546]\n    set [scroll y v] to [-362]\n    broadcast (stop v)\nend\nrepeat (20)\n    change y by (-1)\n    set [scroll x v] to [-546]\n    set [scroll y v] to [-362]\n    broadcast (stop v)\nend\nset [completed scaner v] to [1]\nbroadcast (task completed3 v) and wait\n\nwhen I receive [task completed3 v]\nhide\n\nwhen flag clicked\nset [completed scaner v] to [0]\nhide\n\n@task4\n\nwhen flag clicked\nhide\nswitch costume to (task2 v)\nset size to (100) %\nswitch costume to (task4 v)\nset [x v] to [-2000]\nset [y v] to [250]\nforever\n    go to x: ((x) - (scroll x)) y: ((y) - (scroll y))\n    go to [back v] layer\n    if <(costume [number v]) = [2]> then\n        if <touching (_edge_ v)?> then\n            hide\n        else\n            show\n        end\n    end\nend\n\nwhen I receive [begin v]\nshow\n\nwhen I receive [task completed4 v]\nswitch costume to (task2 v)\n\n@Sprite2\n\nwhen I receive [task4 v]\nset [run? v] to [0]\nset [reactor index v] to [0]\nif <[1] = [1]> then\n    delete this clone\nend\nbroadcast (add clones v)\nswitch costume to (reactor_manifolds_bg v)\ngo to x: (0) y: (-500)\nshow\nstart sound [Panel_GenericAppear-sharedassets0 v]\nrepeat (7)\n    change y by (40)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [exit task4 v]\nset [run? v] to [1]\nhide\n\nwhen I receive [task completed4 v]\nhide\n\n@Sprite3\n\ndefine add clones\ngo to x: (-180) y: (5)\nrepeat (2)\n    repeat (5)\n        change x by (65)\n        change [romdom reactor v] by (1)\n        create clone of (_myself_ v)\n    end\n    set x to (-180)\n    change y by (-65)\nend\n\nswitch costume to (item (romdom reactor's) of [_list reacrtor's v])\n\nwhen flag clicked\nhide\ndelete this clone\n\nwhen I receive [exit task4 v]\nhide\n\nwhen I start as a clone\nswitch costume to (item (romdom reactor) of [_list reacrtor's v])\nwait (0.3) seconds\nshow\ngo to [front v] layer\nset [color v] effect to (0)\nforever\nend\n\nwhen I receive [add clones v]\nset [course v] to [1]\nset [romdom reactor v] to [0]\nif <[50] = [50]> then\n    delete this clone\nend\nadd clones\n\nwhen this sprite clicked\nif <(course) = [1]> then\n    if <(costume [number v]) = [1]> then\n        set [color v] effect to (100)\n        set [course v] to [2]\n    else\n        broadcast (error v)\n        set [course v] to [1]\n    end\nelse\n    if <(course) = [2]> then\n        if <(costume [number v]) = [2]> then\n            set [color v] effect to (100)\n            set [course v] to [3]\n        else\n            broadcast (error v)\n            set [course v] to [1]\n        end\n    else\n        if <(course) = [3]> then\n            if <(costume [number v]) = [3]> then\n                set [color v] effect to (100)\n                set [course v] to [4]\n            else\n                broadcast (error v)\n                set [course v] to [1]\n            end\n        else\n            if <(course) = [4]> then\n                if <(costume [number v]) = [4]> then\n                    set [color v] effect to (100)\n                    set [course v] to [5]\n                else\n                    broadcast (error v)\n                    set [course v] to [1]\n                end\n            else\n                if <(course) = [5]> then\n                    if <(costume [number v]) = [5]> then\n                        set [color v] effect to (100)\n                        set [course v] to [6]\n                    else\n                        broadcast (error v)\n                        set [course v] to [1]\n                    end\n                else\n                    if <(course) = [6]> then\n                        if <(costume [number v]) = [6]> then\n                            set [color v] effect to (100)\n                            set [course v] to [7]\n                        else\n                            broadcast (error v)\n                            set [course v] to [1]\n                        end\n                    else\n                        if <(course) = [7]> then\n                            if <(costume [number v]) = [7]> then\n                                set [color v] effect to (100)\n                                set [course v] to [8]\n                            else\n                                broadcast (error v)\n                                set [course v] to [1]\n                            end\n                        else\n                            if <(course) = [8]> then\n                                if <(costume [number v]) = [8]> then\n                                    set [color v] effect to (100)\n                                    set [course v] to [9]\n                                else\n                                    broadcast (error v)\n                                    set [course v] to [1]\n                                end\n                            else\n                                if <(course) = [9]> then\n                                    if <(costume [number v]) = [9]> then\n                                        set [color v] effect to (100)\n                                        set [course v] to [10]\n                                    else\n                                        broadcast (error v)\n                                        set [course v] to [1]\n                                    end\n                                else\n                                    if <(course) = [10]> then\n                                        if <(costume [number v]) = [10]> then\n                                            set [color v] effect to (100)\n                                            broadcast (task completed4 v) and wait\n                                        else\n                                            broadcast (error v)\n                                            set [course v] to [1]\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 [error v]\nset [color v] effect to (60)\nwait (0.5) seconds\nset [color v] effect to (0)\nwait (0.5) seconds\nset [color v] effect to (60)\nwait (0.5) seconds\nset [color v] effect to (0)\nwait (0.5) seconds\n\nif  then\nend\n\nwhen flag clicked\nset [course v] to [1]\n\nwhen I receive [task completed4 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n
\nhere you can become an impostor and kill whoever you want just be careful because you yourself can be killed