❆ Christmas || A Multiplayer Platformer ❆
@Stage\n\nwhen flag clicked\nset volume to (100) %\nplay sound [brrrr \(Its cold\) v] until done\n\nwhen flag clicked\nforever\n    play sound [Spectre v] until done\n    wait (1) seconds\nend\n\nwhen I receive [win!! v]\nrepeat (90)\n    change volume by (-0.9)\nend\nstop [other scripts in sprite v]\nstop all sounds\n\nwhen I receive [begin v]\nset [sec v] to [0]\nforever\n    wait (1) seconds\n    change [sec v] by (1)\n    if <(sec) > [25]> then\n        set [active? v] to [0]\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nset [active? v] to [1]\n\nwhen I receive [begin v]\nif <not <(username) = [stsha001]>> then\n    forever\n        wait until <<key (any v) pressed?> or <mouse down?>>\n        set [sec v] to [0]\n    end\nelse\n    forever\n        set [sec v] to [0]\n    end\nend\n\nforever\n    if <(MY PLAYER #) > [1]> then\n        if <(item ((MY PLAYER #) - (1)) of [active v]) = []> then\n            set [my player # v] to ((MY PLAYER #) - (1))\n        end\n    end\nend\n\nwhen I receive [begin v]\nwait (1) seconds\nforever\n    set [2 v] to (2 \(\))\n    wait (2.5) seconds\n    if <(2 \(\)) = (2)> then\n        wait (0.5) seconds\n        if <(2 \(\)) = (2)> then\n            replace item (2) of [active v] with []\n        else\n            replace item (2) of [active v] with [Yes]\n        end\n    else\n        replace item (2) of [active v] with [Yes]\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(TIME) > [1200]> then\n        set [active? v] to [0]\n        stop [all v]\n    end\nend\n\nforever\n    if <<(☁ Ping) = [1]> and <(Ping test?) = [0]>> then\n        set [☁ ping v] to [0]\n    end\nend\n\nwhen flag clicked\nset [ping v] to [0.3]\n\nwhen flag clicked\nforever\n    change [mi v] by (1)\n    wait (0.1) seconds\nend\n\nset [ping test? v] to [0]\nforever\n    wait until <(MY PLAYER #) > [1]>\n    wait until <(☁ Ping) = [0]>\n    wait (pick random (0.1) to (0.3)) seconds\n    set [ping test? v] to [1]\n    set [mi v] to [0]\n    set [☁ ping v] to [1]\n    wait until <(☁ Ping) = [0]>\n    set [ping v] to ((round ((mi) / (2))) + (0.3))\n    set [ping test? v] to [0]\n    wait (5) seconds\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    set [1 v] to (1 \(\))\n    wait (2.5) seconds\n    if <(1 \(\)) = (1)> then\n        wait (0.5) seconds\n        if <(1 \(\)) = (1)> then\n            replace item (1) of [active v] with []\n        else\n            replace item (1) of [active v] with [Yes]\n        end\n    else\n        replace item (1) of [active v] with [Yes]\n    end\nend\n\nwhen flag clicked\nforever\n    set [3 v] to (3 \(\))\n    wait (2.5) seconds\n    if <(3 \(\)) = (3)> then\n        wait (0.5) seconds\n        if <(3 \(\)) = (3)> then\n            replace item (3) of [active v] with []\n        else\n            replace item (3) of [active v] with [Yes]\n        end\n    else\n        replace item (3) of [active v] with [Yes]\n    end\nend\n\nwhen flag clicked\nforever\n    set [4 v] to (4 \(\))\n    wait (2.5) seconds\n    if <(4 \(\)) = (4)> then\n        wait (0.5) seconds\n        if <(4 \(\)) = (4)> then\n            replace item (4) of [active v] with []\n        else\n            replace item (4) of [active v] with [Yes]\n        end\n    else\n        replace item (4) of [active v] with [Yes]\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    set [8 v] to (8 \(\))\n    wait (2.5) seconds\n    if <(8 \(\)) = (8)> then\n        wait (0.5) seconds\n        if <(8 \(\)) = (8)> then\n            replace item (8) of [active v] with []\n        else\n            replace item (8) of [active v] with [Yes]\n        end\n    else\n        replace item (8) of [active v] with [Yes]\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    set [7 v] to (7 \(\))\n    wait (2.5) seconds\n    if <(7 \(\)) = (7)> then\n        wait (0.5) seconds\n        if <(7 \(\)) = (7)> then\n            replace item (7) of [active v] with []\n        else\n            replace item (7) of [active v] with [Yes]\n        end\n    else\n        replace item (7) of [active v] with [Yes]\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    set [6 v] to (6 \(\))\n    wait (2.5) seconds\n    if <(6 \(\)) = (6)> then\n        wait (0.5) seconds\n        if <(6 \(\)) = (6)> then\n            replace item (6) of [active v] with []\n        else\n            replace item (6) of [active v] with [Yes]\n        end\n    else\n        replace item (6) of [active v] with [Yes]\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    set [5 v] to (5 \(\))\n    wait (2.5) seconds\n    if <(5 \(\)) = (5)> then\n        wait (0.5) seconds\n        if <(5 \(\)) = (5)> then\n            replace item (5) of [active v] with []\n        else\n            replace item (5) of [active v] with [Yes]\n        end\n    else\n        replace item (5) of [active v] with [Yes]\n    end\nend\n\nwhen flag clicked\nforever\n    set [9 v] to (9 \(\))\n    wait (2.5) seconds\n    if <(9 \(\)) = (9)> then\n        wait (0.5) seconds\n        if <(9 \(\)) = (9)> then\n            replace item (9) of [active v] with []\n        else\n            replace item (9) of [active v] with [Yes]\n        end\n    else\n        replace item (9) of [active v] with [Yes]\n    end\nend\n\nwhen flag clicked\nforever\n    set [1 \(\) v] to (join (letter ((length of (☁ 1)) - (7)) of (☁ 1)) (join (letter ((length of (☁ 1)) - (6)) of (☁ 1)) (join (letter ((length of (☁ 1)) - (5)) of (☁ 1)) (letter ((length of (☁ 1)) - (4)) of (☁ 1)))))\n    set [2 \(\) v] to (join (letter ((length of (☁ 2)) - (7)) of (☁ 2)) (join (letter ((length of (☁ 2)) - (6)) of (☁ 2)) (join (letter ((length of (☁ 2)) - (5)) of (☁ 2)) (letter ((length of (☁ 2)) - (4)) of (☁ 2)))))\n    set [3 \(\) v] to (join (letter ((length of (☁ 3)) - (7)) of (☁ 3)) (join (letter ((length of (☁ 3)) - (6)) of (☁ 3)) (join (letter ((length of (☁ 3)) - (5)) of (☁ 3)) (letter ((length of (☁ 3)) - (4)) of (☁ 3)))))\n    set [4 \(\) v] to (join (letter ((length of (☁ 4)) - (7)) of (☁ 4)) (join (letter ((length of (☁ 4)) - (6)) of (☁ 4)) (join (letter ((length of (☁ 4)) - (5)) of (☁ 4)) (letter ((length of (☁ 4)) - (4)) of (☁ 4)))))\n    set [5 \(\) v] to (join (letter ((length of (☁ 5)) - (7)) of (☁ 5)) (join (letter ((length of (☁ 5)) - (6)) of (☁ 5)) (join (letter ((length of (☁ 5)) - (5)) of (☁ 5)) (letter ((length of (☁ 5)) - (4)) of (☁ 5)))))\n    set [6 \(\) v] to (join (letter ((length of (☁ 6)) - (7)) of (☁ 6)) (join (letter ((length of (☁ 6)) - (6)) of (☁ 6)) (join (letter ((length of (☁ 6)) - (5)) of (☁ 6)) (letter ((length of (☁ 6)) - (4)) of (☁ 6)))))\n    set [7 \(\) v] to (join (letter ((length of (☁ 7)) - (7)) of (☁ 7)) (join (letter ((length of (☁ 7)) - (6)) of (☁ 7)) (join (letter ((length of (☁ 7)) - (5)) of (☁ 7)) (letter ((length of (☁ 7)) - (4)) of (☁ 7)))))\n    set [8 \(\) v] to (join (letter ((length of (☁ 8)) - (7)) of (☁ 8)) (join (letter ((length of (☁ 8)) - (6)) of (☁ 8)) (join (letter ((length of (☁ 8)) - (5)) of (☁ 8)) (letter ((length of (☁ 8)) - (4)) of (☁ 8)))))\n    set [9 \(\) v] to (join (letter ((length of (☁ 9)) - (7)) of (☁ 9)) (join (letter ((length of (☁ 9)) - (6)) of (☁ 9)) (join (letter ((length of (☁ 9)) - (5)) of (☁ 9)) (letter ((length of (☁ 9)) - (4)) of (☁ 9)))))\nend\n\n@Player\n\ndefine send cloud data\nset cloud # (MY PLAYER #) to (encoded)\n\nwhen flag clicked\nset [encoded v] to []\nif <not <(username) = [stsha001]>> then\n    write (username) to encoded\nelse\n    write [stsha001*] to encoded\nend\nset [user v] to (encoded)\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ 1 v] to (join (value) (LEVEL))\nelse\n    if <(player) = [2]> then\n        set [☁ 2 v] to (join (value) (level))\n    else\n        if <(player) = [3]> then\n            set [☁ 3 v] to (join (value) (level))\n        else\n            if <(player) = [4]> then\n                set [☁ 4 v] to (join (value) (level))\n            else\n                if <(player) = [5]> then\n                    set [☁ 5 v] to (join (value) (level))\n                else\n                    if <(player) = [6]> then\n                        set [☁ 6 v] to (join (value) (level))\n                    else\n                        if <(player) = [7]> then\n                            set [☁ 7 v] to (join (value) (level))\n                        else\n                            if <(player) = [8]> then\n                                set [☁ 8 v] to (join (value) (level))\n                            else\n                                if <(player) = [9]> then\n                                    set [☁ 9 v] to (join (value) (level))\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [begin v]\nset [chat v] to [0]\nshow list [chat v]\n\nwhen I receive [play game v]\nset [connected? v] to [0]\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\ndefine Change Player x by (sx)\npoint in direction (90)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Game On\nset [y v] to [0]\nset [x v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [ghost v] effect to (0)\nset size to (100) %\n\ndefine Test - Die\nif <touching (danger v)?> then\n    start sound [Hurtc v]\n    set [exit v] to [die]\nend\nif <touching (saws v)?> then\n    start sound [Hurtc v]\n    set [exit v] to [die]\nend\n\ndefine Game - Die\nset [exit v] to []\nstart sound [Hurtc v]\n\ndefine Game - Win\nrepeat (50)\n    go to [front v] layer\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nif <(LEVEL) = [3]> then\n    broadcast (WIN!! v)\n    forever\nend\nchange [level v] by (1)\nwait (0.7) seconds\nbroadcast (G v)\n\ndefine Tick\nif <not <(Move?) = [0]>> then\n    if <not <key (any v) pressed?>> then\n        switch costume to (normal v)\n    end\n    if <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        switch costume to (left v)\n        change [sx v] by (-2)\n    end\n    if <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        switch costume to (right v)\n        change [sx v] by (2)\n    end\n    if <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n        switch costume to (left up v)\n    end\n    if <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>> then\n        switch costume to (right up v)\n    end\n    set [sx v] to ((sx) * (0.8))\n    if <([abs v] of (sx) ) > [0.9]> then\n        Change Player x by (round (sx))\n    end\n    if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(in air) < [4]> then\n            set [sy v] to [16]\n        end\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player y by (sy)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nif <(x) < [-220]> then\n    set [x v] to [-220]\nend\n\nwhen flag clicked\nhide\nset [max players v] to [9]\nset [my player # v] to [0]\nbroadcast (Connecting v)\nbroadcast (Setup Others v) and wait\nbroadcast (Join Game v) and wait\nif <(MY PLAYER #) > [0]> then\n    broadcast (Connected v)\nelse\n    broadcast (Full v)\n    start sound [Disconnect v]\nend\nbroadcast (Begin v)\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    if <(MY PLAYER #) > [0]> then\n        send cloud data\n        wait (Ping) seconds\n    end\nend\n\ndefine Chat\nif <key (1 v) pressed?> then\n    set [chat words v] to [1]\n    say (item (1) of [chat v])\n    wait (2) seconds\n    say []\n    set [chat words v] to [0]\nelse\n    if <key (2 v) pressed?> then\n        set [chat words v] to [2]\n        say (item (2) of [chat v])\n        wait (2) seconds\n        say []\n        set [chat words v] to [0]\n    else\n        if <key (3 v) pressed?> then\n            set [chat words v] to [3]\n            say (item (3) of [chat v])\n            wait (2) seconds\n            say []\n            set [chat v] to [0]\n        else\n            if <key (4 v) pressed?> then\n                set [chat words v] to [4]\n                say (item (4) of [chat v])\n                wait (2) seconds\n                say []\n                set [chat words v] to [0]\n            else\n                if <key (5 v) pressed?> then\n                    set [chat words v] to [5]\n                    say (item (5) of [chat v])\n                    wait (2) seconds\n                    say []\n                    set [chat words v] to [0]\n                else\n                    if <key (6 v) pressed?> then\n                        set [chat words v] to [6]\n                        say (item (6) of [chat v])\n                        wait (2) seconds\n                        say []\n                        set [chat words v] to [0]\n                    else\n                        if <key (7 v) pressed?> then\n                            set [chat words v] to [7]\n                            say (item (7) of [chat v])\n                            wait (2) seconds\n                            say []\n                            set [chat words v] to [0]\n                        else\n                            if <key (8 v) pressed?> then\n                                set [chat words v] to [8]\n                                say (item (8) of [chat v])\n                                wait (2) seconds\n                                say []\n                                set [chat words v] to [0]\n                            else\n                                if <key (9 v) pressed?> then\n                                    set [chat words v] to [9]\n                                    say (item (9) of [chat v])\n                                    wait (2) seconds\n                                    say []\n                                    set [chat words v] to [0]\n                                else\n                                    set [chat words v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen I receive [connected v]\nset [connected? v] to [1]\nshow\n\nwhen I receive [connecting v]\nhide\n\nwhen I receive [play game v]\nforever\n    if <(Connected?) = [1]> then\n        broadcast (Reset v) and wait\n        broadcast (Setup v) and wait\n        Game On\n        repeat until <(EXIT) > []>\n            Tick\n            broadcast (Tick v)\n        end\n        if <(EXIT) = [win]> then\n            Game - Win\n        else\n            Game - Die\n        end\n    end\nend\n\nwhen I receive [connected v]\nset [level v] to [1]\n\nwhen [timer v] > (0)\nhide\n\nwhen flag clicked\nforever\n    go to [back v] layer\n    if <<(costume [name v]) = [left up]> or <(costume [name v]) = [left]>> then\n        set [player direction v] to [-90]\n    else\n        if <<(costume [name v]) = [right up]> or <(costume [name v]) = [right]>> then\n            set [player direction v] to [90]\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <<(Star?) = [1]> and <touching (exit v)?>> then\n        broadcast (End v)\n    end\nend\n\nwhen I receive [end v]\nrepeat until <(Keep Playing?) = [1]>\n    set [y v] to [0]\n    set [x v] to [0]\nend\nGame - Die\nTest - Die\nset [level v] to [1]\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nforever\n    if <(LEVEL) = [1]> then\n        show\n        point in direction (90)\n    else\n        if <(LEVEL) = [2]> then\n            show\n            point in direction (90)\n        else\n            if <(LEVEL) = [3]> then\n                show\n                point in direction (90)\n            else\n                if <(LEVEL) = [4]> then\n                    show\n                    point in direction (90)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    Chat\nend\n\nwhen I receive [stop v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) > [0]> then\n        set [encoded v] to (user)\n        write (pick random (10) to (99)) to encoded\n        write (x) to encoded\n        write (y) to encoded\n        write (Chat Words) to encoded\n        write (pick random (1000) to (9999)) to encoded\n        set cloud # (MY PLAYER #) to (encoded)\n    end\nend\n\nwhen I receive [g v]\nwait (0.1) seconds\nchange [level v] by (1)\n\n@Others\n\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        show\n        set [offline v] to [0]\n    end\nend\n\nwhen I receive [begin v]\nset [names v] to [1]\nforever\n    if <key (n v) pressed?> then\n        if <(names) = [1]> then\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [0]\n        else\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [1]\n        end\n    end\nend\n\nwhen I receive [setup others v]\nsetup players\n\ndefine setup players\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nset size to (100) %\npoint in direction (90)\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ 1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ 2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ 3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ 4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ 5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ 6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ 7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ 8)\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ 9)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\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    end\nend\n\ndefine Tick\nvalue = cloud # (player #)\nLEVEL\nif <(item (player #) of [active v]) = []> then\n    hide\nelse\n    show\nend\npoint in direction (90)\nbegin decode of (value)\nvalue = read from encoded\nif <(names) = [1]> then\n    say (value)\nelse\n    say []\nend\nvalue = read from encoded\nvalue = read from encoded\nset x to ((value) - (SCROLL X))\nif <(SCROLL X) > (value)> then\n    if <((value) + (1000)) < (SCROLL X)> then\n        say []\n    end\nelse\n    if <((value) - (1000)) > (SCROLL X)> then\n        say []\n    end\nend\nif <(costume [number v]) = [2]> then\n    say []\n    hide\nend\nif <<(x position) = [-285]> or <(x position) = [275]>> then\n    point in direction (91)\n    go to [front v] layer\nend\ngo to [back v] layer\nvalue = read from encoded\nset y to (((value) - (SCROLL Y)) + (8))\nHide\nvalue = read from encoded\nbroadcast (Decode Chat v)\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = 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\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\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        else\n            if <(chat) = [4]> then\n                say (item (4) of [chat v]) for (2) seconds\n            else\n                if <(chat) = [5]> then\n                    say (item (5) of [chat v]) for (2) seconds\n                else\n                    if <(chat) = [6]> then\n                        say (item (6) of [chat v]) for (2) seconds\n                    else\n                        if <(chat) = [7]> then\n                            say (item (7) of [chat v]) for (2) seconds\n                        else\n                            if <(chat) = [8]> then\n                                say (item (8) of [chat v]) for (2) seconds\n                            else\n                                if <(chat) = [9]> then\n                                    say (item (9) of [chat v]) for (2) seconds\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [decode chat v]\nDecode Chat (value)\n\nwhen [timer v] > (0)\nhide\n\ndefine LEVEL\nif <(player #) = [1]> then\n    if <(letter (length of (☁ 1)) of (☁ 1)) = (level)> then\n        switch costume to ((1) + (0))\n    else\n        switch costume to ((1) + (1))\n    end\nend\nif <(player #) = [2]> then\n    if <(letter (length of (☁ 2)) of (☁ 2)) = (level)> then\n        switch costume to ((1) + (0))\n    else\n        switch costume to ((1) + (1))\n    end\nend\nif <(player #) = [3]> then\n    if <(letter (length of (☁ 3)) of (☁ 3)) = (level)> then\n        switch costume to ((1) + (0))\n    else\n        switch costume to ((1) + (1))\n    end\nend\nif <(player #) = [4]> then\n    if <(letter (length of (☁ 4)) of (☁ 4)) = (level)> then\n        switch costume to ((1) + (0))\n    else\n        switch costume to ((1) + (1))\n    end\nend\nif <(player #) = [5]> then\n    if <(letter (length of (☁ 5)) of (☁ 5)) = (level)> then\n        switch costume to ((1) + (0))\n    else\n        switch costume to ((1) + (1))\n    end\nend\nif <(player #) = [6]> then\n    if <(letter (length of (☁ 6)) of (☁ 6)) = (level)> then\n        switch costume to ((1) + (0))\n    else\n        switch costume to ((1) + (1))\n    end\nend\nif <(player #) = [7]> then\n    if <(letter (length of (☁ 7)) of (☁ 7)) = (level)> then\n        switch costume to ((1) + (0))\n    else\n        switch costume to ((1) + (1))\n    end\nend\nif <(player #) = [8]> then\n    if <(letter (length of (☁ 8)) of (☁ 8)) = (level)> then\n        switch costume to ((1) + (0))\n    else\n        switch costume to ((1) + (1))\n    end\nend\nif <(player #) = [9]> then\n    if <(letter (length of (☁ 9)) of (☁ 9)) = (level)> then\n        switch costume to ((1) + (0))\n    else\n        switch costume to ((1) + (1))\n    end\nend\n\nwhen I receive [stop v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\nwhen flag clicked\ndelete all of [active v]\nrepeat (9)\n    add [] to [active v]\nend\n\ndefine Hide\nif <<<(distance to [danger v]) < [10]> and <touching (_edge_ v)?>> or <<<(distance to [saws v]) < [10]> and <not <touching (_edge_ v)?>>> or <<(distance to [exit v]) < [120]> and <not <touching (_edge_ v)?>>>>> then\n    hide\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [0] y: [480]\n        Clone at x: [480] y: [0]\n        Clone at x: [480] y: [0]\n        Clone at x: [480] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [480] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [240] y: [240]\n            Clone at x: [360] y: [-240]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (level 4 1 v)\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nwhen [timer v] > (0)\nhide\n\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\n\nset [level v] to [1]\n\nwhen I receive [begin v]\n\nforever\n\nwhen I receive [win!! v]\nforever\n    stop [other scripts in sprite v]\n    hide\nend\n\nwhen I receive [stop v]\nbroadcast (Reset v)\nforever\n    stop [other scripts in sprite v]\n    hide\nend\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((DANGER: x) - (SCROLL X)) ((DANGER: y) - (SCROLL Y)) (direction)\n\nwhen I receive [setup v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nif <(LEVEL) = [1]> then\n    set [show v] to [1]\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\nelse\n    if <(LEVEL) = [2]> then\nend\n\ndefine Position (x) (y) (show)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(direction) = [90]> then\n        show\n    else\n        hide\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nif <(show) = [1]> then\n    point in direction (90)\nelse\n    point in direction (91)\nend\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\nnext costume\n\nwhen [timer v] > (0)\nhide\n\nwhen I receive [stop v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\n@Landscape\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n        Clone at x: [0] y: [480]\n        Clone at x: [480] y: [0]\n        Clone at x: [480] y: [0]\n        Clone at x: [480] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 3 1 v)\n            Clone at x: [480] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [360] y: [0]\n            Clone at x: [240] y: [240]\n            Clone at x: [360] y: [-240]\n        else\n            switch costume to (level 1 1 v)\n        end\n    end\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nwhen [timer v] > (0)\nhide\n\nwhen I start as a clone\ngo to [back v] layer\n\nwhen I receive [stop v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\n@Saws\n\nwhen I receive [green flag v]\nhide variable [mouse v]\nhide\n\nwhen I receive [tick v]\nturn right (10) degrees\nPosition ((Saws: x) - (SCROLL X)) ((Saws: y) - (SCROLL Y))\ngo to [back v] layer\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [saws: x v] to [0]\nset [saws: y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [150] y: [-50]\nelse\n    if <(LEVEL) = [2]> then\n        Clone at x: [253] y: [146]\n        Clone at x: [325] y: [-40]\n        Clone at x: [1410] y: [565]\n    end\nend\nset [saws: x v] to [-999999]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [saws: x v] to (x)\nset [saws: y v] to (y)\ncreate clone of (_myself_ v)\n\nClone at x: [340] y: [27]\nClone at x: [530] y: [27]\nClone at x: [786] y: [27]\nClone at x: [1124] y: [27]\nClone at x: [1331] y: [245]\nClone at x: [1065] y: [345]\nClone at x: [825] y: [272]\nClone at x: [392] y: [245]\nClone at x: [197] y: [335]\n\nClone at x: [631] y: [11]\n\nwhen [timer v] > (0)\nhide\n\nwhen I receive [stop v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\n@Collectables\n\nwhen I receive [green flag v]\nhide variable [mouse x,y v]\nhide\n\nwhen I receive [tick v]\nnext costume\nPosition ((Collectables: x) - (SCROLL X)) ((Collectables: y) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound [Coin v]\n    broadcast (Coin Collected v)\n    change [collected v] by (1)\n    delete this clone\nend\n\nwhen I receive [setup v]\nset [coins v] to [0]\nhide\nset [collectables: x v] to [0]\nset [collectables: y v] to [0]\nwait (0.01) seconds\nif <(LEVEL) = [1]> then\n    switch costume to (coin v)\n    Clone at x: [458] y: [171]\n    Clone at x: [458] y: [221]\n    Clone at x: [458] y: [271]\n    Clone at x: [1334] y: [146]\n    Clone at x: [1384] y: [146]\n    Clone at x: [1434] y: [146]\n    Clone at x: [1484] y: [146]\n    Clone at x: [1534] y: [146]\n    Clone at x: [2043] y: [-10]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (coin v)\n        Clone at x: [121] y: [635]\n        Clone at x: [370] y: [474]\n        Clone at x: [370] y: [524]\n        Clone at x: [370] y: [574]\n        Clone at x: [278] y: [715]\n        Clone at x: [-69] y: [-143]\n        Clone at x: [-119] y: [-143]\n        Clone at x: [-19] y: [-143]\n        Clone at x: [1461] y: [695]\n        Clone at x: [1461] y: [745]\n        Clone at x: [1000] y: [673]\n        Clone at x: [1000] y: [723]\n        Clone at x: [1000] y: [773]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (coin v)\n            Clone at x: [305] y: [53]\n            Clone at x: [1017] y: [53]\n            Clone at x: [1339] y: [282]\n            Clone at x: [1339] y: [322]\n            Clone at x: [1492] y: [282]\n            Clone at x: [1492] y: [322]\n            Clone at x: [1639] y: [282]\n            Clone at x: [1639] y: [322]\n            Clone at x: [1840] y: [45]\n            Clone at x: [1840] y: [105]\n        else\n            switch costume to (coin v)\n        end\n        set [collectables: x v] to [-9999999999]\n    end\n    set [collectables: x v] to [-9999999999]\nend\nset [collectables: x v] to [-9999999999]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen [timer v] > (0)\nhide\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\nset [collectables: x v] to (x)\nset [collectables: y v] to (y)\ncreate clone of (_myself_ v)\n\nset [level v] to [3]\n\nwhen I receive [stop v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\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)\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nshow\n\nwhen I receive [full v]\ngo to [front v] layer\nswitch costume to (full  v)\nshow\n\nwhen [timer v] > (0)\nhide\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Exit: x) - (SCROLL X)) ((Exit: y) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound [Low Squeak v]\n    start sound [Low Whoosh v]\n    switch costume to (open v)\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [exit: x v] to [0]\nset [exit: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (close v)\n    Clone at x: [1928] y: [350]\n    set [star? v] to [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (close v)\n        Clone at x: [4] y: [811]\n        set [star? v] to [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (close v)\n            Clone at x: [1970] y: [45]\n            set [star? v] to [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (star v)\n                Clone at x: [214] y: [56]\n                set [star? v] to [1]\n            else\n                set [star? v] to [0]\n                Clone at x: [3148734] y: [3273459]\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [exit: x v] to (x)\nset [exit: y v] to (y)\n\nwhen [timer v] > (0)\nhide\n\nwhen I receive [stop v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\nwhen flag clicked\nset [level v] to [1]\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    next costume\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\nwhen [timer v] > (0)\nhide\n\n@Chat Button\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset size to (100) %\nhide\n\nwhen [timer v] > (0)\nhide\n\nwhen I receive [begin v]\nwait (1) seconds\nhide\nset [ghost v] effect to (100)\nwait until <(SCROLL X) > [477]>\nshow\nswitch costume to (chat button v)\nrepeat (12)\n    change [ghost v] effect by (-8.5)\nend\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nset [move? v] to [1]\n\nforever\n    set [move? v] to [1]\nend\n\nwhen I receive [stop v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\nwhen I receive [begin v]\nforever\n    if <touching (mouse-pointer v)?> then\n        set [move? v] to [0]\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [move? v] to [0]\n            start sound [Ho Ho Ho v]\n            set [chat open? v] to [1]\n            set [ghost v] effect to (0)\n            repeat (12)\n                change [ghost v] effect by (8.5)\n            end\n            hide\n            wait until <(chat open?) = [0]>\n            show\n            repeat (12)\n                change [ghost v] effect by (-8.5)\n                set [move? v] to [1]\n            end\n        end\n    else\n        set [chat open? v] to [0]\n        set [move? v] to [1]\n    end\nend\n\n@Snow\n\nwhen I start as a clone\nset size to (pick random (75) to (125)) %\nshow\nset [snow x v] to ((pick random (-240) to (240)) + (x))\nset [snow y v] to [180]\nPosition ((Snow X) - (SCROLL X)) (Snow Y)\nglide (pick random (6) to (5)) secs to x: (x position) y: (-180)\ndelete this clone\n\nwhen flag clicked\nset [stopped? v] to [0]\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\nset [stopped? v] to [1]\nhide\nforever\n    wait (0.5) seconds\n    Clone at x: (pick random (-240) to (240)) y: [180]\nend\n\nwhen [timer v] > (0)\nhide\n\nwhen I receive [begin v]\nhide\nforever\n    wait (0.6) seconds\n    Clone at x: (pick random (-240) to (240)) y: [180]\nend\n\nwhen I start as a clone\nswitch costume to (pick random (2) to (3))\nforever\n    if <(Stopped?) = [0]> then\n        if <(costume [number v]) = [3]> then\n            go to [front v] layer\n        else\n            go to [back v] layer\n        end\n    else\n        go to [front v] layer\n        go [backward v] (1) layers\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\nset [snow x v] to (x)\nset [snow y v] to (y)\ncreate clone of (_myself_ v)\n\n@Snow 2\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nforever\n    Position ((Snow Balls X) - (SCROLL X)) (Snow Balls Y)\nend\n\nwhen I start as a clone\nrepeat until <touching (landscape v)?>\n    change [snow balls y v] by (-2)\nend\n\ndefine Clone at x: (x) y: (y)\nset [snow balls x v] to (x)\nset [snow balls y v] to (y)\ncreate clone of (_myself_ v)\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\n@Chat\n\nwhen flag clicked\nset [chat open? v] to [0]\nhide\nset [ghost v] to [100]\ngo to x: (-150) y: (0)\nforever\n    set [ghost v] effect to (ghost)\n    if <(chat open?) = [1]> then\n        if <not <(ghost) = [0]>> then\n            change [ghost v] by (-20)\n        end\n    else\n        if <not <(ghost) = [100]>> then\n            change [ghost v] by (20)\n        end\n    end\nend\n\nwhen flag clicked\nset [chat reset v] to [6]\nforever\n    wait (1) seconds\n    change [chat reset v] by (1)\nend\n\nwhen flag clicked\nforever\n    if <(chat item) > [9]> then\n        if <(chat reset) > [3]> then\n            set [chat item v] to [0]\n        end\n    else\n        if <(chat reset) > [5]> then\n            set [chat item v] to [0]\n        end\n    end\nend\n\ndefine reset\nset [open chat v] to [0]\nset [chat reset v] to [0]\n\nwhen [timer v] > (0.1)\nhide\n\nwhen I receive [green flag v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nwait until <(SCROLL X) > [477]>\nforever\n    if <key (t v) pressed?> then\n        if <(chat open?) = [0]> then\n            set [chat open? v] to [1]\n        else\n            set [chat open? v] to [0]\n        end\n        wait until <key (t v) pressed?>\n    end\nend\n\nwhen I receive [begin v]\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <(chat open?) = [1]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set [chat open? v] to [0]\n            start sound [1 v]\n            repeat (15)\n                set [move? v] to [0]\n            end\n        end\n    end\n    if <(ghost) = [100]> then\n        hide\n    else\n        show\n    end\nend\n\n@Coin Effect\n\nwhen I receive [coin collected v]\nchange [coins+ v] by (1)\nif <(length of ((Collected coins) + (1))) = [1]> then\n    set [collected coins v] to (join [0] ((letter (2) of (Collected coins)) + (1)))\nelse\n    if <(Collected coins) = [09]> then\n        set [collected coins v] to ((9) + (1))\n    else\n        set [collected coins v] to ((Collected coins) + (1))\n    end\nend\ngo to x: (0) y: (0)\ngo to (my player v)\nset size to (70) %\nset [ghost v] effect to (0)\nshow\nrepeat (15)\n    change x by (-4)\n    change y by (4)\n    change [ghost v] effect by (7)\nend\n\nwhen flag clicked\nset [collected coins v] to [00]\nset [coins+ v] to [0]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [begin v]\nforever\n    wait until <(EXIT) = [win]>\n    set [coins+ v] to [0]\nend\n\nwhen I receive [begin v]\nforever\n    wait until <(EXIT) = [die]>\n    if <(length of ((Collected coins) - (Coins+))) = [2]> then\n        set [collected coins v] to ((Collected coins) - (Coins+))\n    else\n        set [collected coins v] to (join [0] ((Collected coins) - (Coins+)))\n    end\n    wait (0.1) seconds\n    set [coins+ v] to [0]\nend\n\n@Level\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\n\nwhen I receive [begin v]\nset [ghost v] effect to (100)\nset size to (100) %\nshow\nswitch costume to (LEVEL)\nswitch costume to (1 v)\nrepeat (12)\n    change [ghost v] effect by (-8.5)\nend\nwait (4) seconds\nrepeat (12)\n    change [ghost v] effect by (8.5)\nend\nhide\nforever\n    if <not <(costume [number v]) = (LEVEL)>> then\n        wait (0.7) seconds\n        switch costume to (LEVEL)\n        show\n        repeat (12)\n            change [ghost v] effect by (-8.5)\n        end\n        wait (4) seconds\n        repeat (12)\n            change [ghost v] effect by (8.5)\n        end\n        hide\n    end\nend\n\nwhen I receive [begin v]\nforever\n    go to [front v] layer\nend\n\nwhen [timer v] > (0)\nhide\n\n@Coin\n\nwhen flag clicked\nhide\nset size to (100) %\nswitch costume to (\(\) v)\ngo to x: (-3) y: (0)\n\nwhen I receive [begin v]\nset [clone v] to [1]\ncreate clone of (_myself_ v)\nwait (0.01) seconds\nset [clone v] to [2]\ncreate clone of (_myself_ v)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen I start as a clone\nset size to (30) %\nhide\nif <(Clone) = [1]> then\n    Clone [1]\nelse\n    Clone [2]\nend\n\ndefine Clone (id)\nif <(id) = [1]> then\n    switch costume to (letter (1) of (Collected coins))\n    show\n    forever\n        go to x: (-204) y: (149)\n        switch costume to (letter (1) of (Collected coins))\n        go to [front v] layer\n    end\nelse\n    switch costume to (letter (2) of (Collected coins))\n    show\n    forever\n        go to x: (-192) y: (149)\n        switch costume to (letter (2) of (Collected coins))\n        go to [front v] layer\n    end\nend\n\nwhen I receive [stop v]\nforever\n    hide\n    stop [other scripts in sprite v]\nend\n\n@Thumb\n\nwhen [timer v] > (0)\nswitch costume to (tb v)\nshow\nset [ghost v] effect to (0)\ngo to [front v] layer\nstop all sounds\nstart sound [silent-night-disco v]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\nwhen I receive [afk v]\nshow\n\n@Overlay\n\nwhen [timer v] > (0)\nswitch costume to (tb v)\nshow\nset [ghost v] effect to (0)\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\nwhen I receive [afk v]\nshow\n\n@notif\n\nwhen flag clicked\nset [status v] to [...]\nwait (2) seconds\nset [status v] to [Normal]\nif <(username) = []> then\n    set [status v] to [Not Logged In]\n    stop [this script v]\nend\n\nif <<(username) = [stsha001]> and <not <(☁ Active?) = [1]>>> then\n    set [☁ active? v] to [1]\nend\nif <(username) = []> then\n    set [status v] to [Not Logged In]\n    stop [this script v]\nend\nif <(☁ Active?) = [1]> then\n    set [status v] to [Normal]\nelse\n    set [status v] to [New Scratcher]\nend\n\nwhen I receive [begin v]\nwait (6) seconds\nif <<(Status) = [Not Logged In]> or <(Status) = [New Scratcher]>> then\n    switch costume to (Status)\n    show\n    repeat until <(y position) < [6]>\n        change y by (((5) - (y position)) / (6))\n        go to [front v] layer\n    end\n    wait (5) seconds\n    repeat until <(y position) > [49.5]>\n        change y by (((y position) + (5)) / (5))\n        go to [front v] layer\n    end\n    hide\nelse\n    switch costume to (new scratcher v)\n    forever\n        set [pl v] to [0]\n        set [it v] to [1]\n        repeat (9)\n            if <(item (it) of [active v]) = [Yes]> then\n                set [pl v] to ((pl) + (1))\n            end\n            change [it v] by (1)\n        end\n        set [active players? v] to (pl)\n        if <((Active players?) - (1)) > [0]> then\n            if <not <(costume [name v]) = [Not Alone]>> then\n                switch costume to (not alone v)\n                show\n                repeat until <(y position) < [6]>\n                    change y by (((5) - (y position)) / (6))\n                    go to [front v] layer\n                end\n                wait (3) seconds\n                repeat until <(y position) > [49.5]>\n                    change y by (((y position) + (5)) / (5))\n                    go to [front v] layer\n                end\n                hide\n                wait (4) seconds\n            end\n        else\n            if <not <(costume [name v]) = [Alone]>> then\n                if <not <(costume [name v]) = [New Scratcher]>> then\n                    wait (2) seconds\n                end\n                set [pl v] to [0]\n                set [it v] to [1]\n                repeat (9)\n                    if <(item (it) of [active v]) = [Yes]> then\n                        set [pl v] to ((pl) + (1))\n                    end\n                    change [it v] by (1)\n                end\n                set [active players? v] to (pl)\n                if <not <((Active players?) - (1)) > [0]>> then\n                    switch costume to (alone v)\n                    show\n                    repeat until <(y position) < [6]>\n                        change y by (((5) - (y position)) / (6))\n                        go to [front v] layer\n                    end\n                    wait (3) seconds\n                    repeat until <(y position) > [49.5]>\n                        change y by (((y position) + (5)) / (5))\n                        go to [front v] layer\n                    end\n                    hide\n                    wait (1) seconds\n                end\n            end\n        end\n        wait (2) seconds\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (50)\nhide\n\nwhen I receive [begin v]\nforever\n    go to [front v] layer\nend\n\n@Coin Effect -\n\nwhen flag clicked\nset [collected coins v] to [00]\nset [coins+ v] to [0]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [begin v]\nforever\n    wait until <(EXIT) = [win]>\n    set [coins+ v] to [0]\nend\n\nwhen I receive [begin v]\nforever\n    wait until <(EXIT) = [die]>\n    if <(Coins+) > [3]> then\n        repeat (3)\n            create clone of (_myself_ v)\n            wait (pick random (0.1) to (0.2)) seconds\n        end\n    else\n        repeat (Coins+)\n            create clone of (_myself_ v)\n            wait (pick random (0.1) to (0.2)) seconds\n        end\n    end\n    wait until <not <(EXIT) = [die]>>\nend\n\nwhen I start as a clone\nwait (0.1) seconds\ngo to x: (0) y: (0)\ngo to (my player v)\nset size to (70) %\nset [ghost v] effect to (0)\nshow\nrepeat (15)\n    change x by (4)\n    change y by (4)\n    change [ghost v] effect by (7)\nend\ndelete this clone\n\n@End\n\nwhen I receive [win!! v]\nwait (1) seconds\nset [win v] to [1]\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nswitch costume to (blank v)\nset size to (150) %\nswitch costume to (win screen v)\nrepeat until <(size) < [101]>\n    go to [front v] layer\n    switch costume to (blank v)\n    change size by (((100) - (size)) / (7))\n    switch costume to (win screen v)\n    change [ghost v] effect by (-5)\n    set x to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n    set y to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\nend\nrepeat (7)\n    go to [front v] layer\n    switch costume to (blank v)\n    change size by (((99) - (size)) / (7))\n    switch costume to (win screen v)\n    change [ghost v] effect by (-5)\n    set x to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n    set y to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\nend\nbroadcast (stop v)\nclear graphic effects\ngo to x: (0) y: (0)\ndraw (round (TIME)) [1]\nif <(Collected coins) > [30]> then\n    set [collected coins v] to [30]\nend\ndraw (join (Collected coins) (join [/] [30])) [0]\ngo to x: (0) y: (0)\nwait (3) seconds\nset [@id v] to [button]\ncreate clone of (_myself_ v)\n\nwhen I receive [begin v]\nset [time v] to [0]\nwait until <<mouse down?> or <key (any v) pressed?>>\nforever\n    change [time v] by (1)\n    wait (1) seconds\nend\n\nwhen flag clicked\nhide\n\ndefine draw (i) (c)\nclear graphic effects\nif <(c) = [1]> then\n    go to x: ((2) - (((length of (i)) + (5)) * (5.5))) y: (-54)\n    set size to (80) %\n    set [@id v] to [null]\n    switch costume to (time v)\n    create clone of (_myself_ v)\n    change x by (50)\n    change y by (3)\nelse\n    if <(i) = [0/40]> then\n        go to x: (16) y: (-76)\n    else\n        go to x: (20) y: (-76)\n    end\n    set size to (100) %\n    set [@id v] to [null]\n    switch costume to (exp v)\n    create clone of (_myself_ v)\n    if <(i) = [0/40]> then\n        change x by (-53)\n        change y by (3)\n    else\n        change x by (-63)\n        change y by (3)\n    end\nend\nset size to (27) %\nset [brightness v] effect to (20)\nset [c_! v] to [1]\nrepeat (length of (i))\n    switch costume to (join (letter (c_!) of (i)) [a])\n    set [@id v] to [null]\n    create clone of (_myself_ v)\n    change [c_! v] by (1)\n    if <<(costume [name v]) = [/a]> or <(costume [name v]) = [1a]>> then\n        change x by (9)\n    else\n        change x by (12)\n    end\nend\nset size to (100) %\nswitch costume to (win screen v)\ngo to x: (0) y: (0)\nclear graphic effects\n\nwhen I start as a clone\nif <(@id) = [null]> then\n    go to [front v] layer\n    show\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    forever\n        go to [front v] layer\n    end\nelse\n    if <(@id) = [button]> then\n        go to x: (0) y: (0)\n        switch costume to (continue00 v)\n        show\n        set size to (80) %\n        set [ghost v] effect to (100)\n        repeat until <(size) > [99]>\n            change [ghost v] effect by (-10)\n            change size by (((102) - (size)) / (7))\n            go to [front v] layer\n        end\n        forever\n            go to [front v] layer\n            switch costume to (c1 v)\n            if <touching (mouse-pointer v)?> then\n                switch costume to (continue10 v)\n                if <mouse down?> then\n                    set [win v] to [0]\n                    set [click2 v] to [0]\n                    repeat (10)\n                        change [ghost v] effect by (10)\n                    end\n                    broadcast (AFK v)\n                    hide\n                    stop [all v]\n                end\n            else\n                switch costume to (c2 v)\n                if <touching (mouse-pointer v)?> then\n                    switch costume to (continue01 v)\n                    if <mouse down?> then\n                        repeat (10)\n                            change [ghost v] effect by (10)\n                        end\n                        broadcast (AFK v)\n                        hide\n                        stop [all v]\n                    end\n                else\n                    switch costume to (continue00 v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [afk v]\ndelete this clone\n\n@Text\n\nwhen flag clicked\nhide\n\nwhen I receive [stop v]\nshow\nforever\n    go to [front v] layer\n    go [backward v] (16) layers\nend\n\n@After Every Update!\n\nset [☁ active? v] to []\n\n
---------- ❆ Christmas || A Multiplayer Platformer ❆ ---------\n\nThis is a Christmas ☄️ Multiplayer Platformer... that you\ncan ⚔️ play online with ⚡️ people around the ♻️ World!\nYou can Also ⌨️ Chat with others Players via ☁️ Cloud!\n\n◇ ◆◇ ◆◇ ◆◇ ◆◇ ◆◇ ◆◇ ◆◇ ◆◇ ◆◇ ◆◇ ◆◇ ◆◇ ◆\n\n✨ Credits:\n@stsha001, @StratfordJames and @Ultamate_Games