☁Harry Potter Platformer (multiplayer broken)

Instructions: PART 2 OUT NOW!!! : https://scratch.mit.edu/projects/531257729/\n\nJoin my game competition : https://scratch.mit.edu/projects/744379777\n\nBasic arrow keys/wasd controls. Mobile friendly. Collect galleons (coins). Don't touch the death eaters(spikes) and get to the end. Have your volume up fairly high because the music starts quiet. The intro is loud though, so be warned.\n\nTHIS IS SERVER 1. If full, try server 2: https://scratch.mit.edu/projects/484958889/\nHacked version: https://scratch.mit.edu/projects/485534577/\n\nBTW:\n\nFinally got round to part 2 XD.\nDO NOT OPEN THE CODE WHILE PROJECT IS RUNNING, RISK OF COMPUTER COMBUSTION!\n\nThis is still in progress so you may not be able to complete this or have an amazing experience. Multiplayer does NOT work on turbowarp.\n\nWhen I get time I will try to add, I promise.\n\nFor now just try out the new features that don't fully yet work\n:)\n\nThanks to WarnerBros studios for literally HARRY POTTER. ITS IN THE NAME ...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nOh yeah and J.K.Rowling\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nBut she's kinda homophobic so, yeah\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nShare this with your friends, and love, fave and follow, please\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nsay "Pineapple belongs on Pizza" if you found this.\nJoking, but how much controversy will this cause......?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nHello?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nNah you’ve scrolled too far now\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nTold ya!

@Stage\n\nwhen [m v] key pressed\nshow variable [mouse x,y v]\nset [mouse x,y v] to (join ((mouse x) + (SCROLL X)) (join [,] ((mouse y) + (SCROLL Y))))\n\nwhen flag clicked\nforever\n    play sound [Harry_Potter_Theme_Song_Hedwigs_Theme v] until done\nend\n\n@Blank\n\nwhen flag clicked\nforever\n    hide variable [coins v]\n    hide variable [collected v]\n    hide variable [mouse x,y v]\nend\n\n@Harry [P1]\n\nwhen I receive [begin v]\nset [chat v] to [0]\nshow list [chat v]\nforever\n    Chat\nend\n\nif <<key (t v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n    if <(Chat) = [1]> then\n        show list [chat v]\n        set [chat v] to [0]\n        wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\n        if <(Chat) = [0]> then\n            set [chat v] to [1]\n            wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\n        end\n    end\nend\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 Game - Die\nset [exit v] to []\nstart sound [Hurt v]\nrepeat (10)\n    set [x v] to (*:*:chcpt x)\n    set [y v] to ((*:*:chcpt y) + (100))\nend\n\ndefine Game - Win\nrepeat (50)\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\nchange [level v] by (1)\nwait (1) seconds\n\ndefine Tick\nif <not <<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <key (up arrow v) pressed?>>> then\n    switch costume to (normal v)\nend\nif <<<(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)\nend\nif <<<(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)\nend\nif <<<<(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)\nend\nif <<<<(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)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<(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\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    Game - Die\nend\nif <(x) < [-220]> then\n    set [x v] to [-220]\nend\nif <[5130] < (x)> then\n    set [x v] to [5130]\nend\n\nwhen flag clicked\nhide\nset [max players v] to [8]\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)\n    start sound [Connect v]\nelse\n    broadcast (Full v)\n    start sound [Disconnect v]\nend\nbroadcast (Begin v)\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                                    if <(player) = [10]> then\n                                        set [☁ p10 v] to (value)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\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    end\nend\n\ndefine send cloud data\nset [encoded v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (x) to encoded\nwrite (y) to encoded\nwrite (Chat Words) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\ndefine Chat\nif <(Chat) = [1]> then\n    if <<key (1 v) pressed?> or <(answer) = [1]>> then\n        set [chat words v] to [1]\n        say (item (1) of [chat v])\n        wait (3) seconds\n        say []\n        set [chat words v] to [0]\n    else\n        if <<key (2 v) pressed?> or <(answer) = [2]>> then\n            set [chat words v] to [2]\n            say (item (2) of [chat v])\n            wait (3) seconds\n            say []\n            set [chat words v] to [0]\n        else\n            if <<key (3 v) pressed?> or <(answer) = [3]>> then\n                set [chat words v] to [3]\n                say (item (3) of [chat v])\n                wait (3) seconds\n                say []\n                set [chat v] to [0]\n            else\n                if <<key (4 v) pressed?> or <(answer) = [4]>> then\n                    set [chat words v] to [4]\n                    say (item (4) of [chat v])\n                    wait (3) seconds\n                    say []\n                    set [chat words v] to [0]\n                else\n                    if <<key (5 v) pressed?> or <(answer) = [5]>> then\n                        set [chat words v] to [5]\n                        say (item (5) of [chat v])\n                        wait (3) seconds\n                        say []\n                        set [chat words v] to [0]\n                    else\n                        if <<key (6 v) pressed?> or <(answer) = [6]>> then\n                            set [chat words v] to [6]\n                            say (item (6) of [chat v])\n                            wait (3) seconds\n                            say []\n                            set [chat words v] to [0]\n                        else\n                            if <<key (7 v) pressed?> or <(answer) = [7]>> then\n                                set [chat words v] to [7]\n                                say (item (7) of [chat v])\n                                wait (3) seconds\n                                say []\n                                set [chat words v] to [0]\n                            else\n                                if <<key (8 v) pressed?> or <(answer) = [8]>> then\n                                    set [chat words v] to [8]\n                                    say (item (8) of [chat v])\n                                    wait (3) seconds\n                                    say []\n                                    set [chat words v] to [0]\n                                else\n                                    if <<key (9 v) pressed?> or <(answer) = [9]>> then\n                                        set [chat words v] to [9]\n                                        say (item (9) of [chat v])\n                                        wait (3) seconds\n                                        say []\n                                        set [chat words v] to [0]\n                                    else\n                                        if <<key (0 v) pressed?> or <(answer) = [0]>> then\n                                            set [chat words v] to [10]\n                                            say (item (10) of [chat v])\n                                            wait (3) seconds\n                                            say []\n                                            set [chat words v] to [0]\n                                        else\n                                            if <<key (a v) pressed?> or <<(answer) = [a]> or <(answer) = [A]>>> then\n                                                set [chat words v] to [11]\n                                                say (item (11) of [chat v])\n                                                wait (3) seconds\n                                                say []\n                                                set [chat words v] to [0]\n                                            else\n                                                if <<key (b v) pressed?> or <<(answer) = [b]> or <(answer) = [B]>>> then\n                                                    set [chat words v] to [12]\n                                                    say (item (12) of [chat v])\n                                                    wait (3) seconds\n                                                    say []\n                                                    set [chat words v] to [0]\n                                                else\n                                                    if <<key (c v) pressed?> or <<(answer) = [c]> or <(answer) = [C]>>> then\n                                                        set [chat words v] to [13]\n                                                        say (item (13) of [chat v])\n                                                        wait (3) seconds\n                                                        say []\n                                                        set [chat words v] to [0]\n                                                    else\n                                                        if <<key (d v) pressed?> or <<(answer) = [d]> or <(answer) = [D]>>> then\n                                                            set [chat words v] to [14]\n                                                            say (item (14) of [chat v])\n                                                            wait (3) seconds\n                                                            say []\n                                                            set [chat words v] to [0]\n                                                        else\n                                                            if <<key (e v) pressed?> or <<(answer) = [e]> or <(answer) = [E]>>> then\n                                                                set [chat words v] to [15]\n                                                                say (item (15) of [chat v])\n                                                                wait (3) seconds\n                                                                say []\n                                                                set [chat words v] to [0]\n                                                            else\n                                                                if <<key (f v) pressed?> or <<(answer) = [f]> or <(answer) = [F]>>> then\n                                                                    set [chat words v] to [16]\n                                                                    say (item (16) of [chat v])\n                                                                    wait (3) seconds\n                                                                    say []\n                                                                    set [chat words v] to [0]\n                                                                else\n                                                                    if <<key (g v) pressed?> or <<(answer) = [g]> or <(answer) = [G]>>> then\n                                                                        set [chat words v] to [17]\n                                                                        say (item (17) of [chat v])\n                                                                        wait (3) seconds\n                                                                        say []\n                                                                        set [chat words v] to [0]\n                                                                    else\n                                                                        if <<key (h v) pressed?> or <<(answer) = [h]> or <(answer) = [H]>>> then\n                                                                            set [chat words v] to [18]\n                                                                            say (item (18) of [chat v])\n                                                                            wait (3) seconds\n                                                                            say []\n                                                                            set [chat words v] to [0]\n                                                                        else\n                                                                            if <<<key (z v) pressed?> or <<(answer) = [z]> or <(answer) = [Z]>>> and <(username) = [kingofnumbers]>> then\n                                                                                set [chat words v] to [19]\n                                                                                say (item (19) of [chat v])\n                                                                                wait (3) 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\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nelse\n    if <(username) = [kingofnumbers_]> then\n        set [chat words v] to [20]\n        say (item (22) of [chat v])\n        wait (2) seconds\n        say []\n        set [chat words v] to [0]\n    else\n        if <(username) = [kingofnumbers]> then\n            set [chat words v] to [20]\n            say (item (20) of [chat v])\n        else\n            if <(username) = [Owl58]> then\n                set [chat words v] to [21]\n                say (item (21) of [chat v])\n            else\n                set [chat words v] to [0]\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\ndefine Player Tick\n\nwhen flag clicked\nforever\n    if <<(x) = [4421]> and <(y) = [84]>> then\n        set [checkpoint x v] to [2]\n        set [checkpoint y v] to [2]\n    end\nend\n\nwhen flag clicked\nset [*speed boost? v] to [1]\nset [*jump boost? v] to [1]\nset [*:*:chcpt clctd v] to (COLLECTED)\nset [*:*:chcpt j boost v] to (*jump boost?)\nset [*:*:chcpt s boost v] to (*speed boost?)\nset [*:*:chcpt x v] to [0]\nset [*:*:chcpt y v] to [0]\nset [checkpoint v] to [0]\nforever\n    if <touching (toutching? v)?> then\n        set [toutching? v] to [1]\n    else\n        set [toutching? v] to [0]\n    end\nend\n\nwhen [r v] key pressed\ngame respawn\n\ndefine game respawn\nset [exit v] to []\nrepeat (10)\n    set [x v] to (*:*:chcpt x)\n    set [y v] to ((*:*:chcpt y) + (100))\nend\n\n\n\nwait (2) seconds\nsay []\nset [chat words v] to [0]\n\nwhen flag clicked\nforever\n    hide variable [collected v]\nend\n\nwhen flag clicked\nforever\n    show list [chat v]\nend\n\ndefine *game-skip\nif <(username) = [kingofnumbers]> then\n    repeat (10)\n        set [x v] to [3800]\n        set [y v] to [100]\n    end\nend\n\nwhen [k v] key pressed\n*game-skip\n\nwhen flag clicked\nforever\n\nset [level v] to [1]\n\nbroadcast (Reset v)\n\ndefine Test - Die\nif <<touching (danger v)?> or <touching (saws v)?>> then\n    Game - Die\nend\n\nwhen flag clicked\nforever\n    set [*:*:chcpt clctd v] to (COLLECTED)\n    set [*:*:chcpt clctd v] to (COLLECTED)\n    if <<<(x) < [1770]> and <(x) > [1625]>> and <<touching color (#e7e7e7)?> and <not <(checkpoint) = [1]>>>> then\n        set [*:*:chcpt j boost v] to (*jump boost?)\n        set [*:*:chcpt s boost v] to (*speed boost?)\n        set [*:*:chcpt x v] to [1640]\n        set [*:*:chcpt y v] to [0]\n        set [checkpoint v] to [1]\n        set [checkpoint v] to [1]\n    end\n    if <<<(x) < [4390]> and <(x) > [4340]>> and <<touching color (#e7e7e7)?> and <not <(checkpoint) = [2]>>>> then\n        set [*:*:chcpt j boost v] to (*jump boost?)\n        set [*:*:chcpt s boost v] to (*speed boost?)\n        set [*:*:chcpt x v] to [4345]\n        set [*:*:chcpt y v] to [115]\n        set [checkpoint v] to [2]\n        set [checkpoint v] to [2]\n    end\nend\n\nbroadcast (*tbn v)\n\nwhen I receive [*tbn v]\nrepeat (100)\n    set [x v] to [2475]\n    set [y v] to [1595]\nend\n\nwhen I receive [****chat v]\nrepeat (1)\nend\n\nask [chat option:] and wait\nask [Type 'K'] and wait\n\nwhen flag clicked\nforever\n    if <touching (exit v)?> then\n        set [end? v] to [1]\n    end\nend\n\n@Ron [others]\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]\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 (☁ 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                                    if <(player) = [10]> then\n                                        set [value v] to (☁ P10)\n                                    end\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 #)\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    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nif <(names) = [1]> then\n    say (join (player #) (join [:] (value)))\nelse\n    say []\nend\nvalue = read from encoded\nvalue = read from encoded\nset x to ((value) - (SCROLL X))\nvalue = read from encoded\nset y to (((value) - (SCROLL Y)) + (8))\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                                else\n                                    if <(chat) = [10]> then\n                                        say (item (10) of [chat v]) for (2) seconds\n                                    else\n                                        if <(chat) = [11]> then\n                                            say (item (11) of [chat v]) for (2) seconds\n                                        else\n                                            if <(chat) = [12]> then\n                                                say (item (12) of [chat v]) for (2) seconds\n                                            else\n                                                if <(chat) = [13]> then\n                                                    say (item (13) of [chat v]) for (2) seconds\n                                                else\n                                                    if <(chat) = [14]> then\n                                                        say (item (14) of [chat v]) for (2) seconds\n                                                    else\n                                                        if <(chat) = [15]> then\n                                                            say (item (15) of [chat v]) for (2) seconds\n                                                        else\n                                                            if <(chat) = [16]> then\n                                                                say (item (16) of [chat v]) for (2) seconds\n                                                            else\n                                                                if <(chat) = [17]> then\n                                                                    say (item (17) of [chat v]) for (2) seconds\n                                                                else\n                                                                    if <(chat) = [18]> then\n                                                                        say (item (18) of [chat v]) for (2) seconds\n                                                                    else\n                                                                        if <(chat) = [19]> then\n                                                                            say (item (19) of [chat v]) for (2) seconds\n                                                                        else\n                                                                            if <(chat) = [20]> then\n                                                                                say (item (20) of [chat v]) for (2) seconds\n                                                                            else\n                                                                                if <(chat) = [21]> then\n                                                                                    say (item (21) of [chat v]) for (2) seconds\n                                                                                end\n                                                                            end\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\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 [decode chat v]\nDecode Chat (value)\n\nwhen flag clicked\nforever\n    if <touching (_edge_ v)?> then\n        broadcast (arrow v)\n    else\n        broadcast (no arrow v)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\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))\n\nwhen I receive [setup v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nif <(LEVEL) = [1]> then\n    show\n    switch costume to (level 1 1 v)\n    Clone at x: [360] y: [0]\n    Clone at x: [1150] y: [-75]\nelse\n    if <(LEVEL) = [2]> then\n        hide\n    else\n        if <(LEVEL) = [3]> then\n            show\n            switch costume to (level 1 1 v)\n            Clone at x: [360] y: [0]\n            Clone at x: [1150] y: [-75]\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)\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\nnext costume\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: [-40]\n    Clone at x: [2000] y: [35]\n    Clone at x: [2490] y: [165]\nelse\n    if <(LEVEL) = [2]> then\n    else\n        if <(LEVEL) = [2]> then\n            Clone at x: [150] y: [-40]\n            Clone at x: [2000] y: [35]\n        end\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\n@Chat Button\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [119]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (Chat Open v)\n        hide\n        wait until <not <mouse down?>>\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen I receive [chat close v]\nset size to (100) %\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [begin v]\nset [size v] to [.8]\nshow\nrepeat (40)\n    change [ghost v] effect by (-3)\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\ngo to x: (0) y: (0)\nchange [ghost v] effect by (100)\n\nwhen flag clicked\ngo to x: (-193) y: (-156)\nset size to (100) %\n\nwhen [t v] key pressed\nbroadcast (Chat Open v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [*tbn v]\nhide\n\nwhen I receive [shop open v]\nhide\n\nwhen I receive [shop close v]\nshow\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(LOVED__) = [1]> and <(FAVED___) = [1]>>> then\n        wait (pick random (30) to (40)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [*tbn v]\nhide\n\n@Detector\n\nwhen flag clicked\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nbroadcast (Thanks v)\n\ngo to x: (0) y: (0)\nshow\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\nwhen I receive [*tbn v]\nhide\n\n@Thanks\n\nwhen I receive [thanks v]\nswitch costume to (costume2 v)\ngo to x: (-210) y: (50)\nshow\ngo to [front v] layer\nstart sound [pop v]\nrepeat (9)\n    change y by (-6)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-3)\nend\nwait (1) seconds\nrepeat (10)\n    change y by (6)\nend\nhide\n\nwhen I start as a clone\ngo to x: (0) y: (-50)\nshow\ngo to [front v] layer\nrepeat (12)\n    change y by (-9)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-1)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (50)\n        if <(costume [number v]) = [2]> then\n            if <mouse down?> then\n                set [costume v] to [2]\n                repeat (25)\n                    change y by (10)\n                end\n                hide\n                delete this clone\n            end\n        else\n            if <(costume [number v]) = [3]> then\n                if <mouse down?> then\n                    set [costume v] to [1]\n                    repeat (25)\n                        change y by (15)\n                    end\n                    hide\n                    delete this clone\n                end\n            end\n        end\n    else\n        set [ghost v] effect to (0)\n    end\n    if <(Costume) > [0.99]> then\n        repeat (25)\n            change y by (15)\n        end\n        hide\n        delete this clone\n    end\n    hide\n    delete this clone\nend\n\nwhen flag clicked\nhide\nset [costume v] to [0.9]\n\nwhen I receive [begin v]\nset [costume v] to [0.9]\nwait (0.1) seconds\nset [costume v] to [0.9]\nwait (0.2) seconds\nset [costume v] to [0.9]\n\nwhen I receive [*tbn v]\nhide\n\n@Joining\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nwait (5) seconds\nhide\n\nwhen I receive [connecting v]\nswitch costume to (joining v)\nshow\n\nwhen I receive [connected v]\ngo [forward v] (999999) layers\nstart sound [Connect v]\nswitch costume to (connected v)\nshow\nwait (6) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\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\n@Intro TB\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\ngo to x: (-300) y: (0)\nforever\n    set [checktimer v] to (timer)\nend\n\nwhen [timer v] > (Checktimer)\nrepeat (30)\n    change [ghost v] effect by (0)\n    change x by (((0) - (x position)) / (3))\nend\n\nwhen I receive [1ntro over v]\nhide\n\n@Intro\n\nwhen I start as a clone\nif <(Clone) = [Particles]> then\n    switch costume to (pick random (29) to (31))\n    set size to (pick random (50) to (150)) %\n    set [ghost v] effect to (pick random (0.) to (5.))\n    set [brightness v] effect to (pick random (-25.) to (100.))\n    go to x: (0) y: (0)\n    point in direction (pick random (-180) to (180))\n    set [x v] to (pick random (10.) to (12.))\n    set [i v] to (pick random (2.) to (9.))\n    go to [front v] layer\n    show\n    repeat until <touching (_edge_ v)?>\n        move (X) steps\n        change y by (I)\n        change [i v] by (-0.4)\n        set [x v] to ((X) * (0.95))\n    end\n    delete this clone\nend\n\ndefine Particles\nset [clone v] to [Particles]\nrepeat (50)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(Clone) = [Name]> then\n    switch costume to (name v)\n    set size to (50) %\n    clear graphic effects\n    go to [front v] layer\n    go to x: (0) y: (-100)\n    point in direction (0)\n    show\n    repeat (50)\n        go to [front v] layer\n        change size by (((130) - (size)) / (8))\n        change y by (((0) - (y position)) / (8))\n        turn right (((90) - (direction)) / (8)) degrees\n    end\n    set [i v] to [-1]\n    repeat (10)\n        go to [front v] layer\n        change size by (I)\n        change [i v] by (join [-] (([abs v] of (I) ) / (2)))\n        turn right (I) degrees\n    end\n    switch costume to (logo v)\n    repeat (40)\n        go to [front v] layer\n        change size by (((130) - (size)) / (8))\n        turn right (((90) - (direction)) / (8)) degrees\n    end\n    set [i v] to [-1]\n    repeat (20)\n        go to [front v] layer\n        change size by ((I) / (3))\n        change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n        turn right ((I) / (-3)) degrees\n    end\n    delete this clone\nend\n\nwhen flag clicked\nreset timer\nhide\nstart sound [Prismo - Stronger v]\nset volume to (100) %\nclear graphic effects\nset size to (100) %\npoint in direction (90)\ngo to x: (0) y: (0)\nset [clone v] to [Square]\ncreate clone of (_myself_ v)\nwait (1) seconds\nset [clone v] to [Name]\ncreate clone of (_myself_ v)\nwait (0) seconds\nrepeat (2)\n    Spiral spline explosion\n    Particles\n    Rect\n    Spiral spline explosion\nend\nCircle\nrepeat (4)\n    Spiral spline explosion\n    Particles\n    Rect\n    Spiral spline explosion\nend\nCircle\nrepeat (2)\n    Spiral spline explosion\n    Rect\n    Spiral spline explosion\nend\n\nwhen I start as a clone\nif <(Clone) = [Square]> then\n    clear graphic effects\n    show\n    set size to (0) %\n    go to x: (0) y: (300)\n    point in direction (0)\n    switch costume to (square v)\n    repeat (20)\n        change size by (((100) - (size)) / (5))\n        turn right (((90) - (direction)) / (5)) degrees\n        change y by (((0) - (y position)) / (5))\n    end\n    point in direction (90)\n    repeat (12)\n        next costume\n    end\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((2000) - (size)) / (5))\n        switch costume to (square13 v)\n    end\n    wait (3) seconds\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((100) - (size)) / (5))\n        switch costume to (square13 v)\n    end\n    repeat (12)\n        switch costume to ((costume [number v]) - (1))\n        change size by (-5)\n    end\n    set [i v] to [-1]\n    repeat (20)\n        change size by ((I) / (3))\n        change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n        turn right ((I) / (-3)) degrees\n        change y by ((I) / (3))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Bursts]> then\n    switch costume to (lineexplosion1 v)\n    clear graphic effects\n    go to [front v] layer\n    go [backward v] (1) layers\n    set [i v] to (pick random (1) to (3))\n    if <(I) = [1]> then\n        set [brightness v] effect to (100)\n    else\n        if <(I) = [2]> then\n            set [brightness v] effect to (25)\n        else\n            set [brightness v] effect to (-25)\n        end\n    end\n    show\n    set [i v] to [20]\n    Animate   x: [0] y: [0] size: [0] rotate: (pick random (-180) to (180)) speed: [1]\n    repeat (2)\n        set [i v] to ((I) * (0.9))\n        move (I) steps\n        Size: [100] speed: [5]\n    end\n    repeat (10)\n        set [i v] to ((I) * (0.9))\n        move (I) steps\n        Size: [100] speed: [5]\n        change [ghost v] effect by (10)\n        next costume\n    end\n    delete this clone\nend\n\ndefine Animate   x: (x) y: (y) size: (s) rotate: (r) speed: (s)\nchange x by (((round (x)) - (round (x position))) / (s))\nchange y by (((round (y)) - (round (y position))) / (s))\nchange size by (((round (s)) - (round (size))) / (s))\nturn right (((round (r)) - (round (direction))) / (s)) degrees\n\ndefine Spiral spline explosion\nset [clone v] to [Bursts]\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\ndefine Size: (s) speed: (spd)\nchange size by (((round (s)) - (round (size))) / (spd))\n\ndefine Rect\nset [clone v] to [Rect]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Rect]> then\n    clear graphic effects\n    show\n    set size to (0) %\n    go to (random position v)\n    point in direction (90)\n    switch costume to (background rect v)\n    repeat until <(round (size)) = [300]>\n        change size by (((300) - (size)) / (15))\n        change [ghost v] effect by (4)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Circle]> then\n    clear graphic effects\n    set [brightness v] effect to (100)\n    go to [front v] layer\n    go [backward v] (2) layers\n    show\n    set size to (0) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (circle explosion 1 v)\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((300) - (size)) / (5))\n        switch costume to (circle explosion 1 v)\n    end\n    delete this clone\nend\n\ndefine Circle\nset [clone v] to [Circle]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [clone v] to [Circle 2]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Circle 2]> then\n    clear graphic effects\n    set [brightness v] effect to (0)\n    go to [front v] layer\n    go [backward v] (1) layers\n    show\n    set size to (0) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (circle explosion 1 v)\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((300) - (size)) / (5))\n        switch costume to (circle explosion 1 v)\n    end\n    delete this clone\nend\n\nwhen I receive [1ntro over v]\nhide\n\nwhen flag clicked\nreset timer\nhide variable [collected v]\nforever\n    if <(timer) < [8]> then\n        show variable [collected v]\n    end\nend\n\n@Wand collectable\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nnext costume\nPosition ((Collectables: x) - (SCROLL X)) ((Collectables: y) - (SCROLL Y))\nif <touching (harry \[p1\] v)?> then\n    change [collected v] by (1)\n    start sound [Coin v]\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]\nif <(LEVEL) = [1]> then\n    switch costume to (coin1 v)\n    Clone at x: [9999] y: [70]\nend\nset [collectables: x v] to [-9999999999]\n\ncreate clone of (_myself_ v)\n\nnext costume\nnext costume\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 [collectables: x v] to (x)\nset [collectables: y v] to (y)\ncreate clone of (_myself_ v)\n\n@Galleons:\n\nwhen flag clicked\nforever\n    go to x: (36) y: (28)\n    show\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [*tbn v]\nhide\n\n@Fakeoid\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 (costume1 v)\n    Clone at x: [2005] y: [-75]\nelse\n    if <(LEVEL) = [2]> then\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (costume1 v)\n            Clone at x: [2005] y: [-75]\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\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    if <touching (harry \[p1\] v)?> then\n        set [ghost v] effect to (25)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@shop button\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [119]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (shop open v)\n        hide\n        wait until <not <mouse down?>>\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen [s v] key pressed\nbroadcast (shop open v)\n\nwhen flag clicked\ngo to x: (-193) y: (-156)\nset size to (100) %\n\nwhen I receive [shop close v]\nset size to (100) %\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [begin v]\nset [size v] to [.8]\nshow\nrepeat (40)\n    change [ghost v] effect by (-3)\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\nchange [ghost v] effect by (100)\n\nwhen I receive [*tbn v]\nhide\n\nwhen I receive [chat open v]\nhide\n\nwhen I receive [chat close v]\nshow\n\n@online\n\nwhen flag clicked\nforever\n    hide\nend\n\nshow\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    switch costume to (costume10 v)\nend\n\n@toutching?\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: [4505] y: [225]\n    Clone at x: [500] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 1 1 v)\n            Clone at x: [4505] y: [225]\n            Clone at x: [500] y: [0]\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\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I receive [*ctp v]\nshow\n\n@Shop\n\nwhen I receive [tick v]\nif <(shop) = [1]> then\n    show\nelse\n    hide\nend\nif <key (space v) pressed?> then\n    broadcast (shop close v)\n    hide\n    wait until <not <key (space v) pressed?>>\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen flag clicked\nhide\nwait (5) seconds\ngo to [front v] layer\ngo [backward v] (3) layers\n\nwhen I receive [shop open v]\nset [shop v] to [1]\n\nwhen I receive [shop close v]\nset [shop v] to [0]\n\nwhen flag clicked\nforever\n    if <(shop) = [1]> then\n        if <key (1 v) pressed?> then\n            if <<not <(*jump boost?) = [2]>> and <(COLLECTED) > [4]>> then\n                set [*jump boost? v] to [2]\n                change [collected v] by (-5)\n            end\n        end\n        if <key (2 v) pressed?> then\n            if <<not <(*speed boost?) = [2]>> and <(COLLECTED) > [4]>> then\n                set [*speed boost? v] to [2]\n                change [collected v] by (-5)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nrepeat (5)\n    broadcast (shop close v)\nend\n\n@Close chat\n\nwhen flag clicked\nforever\n    go to x: (11) y: (3)\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <(Chat) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [119]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (Chat Close v)\n        hide\n        wait until <not <mouse down?>>\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    go to [front v] layer\nend\n\n@Close shop\n\nwhen flag clicked\nforever\n    go to x: (-5) y: (45)\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <(shop) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [119]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (shop close v)\n        hide\n        wait until <not <mouse down?>>\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\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]\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: [500] y: [-75]\n    Clone at x: [550] y: [0]\n    Clone at x: [475] y: [0]\n    Clone at x: [475] y: [0]\n    Clone at x: [475] y: [-50]\n    Clone at x: [300] y: [0]\n    Clone at x: [300] y: [0]\n    Clone at x: [250] y: [150]\n    Clone at x: [300] y: [0]\n    Clone at x: [400] y: [200]\n    Clone at x: [400] y: [0]\n    Clone at x: [-2500] y: [100]\n    Clone at x: [0] y: [300]\n    Clone at x: [0] y: [300]\n    Clone at x: [0] y: [300]\n    Clone at x: [0] y: [300]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 1 1 v)\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (level 1 1 v)\n            Clone at x: [480] y: [0]\n            Clone at x: [500] y: [-75]\n            Clone at x: [550] y: [0]\n            Clone at x: [475] y: [0]\n            Clone at x: [475] y: [0]\n            Clone at x: [475] y: [-50]\n            Clone at x: [300] y: [0]\n            Clone at x: [300] y: [0]\n            Clone at x: [250] y: [150]\n            Clone at x: [300] y: [0]\n            Clone at x: [400] y: [200]\n            Clone at x: [400] y: [0]\n            Clone at x: [-2500] y: [100]\n            Clone at x: [0] y: [300]\n            Clone at x: [0] y: [300]\n            Clone at x: [0] y: [300]\n            Clone at x: [0] y: [300]\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\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    show\nend\n\n@Galleon\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nnext costume\nPosition ((Collectables: x) - (SCROLL X)) ((Collectables: y) - (SCROLL Y))\nif <touching (harry \[p1\] v)?> then\n    change [collected v] by (1)\n    start sound [Coin v]\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]\nif <(LEVEL) = [1]> then\n    switch costume to (coin1 v)\n    Clone at x: [-7] y: [63]\n    Clone at x: [1950] y: [-75]\n    Clone at x: [1960] y: [-75]\n    Clone at x: [1970] y: [-75]\n    Clone at x: [1980] y: [-75]\n    Clone at x: [475] y: [75]\n    Clone at x: [3300] y: [250]\n    Clone at x: [2955] y: [260]\n    Clone at x: [480] y: [250]\n    Clone at x: [1680] y: [20]\n    Clone at x: [590] y: [-100]\n    Clone at x: [3250] y: [10]\n    Clone at x: [3810] y: [90]\n    Clone at x: [4350] y: [90]\n    Clone at x: [5100] y: [90]\n    Clone at x: [0] y: [200]\n    Clone at x: [0] y: [200]\n    Clone at x: [0] y: [200]\n    Clone at x: [0] y: [200]\n    Clone at x: [0] y: [200]\nelse\n    if <(LEVEL) = [2]> then\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (coin1 v)\n            Clone at x: [-7] y: [63]\n            Clone at x: [1950] y: [-75]\n            Clone at x: [1960] y: [-75]\n            Clone at x: [1970] y: [-75]\n            Clone at x: [1980] y: [-75]\n            Clone at x: [475] y: [75]\n            Clone at x: [3300] y: [250]\n            Clone at x: [2955] y: [260]\n            Clone at x: [480] y: [250]\n            Clone at x: [1680] y: [20]\n            Clone at x: [590] y: [-100]\n            Clone at x: [3250] y: [10]\n            Clone at x: [3810] y: [90]\n            Clone at x: [4350] y: [90]\n            Clone at x: [5100] y: [90]\n            Clone at x: [0] y: [200]\n            Clone at x: [0] y: [200]\n            Clone at x: [0] y: [200]\n            Clone at x: [0] y: [200]\n            Clone at x: [0] y: [200]\n        end\n    end\nend\nset [collectables: x v] to [-9999999999]\n\ncreate clone of (_myself_ v)\n\nnext costume\nnext costume\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 [collectables: x v] to (x)\nset [collectables: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [*ctp v]\nshow\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]\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: [500] y: [-75]\n    Clone at x: [550] y: [0]\n    Clone at x: [475] y: [0]\n    Clone at x: [475] y: [0]\n    Clone at x: [475] y: [-50]\n    Clone at x: [300] y: [0]\n    Clone at x: [300] y: [0]\n    Clone at x: [250] y: [150]\n    Clone at x: [300] y: [0]\n    Clone at x: [400] y: [200]\n    Clone at x: [500] y: [0]\nelse\n    if <(LEVEL) = [2]> then\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\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\nwhen I receive [*ctp v]\nshow\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nswitch costume to (open v)\nPosition ((Exit: x) - (SCROLL X)) ((Exit: y) - (SCROLL Y))\nif <<touching (harry \[p1\] v)?> and <(costume [number v]) = [1]>> then\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 (closed v)\n    Clone at x: [2350] y: [1650]\nelse\n    if <(LEVEL) = [2]> then\n        broadcast (*tbn v)\n        Clone at x: [99999] y: [99999]\n        stop [all v]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (closed v)\n            Clone at x: [2350] y: [1650]\n        else\n            if <(LEVEL) = [4]> then\n                broadcast (*tbn v)\n                Clone at x: [99999] y: [99999]\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\nshow\n\nwhen I receive [*ctp v]\nhide\n\n@Chat\n\nwhen I receive [tick v]\nif <(Chat) = [1]> then\n    show\nelse\n    hide\nend\nif <key (space v) pressed?> then\n    broadcast (Chat Close v)\n    hide\n    wait until <not <key (space v) pressed?>>\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen flag clicked\nhide\nwait (5) seconds\ngo to [front v] layer\ngo [backward v] (3) layers\n\nwhen I receive [chat open v]\nset [chat v] to [1]\n\nwhen I receive [chat close v]\nset [chat v] to [0]\n\nwhen flag clicked\nforever\n    if <<(username) = [kingofnumbers]> or <(username) = [kingofnumbers_]>> then\n        switch costume to (chatty2 v)\n    else\n        switch costume to (chatty v)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@TB\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nshow\n\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nwait (1.5) seconds\nhide\n\nwhen I receive [*tbn v]\nshow\n\nwhen I receive [*ctp v]\nhide\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.000001)\nbroadcast (*tbn v)\n\n@toutching?2\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]\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]\nelse\n    if <(LEVEL) = [2]> then\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\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    if <touching (harry \[p1\] v)?> then\n        set [ghost v] effect to (50)\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [*ctp v]\nshow\n\n@coins\n\nwhen flag clicked\nshow\nforever\n    switch costume to (COLLECTED)\n    hide variable [collected v]\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go to x: (-75) y: (155)\nend\n\nwhen I receive [*tbn v]\nhide\n\nwhen I receive [*ctp v]\nshow\n\n@Y\n\nwhen I receive [*tbn v]\nrepeat (50)\n    go to [front v] layer\n    change [ghost v] effect by (2)\n    wait (0.1) seconds\nend\n\nwhen I receive [*ctp v]\nhide\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    go to x: (-169) y: (-104)\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (115) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (*ctp v)\n    end\nend\n\nwhen I receive [**end v]\nhide\n\nwhen flag clicked\nwait (1) seconds\nhide\n\n@N\n\nwhen I receive [*tbn v]\n\nwhen I receive [*ctp v]\nhide\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    go to x: (-91) y: (-103)\nend\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (115) %\n    else\n        set size to (100) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        broadcast (**end v) and wait\n        stop [all v]\n    end\nend\n\nwhen I receive [**end v]\nhide\n\nwhen I receive [*tbn v]\nrepeat (50)\n    change [ghost v] effect by (2)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nwait (1) seconds\nhide\n\n@Sprite1\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\nforever\n    go to x: (-156) y: (-38)\n    go to [front v] layer\nend\n\nwhen I receive [*tbn v]\nrepeat (50)\n    change [ghost v] effect by (2)\n    wait (0.1) seconds\nend\n\nwhen I receive [*ctp v]\nhide\n\nwhen I receive [**end v]\nhide\n\nwhen I receive [*tbn v]\n\nwhen flag clicked\nwait (1) seconds\nhide\n\n@Mobile chat\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    if <(Chat) = [0]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [119]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (****chat v)\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen flag clicked\ngo to x: (29) y: (-156)\nset size to (100) %\n\nwhen I receive [chat open v]\nset size to (100) %\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [begin v]\nset [size v] to [.8]\nshow\nrepeat (40)\n    change [ghost v] effect by (-3)\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\nchange [ghost v] effect by (100)\n\nwhen I receive [*tbn v]\nhide\n\nwhen I receive [chat close v]\nset size to (100) %\nset [ghost v] effect to (0)\nhide\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Jboost\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [119]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        if <<not <(*jump boost?) = [2]>> and <(COLLECTED) > [4]>> then\n            set [*jump boost? v] to [2]\n            change [collected v] by (-5)\n        end\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen flag clicked\ngo to x: (-77) y: (15)\nset size to (100) %\n\nwhen I receive [shop open v]\nset size to (100) %\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [begin v]\nset [size v] to [.8]\nhide\n\nwhen flag clicked\ngo to [front v] layer\nhide\nchange [ghost v] effect by (100)\n\nwhen I receive [*tbn v]\nhide\n\nwhen I receive [chat open v]\nhide\n\nwhen I receive [shop close v]\nset size to (100) %\nset [ghost v] effect to (0)\nshow\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Sboost\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [119]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        if <<not <(*speed boost?) = [2]>> and <(COLLECTED) > [4]>> then\n            set [*speed boost? v] to [2]\n            change [collected v] by (-5)\n        end\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen flag clicked\ngo to x: (-77) y: (-60)\nset size to (100) %\n\nwhen I receive [begin v]\nset [size v] to [.8]\nhide\n\nwhen flag clicked\ngo to [front v] layer\nhide\nchange [ghost v] effect by (100)\n\nwhen I receive [*tbn v]\nhide\n\nwhen I receive [chat open v]\nhide\n\nwhen I receive [shop open v]\nset size to (100) %\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [shop close v]\nset size to (100) %\nset [ghost v] effect to (0)\nshow\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Blank2\n\nwhen flag clicked\nset [end? v] to [0]\nset [player time v] to [0]\nrepeat until <(end?) = [1]>\n    wait (1) seconds\n    change [player time v] by (1)\nend\n\nwhen flag clicked\nforever\n    if <(end?) = [1]> then\n        if <(☁ best time) > (player time)> then\n            set [☁ best time v] to (player time)\n            set [by v] to (username)\n        end\n    end\nend\n\nset [☁ best time v] to [9999999999999]\nset [by v] to []\n\n