Circles The ☁️ platformer 

Instructions: Welcome To Circles : The☁️ platformer\n\nMy first  (official) Cloud  Scrolling Platformer \nI had made  Jump 4 which was a cloud platformer \nI recently unshared and made it into this game \n8 Players  can play at a time \nArrow keys to move  \nSpace to JUMP\nMobile Friendly -Yes \nTimer removed due to bug =( \nlowest time taken to finish is16.8 sec by @Ice_Cube27\nIf you see no one try inviting your friends  and race with them \nor me if I am online I will race with you\nI shared it today because its my birthday (16 June)

@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [:] ((mouse y) + (SCROLL Y))))\nshow variable [mouse v]\n\n@Blank\n\n@player\n\nwhen flag clicked\nset [max players v] to [8]\nset [player v] to [0]\ndelete all of [buffer v]\nbroadcast (setup - opponents v) and wait\nswitch backdrop to (thumbnail v)\nwait (2.5) seconds\nswitch backdrop to (connecting v)\nbroadcast (join game v) and wait\nif <(Player) > [0]> then\n    switch backdrop to (connected v)\n    wait (3) seconds\n    switch backdrop to (blank v)\nelse\n    switch backdrop to (full v)\nend\nbroadcast (Begin v)\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [begin v]\nforever\n    send cloud data\nend\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                            set [☁ p8 v] to (value)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine send cloud data\nif <(Player) < [1]> then\n    stop [this script v]\nend\nadd (round (x)) to [buffer v]\nadd (round (y)) to [buffer v]\nchange [cloud timer v] by (1)\nif <(cloud timer) < [3]> then\n    stop [this script v]\nend\nset [cloud timer v] to [0]\nset [encoded v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nrepeat (length of [buffer v])\n    write (item (1) of [buffer v]) to encoded\n    delete (1) of [buffer v]\nend\nset cloud # (Player) to (encoded)\n\ndefine tick\nif <<key (left arrow 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 <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [sx v] by (2)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    change player x by (round (sx))\nend\nif <<<key (space v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nchange player y by (sy)\ntest die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nposition\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen flag clicked\nwait until <(backdrop [name v]) = [Blank]>\nbroadcast (green flag v) and wait\n\ndefine Game - die\nset [exit v] to []\nrepeat (4)\n    hide\n    wait (0.3) seconds\n    show\nend\nhide\nwait (0.5) seconds\n\ndefine test die\nif <touching (danger  v)?> then\n    set [exit v] to [die]\nend\n\ndefine change player x by (sx)\nchange [x v] by (sx)\nposition\nif <<touching (platforms v)?> or <touching (win platform v)?>> then\n    if <<touching (platforms v)?> or <touching (win platform v)?>> then\n        repeat (12)\n            change [y v] by (1)\n            position\n            if <not <<touching (platforms v)?> or <touching (win platform v)?>>> then\n                stop [this script v]\n            end\n        end\n    end\n    change [y v] by (-12)\n    if <<<key (space v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <<touching (platforms v)?> or <touching (win 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\ndefine game on\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\npoint in direction (90)\n\ndefine position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine change player x by (sx)\nchange [x v] by (sx)\nposition\nif <<touching (platforms v)?> or <touching (win platform v)?>> then\n    if <<touching (platforms v)?> or <touching (win platform v)?>> then\n        repeat (12)\n            change [y v] by (1)\n            position\n        end\n        if <not <<touching (platforms v)?> or <touching (win platform v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<key (space v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <<touching (platforms v)?> or <touching (win 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\ndefine game on\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\npoint in direction (90)\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)?> or <touching (win platform v)?>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    position\n    set [sy v] to [0]\nend\n\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) and wait\n    end\n    if <([costume # v] of [win platform v]) = [Level  #11]> then\nend\n\nwhen flag clicked\nswitch costume to (player  v)\n\nwhen I receive [begin v]\nswitch costume to (player  v)\n\nwhen flag clicked\nforever\n    if <touching (win platform v)?> then\n        switch costume to (win v)\n    end\nend\n\nwhen I receive [begin v]\nforever\n    play sound [Hello piano cover v] until done\nend\n\n@others\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value =read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\ndefine setup players\ndelete all of [buffer v]\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nset [color v] effect to (90)\n\nwhen I receive [begin v]\nforever\n    if <(Player) = (player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        tick\n    end\nend\n\ndefine value =cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ p2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ p3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ p4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ p5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ p6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ p7)\n                        else\n                            set [value v] to (☁ p8)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup - opponents v]\nsetup players\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]\n    begin decode of (value)\n    value =read from encoded\n    say (join (player #) (join [:] (value)))\n    value =read from encoded\n    value =read from encoded\n    repeat until <(value) = []>\n        add (value) to [buffer v]\n        value =read from encoded\n    end\nend\nif <(length of [buffer v]) > [0]> then\n    set x to ((item (1) of [buffer v]) - (SCROLL X))\n    delete (1) of [buffer v]\n    set y to ((item (1) of [buffer v]) - ((SCROLL Y) + (0)))\n    delete (1) of [buffer v]\nend\nCheck Others\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 [player v] to (player #)\nend\n\ndefine Check Others\nif <<(x position) > [200]> or <<(y position) > [160]> or <<(y position) < [-160]> or <(x position) < [-200]>>>> then\n    switch costume to (arrow v)\n    point towards (player v)\n    if on edge, bounce\nelse\n    switch costume to (others v)\n    point in direction (90)\nend\n\n@platforms\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]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 #1 v)\n    clone at x [360] y [55]\n    clone at x [360] y [57]\n    clone at x [360] y [137]\n    clone at x [360] y [137]\n    clone at x [360] y [137]\n    switch costume to (level 1 #6 v)\n    clone at x [340] y [150]\n    clone at x [360] y [155 ]\n    clone at x [300] y [150]\n    clone at x [360] y [150]\n    clone at x [360] y [150]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\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\n@Danger \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]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 #1 v)\n    clone at x [360] y [29]\n    clone at x [360] y [-15]\n    clone at x [360] y [48]\n    clone at x [360] y [137]\n    clone at x [360] y [137]\n    clone at x [360] y [-66]\n    clone at x [200] y [180]\n    clone at x [200] y [300]\n    clone at x [390] y [300]\n    clone at x [390] y [300]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\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\nnext costume\n\n\n\nif <(LEVEL) = [2]> then\n    switch costume to (level 2 #1 v)\nelse\n    if <(LEVEL) = [3]> then\n        switch costume to (level 3 #1 v)\n        clone at x [341] y [56]\n        clone at x [346] y [145]\n    else\n        switch costume to (level 4 #1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@win platform\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]\nhide\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 #1 v)\n    clone at x [360] y [55]\n    clone at x [360] y [57]\n    clone at x [360] y [137]\n    clone at x [360] y [137]\n    clone at x [360] y [137]\n    switch costume to (level 1 #6 v)\n    clone at x [340] y [150]\n    clone at x [360] y [155 ]\n    clone at x [300] y [150]\n    clone at x [360] y [150]\n    clone at x [360] y [150]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\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\nnext costume\n\nif <(LEVEL) = [2]> then\n\nswitch costume to (level 1 #9 v)\nclone at x [260] y [143]\nswitch costume to (level  #11 v)\n\nsay [you win ] for (1) seconds\n\n