Rainy-a cloud multiplayer platformer

Instructions: Play my new project here: https://scratch.mit.edu/projects/710939600/\n\nWelcome to Rainy- a cloud multiplayer platformer!\n\nGet to the end,because you don't want to wet!\n\nMove with the arrow keys,WAD or tap.Don't fall in holes.Simple lol (and generic)xD

@Stage\n\nwhen flag clicked\nforever\n    play sound [Alan Walker - Spectre \[NCS Release\].mp3 v] until done\nend\n\n@Figur9\n\nwhen I receive [start v]\nshow\ngo to [front v] layer\nforever\n\nwhen I receive [start v]\nset [level v] to [1]\n\nwhen I receive [start v]\nforever\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide variable [players v]\nhide\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@connecting\n\nif <(length of [cloud list v]) = [0]> then\n\n\ndefine connecttest (@slot)\nif <not <(item (((@PlayerSlot) * (8)) - (4)) of [cloud list v]) = (item (4) of [my list v])>> then\n    wait (1) seconds\n    delete all of [my list v]\n    add (x position) to [my list v]\n    add (y position) to [my list v]\n    add (pick random (999) to (99999)) to [my list v]\n    add (XV) to [my list v]\n    add [0] to [my list v]\n    add (chat.output) to [my list v]\n    add (chat.mode) to [my list v]\n    add [4] to [my list v]\n    broadcast (Tick v) and wait\n    broadcast (Get Data v) and wait\n    if <not <(item (((@PlayerSlot) * (8)) - (4)) of [cloud list v]) = (item (4) of [my list v])>> then\n        broadcast (failed v)\n    end\nend\n\nwhen I receive [initialise  v]\nswitch costume to (connecting v)\nshow\nclear graphic effects\ngo to x: (0) y: (0)\ngo to [front v] layer\nset [full? v] to [False]\nset [kick v] to [False]\nset [moved? v] to [800]\n\nwhen flag clicked\nbroadcast (Initialise  v) and wait\nGet Player Slot\nset [moved? v] to [600]\nif <not <(@PlayerSlot) > [0]>> then\n    set [full? v] to [True]\nelse\n    wait (1) seconds\n    set [started v] to [1]\n    broadcast (start v)\nend\nhide\nforever\n    broadcast (Tick v) and wait\nend\n\ndefine Get Player Slot\nset [@playerslot v] to [0]\nbroadcast (Get Data v) and wait\nset [moved? v] to [0]\ndelete all of [check v]\nif <(length of [cloud list v]) = [0]> then\n    set [@playerslot v] to [1]\nelse\n    repeat (10)\n        change [moved? v] by (1)\n        add (item (((Moved?) * (8)) - (5)) of [cloud list v]) to [check v]\n    end\n    wait (2) seconds\n    broadcast (Get Data v) and wait\n    set [moved? v] to [1]\n    repeat until <(item (((Moved?) * (8)) - (5)) of [cloud list v]) = (item (Moved?) of [check v])>\n        change [moved? v] by (1)\n    end\n    set [@playerslot v] to (Moved?)\n    delete all of [my list v]\n    add (x position) to [my list v]\n    add (y position) to [my list v]\n    add (pick random (999) to (99999)) to [my list v]\n    add (XV) to [my list v]\n    add [0] to [my list v]\n    add (chat.output) to [my list v]\n    add (chat.mode) to [my list v]\n    add [4] to [my list v]\n    broadcast (Tick v) and wait\n    broadcast (Get Data v) and wait\n    connecttest (@PlayerSlot)\nend\n\nwhen flag clicked\nset [started v] to [0]\n\nwhen I receive [start v]\nset [started v] to [1]\n\nwhen I receive [aw v]\nshow\ngo to [front v] layer\nswitch costume to (full2 v)\nstop [all v]\n\nwhen flag clicked\nforever\n    if <(Full?) = [True]> then\n        go to [front v] layer\n        switch costume to (full v)\n        show\n        stop [all v]\n    end\nend\n\nwhen I receive [failed v]\nshow\ngo to [front v] layer\nswitch costume to (failed v)\nstop [all v]\n\nhide\n\nshow\n\nwhen I receive [starete v]\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Figur1\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\n@Regen\n\nwhen flag clicked\nset [pixelate v] effect to (0)\nshow\ngo to [front v] layer\nforever\n    repeat (10)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\n    if <(Level) = [19]> then\n        go to [back v] layer\n    end\n    if <(Level) = [20]> then\n        go to [back v] layer\n    end\n    if <(Level) = [21]> then\n        go to [back v] layer\n    end\n    if <(Level) = [22]> then\n        go to [back v] layer\n    end\n    if <(Level) = [23]> then\n        go to [back v] layer\n    end\n    if <(Level) = [24]> then\n        go to [back v] layer\n    end\n    if <(Level) = [25]> then\n        go to [back v] layer\n    end\n    if <(Level) = [26]> then\n        go to [front v] layer\n        stop [other scripts in sprite v]\n        hide\n    end\nend\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (3))\ngo to x: (pick random (-240) to (240)) y: (184)\nglide (pick random (0.005) to (2)) secs to x: (x position) y: (-184)\ndelete this clone\n\nif <(Level) = [27]> then\ngo to [back v] layer\n\nwhen I receive [spielen v]\n\nhide\n\nwhen flag clicked\nhide variable [players v]\n\n@Cloud\n\ndefine Decode (data)\ndelete all of [cloud list v]\nset [output v] to []\nset [i v] to [0]\nrepeat ((length of (data)) / (2))\n    change [i v] by (2)\n    switch costume to (join (letter ((I) - (1)) of (data)) (letter (I) of (data)))\n    if <(costume [name v]) = [~]> then\n        add (Output) to [cloud list v]\n        set [output v] to []\n    else\n        set [output v] to (join (Output) (costume [name v]))\n    end\nend\n\ndefine Encode\nset [output v] to []\nset [n v] to [0]\nrepeat (length of [my list v])\n    set [i v] to [0]\n    change [n v] by (1)\n    repeat (length of (item (n) of [my list v]))\n        change [i v] by (1)\n        switch costume to (letter (I) of (item (n) of [my list v]))\n        if <(costume [number v]) < [10]> then\n            set [output v] to (join (Output) (join [0] (costume [number v])))\n        else\n            set [output v] to (join (Output) (costume [number v]))\n        end\n    end\n    set [output v] to (join (Output) [53])\nend\n\ndefine Update Players List (id)\nif <(id) = [1]> then\n    set [player list v] to [0]\n    delete all of [check v]\n    repeat (10)\n        change [player list v] by (1)\n        add (item (((Player List) * (8)) - (5)) of [cloud list v]) to [check v]\n    end\nelse\n    if <(id) = [2]> then\n        set [player list v] to [0]\n        repeat (10)\n            change [player list v] by (1)\n            if <not <(@PlayerSlot) = (Player List)>> then\n                if <(item (Player List) of [check v]) = (item (((Player List) * (8)) - (5)) of [cloud list v])> then\n                    replace item (Player List) of [active check v] with [Off]\n                else\n                    replace item (Player List) of [active check v] with [On]\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [initialise  v]\ndelete all of [active check v]\nrepeat (10)\n    add [off] to [active check v]\nend\n\nwhen I receive [start v]\nforever\n    Update Players List [1]\n    wait (0.3) seconds\n    Update Players List [2]\nend\n\nwhen I receive [get data v]\nDecode Data\n\ndefine Save Data (id)\nEncode\nif <(timer) < ((last.activity) + (60))> then\n    if <(id) = [1]> then\n        set [☁ p1 v] to (Output)\n    else\n        if <(id) = [2]> then\n            set [☁ p2 v] to (Output)\n        else\n            if <(id) = [3]> then\n                set [☁ p3 v] to (Output)\n            else\n                if <(id) = [4]> then\n                    set [☁ p4 v] to (Output)\n                else\n                    if <(id) = [5]> then\n                        set [☁ p5 v] to (Output)\n                    else\n                        if <(id) = [6]> then\n                            set [☁ p6 v] to (Output)\n                        else\n                            if <(id) = [7]> then\n                                set [☁ p7 v] to (Output)\n                            else\n                                if <(id) = [8]> then\n                                    set [☁ p8 v] to (Output)\n                                else\n                                    if <(id) = [9]> then\n                                        set [☁ p9 v] to (Output)\n                                    else\n                                        if <(id) = [10]> then\n                                            set [☁ p10 v] to (Output)\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [tick v]\nDecode Data\nSave Data (@PlayerSlot)\nDetermine Players\n\ndefine Decode Data\nDecode (join (☁ p1) (join (☁ P2) (join (☁ P3) (join (☁ P4) (join (☁ P5) (join (☁ P6) (join (☁ P7) (join (☁ P8) (join (☁ P9) (☁ P10))))))))))\n\ndefine Determine Players\nset [players v] to [1]\nset [i v] to [0]\nrepeat (10)\n    change [i v] by (1)\n    if <(item (I) of [active check v]) = [On]> then\n        change [players v] by (1)\n    end\nend\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Players2\n\nwhen flag clicked\n\nwhen I receive [start v]\nforever\n    if <(chat) = [1]> then\n        show variable [chat1 v]\n        show variable [chat2 v]\n        show variable [chat3 v]\n        show variable [chat4 v]\n        show variable [chat5 v]\n        show variable [chat6 v]\n        show variable [chat7 v]\n        show variable [chat8 v]\n        show variable [chat9 v]\n        show variable [chat10 v]\n        show variable [chat11 v]\n        if <key (1 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [1]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (2 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [2]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (3 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [3]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (4 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [4]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (5 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [5]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (6 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [6]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (7 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [7]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (8 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [8]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (9 v) pressed?> then\n            hide vars\n            set [chat.mode v] to [0]\n            set [chat.output v] to [9]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (a v) pressed?> then\n            hide vars\n            set [chat.mode v] to [1]\n            set [chat.output v] to [1]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n        if <key (b v) pressed?> then\n            hide vars\n            set [chat.mode v] to [1]\n            set [chat.output v] to [2]\n            wait (2) seconds\n            set [chat.output v] to [0]\n        end\n    else\n        hide vars\n    end\nend\n\ndefine hide vars\nset [chat v] to [0]\nhide variable [chat1 v]\nhide variable [chat2 v]\nhide variable [chat3 v]\nhide variable [chat4 v]\nhide variable [chat5 v]\nhide variable [chat6 v]\nhide variable [chat7 v]\nhide variable [chat8 v]\nhide variable [chat9 v]\nhide variable [chat10 v]\nhide variable [chat11 v]\n\ndefine Movement (id)\nset size to (100) %\nshow\nchange [yv v] by (-1)\nif <(chat.output) > [0]> then\n    say (item ((chat.output) + ((chat.mode) * (9))) of [chat v])\nelse\n    think []\nend\nif <(x position) > [230]> then\n    broadcast (Next v)\n    if <(Level) = [9]> then\n        broadcast (win v)\n    end\n    if <(Level) = [6]> then\n        go to x: (-140) y: (-20)\n    end\n    set [yv v] to [-20]\n    set [xv v] to [0]\n    change [level v] by (1)\n    go to x: (-145) y: (20)\nend\nif <<<(mouse x) < (x position)> and <mouse down?>> or <key (left arrow v) pressed?>> then\n    set [last.activity v] to (timer)\n    change [xv v] by (-0.6)\n    switch costume to (links v)\nelse\n    if <<<(x position) < (mouse x)> and <mouse down?>> or <key (right arrow v) pressed?>> then\n        set [last.activity v] to (timer)\n        change [xv v] by (0.6)\n        switch costume to (rechts v)\n    else\n        switch costume to (spieler v)\n    end\nend\nset [xv v] to ((XV) * (0.9))\nchange x by (XV)\nSave My Data\nif <touching (figur9 v)?> then\n    change y by (1)\nend\nif <touching (figur9 v)?> then\n    change y by (1)\nend\nif <touching (figur9 v)?> then\n    change y by (1)\nend\nif <touching (figur9 v)?> then\n    change y by (1)\nend\nif <touching (figur9 v)?> then\n    change y by (-4)\n    change x by ((XV) * (-1))\nend\nchange y by (YV)\nSave My Data\nif <touching (figur9 v)?> then\n    change y by ((0) - (YV))\n    set [yv v] to [1]\nend\nchange y by (-1)\nif <<<<(y position) < (mouse y)> and <mouse down?>> or <key (up arrow v) pressed?>> and <touching (figur9 v)?>> then\n    set [last.activity v] to (timer)\n    set [yv v] to [15]\nend\nchange y by (1)\nif <(y position) > [180]> then\n    set [yv v] to [0]\nend\nif <touching (figur1 v)?> then\n    go to x: (-192) y: (-2)\n    if <(Level) = [6]> then\n        go to x: (-150) y: (-2)\n    end\n    set [xv v] to [0]\n    set [yv v] to [0]\n    fiind\nend\nSave My Data\ngo to [front v] layer\n\nwhen I receive [initialise  v]\nhide\nset [username v] to (username)\nset [clone id v] to [0]\nrepeat (10)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\n\ndefine (id)\nif <(item (id) of [active check v]) = [Off]> then\n    hide\nelse\n    if <(item (((id) * (8)) - (3)) of [cloud list v]) = (Level)> then\n        switch costume to ((item (((id) * (8)) - (0)) of [cloud list v]) + (4))\n        show\n        set size to (100) %\n        think (item (((id) * (8)) - (4)) of [cloud list v])\n        change x by (((x position) - (item (((id) * (8)) - (7)) of [cloud list v])) / (-2.5))\n        change y by (((y position) - (item (((id) * (8)) - (6)) of [cloud list v])) / (-2.5))\n        if <(item (((id) * (8)) - (2)) of [cloud list v]) > [0]> then\n            say (item ((item (((id) * (8)) - (2)) of [cloud list v]) + ((item (((id) * (8)) - (1)) of [cloud list v]) * (9))) of [chat v])\n        end\n    else\n        go to x: (item (((id) * (8)) - (7)) of [cloud list v]) y: (item (((id) * (8)) - (6)) of [cloud list v])\n        hide\n    end\nend\n\ndefine Save My Data\ndelete all of [my list v]\nadd (x position) to [my list v]\nadd (y position) to [my list v]\nadd (pick random (999) to (99999)) to [my list v]\nadd (username) to [my list v]\nadd (Level) to [my list v]\nadd (chat.output) to [my list v]\nadd (chat.mode) to [my list v]\nadd (costume [name v]) to [my list v]\n\ndefine Tick\nif <(Clone ID) = (@PlayerSlot)> then\n    Movement (Clone ID)\nelse\n    (Clone ID)\nend\n\nwhen I start as a clone\nwait until <(started) = [1]>\nif <not <(Clone ID) = (@PlayerSlot)>> then\n    go to x: (item (((Clone ID) * (8)) - (7)) of [cloud list v]) y: (item (((Clone ID) * (8)) - (6)) of [cloud list v])\nend\nif <(Clone ID) = (@PlayerSlot)> then\n    go to x: (-192) y: (0)\nend\nforever\n    Tick\nend\n\n\n\nwhen flag clicked\nhide variable [players v]\n\nwhen [t v] key pressed\nif <(chat) = [1]> then\n    set [chat v] to [0]\nelse\n    set [chat v] to [0]\nend\n\nwhen flag clicked\nset [chat.output v] to [0]\n\nwhen I receive [start v]\nwait (4) seconds\nforever\n    if <not <(item (((@PlayerSlot) * (8)) - (4)) of [cloud list v]) = (item (4) of [my list v])>> then\n        broadcast (aw v)\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nset [last.activity v] to [1]\n\nwhen flag clicked\nset [chat.output v] to [0]\n\ndefine fiind\nrepeat until <not <touching (figur9 v)?>>\n    change y by (1)\nend\n\n\n\nwait (1) seconds\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\nstop all sounds\n\n@Figur2\n\nwhen flag clicked\nswitch costume to (kostüm1 v)\ngo to [back v] layer\n\nwhen flag clicked\n\nwhen I receive [next v]\nnext costume\n\n@Figur3\n\nwhen flag clicked\nset [ghost v] effect to (50)\nhide\ngo to x: (384) y: (41)\nforever\n    wait (3) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nset y to (pick random (41) to (240))\nswitch costume to (pick random (1) to (3))\nrepeat until <(x position) < [-100]>\n    change x by (-2)\n    if <(x position) < [-100]> then\n        delete this clone\n    end\nend\n\n@Figur4\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\nend\n\nwhen I receive [win v]\nforever\n    set [ghost v] effect to (0)\nend\n\n@Figur5\n\nwhen flag clicked\nforever\n    switch costume to (Players)\nend\n\n