PURPLE//a multiplayer scrolling platformer

Instructions: use WASD or arrows to move\nFrance's no 2 game Jan 17\nWorld's no 54 game Jan 17\nTy so much guys i luv u!

@Stage\n\nwhen flag clicked\nforever\n    if <((1) + (1)) = [2]> then\n        play sound [Alan Walker - Force v] until done\n    else\n        if <((2) + (2)) = [4]> then\n            play sound [Alan Walker - Force v] until done\n        else\n            if <((4) + (4)) = [8]> then\n                play sound [Alan Walker - Force v] until done\n            else\n                if <((8) + (8)) = [16]> then\n                    play sound [Alan Walker - Force v] until done\n                else\n                    play sound [Disconnect v] until done\n                end\n            end\n        end\n    end\nend\n\n@Blank\n\n@Player\n\nwhen flag clicked\ndelete all of [chat v]\nadd [Hi!] to [chat v]\nadd [Come with me!] to [chat v]\nadd [Ok!] to [chat v]\nadd [Nice!] to [chat v]\nadd [Look at me!] to [chat v]\nadd [Be careful!] to [chat v]\nadd [lol] to [chat v]\nadd [Bye!] to [chat v]\nadd [No thanks.] to [chat v]\n\nwhen flag clicked\nshow list [chat v]\nset [is the chat open v] to [0]\nforever\n    if <<key (t v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        if <(is the chat open) = [1]> then\n            set [is the chat open v] to [0]\n        else\n            set [is the chat open v] to [1]\n        end\n        wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\n    end\n    Chat\nend\n\ndefine Chat\nif <(is the chat open) = [1]> then\n    if <key (1 v) pressed?> then\n        set [chat v] to [1]\n        say (item (CHAT) of [chat v])\n        wait (2) seconds\n        say []\n        set [chat v] to [0]\n    else\n        if <key (2 v) pressed?> then\n            set [chat v] to [2]\n            say (item (CHAT) of [chat v])\n            wait (2) seconds\n            say []\n            set [chat v] to [0]\n        else\n            if <key (3 v) pressed?> then\n                set [chat v] to [3]\n                say (item (CHAT) 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 v] to [4]\n                    say (item (CHAT) of [chat v])\n                    wait (2) seconds\n                    say []\n                    set [chat v] to [0]\n                else\n                    if <key (5 v) pressed?> then\n                        set [chat v] to [5]\n                        say (item (CHAT) of [chat v])\n                        wait (2) seconds\n                        say []\n                        set [chat v] to [0]\n                    else\n                        if <key (6 v) pressed?> then\n                            set [chat v] to [6]\n                            say (item (CHAT) of [chat v])\n                            wait (2) seconds\n                            say []\n                            set [chat v] to [0]\n                        else\n                            if <key (7 v) pressed?> then\n                                set [chat v] to [7]\n                                say (item (CHAT) of [chat v])\n                                wait (2) seconds\n                                say []\n                                set [chat v] to [0]\n                            else\n                                if <key (8 v) pressed?> then\n                                    set [chat v] to [8]\n                                    say (item (CHAT) of [chat v])\n                                    wait (2) seconds\n                                    say []\n                                    set [chat v] to [0]\n                                else\n                                    if <key (9 v) pressed?> then\n                                        set [chat v] to [9]\n                                        say (item (CHAT) of [chat v])\n                                        wait (2) seconds\n                                        say []\n                                        set [chat v] to [0]\n                                    else\n                                        set [chat v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [my player # v] to [0]\nset [max players v] to [10]\nbroadcast (setup opponents v) and wait\nbroadcast (join game v) and wait\nset [connect v] to [Connecting]\nif <(MY PLAYER #) > [0]> then\n    set [connect v] to [Connected]\nelse\n    set [connect v] to [Full]\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    end\nend\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ player1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ player2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ player3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ player4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ player5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ player6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ player7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ player8 v] to (value)\n                            else\n                                if <(player) = [9]> then\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine send cloud data\nset [encoded v] to []\nwrite (costume [number v]) to encoded\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (x) to encoded\nwrite (y) to encoded\nwrite (CHAT) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\nwhen flag clicked\nbroadcast (Green flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nset [player: level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Reset\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v)\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        set [exit v] to []\n    end\nend\n\ndefine Tick\nif <touching (ladder v)?> then\n    change [sx v] by ((2) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n    set [sx v] to ((sx) * (0.63))\nelse\n    if <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n        change [sx v] by ((1.7) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n        set [sx v] to ((sx) * (0.85))\n    else\n        change [sx v] by ((1.5) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n        set [sx v] to ((sx) * (0.79))\n    end\nend\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> then\n    if <(in air) < [3]> then\n        if <(sy) > [-2]> then\n            if <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n                set [sy v] to [17]\n            else\n                set [sy v] to [12]\n            end\n        end\n    end\nend\nif <touching (bouncy v)?> then\n    set [sy v] to [21]\nend\nif <touching (ladder v)?> then\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> or <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>>>> then\n        change [y v] by (6)\n    end\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<((mouse y) - (20)) > (y position)> and <mouse down?>>> then\n        change [y v] by (-6)\n    end\n    set [sy v] to [0]\nelse\n    if <(sy) > [-20]> then\n        change [sy v] by (-1.3)\n    end\nend\nChange player y by (sy)\n Test - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nPosition\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\n\nif <<<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> or <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>> or <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) - (20)) > (y position)> and <mouse down?>>> or <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>>>> then\n    set [timeout v] to [1000]\nelse\n    change [timeout v] by (-1)\nend\n\nif <(Timeout) < [1]> then\n    broadcast (timeout v)\n    hide\nend\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (8)\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 (-8)\n    if <touching (platforms v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) - (5)) > (y position)> and <mouse down?>>> then\n            if <(sx) > [0]> then\n                set [sx v] to [-16]\n            else\n                set [sx v] to [16]\n            end\n            set [sy v] to [12]\n        end\n        Position\n    end\n    repeat until <not <touching (platforms v)?>>\n        change [x v] by ((([abs v] of (sx) ) / (sx)) * (-1))\n        Position\n    end\nend\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    change [y v] by ((([abs v] of (sy) ) / (sy)) * (-1))\n    if <(sy) < [0]> then\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\nif <touching (jump_through v)?> then\n    if <(sy) < [0]> then\n        change [y v] by ((sy) * (-1))\n        set [sy v] to [0]\n        set [in air v] to [0]\n        Position\n    end\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine  Test - Die\nif <<touching (spinny v)?> or <touching (danger v)?>> then\n    set [exit v] to [die]\n    Reset\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 [player: level v] by (1)\nwait (1) seconds\nset [ghost v] effect to (0)\n\nwhen flag clicked\nforever\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> and <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) + (15)) > (x position)> and <mouse down?>>>> then\n        switch costume to (right up v)\n    else\n        if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> and <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) - (15)) < (x position)> and <mouse down?>>>> then\n            switch costume to (left up v)\n        else\n            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> then\n                switch costume to (up v)\n            else\n                if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> then\n                    switch costume to (right v)\n                else\n                    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>> then\n                        switch costume to (left v)\n                    else\n                        switch costume to (middle v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [timeout v]\nhide\n\ndefine Reset\nif <(CHECKPOINT) = [0]> then\n    set [x v] to [-100]\n    set [y v] to [-60]\n    set [scroll y v] to (y)\n    set [scroll x v] to (x)\nelse\n    if <(CHECKPOINT) = [1]> then\n        set [x v] to [1600]\n        set [y v] to [-30]\n        set [scroll y v] to (y)\n        set [scroll x v] to (x)\n    else\n        if <(CHECKPOINT) = [2]> then\n            set [x v] to [1400]\n            set [y v] to [850]\n            set [scroll y v] to (y)\n            set [scroll x v] to (x)\n        end\n    end\nend\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [10]\nset [timeout v] to [1000]\nset [exit v] to []\nset size to (100) %\nshow\nset rotation style [left-right v]\n\nwhen flag clicked\nforever\n    set size to (105) %\nend\n\nwhen I start as a clone\nforever\n    set size to (105) %\nend\n\nwhen [r v] key pressed\nReset\n\nwhen I receive [enemy killed v]\nset [sy v] to [12]\nchange [y v] by (6)\n\nwhen I receive [me is frooooont v]\ngo [backward v] (1) layers\n\nwhen flag clicked\nrepeat (10)\n    go to [front v] layer\n    go to [front v] layer\nend\n\nwhen I receive [me is baaaaaaack v]\ngo [forward v] (1) layers\nforever\n    go to [front v] layer\n    go to [front v] layer\nend\n\nClone at [1600] [-30]\nClone at [1400] [850]\n\nwhen flag clicked\nforever\n    if <touching (win v)?> then\n        broadcast (Win v)\n        wait (5) seconds\n    end\nend\n\nwhen flag clicked\nshow list [players who won v]\n\nforever\n    if <(Win) = [1]> then\n        hide list [players who won v]\n        add (username) to [players who won v]\n        wait (99999) seconds\n    end\nend\n\ndefine put this project on trending\nLOVE AND FAVE REQUIREMENT\n\ndefine LOVE AND FAVE REQUIREMENT\nput this project on trending\n\nwhen I receive [win v]\nset [ghost v] effect to (50)\n\nwhen flag clicked\nset [win v] to [0]\nset [☁ world record time: v] to (☁ FT)\nset [your time: v] to [0]\nrepeat until <(Win) = [1]>\n    change [your time: v] by (0.032)\nend\n\nwhen I receive [win v]\nforever\n    if <(Your Time:) < (☁ World Record Time:)> then\n        if <(☁ World Record Time:) > (Your Time:)> then\n            forever\n                set [☁ ft v] to (Your Time:)\n                set [☁ world record time: v] to (☁ FT)\n            end\n        end\n    end\nend\n\nset [☁ world record time: v] to [99999]\n\nset [fastest time v] to [99999]\n\nwhen flag clicked\nrepeat until <(☁ World Record Time:) = (☁ FT)>\n    set [☁ world record time: v] to (☁ FT)\nend\n\nforever\n    set [☁ world record time: v] to [10.839]\n    set [☁ ft v] to [10.839]\nend\n\nset [☁ ft v] to [53.852]\n\n@Opponents\n\ndefine Decode chat (#)\nif <(#) = [0]> then\n\nwhen I receive [decode chat v]\nDecode chat (value)\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\ndecode (☁ Player1)\ndecode (☁ Player2)\ndecode (☁ Player3)\ndecode (☁ Player4)\ndecode (☁ Player5)\ndecode (☁ Player6)\ndecode (☁ Player7)\ndecode (☁ Player8)\ndecode (☁ Player9)\ndecode (☁ Player10)\nset [active check v] to [0]\nset [c1 v] to [0]\nrepeat (10)\n    change [c1 v] by (1)\n    if <(item (c1) of [active_check v]) = [1]> then\n        change [active check v] by (1)\n    end\nend\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\ndefine setup players\nhide\nset [offline v] to [100]\nset [player # v] to [1]\npoint in direction (90)\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n    else\n        tick\n    end\nend\n\ndefine value = cloud # (player #)\nif <(player #) = [1]> then\n    set [value v] to (☁ Player1)\nelse\n    if <(player #) = [2]> then\n        set [value v] to (☁ Player2)\n    else\n        if <(player #) = [3]> then\n            set [value v] to (☁ Player3)\n        else\n            if <(player #) = [4]> then\n                set [value v] to (☁ Player4)\n            else\n                if <(player #) = [5]> then\n                    set [value v] to (☁ Player5)\n                else\n                    if <(player #) = [6]> then\n                        set [value v] to (☁ Player6)\n                    else\n                        if <(player #) = [7]> then\n                            set [value v] to (☁ Player7)\n                        else\n                            if <(player #) = [8]> then\n                                set [value v] to (☁ Player8)\n                            else\n                                if <(player #) = [9]> then\n                                    set [value v] to (☁ Player9)\n                                else\n                                    if <(player #) = [10]> then\n                                        set [value v] to (☁ Player10)\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\ndefine tick\nvalue = cloud # (player #)\nif <(join (value) [A]) = (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 (value) [A])\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nswitch costume to (value)\nvalue = read from encoded\nif <<<(y position) < [-160]> or <[160] < (y position)>> or <<(x position) < [-220]> or <[220] < (x position)>>> then\n    think []\n    set [ghost v] effect to (0)\n    go to [front v] layer\n    if on edge, bounce\n    set rotation style [all around v]\n    switch costume to (arrow v)\n    point towards (player v)\nelse\n    set [ghost v] effect to (10)\n    set rotation style [don't rotate v]\n    think (value)\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))\nif <(costume [name v]) = [Arrow]> then\n    if on edge, bounce\n    set rotation style [all around v]\n    point towards (2 . game_player v)\nend\nvalue = read from encoded\nbroadcast (Decode chat v)\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join (value) [A])\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join (value) [A]) = (last value)> then\n    set [my player # v] to (player #)\nend\n\nwhen I receive [setup opponents v]\nsetup players\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [630] [0]\nClone at [450] [2]\nClone at [360] [150]\nClone at [0] [0]\nClone at [-200] [400]\nClone at [-600] [300]\nClone at [-800] [400]\nClone at [-1000] [450]\nClone at [600] [500]\nClone at [1250] [300]\nClone at [1500] [300]\n\nwhen I receive [tick v]\nposition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\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) (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nClone at [-600] [300]\n\n@Win\n\nwhen I receive [green flag v]\nset [ghost v] effect to (30)\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [630] [0]\nClone at [450] [2]\nClone at [360] [150]\nClone at [0] [0]\nClone at [-200] [400]\nClone at [-600] [300]\nClone at [-800] [400]\nClone at [-1000] [450]\nClone at [600] [500]\nClone at [1250] [300]\nClone at [1500] [300]\n\nwhen I receive [tick v]\nposition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\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) (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nClone at [-600] [300]\n\nwhen I receive [win v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\n@Moving Enemy\n\ndefine Clone at x: (x) y: (y) MAX (i)\nset [enemies max x v] to (i)\nset [enemies: x v] to (x)\nset [enemies: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nset size to (28) %\nPosition ((enemies: X CHANGE) + ((enemies: x) - (SCROLL X))) ((enemies: y) - (SCROLL Y))\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 start as a clone\nset [enemies: x change v] to [0]\nset rotation style [left-right v]\nforever\n    repeat until <(enemies: X CHANGE) > (enemies MAX X)>\n        point in direction (90)\n        change [enemies: x change v] by (2)\n    end\n    repeat until <(enemies: X CHANGE) < [1]>\n        point in direction (-90)\n        change [enemies: x change v] by (-2)\n    end\nend\n\nwhen I receive [enemy killed v]\ngo to [back v] layer\ndelete this clone\n\nswitch costume to (red1 v)\nrepeat until <(costume [number v]) = [17]>\n    next costume\n    wait (0.021) seconds\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <([y position v] of [player v]) > (y position)> then\n            broadcast (JUMP v)\n            broadcast (Enemy Killed v)\n        else\n            set [exit v] to [die]\n            broadcast (Reset v)\n        end\n    end\nend\n\nwhen I receive [setup v]\nhide\nset [enemies: x v] to [0]\nset [enemies: y v] to [0]\nif <not <(CHECKPOINT) > [0]>> then\n    Clone at x: [450] y: [-50] MAX [460]\n    set [enemies: x v] to [-999999999999999]\nelse\n    if <(CHECKPOINT) = [1]> then\n        set [enemies: x v] to [-999999999999999]\n    else\n        set [enemies: x v] to [-999999999999999]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to (red1 v)\n\nwhen I start as a clone\nforever\n    repeat until <(costume [number v]) = [8]>\n        next costume\n        wait (0.019) seconds\n    end\n    switch costume to (red1 v)\n    wait (0.019) seconds\nend\n\nif <not <(costume [number v]) > [8]>> then\n    repeat until <(costume [number v]) = [8]>\n        next costume\n        wait (0.019) seconds\n    end\n    switch costume to (red1 v)\n    wait (0.019) seconds\nend\n\nwhen I receive [begin v]\nforever\n    if <touching (player v)?> then\n        if <<([y position v] of [player v]) > (y position)> and <(sy2) < [-1]>> then\n            broadcast (JUMP v)\n            broadcast (Enemy Killed v)\n            delete this clone\n        else\n            set [exit v] to [die]\n            broadcast (Reset v)\n        end\n    end\nend\n\nshow\n\ngo to [back v] layer\nswitch costume to (red1 v)\nrepeat until <(costume [number v]) = [17]>\n    next costume\n    wait (0.019) seconds\nend\ndelete this clone\n\n\n\nif <not <(costume [number v]) = [17]>> then\n\nrepeat until <(costume [number v]) > [8]>\n\nClone at x: [1700] y: [28] MAX [80]\nClone at x: [2330] y: [335] MAX [250]\nClone at x: [2248] y: [335] MAX [160]\n\nset [enemies: x v] to [-999999999999999]\n\n@Collectables\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 (player v)?> then\n    change [collected v] by (1)\n    start sound [coin v]\n    delete this clone\nend\n\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\nelse\n    hide\nend\n\nshow\n\nwhen I receive [reset v]\nif <(volume) = [99.009]> then\n    delete this clone\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\nwhen flag clicked\nset volume to (100) %\nset [coins v] to [0]\nhide\nset [collectables: x v] to [0]\nset [collectables: y v] to [0]\nwait until <(Connected?) = [1]>\nchange volume by (-0.001)\nswitch costume to (coin1 v)\nif <(CHECKPOINT) = [0]> then\n    Clone at x: [100] y: [59]\n    Clone at x: [964] y: [151]\n    Clone at x: [1145] y: [261]\n    Clone at x: [1300] y: [331]\n    Clone at x: [1468] y: [357]\n    Clone at x: [1643] y: [416]\n    Clone at x: [1806] y: [470]\n    Clone at x: [2178] y: [538]\n    Clone at x: [2320] y: [538]\n    Clone at x: [2936] y: [490]\n    Clone at x: [3076] y: [455]\n    Clone at x: [3323] y: [441]\n    Clone at x: [3775] y: [375]\n    Clone at x: [4232] y: [447]\n    Clone at x: [4985] y: [621]\n    Clone at x: [5413] y: [674]\n    Clone at x: [5779] y: [464]\n    Clone at x: [6830] y: [293]\n    Clone at x: [7230] y: [419]\n    set [collectables: x v] to [-99999]\nend\n\nwhen flag clicked\nforever\n    set size to (75) %\nend\n\nhide\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Danger\n\nwhen I receive [green flag v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\nClone at [480] [0]\nClone at [360] [165]\nClone at [-600] [242]\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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) (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\ngo to [back v] layer\n\n@Checkpoint\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [,] (join [ ] ((mouse y) + (SCROLL Y)))))\nshow variable [mouse v]\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((Checkpoint: x) - (SCROLL X)) ((Checkpoint: y) - (SCROLL Y))\nif <(costume [name v]) = [closed]> then\n    if <touching (player v)?> then\n        switch costume to (open8 v)\n        change [checkpoint v] by (1)\n        play sound [CHECKPOINT v] until done\n    end\nend\ngo to [front v] layer\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) (y)\nset [checkpoint: x v] to (x)\nset [checkpoint: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\nset [checkpoint v] to [0]\nset [checkpoint: x v] to [0]\nset [checkpoint: y v] to [0]\nswitch costume to (closed v)\nClone at [1600] [-30]\nClone at [1400] [850]\nClone at [265] [2435]\nset [checkpoint: x v] to [-99999]\n\nClone at [1600] [-30]\nClone at [1400] [850]\n\nrepeat (7)\n    next costume\n    wait (0.01) seconds\nend\n\n@Ladder\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [480] [0]\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) (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\ngo to [back v] layer\n\n@parallax\n\nwhen I receive [tick v]\nGo to (((((Movement ID) * (480)) - ((SCROLL X) / (6))) mod (960)) - (480)) (Y)\n\nwhen I start as a clone\npoint in direction (90)\nset [ghost v] effect to (0)\nset [movement id v] to [0]\nswitch costume to (hills3 v)\nhide\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nset [movement id v] to [-1]\nswitch costume to (hills2 v)\n\n@@StratfordJames Tree\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\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 [green flag v]\ngo to [back v] layer\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nClone at [-60] [0]\nset [x v] to [-99999]\n\nClone at [1527] [-39]\n\nClone at [1758] [120]\n\nClone at [0] [-128]\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\ngo [backward v] (5) layers\n\n@multiplayer v3.0\n\ndefine decode (i)\nset [c1 v] to [1]\nrepeat until <(c1) > (length of (i))>\n    set [output v] to []\n    repeat until <(join (letter (c1) of (i)) (letter ((c1) + (1)) of (i))) < [1]>\n        switch costume to ((join (letter (c1) of (i)) (letter ((c1) + (1)) of (i))) - (9))\n        set [output v] to (join (output) (letter (1) of (costume [name v])))\n        change [c1 v] by (2)\n    end\n    add (output) to [cloud_data v]\n    change [c1 v] by (2)\nend\n\ndefine encode (i)\nset [c1 v] to [1]\nrepeat until <(c1) > (length of (i))>\n    switch costume to (join (letter (c1) of (i)) [x])\n    set [output v] to (join (output) ((costume [number v]) + (9)))\n    change [c1 v] by (1)\nend\nset [output v] to (join (output) [00])\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nsetup\nwait until <(w_Tick) > [3]>\nwait (0.1) seconds\ndetermine_ID\nbroadcast (cloud_players v)\n\ndefine setup\nset [@c v] to [0]\nset [playerid v] to [null]\nset [w_tick v] to [0]\ndelete all of [active_tick v]\ndelete all of [cloud_data v]\ndelete all of [active_check v]\ndelete all of [last_val v]\nset [names v] to [0]\nset [active check v] to [0]\nrepeat (10)\n    add [4] to [active_tick v]\n    add [null] to [active_check v]\n    add [9999] to [last_val v]\nend\nimport_clouddata\nbroadcast (cloud_start v)\n\nwhen I receive [cloud_start v]\nif <(@c) = [0]> then\n    forever\n        process [0]\n        wait (0.4) seconds\n        process [1]\n    end\nend\n\ndefine process (i)\nif <(i) = [0]> then\n    set [c1 v] to [0]\n    repeat (10)\n        change [c1 v] by (1)\n        replace item (c1) of [last_val v] with (item (((c1) * (6)) - (3)) of [cloud_data v])\n    end\nelse\n    set [c1 v] to [0]\n    repeat (10)\n        change [c1 v] by (1)\n        if <(item (((c1) * (6)) - (3)) of [cloud_data v]) = (item (c1) of [last_val v])> then\n            if <(item (c1) of [active_tick v]) < [4]> then\n                replace item (c1) of [active_tick v] with ((item (c1) of [active_tick v]) + (1))\n            end\n        else\n            replace item (c1) of [active_tick v] with [0]\n        end\n        replace item (c1) of [active_check v] with ((1) - <(item (c1) of [active_tick v]) = [4]>)\n    end\n    if <(w_Tick) < [4]> then\n        change [w_tick v] by (1)\n    end\nend\n\nwhen I receive [cloud_start v]\nif <(@c) = [0]> then\n    forever\n        broadcast (cloud_tick v)\n    end\nend\n\ndefine export_clouddata\nset [output v] to []\nencode (round ((SCROLL X) + ([x position v] of [player v])))\nencode (round ((SCROLL Y) + ([y position v] of [player v])))\nencode (pick random (1000) to (9999))\nencode (username)\nencode (chat item)\nencode ([costume name v] of [player v])\nif <(playerID) = [1]> then\n    set [☁ player1 v] to (output)\nelse\n    if <(playerID) = [2]> then\n        set [☁ player2 v] to (output)\n    else\n        if <(playerID) = [3]> then\n            set [☁ player3 v] to (output)\n        else\n            if <(playerID) = [4]> then\n                set [☁ player4 v] to (output)\n            else\n                if <(playerID) = [5]> then\n                    set [☁ player5 v] to (output)\n                else\n                    if <(playerID) = [6]> then\n                        set [☁ player6 v] to (output)\n                    else\n                        if <(playerID) = [7]> then\n                            set [☁ player7 v] to (output)\n                        else\n                            if <(playerID) = [8]> then\n                                set [☁ player8 v] to (output)\n                            else\n                                if <(playerID) = [9]> then\n                                    set [☁ player9 v] to (output)\n                                else\n                                    if <(playerID) = [10]> then\n                                        set [☁ player10 v] to (output)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nstop [this script v]\n\ndefine import_clouddata\ndelete all of [cloud_data v]\ndecode (☁ Player1)\ndecode (☁ Player2)\ndecode (☁ Player3)\ndecode (☁ Player4)\ndecode (☁ Player5)\ndecode (☁ Player6)\ndecode (☁ Player7)\ndecode (☁ Player8)\ndecode (☁ Player9)\ndecode (☁ Player10)\nset [active check v] to [0]\nset [c1 v] to [0]\nrepeat (10)\n    change [c1 v] by (1)\n    if <(item (c1) of [active_check v]) = [1]> then\n        change [active check v] by (1)\n    end\nend\n\ndefine determine_ID\nset [c1 v] to [0]\nrepeat (10)\n    change [c1 v] by (1)\n    if (item (c1) of [active_check v]) then\nend\nset [playerid v] to [full]\n\nwhen I receive [cloud_players v]\nif <(@c) = [0]> then\n    wait (0.3) seconds\n    forever\n        check\n    end\nend\n\nwhen I receive [cloud_players v]\nif <(@c) = [0]> then\n    forever\n        export_clouddata\n    end\nend\n\ndefine check\nif <<(username) = (item (((playerID) * (6)) - (2)) of [cloud_data v])> or <<(playerID) = [null]> or <<(playerID) = [full]> or <(playerID) = [error]>>>> then\nif <<key (any v) pressed?> or <mouse down?>> then\n    set [tick_afk v] to [0]\nend\n\nwhen I receive [cloud_start v]\nif <(@c) = [0]> then\n    forever\n        import_clouddata\n    end\nend\n\nwhen I receive [localfade v]\nstop [other scripts in sprite v]\n\nwhen I start as a clone\nset [@c v] to [1]\nset [ghost v] effect to (100)\nshow\ngo to x: (0) y: (80)\nswitch costume to (connecting v)\nwait (0.4) seconds\nrepeat until <(y position) < [1]>\n    change y by (((-2) - (y position)) / (9))\n    change [ghost v] effect by (-10)\nend\nwait until <(w_Tick) > [3]>\nwait (0.6) seconds\nif <(playerID) = [error]> then\nelse\n    if <(playerID) = [full]> then\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        switch costume to (full v)\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat until <(y position) > [80]>\n            change y by (((y position) - (-12)) / (8))\n            change [ghost v] effect by (10)\n        end\n        delete this clone\n    else\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        switch costume to (connected v)\n        switch costume to (full v)\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait (3) seconds\n        repeat until <(y position) > [80]>\n            change y by (((y position) - (-12)) / (8))\n            change [ghost v] effect by (8)\n        end\n    end\nend\n\nwhen I receive [cloud_tick v]\nif <(@c) = [1]> then\n    go to [front v] layer\nend\n\nwhen I receive [cloud_error v]\nif <(@c) = [1]> then\n    stop [other scripts in sprite v]\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    switch costume to (error v)\n    go to x: (0) y: (0)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (3) seconds\n    repeat until <(y position) > [80]>\n        change y by (((y position) - (-12)) / (8))\n        change [ghost v] effect by (10)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nset [tick_afk v] to [0]\nforever\n    wait (1) seconds\n    change [tick_afk v] by (1)\n    if <(tick_afk) > [60]> then\n        if <<(playerID) = [full]> or <(playerID) = [error]>> then\n    end\nend\n\nswitch costume to (error v)\n\nhide list [code v]\n\nshow list [code v]\n\n@Chat\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    set size to (0) %\n    wait until <(is the chat open) = [1]>\n    repeat (10)\n        set size to ((size) + (((100) - (size)) / (3))) %\n        change [ghost v] effect by (-10)\n    end\n    wait until <(is the chat open) = [0]>\n    repeat (10)\n        set size to ((size) + (((0) - (size)) / (3))) %\n        change [ghost v] effect by (10)\n    end\nend\n\ndefine GO\ngo to [front v] layer\ngo to [front v] layer\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    repeat (10)\n        GO\n    end\nend\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)\n\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\n\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\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\n@detector \n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nhide\nrepeat until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\n    show\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (pick random (3) to (5)) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    wait (pick random (5) to (8)) seconds\nend\nif <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n    show\n    switch costume to (costume2 v)\n    set [ghost v] effect to (100)\n    wait (0) seconds\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (pick random (3) to (5)) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\nhide\n\n@YAY\n\nwhen flag clicked\nset [win v] to [0]\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\n\nwhen I receive [win v]\nset [win v] to [1]\nif <(Win) = [1]> then\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    wait (3.5) seconds\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\nend\n\n@Moon\n\nwhen flag clicked\nshow\nforever\n    go to [back v] layer\nend\n\n@tn\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n