Cloud platformer!

Instructions: DOUBLE CLICK\nMy multiplayer engine TUTORIAL\nLook inside, the scripts are filled with comments.\nYou can also play multiplayer on this.\n\nRemix and make a multiplayer game!

@Stage\n\nwhen flag clicked\nforever\n    play sound [Chocolate v] until done\nend\n\n@Nothing\n\n@Multiplayer\n\nwhen I receive [done! v]\nforever\n    ☁ Online\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (loading v)\nshow\n☁ Online\ngo to [front v] layer\n☁ Allocate Slot\n☁ Allocate Slot\nset [gameversion v] to (☁ Version)\nif <(username) = []> then\n    switch costume to (no account v)\n    stop [all v]\nelse\n    if <(MYPLAYER) = [0]> then\n        switch costume to (full! v)\n        stop [all v]\n    else\n        if <(MYPLAYER) = []> then\n            switch costume to (confused v)\n            stop [all v]\n        else\n            if <(☁ GameData) = [0]> then\n                switch costume to (new scratcher v)\n                stop [all v]\n            else\n                if <(☁ GameData) = [1]> then\n                    broadcast (Done! v)\n                else\n                    switch costume to (confused v)\n                    stop [all v]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [done! v]\ngo to x: (0) y: (0)\nforever\n    if <<not <(☁ Version) = (Gameversion)>> or <(☁ Version) = [0]>> then\n        go to x: (0) y: (0)\n        show\n        go to [front v] layer\n        switch costume to (out of date v)\n        stop [all v]\n    end\n    ☁ Tick\n    ☁ MyData\n    ☁ Download\nend\n\ndefine ☁ MyData\ndelete (all) of [potentialdata v]\nadd (username) to [potentialdata v]\nadd (x position) to [potentialdata v]\nadd (y position) to [potentialdata v]\nadd [] to [potentialdata v]\n#Encode (PotentialData)\nchange [ticker v] by (1)\nif <(MYPLAYER) = [1]> then\n    set [☁ 1 v] to (join (EncodedResult) (Ticker))\nelse\n    if <(MYPLAYER) = [2]> then\n        set [☁ 2 v] to (join (EncodedResult) (Ticker))\n    else\n        if <(MYPLAYER) = [3]> then\n            set [☁ 3 v] to (join (EncodedResult) (Ticker))\n        else\n            if <(MYPLAYER) = [4]> then\n                set [☁ 4 v] to (join (EncodedResult) (Ticker))\n            else\n                if <(MYPLAYER) = [5]> then\n                    set [☁ 5 v] to (join (EncodedResult) (Ticker))\n                else\n                    if <(MYPLAYER) = [6]> then\n                        set [☁ 6 v] to (join (EncodedResult) (Ticker))\n                    else\n                        if <(MYPLAYER) = [7]> then\n                            set [☁ 7 v] to (join (EncodedResult) (Ticker))\n                        else\n                            if <(MYPLAYER) = [8]> then\n                                set [☁ 8 v] to (join (EncodedResult) (Ticker))\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine ☁ Download\ndelete (all) of [☁ data ☁ v]\n#Decode (☁ 1)\n#Separate (DecodedResult) by [ ]\nadd (item (1) of [separated v]) to [☁ data ☁ v]\nadd (item (2) of [separated v]) to [☁ data ☁ v]\nadd (item (3) of [separated v]) to [☁ data ☁ v]\n#Decode (☁ 2)\n#Separate (DecodedResult) by [ ]\nadd (item (1) of [separated v]) to [☁ data ☁ v]\nadd (item (2) of [separated v]) to [☁ data ☁ v]\nadd (item (3) of [separated v]) to [☁ data ☁ v]\n#Decode (☁ 3)\n#Separate (DecodedResult) by [ ]\nadd (item (1) of [separated v]) to [☁ data ☁ v]\nadd (item (2) of [separated v]) to [☁ data ☁ v]\nadd (item (3) of [separated v]) to [☁ data ☁ v]\n#Decode (☁ 4)\n#Separate (DecodedResult) by [ ]\nadd (item (1) of [separated v]) to [☁ data ☁ v]\nadd (item (2) of [separated v]) to [☁ data ☁ v]\nadd (item (3) of [separated v]) to [☁ data ☁ v]\n#Decode (☁ 5)\n#Separate (DecodedResult) by [ ]\nadd (item (1) of [separated v]) to [☁ data ☁ v]\nadd (item (2) of [separated v]) to [☁ data ☁ v]\nadd (item (3) of [separated v]) to [☁ data ☁ v]\n#Decode (☁ 6)\n#Separate (DecodedResult) by [ ]\nadd (item (1) of [separated v]) to [☁ data ☁ v]\nadd (item (2) of [separated v]) to [☁ data ☁ v]\nadd (item (3) of [separated v]) to [☁ data ☁ v]\n#Decode (☁ 7)\n#Separate (DecodedResult) by [ ]\nadd (item (1) of [separated v]) to [☁ data ☁ v]\nadd (item (2) of [separated v]) to [☁ data ☁ v]\nadd (item (3) of [separated v]) to [☁ data ☁ v]\n#Decode (☁ 8)\n#Separate (DecodedResult) by [ ]\nadd (item (1) of [separated v]) to [☁ data ☁ v]\nadd (item (2) of [separated v]) to [☁ data ☁ v]\nadd (item (3) of [separated v]) to [☁ data ☁ v]\n\ndefine ☁ Allocate Slot\nset [myplayer v] to []\ndelete (all) of [olddata v]\nadd (☁ 1) to [olddata v]\nadd (☁ 2) to [olddata v]\nadd (☁ 3) to [olddata v]\nadd (☁ 4) to [olddata v]\nadd (☁ 5) to [olddata v]\nadd (☁ 6) to [olddata v]\nadd (☁ 7) to [olddata v]\nadd (☁ 8) to [olddata v]\nwait (3) seconds\nif <(item (1) of [olddata v]) = (☁ 1)> then\n    set [myplayer v] to [1]\nelse\n    if <(item (2) of [olddata v]) = (☁ 2)> then\n        set [myplayer v] to [2]\n    else\n        if <(item (3) of [olddata v]) = (☁ 3)> then\n            set [myplayer v] to [3]\n        else\n            if <(item (4) of [olddata v]) = (☁ 4)> then\n                set [myplayer v] to [4]\n            else\n                if <(item (5) of [olddata v]) = (☁ 5)> then\n                    set [myplayer v] to [5]\n                else\n                    if <(item (6) of [olddata v]) = (☁ 6)> then\n                        set [myplayer v] to [6]\n                    else\n                        if <(item (7) of [olddata v]) = (☁ 7)> then\n                            set [myplayer v] to [7]\n                        else\n                            if <(item (8) of [olddata v]) = (☁ 8)> then\n                                set [myplayer v] to [8]\n                            else\n                                set [myplayer v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine #Encode []\nset [characters v] to [ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*\(\)_-+=}\]|{\[\.>/?,<`~'";:✦€]\nset [ei v] to [1]\nset [encodedresult v] to []\nrepeat (length of (string))\n    set [ei2 v] to [1]\n    repeat until <(letter (Ei) of (string)) = (letter (Ei2) of (Characters))>\n        change [ei2 v] by (1)\n    end\n    if <<(Ei2) > [1]> and <(Ei2) < [28]>> then\n        switch costume to (null v)\n        switch costume to (letter (Ei) of (string))\n        if <(costume [number v]) > [1]> then\n            change [ei2 v] by (26)\n        end\n    end\n    if <(length of (Ei2)) = [1]> then\n        set [ei2 v] to (join [0] (Ei2))\n    end\n    change [ei v] by (1)\n    set [encodedresult v] to (join (EncodedResult) (Ei2))\nend\nswitch costume to (null v)\n\ndefine None\nset [decodedresult v] to []\nset [di v] to [1]\nrepeat ((length of (code)) / (2))\n    set [decodedresult v] to (join (DecodedResult) (letter (join (letter (Di) of (code)) (letter ((Di) + (1)) of (code))) of (Characters)))\n    change [di v] by (2)\nend\n\ndefine #Separate [] by []\ndelete (all) of [separated v]\nset [si v] to [1]\nset [item v] to []\nrepeat (length of (str))\n    if <(letter (Si) of (str)) = (sep)> then\n        add (item) to [separated v]\n        set [item v] to []\n    else\n        set [item v] to (join (item) (letter (Si) of (str)))\n    end\n    change [si v] by (1)\nend\n\ndefine ☁ Online\ndelete (all) of [olddata v]\nadd (☁ 1) to [olddata v]\nadd (☁ 2) to [olddata v]\nadd (☁ 3) to [olddata v]\nadd (☁ 4) to [olddata v]\nadd (☁ 5) to [olddata v]\nadd (☁ 6) to [olddata v]\nadd (☁ 7) to [olddata v]\nadd (☁ 8) to [olddata v]\nwait (3) seconds\nif <(item (1) of [olddata v]) = (☁ 1)> then\n    set [☁ 1 v] to []\nend\nif <(item (2) of [olddata v]) = (☁ 2)> then\n    set [☁ 2 v] to []\nend\nif <(item (3) of [olddata v]) = (☁ 3)> then\n    set [☁ 3 v] to []\nend\nif <(item (4) of [olddata v]) = (☁ 4)> then\n    set [☁ 4 v] to []\nend\nif <(item (5) of [olddata v]) = (☁ 5)> then\n    set [☁ 5 v] to []\nend\nif <(item (6) of [olddata v]) = (☁ 6)> then\n    set [☁ 6 v] to []\nend\nif <(item (7) of [olddata v]) = (☁ 7)> then\n    set [☁ 7 v] to []\nend\nif <(item (8) of [olddata v]) = (☁ 8)> then\n    set [☁ 8 v] to []\nend\n\ndefine ☁ Tick\nchange [ghost v] effect by (25)\nif <key (right arrow v) pressed?> then\n    change [xv v] by (1)\nend\nif <key (left arrow v) pressed?> then\n    change [xv v] by (-1)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\nif <touching color (#000000)?> then\n    change y by (1)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change x by ((Xv) * (-1))\n                        change y by (-5)\n                        if <key (up arrow v) pressed?> then\n                            if <(Xv) > [0]> then\n                                set [xv v] to [-5]\n                            else\n                                set [xv v] to [5]\n                            end\n                            set [yv v] to [10]\n                        else\n                            set [xv v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [yv v] by (-1)\nchange y by (Yv)\nif <touching color (#000000)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <touching color (#000000)?> then\n    if <key (up arrow v) pressed?> then\n        set [yv v] to [13]\n    end\nend\nchange y by (1)\nif <touching color (#ff0000)?> then\n    go to x: (-19) y: (-78)\nend\nif <touching color (#54ffd4)?> then\n    change y by (-1)\n    set [yv v] to [20]\n    change y by (1)\nend\n\n@Players\n\nwhen I receive [done! v]\nset [id v] to [0]\nrepeat (8)\n    change [id v] by (1)\n    create clone of (_myself_ v)\nend\nset [id v] to [--]\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    if <(item (((ID) * (3)) - (2)) of [☁ data ☁ v]) = []> then\n        hide\n    else\n        show\n        if <(ID) = (MYPLAYER)> then\n            switch costume to (you v)\n            go to (multiplayer v)\n        else\n            switch costume to (other v)\n            go to x: (item (((ID) * (3)) - (1)) of [☁ data ☁ v]) y: (item (((ID) * (3)) - (0)) of [☁ data ☁ v])\n            think (item (((ID) * (3)) - (2)) of [☁ data ☁ v])\n        end\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\nset [☁ gamedata v] to [1]\nchange [☁ version v] by (1)\n\ngo to [front v] layer\nshow\n\nstop [all v]\n\ngo to x: (0) y: (0)\n\nset [☁ gamedata v] to [0]\n\n