Tile ✎  Scrolling Platformer Creator #games


@Stage\n\nwhen I receive [clear clones v]\nswitch backdrop to (sky v)\nset volume to (100) %\nforever\n    play sound [10000 Pounds of Sunshine \(by EternalSushi\) v] until done\nend\n\nwhen flag clicked\nswitch backdrop to (intro v)\n\nwhen I receive [you won! v]\nrepeat (15)\n    change volume by (((0) - (volume)) / (1.5))\nend\nstop [other scripts in sprite v]\n\n@Thumbnail\n\ngo to x: (0) y: (0)\ngo to [front v] layer\nclear graphic effects\nshow\nhide variable [players v]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\nrepeat (10)\n    change y by (((1) - (y position)) / (-1.5))\n    go to [front v] layer\n    change [ghost v] effect by (10)\nend\nhide\nforever\n    go to [front v] layer\nend\n\n@Intro\n\nwhen flag clicked\nhide\nset size to (100) %\nbroadcast (Intro v)\nclear graphic effects\nset [intro set 2 v] to [0]\nset [set v] to [2]\ncreate clone of (_myself_ v)\nset [set v] to [-1]\nset volume to (100) %\nstart sound [Adventure Meme v]\nwait (0.25) seconds\nset [set v] to [0]\nswitch costume to (logo v)\ncreate clone of (_myself_ v)\nset [set v] to [-1]\nbroadcast (Show logo v)\n\nwhen I start as a clone\nclear graphic effects\nset size to (100) %\nif <(set) = [3]> then\n    switch costume to (fade v)\n    go to x: (0) y: (0)\n    set [brightness v] effect to (-100)\n    show\nelse\n    if <(set) = [2]> then\n        switch costume to (fade v)\n        go to x: (0) y: (0)\n        show\n    else\n        if <(set) = [1]> then\n            clear graphic effects\n            show\n            go to [front v] layer\n            go to x: (0) y: (0)\n            switch costume to (presents v)\n        else\n            if <(set) = [0]> then\n                switch costume to (logo v)\n                go to [front v] layer\n                show\n                go to x: (0) y: (40)\n            else\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I receive [clear clones v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen I start as a clone\nif <(set) = [1]> then\n    set [brightness v] effect to (0)\n    switch costume to (presents v)\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    show\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\n    wait (0.1) seconds\n    start sound [Logo v]\n    repeat (5)\n        change [brightness v] effect by (2)\n    end\n    repeat (5)\n        change [brightness v] effect by (-2)\n    end\n    wait ((1.51) - ((1) / (3))) seconds\n    broadcast (Start v)\nend\nif <(set) = [0]> then\n    go to x: (0) y: (1000)\n    set [ghost v] effect to (100)\n    set [y v] to [0]\n    repeat until <<(y position) < [2]> and <(round (Y)) = [0]>>\n        change [ghost v] effect by (-10)\n        change [y v] by (-1.2)\n        if <(y position) < [0]> then\n            set volume to (100) %\n            start sound [Boing v]\n            set [y v] to ((Y) * (-0.3))\n            change y by (Y)\n        end\n        change y by (Y)\n    end\n    set [intro set 2 v] to [1]\nend\n\nwhen I start as a clone\nif <(set) = [2]> then\n    wait until <(Intro set 2) = [1]>\n    set [set v] to [1]\n    create clone of (_myself_ v)\n    set [set v] to [2]\nend\n\nwhen I receive [clear clones v]\nset volume to (100) %\nrepeat (10)\n    change volume by (-10)\nend\n\n@Player\n\nwhen flag clicked\nhide\n\nwhen I receive [clear clones v]\nif <not <(Player ID) = [0]>> then\n    reset timer\n    set [player_shown? v] to [1]\n    set [level v] to [1]\n    set [xvel v] to [0]\n    set [yvel v] to [0]\n    point in direction (90)\n    go to x: (-200) y: (-109)\n    show\n    forever\n        switch costume to (hitbox v)\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            point in direction (90)\n            change [xvel v] by (Accel. speed)\n        end\n        if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n            point in direction (-90)\n            change [xvel v] by ((Accel. speed) * (-1))\n        end\n        set [xvel v] to ((Xvel) * (0.9))\n        change x 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                                if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < ((mouse y) - (15))>>> then\n                                    if <(Xvel) > [0]> then\n                                        set [xvel v] to [-10]\n                                    else\n                                        set [xvel v] to [10]\n                                    end\n                                else\n                                    change x by ((Xvel) * (-1))\n                                    set [xvel v] to [0]\n                                end\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            change y by ((Yvel) * (-1))\n            set [yvel v] to [0]\n        end\n        change y by (-5)\n        if <touching (death bars v)?> then\n            set [xvel v] to [0]\n            set [yvel v] to [0]\n            go to x: (-200) y: (-109)\n        end\n        if <(x position) > [240]> then\n            change [level v] by (1)\n            go to x: (-200) y: (-109)\n        end\n        if <touching (bounce pad v)?> then\n            set [yvel v] to [20]\n        end\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) - (15))>>> then\n                if <touching (water v)?> then\n                    set [yvel v] to [11]\n                else\n                    set [yvel v] to [15]\n                end\n            end\n        end\n        change y by (5)\n        set [player_x v] to (x position)\n        set [player_y v] to (y position)\n        set [location v] to (Level)\n        switch costume to (Player ID)\n    end\nend\n\nwhen I receive [you won! v]\nstop [other scripts in sprite v]\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\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 (pID)\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: (current_x) y: (current_y)\n            set size to (50) %\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        end\n        if <<(item (5) of [data v]) = [1]> and <<(item (6) of [data v]) = [1]> and <(item (7) of [data v]) = (Level)>>> then\n            show\n            think (item (4) of [data v])\n            change [ghost v] by (((0) - (Ghost)) / (3))\n        else\n            change [ghost v] by (((100) - (Ghost)) / (3))\n            if <(round (Ghost)) = [100]> then\n                hide\n            else\n                show\n                go to x: (current_x) y: (current_y)\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 flag clicked\nhide variable [players v]\nforever\n    delete all of [all players v]\n    if <not <(item (4) of [player1 v]) = []>> then\n        add (item (4) of [player1 v]) to [all players v]\n    end\n    if <not <(item (4) of [player2 v]) = []>> then\n        add (item (4) of [player2 v]) to [all players v]\n    end\n    if <not <(item (4) of [player3 v]) = []>> then\n        add (item (4) of [player3 v]) to [all players v]\n    end\n    if <not <(item (4) of [player4 v]) = []>> then\n        add (item (4) of [player4 v]) to [all players v]\n    end\n    if <not <(item (4) of [player5 v]) = []>> then\n        add (item (4) of [player5 v]) to [all players v]\n    end\n    if <not <(item (4) of [player6 v]) = []>> then\n        add (item (4) of [player6 v]) to [all players v]\n    end\n    if <not <(item (4) of [player7 v]) = []>> then\n        add (item (4) of [player7 v]) to [all players v]\n    end\n    if <not <(item (4) of [player8 v]) = []>> then\n        add (item (4) of [player8 v]) to [all players v]\n    end\n    if <not <(item (4) of [player9 v]) = []>> then\n        add (item (4) of [player9 v]) to [all players v]\n    end\n    if <not <(item (4) of [player10 v]) = []>> then\n        add (item (4) of [player10 v]) to [all players v]\n    end\n    set [players v] to (length of [all players v])\nend\n\nwhen I receive [play v]\nshow variable [players 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 flag clicked\nset [level v] to [1]\nhide\n\nwhen I receive [clear clones v]\ngo to x: (0) y: (0)\nFind\nclear graphic effects\nshow\nset [level v] to [1]\nforever\n    if <(Player ID) = [0]> then\n        if <key (right arrow v) pressed?> then\n            if <(Level) = ((Total Levels) - (1))> then\n                set [level v] to [15]\n            else\n                change [level v] by (1)\n            end\n        end\n        if <key (left arrow v) pressed?> then\n            if <(Level) = [1]> then\n                set [level v] to [1]\n            else\n                change [level v] by (-1)\n            end\n        end\n    else\n        if <(Level) = (Total Levels)> then\n            set [ghost v] effect to (0)\n            broadcast (You Won! v)\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            hide\n            stop [this script v]\n        end\n    end\n    switch costume to (Level)\nend\n\ndefine Find\nswitch costume to (1 v)\nnext costume\nset [total levels v] to [1]\nrepeat until <(costume [name v]) = [1]>\n    change [total levels v] by (1)\n    next costume\nend\nswitch costume to (1 v)\n\n@You Won!\n\nwhen flag clicked\nhide variable [complete time v]\nif <(Intro played?) = [True]> then\n    go to x: (0) y: (0)\n    set [ghost v] effect to (0)\n    repeat (10)\n        change y by (((1) - (y position)) / (-1.5))\n        go to [front v] layer\n        change [ghost v] effect by (10)\n    end\nend\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [you won! v]\nhide variable [players v]\nset [complete time v] to (timer)\nshow\nset x to (0)\nset y to (-1000)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (2.5))\nend\nset y to (0)\nshow variable [complete time v]\n\nwhen I receive [you won! v]\nplay sound [YOU WON! v] until done\nstop [all v]\n\n@Death bars\n\nwhen flag clicked\nhide\n\nwhen I receive [clear clones v]\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nforever\n    if <(Level) = (Total Levels)> then\n        set [ghost v] effect to (0)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        stop [this script v]\n    end\n    switch costume to (Level)\nend\n\n@Water\n\nwhen flag clicked\nhide\n\nwhen I receive [clear clones v]\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nforever\n    if <(Level) = (Total Levels)> then\n        set [ghost v] effect to (0)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        stop [this script v]\n    end\n    switch costume to (Level)\nend\n\n@Bounce pad\n\nwhen flag clicked\nhide\n\nwhen I receive [clear clones v]\ngo to x: (0) y: (0)\nclear graphic effects\nshow\nforever\n    if <(Level) = (Total Levels)> then\n        set [ghost v] effect to (0)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        stop [this script v]\n    end\n    switch costume to (Level)\nend\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]\n--- [Player 1]\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]\n--- [Player 2]\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]\n--- [Player 3]\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]\n--- [Player 4]\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]\n--- [Player 5]\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]\n--- [Player 6]\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]\n--- [Player 7]\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]\n--- [Player 8]\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]\n--- [Player 9]\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]\n--- [Player 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 --- (label)\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 (Location)\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 (Location)\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 (Location)\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 (Location)\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 (Location)\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 (Location)\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 (Location)\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 (Location)\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 (Location)\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 (Location)\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    wait (0.1) seconds\n    Update\n    Measure Memory\nend\n\nwhen I receive [play v]\nforever\n    Tick\n    wait (0.5) 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]\nset [characters v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~`!@#$%^&*\(\)-_=+\[\]{}/\|;:'",.<>? ]\nset [offline limit v] to [1500]\nset [player id v] to [0]\nconnect\nsay []\nbroadcast (Clear clones 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\nwhen I receive [clear clones v]\nif <(Player ID) = [0]> then\n    broadcast (Game full! v) and wait\nelse\n    if <(length of [players v]) = [1]> then\n        broadcast (Playing alone v)\n    else\n        broadcast (Found active game v)\n    end\nend\nstop [other scripts in sprite v]\nbroadcast (play v)\n\n@Progress Bar\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(Progress Bar: ID) = [Light]> then\n    switch costume to (progress bar v)\n    set x to ((-480) + (((480) / (100)) * (connect-percent)))\n    forever\n        set size to (400) %\n        change x by ((((-480) + (((480) / (100)) * (connect-percent))) - (x position)) / (1.5))\n        set y to (-178)\n        set size to (100) %\n    end\nelse\n    if <(Progress Bar: ID) = [Dark]> then\n        switch costume to (progress bar dark v)\n        go to x: (0) y: (-178)\n    else\n        delete this clone\n    end\nend\n\nwhen I receive [play v]\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen flag clicked\nset [connect-percent v] to [0]\nset [progress bar: id v] to [Dark]\ncreate clone of (_myself_ v)\nset [progress bar: id v] to [Light]\ncreate clone of (_myself_ v)\nset [progress bar: id v] to [Main]\n\nwhen I start as a clone\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [game full! v]\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\nwhen I receive [load done v]\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\n@Screen\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (connecting v)\nhide\n\nwhen I receive [play v]\nset [ghost v] effect to (0)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [game full! v]\nshow\ngo to [front v] layer\nset [ghost v] effect to (100)\nset [brightness v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nswitch costume to (game full! v)\nset [brightness v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [brightness v] effect by (-10)\nend\nwait (2) seconds\nbroadcast (Spectator Mode v)\n\n@Join/Left messages2\n\nwhen I receive [playing alone v]\nstop [other scripts in sprite v]\nswitch costume to (alone v)\nshow\ngo to x: (0) y: (1000)\nset [ghost v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (2.5))\nend\nclear graphic effects\nset y to (0)\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.25))\nend\nhide\n\nwhen I receive [found active game v]\nstop [other scripts in sprite v]\nswitch costume to (someone is in! v)\nshow\ngo to x: (0) y: (1000)\nset [ghost v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (2.5))\nend\nclear graphic effects\nset y to (0)\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.25))\nend\nhide\n\nwhen I receive [spectator mode v]\nstop [other scripts in sprite v]\nswitch costume to (spectating v)\nshow\ngo to x: (0) y: (1000)\nset [ghost v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (2.5))\nend\nclear graphic effects\nset y to (0)\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.25))\nend\nhide\n\nwhen I receive [join v]\nstop [other scripts in sprite v]\nbroadcast (Join message v)\nswitch costume to (joined v)\nshow\ngo to x: (0) y: (1000)\nset [ghost v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (2.5))\nend\nclear graphic effects\nset y to (0)\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.25))\nend\nhide\n\nwhen I receive [left v]\nstop [other scripts in sprite v]\nbroadcast (Left message v)\nswitch costume to (left v)\nshow\ngo to x: (0) y: (1000)\nset [ghost v] effect to (100)\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (2.5))\nend\nclear graphic effects\nset y to (0)\nwait (3) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\n    change y by (((-1) - (y position)) / (-1.25))\nend\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [join message v]\nplay sound [Join v] until done\nstart sound [A player has joined the game \(HQ\) v]\n\nwhen I receive [left message v]\nplay sound [Left v] until done\nstart sound [A player has left the game \(HQ\) v]\n\n@Clouds\n\nwhen I start as a clone\nset size to (600) %\ngo to x: (350) y: (pick random (20) to (150))\nset [ghost v] effect to (pick random (50) to (90))\nset [size v] to (pick random (100) to (300))\nset size to (Size) %\nset [speed v] to ((0) - ((Size) / (150)))\nshow\nrepeat until <(x position) < [-270]>\n    set size to (600) %\n    change x by (speed)\n    set size to (Size) %\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\ngo to [back v] layer\nforever\n    create clone of (_myself_ v)\n    wait (pick random (2) to (7)) seconds\nend\n\n@detector\n\nwhen flag clicked\nhide\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nstart sound [Thank you! ^w^ v]\nshow\ngo to x: (-120) y: (1000)\ngo to [front v] layer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat (105)\n    go to [front v] layer\n    change y by (((124) - (y position)) / (10))\n    change [ghost v] effect by (-4)\nend\nrepeat (30)\n    change y by (((213) - (y position)) / (7.5))\n    change [ghost v] effect by (8)\nend\nhide\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        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    set [faved___ v] to [0]\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