☁︎Elements || A Mobile friendly Cloud Platformer Collab V 2.1 #Games #Music #All #Art #Multiplayer
@Stage\n\nwhen flag clicked\nforever\n    set [oldgloballocation v] to (Global: Location)\n    wait until <not <(Global: Location) = (OldGlobalLocation)>>\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    switch backdrop to (Global: Location)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen flag clicked\nset [ghost v] effect to (100)\nswitch backdrop to (1 v)\nnext backdrop\nset [global: # of backdrops v] to [1]\nrepeat until <(backdrop [name v]) = [1]>\n    change [global: # of backdrops v] by (1)\n    next backdrop\nend\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\nforever\n    play sound [Vexento - Masked Heroes.mp3 v] until done\nend\n\nwhen I receive [gf v]\nplay sound [Smashing-Yuri_Santana-1233262689 v] until done\n\n@Blank\n\nwhen flag clicked\n\n@LocalPlayer [You]\n\nwhen flag clicked\nforever\n    set [global: localx v] to (round (x position))\n    set [global: localy v] to (round (y position))\n    wait until <<not <(Global: LocalX) = (x position)>> or <not <(Global: LocalY) = (y position)>>>\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nwait (1) seconds\nwait until <(Global:Network Connected) = [1]>\nshow\n\nwhen flag clicked\nwait (1) seconds\nwait until <(Global:Network Connected) = [1]>\nset [global: location v] to [1]\nset [global: cycling backgrounds v] to [1]\nforever\n    if <(x position) > [200]> then\n        if <((Global: Location) + (1)) = ((Global: # of Backdrops) + (1))> then\n            if <(Global: Cycling Backgrounds) = [1]> then\n                go to x: (0) y: (0)\n                set [global: location v] to [1]\n            end\n        else\n            go to x: (0) y: (0)\n            change [global: location v] by (1)\n        end\n    end\n    if <(x position) < [-200]> then\n        if <((Global: Location) - (1)) = [0]> then\n            if <(Global: Cycling Backgrounds) = [1]> then\n                go to x: (0) y: (0)\n                set [global: location v] to (Global: # of Backdrops)\n            end\n        else\n            go to x: (0) y: (0)\n            change [global: location v] by (-1)\n        end\n    end\n    wait (1) seconds\nend\n\nset [global: cycling backgrounds v] to [0]\n\nwhen flag clicked\nset [x v] to [0]\nset [y v] to [0]\nshow list [chat v]\nbroadcast (GREEN FLAG v) and wait\nbroadcast (PLAY GAME v) and wait\n\nwhen flag clicked\nforever\n    set size to (150) %\nend\n\nwhen I receive [boost v]\nforever\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        change [y v] by (4)\n    end\nend\n\ndefine CHANGE PLAYER Y BY (sy)\nchange [y v] by (sy)\nchange [inair v] by (1)\nPosition\nrepeat until <not <touching (platform v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [inair v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\nwhen flag clicked\nforever\n    if <touching (water v)?> then\n        change [sy v] by (1.9)\n        if <key (up arrow v) pressed?> then\n            change [sy v] by (1)\n        end\n    end\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                        ask [type something to chat] and wait\n                        set [chat v] to [5]\n                        say (answer)\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\nforever\n    play sound [Vexento - Pixel Party.mp3 v] until done\nend\n\ndefine GAME ON\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [sx v] to [0]\nset [inair v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen flag clicked\nset [player level v] to [0]\n\nwhen flag clicked\nforever\n    if <<touching (danger v)?> or <touching (lava v)?>> then\n        broadcast (h v)\n        GAME - DIE\n    end\nend\n\ndefine Game-Win\nrepeat (50)\n    point towards (exit v)\n    change size by (-1)\n    change [ghost v] effect by (10)\nend\nhide\nset size to (170) %\nclear graphic effects\nchange [player level v] by (1)\nchange [level v] by (1)\nbroadcast (level v)\ngo to x: (-212) y: (-57)\nwait (1) seconds\n\ndefine TICK\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n    change [sx v] by (-2)\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    change [sx v] by (2)\nend\nset [sx v] to ((SX) * (0.8))\nif <[0.9] < ([abs v] of (SX) )> then\n    CHANGE PLAYER X By (round (SX))\nend\nif <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n    if <(inair) < [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\nif <(SCROLL X) < [0]> then\nif <[2649] < (SCROLL X)> then\nif <(SCROLL Y) < [0]> then\nPosition\nif <(y) < [-175]> then\n    set [exit v] to [die]\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [244]> then\n        Game-Win\n    end\nend\n\nwhen I receive [begin v]\nset [is the chat open v] to [0]\nshow list [chat v]\nforever\n    if <key (t v) pressed?> then\n        Chat\n        if <(is the chat open) = [1]> then\n            show list [chat v]\n            set [is the chat open v] to [0]\n        else\n            set [is the chat open v] to [1]\n            hide list [chat v]\n        end\n        wait until <not <key (t v) pressed?>>\n    end\nend\n\nwhen I receive [begin v]\nset [level v] to [1]\nforever\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        if <(My Player #) > [0]> then\n            send cloud data\n        end\n    end\n    if <(EXIT) = [win]> then\n        Game-Win\n    else\n        GAME - DIE\n    end\nend\n\ndefine GAME - DIE\nset [exit v] to []\nhide\n\ndefine TEST-DIE\nif <touching (dangers  v)?> then\n    set [exit v] to [die]\nend\n\ndefine CHANGE PLAYER X By (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platform v)?> then\n    repeat (18)\n        change [y v] by (1)\n        Position\n        if <not <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-18)\n    if <<key (w v) pressed?> or <<<mouse down?> and <(mouse y) > ((y position) + (20))>> or <key (up arrow 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 [inair v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platform 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\nset [max players v] to [4]\nset [my player # v] to [0]\nbroadcast (setups v) and wait\nbroadcast (joining v)\nbroadcast (join game v) and wait\nif <(My Player #) > [0]> then\n    start sound [Connect v]\n    broadcast (joined v)\nelse\n    start sound [Disconnect v]\n    broadcast (full v)\nend\nbroadcast (begin v)\n\ndefine Position\ngo to x: ((x) - (159)) y: ((y) - (-46))\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                            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 [encodied v] to (join (encodied) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encodied v] to (join (encodied) [00])\n\nwhen I receive [begin v]\nwait (5) seconds\nswitch backdrop to (blank v)\n\ndefine send cloud data\nset [encodied v] to []\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 (encodied)\n\nwhen I receive [wind v]\nchange [sx v] by (pick random (.2) to (1))\n\ndefine value=read from encode\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encodied)) (letter ((letter #) + (1)) of (encodied)))\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 flag clicked\n\nwhen flag clicked\n\n\n    change [sx v] by (1)\nend\n\n\n    change [sx v] by (-1)\nend\n\nforever\n\nforever\n\nwhen flag clicked\nif <touching (danger v)?> then\n\nwhen I receive [h v]\nplay sound [Oops v] until done\n\nwhen I receive [blue ninja v]\nswitch costume to (ninja v)\n\nwhen flag clicked\nswitch costume to (normal v)\n\nwhen I receive [cool logo 1 v]\nswitch costume to (cool logo 1 v)\n\nwhen I receive [other cool logo v]\nswitch costume to (cool logo 2 v)\n\nwhen I receive [cow boy v]\nswitch costume to (cow boy v)\n\nwhen flag clicked\nforever\n    Chat\nend\n\nset [chat v] to [2]\nsay (item (Chat) of [chat v])\nwait (2) seconds\nsay []\nset [chat v] to [0]\n\nwhen I receive [alien v]\nswitch costume to (costume3 v)\n\nwhen I receive [alien v]\nforever\n    if <<(costume [name v]) = [costume1]> or <<(costume [name v]) = [costume2]> or <<(costume [name v]) = [costume4]> or <(costume [name v]) = [costume3]>>>> then\n        switch costume to (costume3 v)\n        wait (.0001) seconds\n        next costume\n        wait (.01) seconds\n        next costume\n        wait (.01) seconds\n        next costume\n        wait (.1) seconds\n        switch costume to (costume3 v)\n        wait (3) seconds\n    end\nend\n\n@Online Player [Other]\n\ndefine Create Clones\nset [count v] to [1]\nrepeat until <(Count) > (length of [used slots v])>\n    set [cloudplayer: clone id v] to (item (Count) of [used slots v])\n    create clone of (_myself_ v)\n    change [count v] by (1)\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen I start as a clone\nset [local clone id v] to (CloudPlayer: Clone ID)\nset [placeholder v] to [-000]\nwait until <(length of [positionx v]) > [0]>\ngo to x: (item (Local Clone ID) of [positionx v]) y: (item (Local Clone ID) of [positiony v])\nshow\nforever\n    glide (([sqrt v] of ((((x position) - (item (Local Clone ID) of [positionx v])) * ((x position) - (item (Local Clone ID) of [positionx v]))) + (((y position) - (item (Local Clone ID) of [positiony v])) * ((y position) - (item (Local Clone ID) of [positiony v])))) ) / (250)) secs to x: (item (Local Clone ID) of [positionx v]) y: (item (Local Clone ID) of [positiony v])\n    set [oldposx v] to (item (Local Clone ID) of [positionx v])\n    set [oldposy v] to (item (Local Clone ID) of [positiony v])\n    wait until <<not <(item (Local Clone ID) of [positionx v]) = (OldPosX)>> or <not <(item (Local Clone ID) of [positiony v]) = (OldPosY)>>>\n    wait (0.2) seconds\nend\n\nwhen flag clicked\nhide\nwait (1) seconds\nwait until <<(Global:Network Connected) = [1]> and <(length of [used slots v]) > [0]>>\nCreate Clones\nforever\n    set [oldplayersonline v] to (Global: Players Online)\n    wait until <<not <(OldPlayersOnline) = (Global: Players Online)>> and <((length of [used slots v]) + (1)) = (Global: Players Online)>>\n    broadcast (Delete Clones v)\n    Create Clones\nend\n\nwhen I start as a clone\nforever\n    say (item (Local Clone ID) of [global: usernames v])\n    wait (1) seconds\nend\n\nwhen I start as a clone\nforever\n    if <(item (Local Clone ID) of [global: locations v]) = (Global: Location)> then\n        show\n    else\n        hide\n    end\n    wait (0.5) seconds\nend\n\ndefine Decode chat (chat)\nif <(chat) = [0]> then\n\nwhen I receive [decode chat v]\nDecode chat (value)\n\ndefine begin decode of (encode)\nset [encodied v] to (encode)\nset [letter # v] to [1]\n\nwhen I receive [start 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 [setups v]\nsetup players\n\ndefine setup players\nset [color v] effect to (90)\nset [offline v] to [100]\nhide\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [start v]\nforever\n    if <(My Player #) = (player #)> then\n        hide\n        set [offline v] to [100]\n    else\n        tick\n    end\n    go to [back v] layer\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 encode\nif <(names) = [1]> then\n    say (join (player #) (join [:] (value)))\nelse\n    say []\nend\nvalue=read from encode\nvalue=read from encode\nset x to ((value) - (SCROLL X))\nvalue=read from encode\nset y to ((value) - (SCROLL Y))\nvalue=read from encode\nbroadcast (Decode chat v)\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                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\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\n@MessageBox\n\nwhen flag clicked\nset [messages: clone id v] to [0]\nset [messages: isplaying v] to [0]\nhide\ngo to x: (-125) y: (153)\n\nwhen I start as a clone\nset [local clone id v] to (Message #)\nset [message # v] to [0]\ngo to x: (-125) y: ((153) - ((49) * ((Messages: Clone ID) - (1))))\nswitch costume to (Local Clone ID)\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nif <(OnDebugList) = [1]> then\n    wait until <(Messages: isPlaying) = [0]>\n    set [messages: isplaying v] to [1]\n    play sound (Local Clone ID) until done\n    set [messages: isplaying v] to [0]\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nchange [messages: clone id v] by (-1)\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(Message #) = [2]> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n        wait (4) seconds\n        stop [all v]\n    end\n    if <(Message #) = [3]> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\n    if <(Message #) = [4]> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\n    if <(Message #) = [5]> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\n    if <(Message #) = [6]> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\n    if <(Message #) = [7]> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\n    if <<(Message #) = [8]> and <(OnDebugList) = [1]>> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\n    if <<(Message #) = [9]> and <(OnDebugList) = [1]>> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\n    if <(Message #) = [10]> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\n    if <(Message #) = [11]> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\n    if <(Message #) = [12]> then\n        change [messages: clone id v] by (1)\n        create clone of (_myself_ v)\n    end\nend\n\n@NetworkManager\n\ndefine Clear Empty Slots\nif <<(length of [emptyslots v]) = (length of (☁ Watchdog))> and <(length of (☁ Watchdog)) > [10]>> then\n    set [global: players online v] to [0]\n    set [☁ watchdog v] to [0000000000]\n    set [☁ position v] to [00000000000000000000000000000000000000000000000000000000000000000000000000000000]\n    if <(Global: NetworkDebugMode) = [1]> then\n        say [Cleared Empty Slots] for (2) seconds\n        delete (all) of [emptyslots v]\n        add [1] to [emptyslots v]\n    end\nelse\n    if <(Global: NetworkDebugMode) = [1]> then\n        say [Unable to Clear Empty Slots \(Player\(s\) Already Online\)] for (2) seconds\n    end\nend\n\ndefine None\nset [networkmanager: playersonlinetemp v] to [0]\nset [networkmanager: onlinecounterglobal v] to [1]\nEmpty Slots --> Unused Slots\nUsed Slots --> Global Used Slots\ndelete (all) of [emptyslots v]\ndelete (all) of [temptimerlist v]\ndelete (all) of [tempwatchdog2list v]\ndelete (all) of [used slots v]\nset [networkmanager: players online individal done v] to (length of (☁ Watchdog))\nrepeat until <(NetworkManager: OnlineCounterGlobal) > (length of (☁ Watchdog))>\n    add [thing] to [temptimerlist v]\n    add [thing] to [tempwatchdog2list v]\n    set [networkmanager: proceed v] to [0]\n    change [networkmanager: onlinecounterglobal v] by (1)\n    create clone of (_myself_ v)\n    wait until <(NetworkManager: Proceed) = [1]>\nend\nwait until <(NetworkManager: Players Online Individal Done) = [0]>\nset [global: players online v] to (NetworkManager: PlayersOnlineTemp)\n\nwhen I start as a clone\nset [onlinecounterprivate v] to ((NetworkManager: OnlineCounterGlobal) - (1))\nset [networkmanager: proceed v] to [1]\nreplace item (OnlineCounterPrivate) of [tempwatchdog2list v] with (☁ Watchdog)\nreplace item (OnlineCounterPrivate) of [temptimerlist v] with (timer)\nwait until <<not <(length of (item (OnlineCounterPrivate) of [tempwatchdog2list v])) = (length of (☁ Watchdog))>> or <<not <(letter (OnlineCounterPrivate) of (item (OnlineCounterPrivate) of [tempwatchdog2list v])) = (letter (OnlineCounterPrivate) of (☁ Watchdog))>> or <(timer) > ((item (OnlineCounterPrivate) of [temptimerlist v]) + (NoPlayerTimeout))>>>\nif <(timer) > ((item (OnlineCounterPrivate) of [temptimerlist v]) + (NoPlayerTimeout))> then\n    add (OnlineCounterPrivate) to [emptyslots v]\n    if <<(Global: NetworkDebugMode) = [1]> and <(include debug) = [true]>> then\n        say (join [No player in Slot ] (OnlineCounterPrivate)) for (2) seconds\n    end\nelse\n    if <not <(OnlineCounterPrivate) = (Global: Player ID)>> then\n        add (OnlineCounterPrivate) to [used slots v]\n    end\n    if <<<not <[global: used slots v] contains (OnlineCounterPrivate)?>> and <not <(OnlineCounterPrivate) = (Global: Player ID)>>> and <(Global:Network Connected) = [1]>> then\n        change [global: players online v] by (1)\n    end\n    change [networkmanager: playersonlinetemp v] by (1)\n    if <<(Global: NetworkDebugMode) = [1]> and <(include debug) = [true]>> then\n        say (join [Player in Slot ] (OnlineCounterPrivate)) for (2) seconds\n    end\nend\nchange [networkmanager: players online individal done v] by (-1)\ndelete this clone\n\ndefine Verify Slot Added\nif <(length of (☁ Watchdog)) < (WatchdogSlot)> then\n    if <(Global: NetworkDebugMode) = [1]> then\n        say [Failure to join.. Trying again] for (2) seconds\n    end\n    broadcast (Ingame Counter v)\n    set [☁ watchdog v] to (join (☁ Watchdog) [0])\nend\nif <(length of (☁ Position)) < ((WatchdogSlot) * (8))> then\n    if <(Global: NetworkDebugMode) = [1]> then\n        say [Failure to join.. Trying again] for (2) seconds\n    end\n    broadcast (Ingame Counter v)\n    set [☁ position v] to (join (☁ Position) [00000000])\nend\n\nwhen I receive [ingame counter v]\nwait (5) seconds\nset [global:network connected v] to [1]\n\nwhen I receive [update players online loop v]\nset [noplayertimeout v] to [20]\nforever\n    Update Players Online (NoPlayerTimeout) [false]\nend\n\nwhen I receive [verify slot added loop v]\nforever\n    Verify Slot Added\n    wait (1) seconds\nend\n\ndefine Watchdog List --> Variable\nset [tempwatchdog v] to []\nset [watchdogcounter v] to [1]\nrepeat until <(WatchdogCounter) > (length of [watchdog v])>\n    set [tempwatchdog v] to (join (TempWatchdog) (item (WatchdogCounter) of [watchdog v]))\n    change [watchdogcounter v] by (1)\nend\nset [☁ watchdog v] to (TempWatchdog)\n\ndefine Used Slots --> Global Used Slots\nif <(length of [global: used slots v]) > (length of [used slots v])> then\n    repeat until <(length of [global: used slots v]) = (length of [used slots v])>\n        delete (last) of [global: used slots v]\n    end\nend\nif <(length of [global: used slots v]) < (length of [used slots v])> then\n    repeat until <(length of [global: used slots v]) = (length of [used slots v])>\n        add [] to [global: used slots v]\n    end\nend\nset [usedslots count v] to [1]\nrepeat until <(UsedSlots Count) = ((length of [used slots v]) + (1))>\n    replace item (UsedSlots Count) of [global: used slots v] with (item (UsedSlots Count) of [used slots v])\n    change [usedslots count v] by (1)\nend\n\nwhen flag clicked\nset [global:network connected v] to [0]\nset [global: players online v] to [Loading...]\nset [watchdogslot v] to [0]\nforever\n    set [global: player id v] to (WatchdogSlot)\n    wait (1) seconds\nend\n\nwhen flag clicked\nwait (1) seconds\nwait until <(Global:Network Connected) = [1]>\nforever\n    set [usedslotslength v] to (length of [used slots v])\n    set [oldusedslotslength v] to (length of [used slots v])\n    set [oldtimer v] to (timer)\n    wait until <not <(UsedSlotsLength) = (OldUsedSlotsLength)>>\n    change [global: players online v] by (1)\nend\n\ndefine Find Watchdog Slot\nset [watchdogslot v] to [0]\nif <(length of [emptyslots v]) > [0]> then\n    set [global:network connected v] to [1]\n    if <(Global: NetworkDebugMode) = [1]> then\n        say [Joining Watchdog via Unused Slot] for (2) seconds\n    end\n    set [watchdogslot v] to (item (1) of [emptyslots v])\nelse\n    broadcast (Ingame Counter v)\n    if <(Global: NetworkDebugMode) = [1]> then\n        say [Joining Watchdog via Adding Slot] for (2) seconds\n    end\n    set [watchdogslot v] to ((length of (☁ Watchdog)) + (1))\n    set [☁ watchdog v] to (join (☁ Watchdog) [0])\n    set [☁ position v] to (join (☁ Position) [00000000])\nend\nrepeat (2)\n    Watchdog Variable --> List\n    if <(item (WatchdogSlot) of [watchdog v]) = [1]> then\n        replace item (WatchdogSlot) of [watchdog v] with [0]\n    else\n        replace item (WatchdogSlot) of [watchdog v] with [1]\n    end\n    Watchdog List --> Variable\n    wait (1) seconds\nend\n\nwhen flag clicked\nset [global: dontcreateclones v] to [0]\nset [noplayertimeout v] to [15]\nset [message # v] to [4]\nUpdate Players Online (NoPlayerTimeout) [true]\nchange [global: players online v] by (1)\nClear Empty Slots\nFind Watchdog Slot\nbroadcast (Verify Slot Added Loop v)\nbroadcast (Update Players Online Loop v)\nUpdate Watchdog (2)\n\nwhen flag clicked\nwait (1) seconds\nwait until <(Global:Network Connected) = [1]>\nset [message # v] to [5]\nset [global: updatepos v] to [1]\n\ndefine Watchdog Variable --> List\nif <(length of (☁ Watchdog)) = (length of [watchdog v])> then\n    set [watchdogcounter v] to [1]\n    repeat until <(WatchdogCounter) > (length of (☁ Watchdog))>\n        replace item (WatchdogCounter) of [watchdog v] with (letter (WatchdogCounter) of (☁ Watchdog))\n        change [watchdogcounter v] by (1)\n    end\nelse\n    if <(length of (☁ Watchdog)) > (length of [watchdog v])> then\n        repeat until <(length of (☁ Watchdog)) = (length of [watchdog v])>\n            add [thing] to [watchdog v]\n        end\n    end\n    if <(length of (☁ Watchdog)) < (length of [watchdog v])> then\n        repeat until <(length of (☁ Watchdog)) = (length of [watchdog v])>\n            delete (last) of [watchdog v]\n        end\n    end\n    Watchdog Variable --> List\nend\n\nwhen flag clicked\nwait until <(Global:Network Connected) = [1]>\nset [oldplayersonline v] to (Global: Players Online)\nforever\n    wait until <not <(Global: Players Online) = (OldPlayersOnline)>>\n    if <(Global: Players Online) > (OldPlayersOnline)> then\n        set [message # v] to [6]\n        set [global: updatepos v] to [1]\n        broadcast (Confirm Username in TempData v)\n    else\n        set [message # v] to [7]\n    end\n    set [oldplayersonline v] to (Global: Players Online)\nend\n\ndefine Empty Slots --> Unused Slots\ndelete (all) of [global: unused slots v]\nset [emptyslots count v] to [1]\nrepeat until <(EmptySlots Count) = ((length of [emptyslots v]) + (1))>\n    add (item (EmptySlots Count) of [emptyslots v]) to [global: unused slots v]\n    change [emptyslots count v] by (1)\nend\n\ndefine None\nset [oldtimerwatchdog v] to (timer)\nforever\n    if <(timer) > ((OldTimerWatchdog) + (pick random (20) to (60)))> then\n        set [message # v] to [8]\n        wait (3) seconds\n        Watchdog Variable --> List\n        set [oldtimerwatchdog v] to (timer)\n        set [oldwatchdogvalue v] to (item (WatchdogSlot) of [watchdog v])\n        set [oldtimerwatchdogwait v] to (timer)\n        repeat until <<not <(OldWatchdogValue) = (item (WatchdogSlot) of [watchdog v])>> or <(timer) > ((OldTimerWatchdogWait) + ((delay) * (3)))>>\n            Watchdog Variable --> List\n        end\n        if <(OldWatchdogValue) = (item (WatchdogSlot) of [watchdog v])> then\n            set [message # v] to [9]\n        else\n            set [message # v] to [10]\n            wait until <(Message #) = [0]>\n            set [message # v] to [4]\n            Update Players Online (NoPlayerTimeout) [true]\n            Find Watchdog Slot\n            set [message # v] to [5]\n            set [global: updatepos v] to [1]\n        end\n    else\n        Watchdog Variable --> List\n        if <(item (WatchdogSlot) of [watchdog v]) = [1]> then\n            replace item (WatchdogSlot) of [watchdog v] with [0]\n        else\n            replace item (WatchdogSlot) of [watchdog v] with [1]\n        end\n        Watchdog List --> Variable\n        wait (delay) seconds\n    end\nend\n\n@PositionManager\n\nwhen flag clicked\nset [global: updatepos v] to [0]\nset [wait v] to [0]\nset [wait2 v] to [0]\nset [global: ingame v] to [0]\nwait (1) seconds\n\ndefine Translate Position\nset [position2count v] to [1]\nset [position2count2 v] to [1]\nrepeat until <(length of [position2 v]) = (length of [position v])>\n    if <(length of [position2 v]) > (length of [position v])> then\n        delete (last) of [position2 v]\n    end\n    if <(length of [position2 v]) < (length of [position v])> then\n        add [0] to [position2 v]\n    end\nend\nrepeat until <(Position2Count) > (length of [position v])>\n    if <(Position2Count2) = [1]> then\n        if <(item (Position2Count) of [position v]) = [0]> then\n            replace item (Position2Count) of [position2 v] with [-]\n        end\n        if <(item (Position2Count) of [position v]) = [1]> then\n            replace item (Position2Count) of [position2 v] with [0]\n        end\n    else\n        replace item (Position2Count) of [position2 v] with (item (Position2Count) of [position v])\n    end\n    change [position2count v] by (1)\n    change [position2count2 v] by (1)\n    if <(Position2Count2) = [5]> then\n        set [position2count2 v] to [1]\n    end\nend\n\nset [☁ position v] to [00000000]\n\ndefine Condense Position2\nrepeat until <(length of [position3 v]) = ((length of [position2 v]) / (4))>\n    if <(length of [position3 v]) > ((length of [position2 v]) / (4))> then\n        delete (last) of [position3 v]\n    end\n    if <(length of [position3 v]) < ((length of [position2 v]) / (4))> then\n        add [-000] to [position3 v]\n    end\nend\nset [position3count v] to [1]\nrepeat until <(Position3Count) > (length of [position3 v])>\n    replace item (Position3Count) of [position3 v] with []\n    change [position3count v] by (1)\nend\nset [position3count v] to [1]\nrepeat until <(Position3Count) > (length of [position3 v])>\n    set [position3count2 v] to [1]\n    repeat until <(Position3Count2) > [4]>\n        replace item (Position3Count) of [position3 v] with (join (item (Position3Count) of [position3 v]) (item ((((Position3Count) - (1)) * (4)) + (Position3Count2)) of [position2 v]))\n        change [position3count2 v] by (1)\n    end\n    change [position3count v] by (1)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nPosition Variable --> List\n\nset [wait v] to [0]\n\nif <not <((length of [position v]) mod (8)) = [0]>> then\n    go to [front v] layer\n    switch costume to (costume2 v)\n    stop [all v]\nend\n\nPosition Variable --> List\n\nset [position updated v] to [0]\n\nwhen flag clicked\ndelete (all) of [positionx v]\ndelete (all) of [positiony v]\nwait (1) seconds\nwait until <(Global:Network Connected) = [1]>\nforever\n    Position Variable --> List\n    Translate Position\n    Condense Position2\n    Position3 --> PositionX & PositionY\n    set [oldposition v] to (☁ Position)\n    wait until <not <(☁ Position) = (OldPosition)>>\nend\n\ndefine LocalY Variable --> List\nset [localycounter v] to [1]\ndelete (all) of [localylist v]\nrepeat until <(LocalYCounter) > (length of (Global: LocalY))>\n    add (letter (LocalYCounter) of (Global: LocalY)) to [localylist v]\n    change [localycounter v] by (1)\nend\nif <(item (1) of [localylist v]) = [-]> then\n    replace item (1) of [localylist v] with [0]\nelse\n    insert [1] at (1) of [localylist v] \nend\nrepeat until <(length of [localylist v]) = [4]>\n    insert [0] at (2) of [localylist v] \nend\n\ndefine LocalX Variable --> List\nset [localxcounter v] to [1]\ndelete (all) of [localxlist v]\nrepeat until <(LocalXCounter) > (length of (Global: LocalX))>\n    add (letter (LocalXCounter) of (Global: LocalX)) to [localxlist v]\n    change [localxcounter v] by (1)\nend\nif <(item (1) of [localxlist v]) = [-]> then\n    replace item (1) of [localxlist v] with [0]\nelse\n    insert [1] at (1) of [localxlist v] \nend\nrepeat until <(length of [localxlist v]) = [4]>\n    insert [0] at (2) of [localxlist v] \nend\n\ndefine Position3 --> PositionX & PositionY\nrepeat until <(length of [positionx v]) = ((length of [position3 v]) / (2))>\n    if <(length of [positionx v]) < ((length of [position3 v]) / (2))> then\n        add [-000] to [positionx v]\n    end\n    if <(length of [positionx v]) > ((length of [position3 v]) / (2))> then\n        delete (last) of [positionx v]\n    end\nend\nrepeat until <(length of [positiony v]) = ((length of [position3 v]) / (2))>\n    if <(length of [positiony v]) < ((length of [position3 v]) / (2))> then\n        add [-000] to [positiony v]\n    end\n    if <(length of [positiony v]) > ((length of [position3 v]) / (2))> then\n        delete (last) of [positiony v]\n    end\nend\nset [positionxycount v] to [1]\nset [positionxycount2 v] to [1]\nrepeat until <(PositionXYCount) > (length of [position3 v])>\n    replace item (PositionXYCount2) of [positionx v] with (item (PositionXYCount) of [position3 v])\n    change [positionxycount v] by (2)\n    change [positionxycount2 v] by (1)\nend\nset [positionxycount v] to [2]\nset [positionxycount2 v] to [1]\nrepeat until <(PositionXYCount) > (length of [position3 v])>\n    replace item (PositionXYCount2) of [positiony v] with (item (PositionXYCount) of [position3 v])\n    change [positionxycount v] by (2)\n    change [positionxycount2 v] by (1)\nend\n\ndefine None\nif <(first time) = [1]> then\n    delete (all) of [verifypositionlist v]\n    set [verifypositionlistcount v] to [1]\n    wait until <(Position Variable --> List Done) = [1]>\n    Position Variable --> List\n    repeat until <(VerifyPositionListCount) > (length of [position v])>\n        add (item (VerifyPositionListCount) of [position v]) to [verifypositionlist v]\n        change [verifypositionlistcount v] by (1)\n    end\nend\nset [oldtimer v] to (timer)\nset [positionupdatefail v] to [0]\nrepeat until <((OldTimer) + (5)) < (timer)>\n    if <not <(letter ((((Global: Player ID) * (8)) - (7)) + (0)) of (☁ Position)) = (item ((((Global: Player ID) * (8)) - (7)) + (0)) of [verifypositionlist v])>> then\n        set [positionupdatefail v] to [1]\n    end\n    if <not <(letter ((((Global: Player ID) * (8)) - (7)) + (1)) of (☁ Position)) = (item ((((Global: Player ID) * (8)) - (7)) + (1)) of [verifypositionlist v])>> then\n        set [positionupdatefail v] to [1]\n    end\n    if <not <(letter ((((Global: Player ID) * (8)) - (7)) + (2)) of (☁ Position)) = (item ((((Global: Player ID) * (8)) - (7)) + (2)) of [verifypositionlist v])>> then\n        set [positionupdatefail v] to [1]\n    end\n    if <not <(letter ((((Global: Player ID) * (8)) - (7)) + (3)) of (☁ Position)) = (item ((((Global: Player ID) * (8)) - (7)) + (3)) of [verifypositionlist v])>> then\n        set [positionupdatefail v] to [1]\n    end\n    if <not <(letter ((((Global: Player ID) * (8)) - (7)) + (4)) of (☁ Position)) = (item ((((Global: Player ID) * (8)) - (7)) + (4)) of [verifypositionlist v])>> then\n        set [positionupdatefail v] to [1]\n    end\n    if <not <(letter ((((Global: Player ID) * (8)) - (7)) + (5)) of (☁ Position)) = (item ((((Global: Player ID) * (8)) - (7)) + (5)) of [verifypositionlist v])>> then\n        set [positionupdatefail v] to [1]\n    end\n    if <not <(letter ((((Global: Player ID) * (8)) - (7)) + (6)) of (☁ Position)) = (item ((((Global: Player ID) * (8)) - (7)) + (6)) of [verifypositionlist v])>> then\n        set [positionupdatefail v] to [1]\n    end\n    if <not <(letter ((((Global: Player ID) * (8)) - (7)) + (7)) of (☁ Position)) = (item ((((Global: Player ID) * (8)) - (7)) + (7)) of [verifypositionlist v])>> then\n        set [positionupdatefail v] to [1]\n    end\nend\nif <(PositionUpdateFail) = [1]> then\n    Update Position\n    Verify Updated Position (0)\nelse\n    set [position updated v] to [1]\nend\n\ndefine Update Position\nwait until <(Position Variable --> List Done) = [1]>\nPosition Variable --> List\nLocalX Variable --> List\nLocalY Variable --> List\nreplace item ((((Global: Player ID) * (8)) - (7)) + (0)) of [position v] with (item (1) of [localxlist v])\nreplace item ((((Global: Player ID) * (8)) - (7)) + (1)) of [position v] with (item (2) of [localxlist v])\nreplace item ((((Global: Player ID) * (8)) - (7)) + (2)) of [position v] with (item (3) of [localxlist v])\nreplace item ((((Global: Player ID) * (8)) - (7)) + (3)) of [position v] with (item (4) of [localxlist v])\nreplace item ((((Global: Player ID) * (8)) - (7)) + (4)) of [position v] with (item (1) of [localylist v])\nreplace item ((((Global: Player ID) * (8)) - (7)) + (5)) of [position v] with (item (2) of [localylist v])\nreplace item ((((Global: Player ID) * (8)) - (7)) + (6)) of [position v] with (item (3) of [localylist v])\nreplace item ((((Global: Player ID) * (8)) - (7)) + (7)) of [position v] with (item (4) of [localylist v])\nPosition List --> Variable\n\ndefine Position List --> Variable\nset [tempposition v] to []\nset [positioncounter2 v] to [1]\nrepeat until <(PositionCounter2) > (length of [position v])>\n    set [tempposition v] to (join (TempPosition) (item (PositionCounter2) of [position v]))\n    change [positioncounter2 v] by (1)\nend\nset [☁ position v] to (TempPosition)\n\nwhen flag clicked\nwait (1) seconds\nwait until <(Global:Network Connected) = [1]>\nwait (1) seconds\nforever\n    Update Position\n    set [oldlocalx2 v] to (Global: LocalX)\n    set [oldlocaly2 v] to (Global: LocalY)\n    set [position updated v] to [0]\n    Verify Updated Position (1)\n    wait until <(Position Updated) = [1]>\n    wait until <<<not <(OldLocalX2) = (Global: LocalX)>> or <not <(OldLocalY2) = (Global: LocalY)>>> or <(Global: UpdatePos) = [1]>>\n    if <(Global: UpdatePos) = [1]> then\n        set [global: updatepos v] to [0]\n    end\nend\n\ndefine Position Variable --> List\nset [position variable --> list done v] to [0]\nset [positioncounter v] to [1]\nrepeat until <(length of [position v]) = (length of (☁ Position))>\n    if <(length of [position v]) > (length of (☁ Position))> then\n        delete (last) of [position v]\n    end\n    if <(length of [position v]) < (length of (☁ Position))> then\n        add [0] to [position v]\n    end\nend\nrepeat until <(PositionCounter) > (length of (☁ Position))>\n    replace item (PositionCounter) of [position v] with (letter (PositionCounter) of (☁ Position))\n    change [positioncounter v] by (1)\nend\nset [position variable --> list done v] to [1]\n\n@DebugManager\n\nwhen [d v] key pressed\nif <(OnDebugList) = [1]> then\n    if <(DebugVisibility) = [1]> then\n        set [debugvisibility v] to [0]\n        HideDeubgVars\n    else\n        set [debugvisibility v] to [1]\n        ShowDebugVars\n    end\nend\n\nwhen flag clicked\nset [global:debug mode v] to [0]\nHideDeubgVars\nset [debugvisibility v] to [0]\nCheckDebuggerList\nwait (1) seconds\nif <(Global:Debug Mode) = [1]> then\n    if <(OnDebugList) = [1]> then\n        set [message # v] to [3]\n    else\n        set [message # v] to [2]\n    end\nend\n\ndefine CheckDebuggerList\nset [x v] to [1]\nset [ondebuglist v] to [0]\nrepeat until <(x) > (length of [debuggers v])>\n    if <(item (x) of [debuggers v]) = (username)> then\n        set [ondebuglist v] to [1]\n        set [debugvisibility v] to [1]\n        ShowDebugVars\n        stop [this script v]\n    end\n    change [x v] by (1)\nend\n\nwhen flag clicked\nset [message: not on db list v] to [0]\n\ndefine HideDeubgVars\nhide variable [☁ watchdog v]\nhide variable [☁ position v]\nhide variable [☁ tempdata v]\n\ndefine ShowDebugVars\nshow variable [☁ watchdog v]\nshow variable [☁ position v]\nshow variable [☁ tempdata v]\n\nwhen [s v] key pressed\n\n@TempDataManager\n\ndefine None\nif <not <(length of (☁ TempData)) = ((tempdataslots) * (Global: Players Online))>> then\n    if <(Global: Players Online) = [1]> then\n        set [slotcount v] to []\n        repeat (tempdataslots)\n            set [slotcount v] to (join (SlotCount) [0])\n        end\n        set [☁ tempdata v] to (SlotCount)\n    else\n        set [slotcount v] to (☁ TempData)\n        if <not <<(length of (☁ TempData)) > ((tempdataslots) * (Global: Player ID))> or <(length of (☁ TempData)) = ((tempdataslots) * (Global: Player ID))>>> then\n            repeat until <(length of (SlotCount)) = ((tempdataslots) * (Global: Player ID))>\n                repeat (tempdataslots)\n                    set [slotcount v] to (join (SlotCount) [0])\n                end\n            end\n            set [☁ tempdata v] to (SlotCount)\n        end\n    end\n    set [oldtempdatalen v] to (length of (☁ TempData))\n    if <(verifytempdata) = [1]> then\n        broadcast (Verify TempData v)\n    end\nend\n\ndefine TempData --> TempDataList\nset [tempdatacounter v] to [1]\nrepeat until <(length of [tempdatalist v]) = (length of (☁ TempData))>\n    if <(length of [tempdatalist v]) > (length of (☁ TempData))> then\n        delete (last) of [tempdatalist v]\n    end\n    if <(length of [tempdatalist v]) < (length of (☁ TempData))> then\n        add [0] to [tempdatalist v]\n    end\nend\nrepeat until <(TempDataCounter) > (length of (☁ TempData))>\n    replace item (TempDataCounter) of [tempdatalist v] with (letter (TempDataCounter) of (☁ TempData))\n    change [tempdatacounter v] by (1)\nend\n\ndefine Add Username to TempDataList\nset [usernamecount v] to ((((Global: Player ID) - (1)) * (TempDataSlots)) + (1))\nset [usernamecount2 v] to [1]\nrepeat until <(UsernameCount2) > [40]>\n    replace item (UsernameCount) of [tempdatalist v] with (letter (UsernameCount2) of (Encoded Username))\n    change [usernamecount v] by (1)\n    change [usernamecount2 v] by (1)\nend\n\nwhen flag clicked\nwait until <(Global:Network Connected) = [1]>\nforever\n    Decode TempData\n    wait (0.5) seconds\nend\n\ndefine Local Information--> Cloud Temp Data\nEncode Username\nTempData --> TempDataList\nAdd Username to TempDataList\nAdd Location to TempDataList\nTempDataList --> Temp Data\nbroadcast (Confirm Username in TempData v)\n\nwhen I receive [confirm username in tempdata v]\nwait (5) seconds\nset [confirmcounter v] to ((((Global: Player ID) - (1)) * (TempDataSlots)) + (1))\nset [confirmcounter2 v] to [1]\nrepeat (39)\n    if <not <(letter (ConfirmCounter) of (☁ TempData)) = (letter (ConfirmCounter2) of (Encoded Username))>> then\n        if <not <(OldTempDataLen) > ((length of (☁ TempData)) - (1))>> then\n            set [message # v] to [11]\n            Resize TempData (tempdataslots) (0)\n        end\n        set [message # v] to [12]\n        broadcast (Run Username --> Temp Data v)\n        stop [this script v]\n    end\n    change [confirmcounter v] by (1)\n    change [confirmcounter2 v] by (1)\nend\n\ndefine Decode TempData\nrepeat until <((length of (☁ TempData)) / (TempDataSlots)) = (length of [global: playerdaya v])>\n    if <((length of (☁ TempData)) / (TempDataSlots)) > (length of [global: playerdaya v])> then\n        add [] to [global: playerdaya v]\n    end\n    if <((length of (☁ TempData)) / (TempDataSlots)) < (length of [global: playerdaya v])> then\n        delete (last) of [global: playerdaya v]\n    end\nend\nset [playerdatacount v] to [1]\nrepeat until <(PlayerDataCount) > ((length of (☁ TempData)) / (TempDataSlots))>\n    set [playerdatacount2 v] to [1]\n    set [tempplayerdata v] to []\n    repeat until <(PlayerDataCount2) > (TempDataSlots)>\n        set [tempplayerdata v] to (join (TempPlayerData) (letter ((((PlayerDataCount) - (1)) * (TempDataSlots)) + (PlayerDataCount2)) of (☁ TempData)))\n        change [playerdatacount2 v] by (1)\n    end\n    replace item (PlayerDataCount) of [global: playerdaya v] with (TempPlayerData)\n    change [playerdatacount v] by (1)\nend\n\nwhen I receive [run username --> temp data v]\nLocal Information--> Cloud Temp Data\n\nwhen flag clicked\nwait until <(Global:Network Connected) = [1]>\nforever\n    TempData --> Usernames List\n    TempData --> Locations List\n    wait (0.5) seconds\nend\n\ndefine Global: PlayerData --> Encoded Usernames\nrepeat until <(length of [encoded usernames v]) = (length of [global: playerdaya v])>\n    if <(length of [encoded usernames v]) > (length of [global: playerdaya v])> then\n        delete (last) of [encoded usernames v]\n    end\n    if <(length of [encoded usernames v]) < (length of [global: playerdaya v])> then\n        add [] to [encoded usernames v]\n    end\nend\nset [encodedusernamescount v] to [1]\nrepeat until <(EncodedUsernamesCount) > (length of [global: playerdaya v])>\n    set [tempencodedusername v] to []\n    set [encodedusernamescount2 v] to [1]\n    repeat until <(EncodedUsernamesCount2) > [40]>\n        set [tempencodedusername v] to (join (TempEncodedUsername) (letter (EncodedUsernamesCount2) of (item (EncodedUsernamesCount) of [global: playerdaya v])))\n        change [encodedusernamescount2 v] by (1)\n    end\n    replace item (EncodedUsernamesCount) of [encoded usernames v] with (TempEncodedUsername)\n    change [encodedusernamescount v] by (1)\nend\n\nwhen flag clicked\nset [tempdataslots v] to [42]\nwait until <<(Global:Network Connected) = [1]> and <not <(Global: Player ID) = [0]>>>\nset [old player id v] to (Global: Player ID)\nResize TempData (TempDataSlots) (1)\nwait (1) seconds\nLocal Information--> Cloud Temp Data\nforever\n    set [oldlocation v] to (Global: Location)\n    wait until <<not <(Old Player ID) = (Global: Player ID)>> or <not <(Global: Location) = (OldLocation)>>>\n    Resize TempData (TempDataSlots) (1)\n    wait (1) seconds\n    Local Information--> Cloud Temp Data\nend\n\nwhen I receive [verify tempdata v]\nwait (5) seconds\nif <not <(OldTempDataLen) > ((length of (☁ TempData)) - (1))>> then\n    set [message # v] to [11]\n    Resize TempData (tempdataslots) (1)\n    Local Information--> Cloud Temp Data\nend\n\ndefine TempDataList --> Temp Data\nset [temptempdata v] to []\nset [tempdatacounter2 v] to [1]\nrepeat until <(TempDataCounter2) > (length of [tempdatalist v])>\n    set [temptempdata v] to (join (TempTempData) (item (TempDataCounter2) of [tempdatalist v]))\n    change [tempdatacounter2 v] by (1)\nend\nset [☁ tempdata v] to (TempTempData)\n\ndefine Encode Username\nset [username codes v] to [abcdefghijklmnopqrstuvwxyz1234567890_-]\nset [encoded username v] to []\nset [ucount v] to [1]\nrepeat until <(uCount) > (length of (username))>\n    set [ucount2 v] to [1]\n    repeat until <(letter (uCount2) of (Username Codes)) = (letter (uCount) of (username))>\n        change [ucount2 v] by (1)\n    end\n    if <(length of (uCount2)) = [1]> then\n        set [encoded username v] to (join (Encoded Username) (join [0] (uCount2)))\n    else\n        set [encoded username v] to (join (Encoded Username) (uCount2))\n    end\n    change [ucount v] by (1)\nend\nrepeat until <(length of (Encoded Username)) = [40]>\n    set [encoded username v] to (join (Encoded Username) [0])\nend\n\ndefine Add Location to TempDataList\nset [usernamecount v] to (((((Global: Player ID) - (1)) * (TempDataSlots)) + (1)) + (40))\nif <(length of (Global: Location)) = [1]> then\n    replace item (UsernameCount) of [tempdatalist v] with [0]\n    replace item ((UsernameCount) + (1)) of [tempdatalist v] with (letter (1) of (Global: Location))\nelse\n    replace item (UsernameCount) of [tempdatalist v] with (letter (1) of (Global: Location))\n    replace item ((UsernameCount) + (1)) of [tempdatalist v] with (letter (2) of (Global: Location))\nend\n\ndefine TempData --> Usernames List\nGlobal: PlayerData --> Encoded Usernames\nEncoded Usernames List --> Global: Usernames\n\ndefine TempData --> Locations List\nResize Locations List\nTempDataList --> Global: Locations\n\ndefine TempDataList --> Global: Locations\nset [locationscount1 v] to [1]\nrepeat until <(LocationsCount1) > (length of [global: playerdaya v])>\n    replace item (LocationsCount1) of [global: locations v] with (letter (41) of (item (LocationsCount1) of [global: playerdaya v]))\n    replace item (LocationsCount1) of [global: locations v] with (join (item (LocationsCount1) of [global: locations v]) (letter (42) of (item (LocationsCount1) of [global: playerdaya v])))\n    change [locationscount1 v] by (1)\nend\n\ndefine Resize Locations List\nif <(length of [global: locations v]) > (Global: Players Online)> then\n    delete (last) of [global: locations v]\nend\nif <(length of [global: locations v]) < (Global: Players Online)> then\n    add [] to [global: locations v]\nend\n\ndefine Encoded Usernames List --> Global: Usernames\nrepeat until <(length of [global: usernames v]) = (length of [encoded usernames v])>\n    if <(length of [global: usernames v]) > (length of [encoded usernames v])> then\n        delete (last) of [global: usernames v]\n    end\n    if <(length of [global: usernames v]) < (length of [encoded usernames v])> then\n        add [] to [global: usernames v]\n    end\nend\nset [countglobalusernames v] to [1]\nrepeat until <(CountGlobalUsernames) > (length of [encoded usernames v])>\n    set [countglobalusernames2 v] to [1]\n    set [tempusername v] to []\n    repeat until <(CountGlobalUsernames2) > [40]>\n        set [tempdecodecode v] to (join (letter (CountGlobalUsernames2) of (item (CountGlobalUsernames) of [encoded usernames v])) (letter ((CountGlobalUsernames2) + (1)) of (item (CountGlobalUsernames) of [encoded usernames v])))\n        set [tempusername v] to (join (TempUsername) (letter (TempDecodeCode) of (Username Codes)))\n        change [countglobalusernames2 v] by (2)\n    end\n    replace item (CountGlobalUsernames) of [global: usernames v] with (TempUsername)\n    change [countglobalusernames v] by (1)\nend\n\n@PLATFORM\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPOSTION ((x) - (my variable)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\n\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (level 2 1 v)\n    else\n        if <(LEVEL) = [2]> then\n            switch costume to (level 3 1 v)\n        end\n    end\nend\n\nCLONE AT X [360] Y [0]\nCLONE AT X [0] Y [360]\nCLONE AT X [400] Y [320]\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [0]\nCLONE AT X [360] Y [0]\n\ndefine POSTION (x) (y)\nif <<[0] = (x position)> and <[0] = (y position)>> then\n    show\nelse\n    hide\nend\n\ngo to x: (0) y: (-55)\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine CLONE AT X (x) Y (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <<(costume [number v]) = [5]> or <<(costume [number v]) = [6]> or <<(costume [number v]) = [7]> or <(costume [number v]) = [8]>>>> then\n        broadcast (wind v)\n    end\nend\n\nwhen flag clicked\nif <(costume [number v]) = [5]> then\n    broadcast (wind v) and wait\nend\nif <(costume [number v]) = [6]> then\n    broadcast (wind v) and wait\nend\nif <(costume [number v]) = [7]> then\n    broadcast (wind v)\nend\nif <(costume [number v]) = [8]> then\n    broadcast (wind v) and wait\nend\n\nforever\n\nbroadcast (wind v) and wait\n\n@DAnger\n\nwhen I receive [level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume2 v)\n\nwhen flag clicked\nswitch costume to (3 v)\nhide\n\nwhen I receive [begin v]\nshow\n\n@Love and fav detector\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 <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait (0.2) seconds\n            set [loved v] to [1]\n            broadcast (boost v) and wait\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 <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait (0.2) seconds\n            set [faved v] to [1]\n            broadcast (boost v) and wait\n        end\n    end\nend\n\nif <touching (mouse-pointer v)?> then\n\nif <touching (mouse-pointer v)?> then\n\nwhen flag clicked\nhide\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 (0.25) seconds\nshow\ngo to x: (0) y: (-100)\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\n@Water\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    set [ghost v] effect to (40)\n    go to x: (0) y: (0)\n    go to [back v] layer\n    forever\n        wait (.05) seconds\n        repeat (5)\n            wait (.0001) seconds\n            change y by (2)\n        end\n        wait (.05) seconds\n        repeat (5)\n            wait (.0001) seconds\n            change y by (-2)\n        end\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [back v] layer\n\nwhen I receive [level v]\nnext costume\n\n@wind\n\nwhen flag clicked\n\nwhen I start as a clone\nchange [count v] by (.0000000001)\nhide\ngo to x: (-230) y: (pick random (175) to (-175))\ngo [backward v] (2) layers\ngo to [front v] layer\nset [ghost v] effect to (50)\nswitch costume to (pick random (1) to (6))\nshow\nrepeat (1)\n    move (((speed) * (100)) + (100)) steps\n    turn right (pick random (-2) to (2)) degrees\nend\nhide\ndelete this clone\n\nchange [count v] by (-1)\n\nwhen flag clicked\nhide\n\nforever\n    \n    end\nend\n\nwhen I receive [wind v]\nset [count v] to [0]\nforever\n    if <(count) < [1]> then\n        create clone of (_myself_ v)\n        wait (1) seconds\n    end\nend\n\n@Thumb\n\nwhen flag clicked\ngo to x: (25) y: (-2)\ngo to [front v] layer\nswitch costume to (costume2 v)\nset [ghost v] effect to (100)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Lava\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nforever\n    clear graphic effects\n    go to x: (0) y: (0)\n    go to [back v] layer\n    forever\n        wait (.05) seconds\n        repeat (5)\n            wait (.0001) seconds\n            change y by (2)\n        end\n        wait (.05) seconds\n        repeat (5)\n            wait (.0001) seconds\n            change y by (-2)\n        end\n    end\nend\n\nset [ghost v] effect to (40)\n\n@Shop\n\nwhen flag clicked\ngo to [back v] layer\nset size to (100) %\ngo to x: (-182) y: (144)\nswitch costume to (costume1 v)\nclear graphic effects\nshow\n\nwhen this sprite clicked\nswitch costume to (costume2 v)\ngo to x: (0) y: (0)\nbroadcast (fvfvfv v) and wait\nforever\n    if <touching (mouse-pointer v)?> then\n        go to x: (0) y: (0)\n        switch costume to (costume2 v)\n        broadcast (fvfvfv v) and wait\n    else\n        go to x: (-182) y: (144)\n        switch costume to (costume1 v)\n        broadcast (stop fr=vvfv v) and wait\n    end\nend\n\nwhen flag clicked\n\n@Sprite1\n\nwhen flag clicked\n\n@Blue ninja\n\nwhen flag clicked\ngo to x: (-192) y: (135)\nhide\n\nwhen this sprite clicked\nif <(LEVEL) > [-1]> then\n    broadcast (Blue Ninja v) and wait\nend\n\nwhen I receive [fvfvfv v]\nshow\n\nwhen I receive [stop fr=vvfv v]\nhide\n\ngo to x: (-127) y: (138)\n\n@Blue ninja2\n\nwhen flag clicked\ngo to x: (-203) y: (81)\nhide\n\nwhen this sprite clicked\nif <(LEVEL) > [1]> then\n    broadcast (other cool logo v) and wait\nend\n\nwhen I receive [fvfvfv v]\nshow\n\nwhen I receive [stop fr=vvfv v]\nhide\n\n@Blue ninja3\n\nwhen flag clicked\ngo to x: (-127) y: (135)\nhide\n\nwhen this sprite clicked\nif <(LEVEL) > [1]> then\n    broadcast (cool logo 1 v) and wait\nend\n\nwhen I receive [fvfvfv v]\nshow\n\nwhen I receive [stop fr=vvfv v]\nhide\n\n@Blue ninja4\n\nwhen flag clicked\ngo to x: (-128) y: (80)\nhide\n\nwhen this sprite clicked\nif <(LEVEL) > [4]> then\n    broadcast (cow boy v) and wait\nend\n\nwhen I receive [fvfvfv v]\nshow\n\nwhen I receive [stop fr=vvfv v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nshow list [chat v]\n\nwhen this sprite clicked\nset [is the chat open v] to [1]\nset [chat v] to [1]\nsay (item (Chat) of [chat v])\nwait (2) seconds\nsay []\nset [chat v] to [0]\n\nhide list [chat v]\n\n@Blue ninja5\n\nwhen flag clicked\ngo to x: (-208) y: (22)\nhide\n\nwhen this sprite clicked\nif <(LEVEL) > [9]> then\n    broadcast (alien v) and wait\nend\n\nwhen I receive [fvfvfv v]\nshow\n\nwhen I receive [stop fr=vvfv v]\nhide\n\n@Intro\n\nwhen flag clicked\nstart sound [JJD - Adventure v]\nhide\nswitch costume to (download v)\nrepeat (4)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nforever\n    if <(costume [number v]) = [1]> then\n        set [brightness v] effect to (0)\n        go to x: (0) y: (500)\n        point in direction (180)\n        set size to (100) %\n        wait (0) seconds\n        show\n        go to [front v] layer\n        repeat until <<(round (y position)) = [0]> and <(round (direction)) = [90]>>\n            change y by (((0) - (y position)) * (.2))\n            turn right (((90) - (direction)) * (.2)) degrees\n        end\n        repeat (10)\n            change [brightness v] effect by (10)\n            change size by (10)\n        end\n        broadcast (2 v)\n        delete this clone\n    else\n        if <(costume [number v]) = [2]> then\n            wait (5.5) seconds\n            show\n            set [ghost v] effect to (0)\n            go to x: (0) y: (0)\n            set size to (70) %\n            wait (6.9) seconds\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [ghost v] effect to (100)\n            delete this clone\n        else\n            if <(costume [number v]) = [3]> then\n                wait (5.9) seconds\n                show\n                set [ghost v] effect to (0)\n                go to x: (0) y: (-70)\n                set size to (80) %\n                wait (6.9) seconds\n                repeat (10)\n                    change [ghost v] effect by (10)\n                end\n                set [ghost v] effect to (100)\n                delete this clone\n            else\n                if <(costume [number v]) = [4]> then\n                    set [ghost v] effect to (0)\n                    go to x: (0) y: (0)\n                    point in direction (90)\n                    wait (5.7) seconds\n                    show\n                    repeat (10)\n                        change [ghost v] effect by (10)\n                    end\n                    delete this clone\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [2]> then\n        change size by ([sin v] of ((timer) * (200)) )\n    end\n    if <(costume [number v]) = [3]> then\n        point in direction ((([sin v] of (rfvdcsx) ) * (7)) + (90))\n        change y by ([sin v] of (rfvdcsx) )\n        change size by ([sin v] of (rfvdcsx) )\n        change [rfvdcsx v] by (10)\n    end\nend\n\n
press t to chat and when you are in chat press 5 to say anything\n\nyay top loved! please also like and fav @Chr_avila_07663 version! and get that top loved too...\n\nPLease stop the hate this collab took so long and It was made for you all it makes me feed bad when you all right mean comments so just stop please #STOPTHEHATE\n\nYAY! #11 on games trending and #3 on music trending and #13 on all trending #21 on Art trending\n\nElements | A Platformer Collab\n-Made by @YungSky , @Kookycat18 , @Chr_Avila_07663 !\n\nUse WASD/Arrow keys or mobile to move your player.\n200 loves for a boss fight. = boss fight coming soon\n300 loves for more levels and shop = done\n500 loves for 2nd hopefully!\n1000 loves for ... chat\n1500 loves for a huge update\n\nPlease love and fave and follow, for me to know that you are loving my projects.