Galaxy Run | Scrolling Cloud Platformer Part 1
@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [Bensound - Little Idea v] until done\nend\n\nwhen I receive [win v]\nrepeat (10)\n    change volume by (-10)\nend\nstop [other scripts in sprite v]\n\nwhen [m v] key pressed\nif <(volume) = [100]> then\n    set volume to (0) %\nelse\n    set volume to (100) %\nend\n\n@Thumbnail\n\nwhen [timer v] > (0.1)\nset size to (100) %\nset [ghost v] effect to (100)\nshow\ngo to x: (0) y: (-1000)\nrepeat until <(round (y position)) = [0]>\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (3))\nend\nset y to (0)\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    reset timer\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.5))\nend\nhide\n\n@Status\n\nwhen I receive [connect & start v]\nset [ghost v] effect to (1000)\nswitch costume to (connecting v)\nshow\nset y to (1000)\nrepeat until <(round (y position)) = [0]>\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (3))\nend\nset y to (0)\n\nwhen flag clicked\nhide\n\nwhen I receive [connected! v]\nstart sound [Connect v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.5))\nend\nhide\nset [ghost v] effect to (1000)\nswitch costume to (connected v)\nshow\nset y to (1000)\nrepeat until <(round (y position)) = [0]>\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (3))\nend\nset y to (0)\nwait (2) seconds\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.5))\nend\nhide\n\nwhen I receive [game full! v]\nstart sound [Bonk v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.5))\nend\nhide\nset [ghost v] effect to (1000)\nswitch costume to (game full! v)\nshow\nset y to (1000)\nrepeat until <(round (y position)) = [0]>\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (3))\nend\nset y to (0)\nwait (2) seconds\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.5))\nend\nhide\n\nwhen I receive [not logged in! v]\nstart sound [Bonk v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.5))\nend\nhide\nset [ghost v] effect to (1000)\nswitch costume to (not logged in! v)\nshow\nset y to (1000)\nrepeat until <(round (y position)) = [0]>\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (3))\nend\nset y to (0)\nwait (2) seconds\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.5))\nend\nhide\n\n@detector\n\nwhen flag clicked\nhide\nif <not <<(LOVED__) = [1]> and <(FAVED___) = [1]>>> then\n    set [clone id v] to [0]\n    create clone of (_myself_ v)\n    wait (0.2) seconds\n    set [clone id v] to [1]\n    create clone of (_myself_ v)\n    wait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\n    wait (1) seconds\n    start sound [Thank you! ^w^ v]\n    show\n    go to x: (-120) y: (1000)\n    go to [front v] layer\n    switch costume to (pick random (1) to (4))\n    set [ghost v] effect to (100)\n    repeat (105)\n        go to [front v] layer\n        change y by (((124) - (y position)) / (10))\n        change [ghost v] effect by (-4)\n    end\n    repeat (30)\n        change y by (((213) - (y position)) / (7.5))\n        change [ghost v] effect by (8)\n    end\n    hide\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    switch costume to (love v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nif <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n    stop [other scripts in sprite v]\n    repeat (30)\n        change y by (((213) - (y position)) / (7.5))\n        change [ghost v] effect by (8)\n    end\n    hide\nend\n\n@Join/Left messages\n\nwhen I receive [join v]\nif <(ID) = [Main]> then\n    stop [other scripts in sprite v]\n    set [id v] to [Clone]\n    switch costume to (joined v)\n    create clone of (_myself_ v)\n    set [id v] to [Main]\nend\n\nwhen I receive [left v]\nif <(ID) = [Main]> then\n    stop [other scripts in sprite v]\n    set [id v] to [Clone]\n    switch costume to (left v)\n    create clone of (_myself_ v)\n    set [id v] to [Main]\nend\n\nwhen flag clicked\nset [clone v] to [0]\nset [id v] to [Main]\nhide\ndelete all of [pos v]\nrepeat (6)\n    add [] to [pos v]\nend\n\nwhen I start as a clone\nchange [clone v] by (1)\nset [id count v] to (clone)\ngo to [front v] layer\nshow\ngo to x: (1000) y: ((146) + (((clone) - (1)) * (-60)))\nreplace item (clone) of [pos v] with (clone)\nCheck\nset [ghost v] effect to (100)\nrepeat (90)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    change x by (((118) - (x position)) / (3))\n    if <not <(item (id count) of [pos v]) = []>> then\n        change y by ((((146) + (((item (id count) of [pos v]) - (1)) * (-60))) - (y position)) / (2.5))\n    end\n    if <(clone) < [1]> then\n        set [clone v] to [1]\n    end\nend\nchange [clone v] by (-1)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\n    change x by (((117) - (x position)) / (-1.5))\n    if <(clone) < [1]> then\n        set [clone v] to [1]\n    end\nend\nClear\nhide\ndelete this clone\n\ndefine Check\nif <(y position) < [-170]> then\n    change [clone v] by (-1)\n    delete this clone\nend\n\nwhen this sprite clicked\nstop [other scripts in sprite v]\nchange [clone v] by (-1)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (10)\n    change x by (((117) - (x position)) / (-1.5))\nend\nClear\nhide\ndelete this clone\n\ndefine Clear\nreplace item (id count) of [pos v] with []\nif <(clone) < [0]> then\n    set [clone v] to [0]\nend\nset [check v] to [0]\nset [blanks v] to [0]\nrepeat (length of [pos v])\n    change [check v] by (1)\n    if <not <<(item (check) of [pos v]) = []> or <(item (check) of [pos v]) < [2]>>> then\n        replace item (check) of [pos v] with ((item (check) of [pos v]) - (1))\n    end\n    if <(item (check) of [pos v]) = []> then\n        change [blanks v] by (1)\n    end\nend\nif <(length of [pos v]) = (blanks)> then\n    set [clone v] to [0]\nend\nif <(clone) < [0]> then\n    set [clone v] to [0]\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [Joined]> then\n    play sound [Join v] until done\n    start sound [Join message v]\nelse\n    if <(costume [name v]) = [Left]> then\n        play sound [Left v] until done\n        start sound [Left message v]\n    end\nend\n\nwhen I receive [stop all v]\nstop [other scripts in sprite v]\n\n@Multiplayer Engine\n\ndefine save list on var\nif <(length of [list v]) = [0]> then\n    stop [this script v]\nend\ndelete (all) of [return v]\nset [item v] to [1]\nrepeat (length of [list v])\n    set [letter v] to [1]\n    repeat (length of (item (item) of [list v]))\n        set [symbol v] to [1]\n        repeat until <<(letter (symbol) of (characters)) = (letter (letter) of (item (item) of [list v]))> or <(symbol) > (length of (characters))>>\n            change [symbol v] by (1)\n        end\n        if <not <(symbol) > (length of (characters))>> then\n            if <not <(symbol) > [26]>> then\n                switch costume to (lowercase v)\n                switch costume to (letter (letter) of (item (item) of [list v]))\n                if <(costume [number v]) = [27]> then\n                    change [symbol v] by (26)\n                end\n            end\n            if <(length of (symbol)) < [2]> then\n                set [symbol v] to (join [0] (symbol))\n            end\n            add (letter (1) of (symbol)) to [return v]\n            add (letter (2) of (symbol)) to [return v]\n        end\n        change [letter v] by (1)\n    end\n    add (letter (1) of [0]) to [return v]\n    add (letter (1) of [0]) to [return v]\n    change [item v] by (1)\nend\nset [var v] to (return)\n\ndefine load (number) to list\ndelete (all) of [list v]\nset [item v] to []\nset [letter v] to [1]\nrepeat ((length of (number)) / (2))\n    set [symbol v] to (join (letter (letter) of (number)) (letter ((letter) + (1)) of (number)))\n    if <(symbol) = [0]> then\n        add (item) to [list v]\n        set [item v] to []\n    else\n        set [item v] to (join (item) (letter (symbol) of (characters)))\n    end\n    change [letter v] by (2)\nend\n\ndefine connect\nset percent from [0] / [10]\nset [tick v] to [0]\nset [player id v] to [0]\ndelete all of [players v]\ndelete all of [slots v]\nrepeat (10)\n    add [0] to [slots v]\nend\nset percent from [0.25] / [10]\nload player [1]\nset [old-tick v] to (item (3) of [player1 v])\nif <(item (5) of [player1 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [1]\nend\nwait (0.25) seconds\nif <(item (3) of [player1 v]) = (old-tick)> then\n    reset player [1]\n    if <(Player ID) = [0]> then\n        set [player id v] to [1]\n        replace item (4) of [player1 v] with (username)\n        replace item (5) of [player1 v] with [1]\n        save player [1]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player1 v]) to [players v]\n    replace item (1) of [slots v] with [1]\nend\nset percent from [1] / [10]\nload player [2]\nset [old-tick v] to (item (3) of [player2 v])\nif <(item (5) of [player2 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [2]\nend\nwait (0.25) seconds\nif <(item (3) of [player2 v]) = (old-tick)> then\n    reset player [2]\n    if <(Player ID) = [0]> then\n        set [player id v] to [2]\n        replace item (4) of [player2 v] with (username)\n        replace item (5) of [player2 v] with [1]\n        save player [2]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player2 v]) to [players v]\n    replace item (2) of [slots v] with [1]\nend\nset percent from [2] / [10]\nload player [3]\nset [old-tick v] to (item (3) of [player3 v])\nif <(item (5) of [player3 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [3]\nend\nwait (0.25) seconds\nif <(item (3) of [player3 v]) = (old-tick)> then\n    reset player [3]\n    if <(Player ID) = [0]> then\n        set [player id v] to [3]\n        replace item (4) of [player3 v] with (username)\n        replace item (5) of [player3 v] with [1]\n        save player [3]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player3 v]) to [players v]\n    replace item (3) of [slots v] with [1]\nend\nset percent from [3] / [10]\nload player [4]\nset [old-tick v] to (item (3) of [player4 v])\nif <(item (5) of [player4 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [4]\nend\nwait (0.25) seconds\nif <(item (3) of [player4 v]) = (old-tick)> then\n    reset player [4]\n    if <(Player ID) = [0]> then\n        set [player id v] to [4]\n        replace item (4) of [player4 v] with (username)\n        replace item (5) of [player4 v] with [1]\n        save player [4]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player4 v]) to [players v]\n    replace item (4) of [slots v] with [1]\nend\nset percent from [4] / [10]\nload player [5]\nset [old-tick v] to (item (3) of [player5 v])\nif <(item (5) of [player5 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [5]\nend\nwait (0.25) seconds\nif <(item (3) of [player5 v]) = (old-tick)> then\n    reset player [5]\n    if <(Player ID) = [0]> then\n        set [player id v] to [5]\n        replace item (4) of [player5 v] with (username)\n        replace item (5) of [player5 v] with [1]\n        save player [5]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player5 v]) to [players v]\n    replace item (5) of [slots v] with [1]\nend\nset percent from [5] / [10]\nload player [6]\nset [old-tick v] to (item (3) of [player6 v])\nif <(item (5) of [player6 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [6]\nend\nwait (0.25) seconds\nif <(item (3) of [player6 v]) = (old-tick)> then\n    reset player [6]\n    if <(Player ID) = [0]> then\n        set [player id v] to [6]\n        replace item (4) of [player6 v] with (username)\n        replace item (5) of [player6 v] with [1]\n        save player [6]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player6 v]) to [players v]\n    replace item (6) of [slots v] with [1]\nend\nset percent from [6] / [10]\nload player [7]\nset [old-tick v] to (item (3) of [player7 v])\nif <(item (5) of [player7 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [7]\nend\nwait (0.25) seconds\nif <(item (3) of [player7 v]) = (old-tick)> then\n    reset player [7]\n    if <(Player ID) = [0]> then\n        set [player id v] to [7]\n        replace item (4) of [player7 v] with (username)\n        replace item (5) of [player7 v] with [1]\n        save player [7]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player7 v]) to [players v]\n    replace item (7) of [slots v] with [1]\nend\nset percent from [7] / [10]\nload player [8]\nset [old-tick v] to (item (3) of [player8 v])\nif <(item (5) of [player8 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [8]\nend\nwait (0.25) seconds\nif <(item (3) of [player8 v]) = (old-tick)> then\n    reset player [8]\n    if <(Player ID) = [0]> then\n        set [player id v] to [8]\n        replace item (4) of [player8 v] with (username)\n        replace item (5) of [player8 v] with [1]\n        save player [8]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player8 v]) to [players v]\n    replace item (8) of [slots v] with [1]\nend\nset percent from [8] / [10]\nload player [9]\nset [old-tick v] to (item (3) of [player9 v])\nif <(item (5) of [player9 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [9]\nend\nwait (0.25) seconds\nif <(item (3) of [player9 v]) = (old-tick)> then\n    reset player [9]\n    if <(Player ID) = [0]> then\n        set [player id v] to [9]\n        replace item (4) of [player9 v] with (username)\n        replace item (5) of [player9 v] with [1]\n        save player [9]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player9 v]) to [players v]\n    replace item (9) of [slots v] with [1]\nend\nset percent from [9] / [10]\nload player [10]\nset [old-tick v] to (item (3) of [player10 v])\nif <(item (5) of [player10 v]) = [1]> then\n    wait ((Offline Limit) / (1000)) seconds\n    load player [10]\nend\nwait (0.25) seconds\nif <(item (3) of [player10 v]) = (old-tick)> then\n    reset player [10]\n    if <(Player ID) = [0]> then\n        set [player id v] to [10]\n        replace item (4) of [player10 v] with (username)\n        replace item (5) of [player10 v] with [1]\n        save player [10]\n        add (username) to [players v]\n        broadcast (DEMOtick v)\n    end\nelse\n    add (item (4) of [player10 v]) to [players v]\n    replace item (10) of [slots v] with [1]\nend\nset percent from [10] / [10]\n\ndefine reset cloud\nset [c v] to [0]\nrepeat (8)\n    change [c v] by (1)\n    reset player (c)\n    save player (c)\nend\n\ndefine reset player (p)\nif <(p) = [1]> then\n    delete all of [player1 v]\n    add [0] to [player1 v]\n    add [0] to [player1 v]\n    add [0] to [player1 v]\n    add [] to [player1 v]\n    add [0] to [player1 v]\n    add [0] to [player1 v]\n    add [1] to [player1 v]\nelse\n    if <(p) = [2]> then\n        delete all of [player2 v]\n        add [0] to [player2 v]\n        add [0] to [player2 v]\n        add [0] to [player2 v]\n        add [] to [player2 v]\n        add [0] to [player2 v]\n        add [0] to [player2 v]\n        add [1] to [player2 v]\n    else\n        if <(p) = [3]> then\n            delete all of [player3 v]\n            add [0] to [player3 v]\n            add [0] to [player3 v]\n            add [0] to [player3 v]\n            add [] to [player3 v]\n            add [0] to [player3 v]\n            add [0] to [player3 v]\n            add [1] to [player3 v]\n        else\n            if <(p) = [4]> then\n                delete all of [player4 v]\n                add [0] to [player4 v]\n                add [0] to [player4 v]\n                add [0] to [player4 v]\n                add [] to [player4 v]\n                add [0] to [player4 v]\n                add [0] to [player4 v]\n                add [1] to [player4 v]\n            else\n                if <(p) = [5]> then\n                    delete all of [player5 v]\n                    add [0] to [player5 v]\n                    add [0] to [player5 v]\n                    add [0] to [player5 v]\n                    add [] to [player5 v]\n                    add [0] to [player5 v]\n                    add [0] to [player5 v]\n                    add [1] to [player5 v]\n                else\n                    if <(p) = [6]> then\n                        delete all of [player6 v]\n                        add [0] to [player6 v]\n                        add [0] to [player6 v]\n                        add [0] to [player6 v]\n                        add [] to [player6 v]\n                        add [0] to [player6 v]\n                        add [0] to [player6 v]\n                        add [1] to [player6 v]\n                    else\n                        if <(p) = [7]> then\n                            delete all of [player7 v]\n                            add [0] to [player7 v]\n                            add [0] to [player7 v]\n                            add [0] to [player7 v]\n                            add [] to [player7 v]\n                            add [0] to [player7 v]\n                            add [0] to [player7 v]\n                            add [1] to [player7 v]\n                        else\n                            if <(p) = [8]> then\n                                delete all of [player8 v]\n                                add [0] to [player8 v]\n                                add [0] to [player8 v]\n                                add [0] to [player8 v]\n                                add [] to [player8 v]\n                                add [0] to [player8 v]\n                                add [0] to [player8 v]\n                                add [1] to [player8 v]\n                            else\n                                if <(p) = [9]> then\n                                    delete all of [player9 v]\n                                    add [0] to [player9 v]\n                                    add [0] to [player9 v]\n                                    add [0] to [player9 v]\n                                    add [] to [player9 v]\n                                    add [0] to [player9 v]\n                                    add [0] to [player9 v]\n                                    add [1] to [player9 v]\n                                else\n                                    if <(p) = [10]> then\n                                        delete all of [player10 v]\n                                        add [0] to [player10 v]\n                                        add [0] to [player10 v]\n                                        add [0] to [player10 v]\n                                        add [] to [player10 v]\n                                        add [0] to [player10 v]\n                                        add [0] to [player10 v]\n                                        add [1] to [player10 v]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nsave player (p)\n\ndefine save player (p)\nset [i v] to [0]\ndelete all of [list v]\nif <(p) = [1]> then\n    repeat (length of [player1 v])\n        change [i v] by (1)\n        add (item (i) of [player1 v]) to [list v]\n    end\n    save list on var\n    set [☁ p1 v] to (var)\nelse\n    if <(p) = [2]> then\n        repeat (length of [player2 v])\n            change [i v] by (1)\n            add (item (i) of [player2 v]) to [list v]\n        end\n        save list on var\n        set [☁ p2 v] to (var)\n    else\n        if <(p) = [3]> then\n            repeat (length of [player3 v])\n                change [i v] by (1)\n                add (item (i) of [player3 v]) to [list v]\n            end\n            save list on var\n            set [☁ p3 v] to (var)\n        else\n            if <(p) = [4]> then\n                repeat (length of [player4 v])\n                    change [i v] by (1)\n                    add (item (i) of [player4 v]) to [list v]\n                end\n                save list on var\n                set [☁ p4 v] to (var)\n            else\n                if <(p) = [5]> then\n                    repeat (length of [player5 v])\n                        change [i v] by (1)\n                        add (item (i) of [player5 v]) to [list v]\n                    end\n                    save list on var\n                    set [☁ p5 v] to (var)\n                else\n                    if <(p) = [6]> then\n                        repeat (length of [player6 v])\n                            change [i v] by (1)\n                            add (item (i) of [player6 v]) to [list v]\n                        end\n                        save list on var\n                        set [☁ p6 v] to (var)\n                    else\n                        if <(p) = [7]> then\n                            repeat (length of [player7 v])\n                                change [i v] by (1)\n                                add (item (i) of [player7 v]) to [list v]\n                            end\n                            save list on var\n                            set [☁ p7 v] to (var)\n                        else\n                            if <(p) = [8]> then\n                                repeat (length of [player8 v])\n                                    change [i v] by (1)\n                                    add (item (i) of [player8 v]) to [list v]\n                                end\n                                save list on var\n                                set [☁ p8 v] to (var)\n                            else\n                                if <(p) = [9]> then\n                                    repeat (length of [player9 v])\n                                        change [i v] by (1)\n                                        add (item (i) of [player9 v]) to [list v]\n                                    end\n                                    save list on var\n                                    set [☁ p9 v] to (var)\n                                else\n                                    if <(p) = [10]> then\n                                        repeat (length of [player10 v])\n                                            change [i v] by (1)\n                                            add (item (i) of [player10 v]) to [list v]\n                                        end\n                                        save list on var\n                                        set [☁ p10 v] to (var)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine load player (p)\nset [i v] to [0]\nif <(p) = [1]> then\n    load (☁ p1) to list\n    delete all of [player1 v]\n    repeat (length of [list v])\n        change [i v] by (1)\n        add (item (i) of [list v]) to [player1 v]\n    end\nelse\n    if <(p) = [2]> then\n        load (☁ p2) to list\n        delete all of [player2 v]\n        repeat (length of [list v])\n            change [i v] by (1)\n            add (item (i) of [list v]) to [player2 v]\n        end\n    else\n        if <(p) = [3]> then\n            load (☁ p3) to list\n            delete all of [player3 v]\n            repeat (length of [list v])\n                change [i v] by (1)\n                add (item (i) of [list v]) to [player3 v]\n            end\n        else\n            if <(p) = [4]> then\n                load (☁ p4) to list\n                delete all of [player4 v]\n                repeat (length of [list v])\n                    change [i v] by (1)\n                    add (item (i) of [list v]) to [player4 v]\n                end\n            else\n                if <(p) = [5]> then\n                    load (☁ p5) to list\n                    delete all of [player5 v]\n                    repeat (length of [list v])\n                        change [i v] by (1)\n                        add (item (i) of [list v]) to [player5 v]\n                    end\n                else\n                    if <(p) = [6]> then\n                        load (☁ p6) to list\n                        delete all of [player6 v]\n                        repeat (length of [list v])\n                            change [i v] by (1)\n                            add (item (i) of [list v]) to [player6 v]\n                        end\n                    else\n                        if <(p) = [7]> then\n                            load (☁ p7) to list\n                            delete all of [player7 v]\n                            repeat (length of [list v])\n                                change [i v] by (1)\n                                add (item (i) of [list v]) to [player7 v]\n                            end\n                        else\n                            if <(p) = [8]> then\n                                load (☁ p8) to list\n                                delete all of [player8 v]\n                                repeat (length of [list v])\n                                    change [i v] by (1)\n                                    add (item (i) of [list v]) to [player8 v]\n                                end\n                            else\n                                if <(p) = [9]> then\n                                    load (☁ p9) to list\n                                    delete all of [player9 v]\n                                    repeat (length of [list v])\n                                        change [i v] by (1)\n                                        add (item (i) of [list v]) to [player9 v]\n                                    end\n                                else\n                                    if <(p) = [10]> then\n                                        load (☁ p10) to list\n                                        delete all of [player10 v]\n                                        repeat (length of [list v])\n                                            change [i v] by (1)\n                                            add (item (i) of [list v]) to [player10 v]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Update\nif <(Player ID) = [1]> then\n    replace item (1) of [player1 v] with (round (player_x))\n    replace item (2) of [player1 v] with (round (player_y))\n    replace item (3) of [player1 v] with (tick)\n    replace item (4) of [player1 v] with (username)\n    replace item (5) of [player1 v] with [1]\n    replace item (6) of [player1 v] with (player_shown?)\n    replace item (7) of [player1 v] with (Crouch?)\nelse\n    if <(Player ID) = [2]> then\n        replace item (1) of [player2 v] with (round (player_x))\n        replace item (2) of [player2 v] with (round (player_y))\n        replace item (3) of [player2 v] with (tick)\n        replace item (4) of [player2 v] with (username)\n        replace item (5) of [player2 v] with [1]\n        replace item (6) of [player2 v] with (player_shown?)\n        replace item (7) of [player2 v] with (Crouch?)\n    else\n        if <(Player ID) = [3]> then\n            replace item (1) of [player3 v] with (round (player_x))\n            replace item (2) of [player3 v] with (round (player_y))\n            replace item (3) of [player3 v] with (tick)\n            replace item (4) of [player3 v] with (username)\n            replace item (5) of [player3 v] with [1]\n            replace item (6) of [player3 v] with (player_shown?)\n            replace item (7) of [player3 v] with (Crouch?)\n        else\n            if <(Player ID) = [4]> then\n                replace item (1) of [player4 v] with (round (player_x))\n                replace item (2) of [player4 v] with (round (player_y))\n                replace item (3) of [player4 v] with (tick)\n                replace item (4) of [player4 v] with (username)\n                replace item (5) of [player4 v] with [1]\n                replace item (6) of [player4 v] with (player_shown?)\n                replace item (7) of [player4 v] with (Crouch?)\n            else\n                if <(Player ID) = [5]> then\n                    replace item (1) of [player5 v] with (round (player_x))\n                    replace item (2) of [player5 v] with (round (player_y))\n                    replace item (3) of [player5 v] with (tick)\n                    replace item (4) of [player5 v] with (username)\n                    replace item (5) of [player5 v] with [1]\n                    replace item (6) of [player5 v] with (player_shown?)\n                    replace item (7) of [player5 v] with (Crouch?)\n                else\n                    if <(Player ID) = [6]> then\n                        replace item (1) of [player6 v] with (round (player_x))\n                        replace item (2) of [player6 v] with (round (player_y))\n                        replace item (3) of [player6 v] with (tick)\n                        replace item (4) of [player6 v] with (username)\n                        replace item (5) of [player6 v] with [1]\n                        replace item (6) of [player6 v] with (player_shown?)\n                        replace item (7) of [player6 v] with (Crouch?)\n                    else\n                        if <(Player ID) = [7]> then\n                            replace item (1) of [player7 v] with (round (player_x))\n                            replace item (2) of [player7 v] with (round (player_y))\n                            replace item (3) of [player7 v] with (tick)\n                            replace item (4) of [player7 v] with (username)\n                            replace item (5) of [player7 v] with [1]\n                            replace item (6) of [player7 v] with (player_shown?)\n                            replace item (7) of [player7 v] with (Crouch?)\n                        else\n                            if <(Player ID) = [8]> then\n                                replace item (1) of [player8 v] with (round (player_x))\n                                replace item (2) of [player8 v] with (round (player_y))\n                                replace item (3) of [player8 v] with (tick)\n                                replace item (4) of [player8 v] with (username)\n                                replace item (5) of [player8 v] with [1]\n                                replace item (6) of [player8 v] with (player_shown?)\n                                replace item (7) of [player8 v] with (Crouch?)\n                            else\n                                if <(Player ID) = [9]> then\n                                    replace item (1) of [player9 v] with (round (player_x))\n                                    replace item (2) of [player9 v] with (round (player_y))\n                                    replace item (3) of [player9 v] with (tick)\n                                    replace item (4) of [player9 v] with (username)\n                                    replace item (5) of [player9 v] with [1]\n                                    replace item (6) of [player9 v] with (player_shown?)\n                                    replace item (7) of [player9 v] with (Crouch?)\n                                else\n                                    if <(Player ID) = [10]> then\n                                        replace item (1) of [player10 v] with (round (player_x))\n                                        replace item (2) of [player10 v] with (round (player_y))\n                                        replace item (3) of [player10 v] with (tick)\n                                        replace item (4) of [player10 v] with (username)\n                                        replace item (5) of [player10 v] with [1]\n                                        replace item (6) of [player10 v] with (player_shown?)\n                                        replace item (7) of [player10 v] with (Crouch?)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nsave player (Player ID)\n\ndefine Tick\nchange [tick v] by (1)\nif <(tick) > [9]> then\n    set [tick v] to [0]\nend\n\ndefine Update Players\nif <not <(Player ID) = [1]>> then\n    load player [1]\nend\nif <not <(Player ID) = [2]>> then\n    load player [2]\nend\nif <not <(Player ID) = [3]>> then\n    load player [3]\nend\nif <not <(Player ID) = [4]>> then\n    load player [4]\nend\nif <not <(Player ID) = [5]>> then\n    load player [5]\nend\nif <not <(Player ID) = [6]>> then\n    load player [6]\nend\nif <not <(Player ID) = [7]>> then\n    load player [7]\nend\nif <not <(Player ID) = [8]>> then\n    load player [8]\nend\nif <not <(Player ID) = [9]>> then\n    load player [9]\nend\nif <not <(Player ID) = [10]>> then\n    load player [10]\nend\n\ndefine set percent from (1) / (2)\nset [connect-percent v] to ((1) / ((2) / (100)))\n\nwhen I receive [play v]\nset [player_shown? v] to [1]\nforever\n    Update\n    Measure Memory\nend\n\nwhen I receive [play v]\nforever\n    Tick\n    wait (0.25) seconds\nend\n\nwhen I receive [play v]\nforever\n    Update Players\nend\n\ndefine Measure Memory\nif <(Player ID) = [1]> then\n    set [memory v] to (join (join ([floor v] of (((length of (☁ p1)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p1)) [ of 128])) [\)]))\nelse\n    if <(Player ID) = [2]> then\n        set [memory v] to (join (join ([floor v] of (((length of (☁ p2)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p2)) [ of 128])) [\)]))\n    else\n        if <(Player ID) = [3]> then\n            set [memory v] to (join (join ([floor v] of (((length of (☁ p3)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p3)) [ of 128])) [\)]))\n        else\n            if <(Player ID) = [4]> then\n                set [memory v] to (join (join ([floor v] of (((length of (☁ p4)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p4)) [ of 128])) [\)]))\n            else\n                if <(Player ID) = [5]> then\n                    set [memory v] to (join (join ([floor v] of (((length of (☁ p5)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p5)) [ of 128])) [\)]))\n                else\n                    if <(Player ID) = [6]> then\n                        set [memory v] to (join (join ([floor v] of (((length of (☁ p6)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p6)) [ of 128])) [\)]))\n                    else\n                        if <(Player ID) = [7]> then\n                            set [memory v] to (join (join ([floor v] of (((length of (☁ p7)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p7)) [ of 128])) [\)]))\n                        else\n                            if <(Player ID) = [8]> then\n                                set [memory v] to (join (join ([floor v] of (((length of (☁ p8)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p8)) [ of 128])) [\)]))\n                            else\n                                if <(Player ID) = [9]> then\n                                    set [memory v] to (join (join ([floor v] of (((length of (☁ p9)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p9)) [ of 128])) [\)]))\n                                else\n                                    if <(Player ID) = [10]> then\n                                        set [memory v] to (join (join ([floor v] of (((length of (☁ p10)) / (128)) * (100)) ) [% ]) (join (join [\(] (join (length of (☁ p10)) [ of 128])) [\)]))\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [demotick v]\nforever\n    Tick\n    Update\n    Update Players\n    Measure Memory\n    wait (0.5) seconds\nend\n\ndefine check player (p)\nload player (p)\nif <(item (5) of [list v]) = [0]> then\n    if <not <(item (4) of [list v]) = []>> then\n        reset player (p)\n    end\n    stop [this script v]\nend\nif <(p) = [1]> then\n    set [ot1 v] to (item (3) of [list v])\n    wait ((Offline Limit) / (1000)) seconds\n    load player (p)\n    if <(item (3) of [list v]) = (ot1)> then\n        reset player (p)\n    end\nelse\n    if <(p) = [2]> then\n        set [ot2 v] to (item (3) of [list v])\n        wait ((Offline Limit) / (1000)) seconds\n        load player (p)\n        if <(item (3) of [list v]) = (ot2)> then\n            reset player (p)\n        end\n    else\n        if <(p) = [3]> then\n            set [ot3 v] to (item (3) of [list v])\n            wait ((Offline Limit) / (1000)) seconds\n            load player (p)\n            if <(item (3) of [list v]) = (ot3)> then\n                reset player (p)\n            end\n        else\n            if <(p) = [4]> then\n                set [ot4 v] to (item (3) of [list v])\n                wait ((Offline Limit) / (1000)) seconds\n                load player (p)\n                if <(item (3) of [list v]) = (ot4)> then\n                    reset player (p)\n                end\n            else\n                if <(p) = [5]> then\n                    set [ot5 v] to (item (3) of [list v])\n                    wait ((Offline Limit) / (1000)) seconds\n                    load player (p)\n                    if <(item (3) of [list v]) = (ot5)> then\n                        reset player (p)\n                    end\n                else\n                    if <(p) = [6]> then\n                        set [ot6 v] to (item (3) of [list v])\n                        wait ((Offline Limit) / (1000)) seconds\n                        load player (p)\n                        if <(item (3) of [list v]) = (ot6)> then\n                            reset player (p)\n                        end\n                    else\n                        if <(p) = [7]> then\n                            set [ot7 v] to (item (3) of [list v])\n                            wait ((Offline Limit) / (1000)) seconds\n                            load player (p)\n                            if <(item (3) of [list v]) = (ot7)> then\n                                reset player (p)\n                            end\n                        else\n                            if <(p) = [8]> then\n                                set [ot8 v] to (item (3) of [list v])\n                                wait ((Offline Limit) / (1000)) seconds\n                                load player (p)\n                                if <(item (3) of [list v]) = (ot8)> then\n                                    reset player (p)\n                                end\n                            else\n                                if <(p) = [9]> then\n                                    set [ot9 v] to (item (3) of [list v])\n                                    wait ((Offline Limit) / (1000)) seconds\n                                    load player (p)\n                                    if <(item (3) of [list v]) = (ot9)> then\n                                        reset player (p)\n                                    end\n                                else\n                                    if <(p) = [9]> then\n                                        set [ot10 v] to (item (3) of [list v])\n                                        wait ((Offline Limit) / (1000)) seconds\n                                        load player (p)\n                                        if <(item (3) of [list v]) = (ot10)> then\n                                            reset player (p)\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 [play v]\nforever\n    if <not <(Player ID) = [3]>> then\n        check player [3]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <not <(Player ID) = [4]>> then\n        check player [4]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <not <(Player ID) = [5]>> then\n        check player [5]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <not <(Player ID) = [6]>> then\n        check player [6]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <not <(Player ID) = [7]>> then\n        check player [7]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <not <(Player ID) = [8]>> then\n        check player [8]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <not <(Player ID) = [1]>> then\n        check player [1]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <not <(Player ID) = [2]>> then\n        check player [2]\n    end\nend\n\ndefine get data of player (p)\ndelete all of [data v]\nset [i v] to [0]\nif <(p) = [1]> then\n    repeat (length of [player1 v])\n        change [i v] by (1)\n        add (item (i) of [player1 v]) to [data v]\n    end\nelse\n    if <(p) = [2]> then\n        repeat (length of [player2 v])\n            change [i v] by (1)\n            add (item (i) of [player2 v]) to [data v]\n        end\n    else\n        if <(p) = [3]> then\n            repeat (length of [player3 v])\n                change [i v] by (1)\n                add (item (i) of [player3 v]) to [data v]\n            end\n        else\n            if <(p) = [4]> then\n                repeat (length of [player4 v])\n                    change [i v] by (1)\n                    add (item (i) of [player4 v]) to [data v]\n                end\n            else\n                if <(p) = [5]> then\n                    repeat (length of [player5 v])\n                        change [i v] by (1)\n                        add (item (i) of [player5 v]) to [data v]\n                    end\n                else\n                    if <(p) = [6]> then\n                        repeat (length of [player6 v])\n                            change [i v] by (1)\n                            add (item (i) of [player6 v]) to [data v]\n                        end\n                    else\n                        if <(p) = [7]> then\n                            repeat (length of [player7 v])\n                                change [i v] by (1)\n                                add (item (i) of [player7 v]) to [data v]\n                            end\n                        else\n                            if <(p) = [8]> then\n                                repeat (length of [player8 v])\n                                    change [i v] by (1)\n                                    add (item (i) of [player8 v]) to [data v]\n                                end\n                            else\n                                if <(p) = [9]> then\n                                    repeat (length of [player9 v])\n                                        change [i v] by (1)\n                                        add (item (i) of [player9 v]) to [data v]\n                                    end\n                                else\n                                    if <(p) = [10]> then\n                                        repeat (length of [player10 v])\n                                            change [i v] by (1)\n                                            add (item (i) of [player10 v]) to [data v]\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 [connect & start v]\nif <(username) = []> then\n    broadcast (Not logged in! v)\n    stop [other scripts in sprite v]\n    stop [this script v]\nend\nset [characters v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~`!@#$%^&*\(\)-_=+\[\]{}/\|;:'",.<>? ]\nset [offline limit v] to [1500]\nset [player id v] to [0]\nconnect\nsay []\nif <(Player ID) = [0]> then\n    broadcast (Game full! v)\nelse\n    broadcast (Connected! v)\nend\nstop [other scripts in sprite v]\nbroadcast (play v)\n\nwhen flag clicked\nbroadcast (connect & start v)\n\nwhen I receive [play v]\nforever\n    if <not <(Player ID) = [9]>> then\n        check player [9]\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <not <(Player ID) = [10]>> then\n        check player [10]\n    end\nend\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to (playerred v)\nset volume to (100) %\nforever\n    if <key (v v) pressed?> then\n        if <(volume) = [100]> then\n            set volume to (0) %\n        else\n            set volume to (100) %\n        end\n        wait until <not <key (v v) pressed?>>\n    end\nend\n\nwhen flag clicked\nset [player_shown? v] to [1]\nset [xvel v] to [0]\nset [yvel v] to [0]\nset [scroll x v] to [0]\nset [x v] to [0]\npoint in direction (90)\nset y to (-86)\nshow\nset [ghost v] effect to (0)\nforever\n    set rotation style [don't rotate v]\n    switch costume to (hitbox check v)\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > ((mouse y) + (20))>>> then\n        switch costume to (hitbox check - crouch v)\n    end\n    if <touching color (#5abf00)?> then\n        stop [other scripts in sprite v]\n        broadcast (Win v)\n        set rotation style [left-right v]\n        if <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n            switch costume to (playeryellow v)\n        else\n            switch costume to (playerred v)\n        end\n        repeat (10)\n            if <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n                switch costume to (playeryellow v)\n            else\n                switch costume to (playerred v)\n            end\n            change [ghost v] effect by (10)\n        end\n        hide\n        stop [this script v]\n    end\n    if <<touching color (#ff2e2e)?> or <<touching color (#d82727)?> or <(y position) < [-182]>>> then\n        create clone of (_myself_ v)\n        start sound [Oops v]\n        set rotation style [left-right v]\n        if <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n            switch costume to (playeryellow v)\n        else\n            switch costume to (playerred v)\n        end\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        set [x v] to (Spawn point)\n        set [xvel v] to [0]\n        set [yvel v] to [0]\n        set y to (-86)\n        wait (0.4) seconds\n    end\n    if <touching color (#ffce2e)?> then\n        start sound [Boing v]\n        set [yvel v] to [20]\n    end\n    switch costume to (hitbox v)\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > ((mouse y) + (20))>>> then\n        switch costume to (hitbox - crouch v)\n    end\n    change [ghost v] effect by (-10)\n    if <touching (water v)?> then\n        set [accel. speed v] to [0.4]\n        set [gravity v] to [-0.75]\n    else\n        set [accel. speed v] to [1]\n        set [gravity v] to [-1.25]\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <(x position) < (mouse x)>>> then\n        if <not <touching (level v)?>> then\n            change [xvel v] by (Accel. speed)\n            point in direction (90)\n        end\n    end\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        if <not <touching (level v)?>> then\n            change [xvel v] by ((Accel. speed) * (-1))\n            point in direction (-90)\n        end\n    end\n    set [xvel v] to ((Xvel) * (0.9))\n    switch costume to (hitbox right v)\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > ((mouse y) + (20))>>> then\n        switch costume to (hitbox right - crouch v)\n    end\n    set [bump? v] to [0]\n    if <<touching (level v)?> and <(Bump?) = [0]>> then\n        if <not <(Xvel) < [0]>> then\n            set [bump? v] to [1]\n            set [xvel v] to ((Xvel) * (-1.1))\n        end\n    end\n    switch costume to (hitbox left v)\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > ((mouse y) + (20))>>> then\n        switch costume to (hitbox left - crouch v)\n    end\n    if <<touching (level v)?> and <(Bump?) = [0]>> then\n        if <not <(Xvel) > [0]>> then\n            set [bump? v] to [1]\n            set [xvel v] to ((Xvel) * (-1.1))\n        end\n    end\n    if <(x position) < [-213]> then\n        if <not <(Xvel) > [0]>> then\n            set [bump? v] to [1]\n            set [xvel v] to ((Xvel) * (-1.1))\n        end\n    end\n    if <(x position) > [213]> then\n        if <not <(Xvel) < [0]>> then\n            set [bump? v] to [1]\n            set [xvel v] to ((Xvel) * (-1.1))\n        end\n    end\n    switch costume to (hitbox v)\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > ((mouse y) + (20))>>> then\n        switch costume to (hitbox - crouch v)\n    end\n    change [x v] by (Xvel)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change y by (1)\n                        if <touching (level v)?> then\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yvel v] by (Gravity)\n    change y by (Yvel)\n    if <touching (level v)?> then\n        if <<touching color (#ff2e2e)?> or <<touching color (#d82727)?> or <(y position) < [-182]>>> then\n            create clone of (_myself_ v)\n            start sound [Oops v]\n            set rotation style [left-right v]\n            if <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n                switch costume to (playeryellow v)\n            else\n                switch costume to (playerred v)\n            end\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            set [x v] to (Spawn point)\n            set [xvel v] to [0]\n            set [yvel v] to [0]\n            set y to (-86)\n            wait (0.4) seconds\n        end\n        change y by ((Yvel) * (-1))\n        set [yvel v] to [0]\n    end\n    change y by (-5)\n    if <touching (level v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < ((mouse y) - (20))>>> then\n            start sound [Jump v]\n            set [yvel v] to [15]\n        end\n    end\n    change y by (5)\n    set rotation style [left-right v]\n    if <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n        set [crouch? v] to [3]\n        switch costume to (playeryellow v)\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > ((mouse y) + (20))>>> then\n            set [crouch? v] to [4]\n            switch costume to (playeryellow - crouch v)\n        end\n    else\n        set [crouch? v] to [1]\n        switch costume to (playerred v)\n        if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<mouse down?> and <(y position) > ((mouse y) + (20))>>> then\n            set [crouch? v] to [2]\n            switch costume to (playerred - crouch v)\n        end\n    end\n    set [player_x v] to (X)\n    set [player_y v] to (y position)\nend\n\nwhen flag clicked\nshow\nset [spawn point v] to [0]\nset [scroll x v] to [0]\nset [x v] to [0]\nforever\n    set size to (1000) %\n    if <<(X) < [0]> or <(X) = [0]>> then\n        change [scroll x v] by (((0) - (scroll x)) / (3))\n    else\n        if <<(X) > [9120]> or <(X) = [9120]>> then\n            change [scroll x v] by (((9120) - (scroll x)) / (3))\n        else\n            change [scroll x v] by (((X) - (scroll x)) / (3))\n        end\n    end\n    if <(X) < [1150]> then\n        set [spawn point v] to [0]\n    end\n    if <(X) > [1150]> then\n        set [spawn point v] to [1150]\n    end\n    if <(X) > [2400]> then\n        set [spawn point v] to [2400]\n    end\n    if <(X) > [3550]> then\n        set [spawn point v] to [3550]\n    end\n    if <(X) > [4800]> then\n        set [spawn point v] to [4800]\n    end\n    if <(X) > [5950]> then\n        set [spawn point v] to [5950]\n    end\n    if <(X) > [7200]> then\n        set [spawn point v] to [7200]\n    end\n    set x to (((X) - (scroll x)) - (184))\n    set size to (100) %\nend\n\nwhen I start as a clone\nshow\nset rotation style [all around v]\nset [ghost v] effect to (0)\ngo to [front v] layer\nset size to (100) %\nif <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n    switch costume to (effect yellow v)\nelse\n    switch costume to (effect v)\nend\nrepeat (10)\n    turn right (10) degrees\n    change size by (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\n@Players on cloud\n\ndefine get data of player (p)\ndelete all of [data v]\nset [i v] to [0]\nif <(p) = [1]> then\n    repeat (length of [player1 v])\n        change [i v] by (1)\n        add (item (i) of [player1 v]) to [data v]\n    end\nelse\n    if <(p) = [2]> then\n        repeat (length of [player2 v])\n            change [i v] by (1)\n            add (item (i) of [player2 v]) to [data v]\n        end\n    else\n        if <(p) = [3]> then\n            repeat (length of [player3 v])\n                change [i v] by (1)\n                add (item (i) of [player3 v]) to [data v]\n            end\n        else\n            if <(p) = [4]> then\n                repeat (length of [player4 v])\n                    change [i v] by (1)\n                    add (item (i) of [player4 v]) to [data v]\n                end\n            else\n                if <(p) = [5]> then\n                    repeat (length of [player5 v])\n                        change [i v] by (1)\n                        add (item (i) of [player5 v]) to [data v]\n                    end\n                else\n                    if <(p) = [6]> then\n                        repeat (length of [player6 v])\n                            change [i v] by (1)\n                            add (item (i) of [player6 v]) to [data v]\n                        end\n                    else\n                        if <(p) = [7]> then\n                            repeat (length of [player7 v])\n                                change [i v] by (1)\n                                add (item (i) of [player7 v]) to [data v]\n                            end\n                        else\n                            if <(p) = [8]> then\n                                repeat (length of [player8 v])\n                                    change [i v] by (1)\n                                    add (item (i) of [player8 v]) to [data v]\n                                end\n                            else\n                                if <(p) = [9]> then\n                                    repeat (length of [player9 v])\n                                        change [i v] by (1)\n                                        add (item (i) of [player9 v]) to [data v]\n                                    end\n                                else\n                                    if <(p) = [10]> then\n                                        repeat (length of [player10 v])\n                                            change [i v] by (1)\n                                            add (item (i) of [player10 v]) to [data v]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset size to (100) %\ngo to x: (-200) y: (-109)\npoint in direction (90)\nset [current_x v] to [0]\nset [current_y v] to [-130]\nset [ghost v] to [100]\nif <not <(pID) = (Player ID)>> then\n    get data of player (pID)\n    set [current_x v] to (item (1) of [data v])\n    set [current_y v] to (item (2) of [data v])\n    point in direction (90)\n    go to x: (current_x) y: (current_y)\n    forever\n        get data of player (pID)\n        switch costume to (item (7) of [data v])\n        if <(item (5) of [data v]) = [1]> then\n            change [current_x v] by (((item (1) of [data v]) - (Xpos)) / (3))\n            change [current_y v] by (((item (2) of [data v]) - (Ypos)) / (3))\n            set [xpos v] to (current_x)\n            set [ypos v] to (current_y)\n            set size to (400) %\n            go to x: ((((scroll x) - (current_x)) * (-1)) - (184)) y: (current_y)\n            set size to (100) %\n            set rotation style [left-right v]\n            if <((item (1) of [data v]) - (Xpos)) > [0]> then\n                point in direction (90)\n            end\n            if <((item (1) of [data v]) - (Xpos)) < [0]> then\n                point in direction (-90)\n            end\n            if <<(x position) < [-300]> or <(x position) > [300]>> then\n                hide\n            end\n        end\n        if <<(item (5) of [data v]) = [1]> and <(item (6) of [data v]) = [1]>> then\n            show\n            think (item (4) of [data v])\n            change [ghost v] by (((0) - (Ghost)) / (3))\n            if <<(x position) < [-300]> or <(x position) > [300]>> then\n                hide\n            end\n        else\n            change [ghost v] by (((100) - (Ghost)) / (3))\n            if <(round (Ghost)) = [100]> then\n                hide\n            else\n                show\n                if <<(x position) < [-300]> or <(x position) > [300]>> then\n                    hide\n                end\n            end\n        end\n        set [ghost v] effect to (Ghost)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <not <(pID) = (Player ID)>> then\n    get data of player (pID)\n    if <<(item (5) of [data v]) = [1]> and <(item (6) of [data v]) = [1]>> then\n        wait until <not <<(item (5) of [data v]) = [1]> and <(item (6) of [data v]) = [1]>>>\n        if <not <(length of [players v]) = [1]>> then\n            broadcast (Left v)\n        end\n    end\n    forever\n        if <<(item (5) of [data v]) = [1]> and <(item (6) of [data v]) = [1]>> then\n            broadcast (Join v)\n            wait until <not <<(item (5) of [data v]) = [1]> and <(item (6) of [data v]) = [1]>>>\n            broadcast (Left v)\n        end\n    end\nend\n\nwhen I receive [play v]\nset [pid v] to [0]\nrepeat (10)\n    change [pid v] by (1)\n    create clone of (_myself_ v)\nend\n\n@Level\n\nwhen I receive [tick v]\nset size to (400) %\ngo to x: (((scroll x) * (-1)) + (ox)) y: (0)\nshow\nset y to (0)\nif <<(((scroll x) * (-1)) + (ox)) < [-500]> or <(((scroll x) * (-1)) + (ox)) > [500]>> then\n    hide\nend\nset size to (100) %\nswitch costume to (join [P] (ID))\n\nwhen I receive [clear all v]\ndelete this clone\n\nwhen flag clicked\nhide\nset [id v] to [0]\nif <(ID) = [0]> then\n    set [scroll x v] to [0]\n    broadcast (Clear all v)\n    go to [back v] layer\n    Clone all\n    forever\n        broadcast (tick v)\n    end\nend\n\ndefine Clone all\ngo to [back v] layer\nset [id v] to [0]\nset [ox v] to [0]\nrepeat (19)\n    change [id v] by (1)\n    change [ox v] by (480)\n    set size to (100) %\n    create clone of (_myself_ v)\nend\nset [id v] to [0]\nset [ox v] to [0]\n\nwhen I receive [win v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [20]> then\n        broadcast (Goal v)\n    end\nend\n\n@Parallax\n\nwhen I receive [tick v]\nset [brightness v] effect to (-10)\nset [ghost v] effect to (20)\nset size to (400) %\ngo to [back v] layer\ngo to x: (((((scroll x) * (-0.5)) mod (480)) + (ox)) - (480)) y: (0)\nshow\nset y to (0)\nif <<(((((scroll x) * (-0.5)) mod (480)) + (ox)) - (480)) < [-500]> or <(((((scroll x) * (-0.5)) mod (480)) + (ox)) - (480)) > [500]>> then\n    hide\nend\nset size to (100) %\n\nwhen I receive [clear all v]\ndelete this clone\n\nwhen flag clicked\nhide\nset [ox v] to [0]\ncreate clone of (_myself_ v)\nset [ox v] to [480]\n\nwhen I receive [win v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\n@Win\n\nwhen I receive [win v]\nshow\nswitch costume to (resize v)\ngo to [front v] layer\nset size to (200) %\nswitch costume to (win v)\nset [ghost v] effect to (100)\nrepeat (20)\n    switch costume to (resize v)\n    change [ghost v] effect by (-10)\n    change size by (((100) - (size)) / (3.2))\n    switch costume to (win v)\nend\nswitch costume to (win v)\n\nwhen I receive [win v]\nplay sound [YOU WON! v] until done\nwait (3) seconds\nstop [all v]\n\nwhen flag clicked\nhide\n\n
Use ← → to move, to jump, and ↓ to crouch.\nPRESS THE GREEN FLAG 4 TIMES IN A ROW to eliminate a major glitch. Thanks.\nI will make  a sequel if this gets 500 views.\nTHANK YOU!!!!!! 1600 views!\nNOTE: This is not an original project, but a remix of @Lucasliu9595 's The Great Forest Cloud Scrolling Platformer. 