☁ Multiplayer Platformer ☁
@Stage\n\ndefine Create Character List\nset [characters v] to [`1234567890-=~!@#$%^&*\(\)_+qwertyuiop\[\]\{}|asdfghjkl;':"zxcvbnm,./<>? ]\ndelete all of [characters v]\nrepeat (9)\n    add [] to [characters v]\nend\nset [stage: @character list v] to [0]\nrepeat (length of (Characters))\n    change [stage: @character list v] by (1)\n    add (letter (Stage: @Character List) of (Characters)) to [characters v]\nend\n\n@Empty\n\n@Player\n\ndefine Walk (direction) (speed)\nset [last costume v] to (costume [name v])\nif <not <(!Power Name) = [Moon Blob]>> then\n    switch costume to (hitbox v)\nend\nchange x by (speed)\nif <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 (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                                    if <<[Pigs] = [Fly]> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n                                        set [wall jumpable? v] to [0]\n                                        set [y movements v] to ((!JumpPower) * (.7))\n                                        set [x movements v] to [0]\n                                    else\n                                        set [y movements v] to ((Y Movements) * (1))\n                                        set [x movements v] to [0]\n                                    end\n                                    change x by ((-1) * (speed))\n                                    change y by (-8)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nswitch costume to (last costume)\n\ndefine ChangeY\nset [last costume v] to (costume [name v])\nif <not <(!Power Name) = [Moon Blob]>> then\n    switch costume to (hitbox v)\nend\nif <not <<(!Power Name) = [UFO]> or <(!Power Name) = [Eaten Kitty]>>> then\n    change y by (-1)\n    if <((-1) * (Y Movements)) < [25]> then\n        change [y movements v] by ((-1) * (!GravityPower))\n    end\nend\nif <(rocket launch?) = [1]> then\n    set [y movements v] to [30]\nend\nif <<(!Power Name) = [UFO]> or <(!Power Name) = [Eaten Kitty]>> then\n    set [y movements v] to [0]\n    if <<<key (s v) pressed?> or <key (down arrow v) pressed?>> and <<(!Power Name) = [UFO]> or <(!Power Name) = [Eaten Kitty]>>> then\n        set [y movements v] to ((-1) * (!JumpPower))\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<(!Power Name) = [UFO]> or <(!Power Name) = [Eaten Kitty]>>> then\n        set [y movements v] to ((1) * (!JumpPower))\n    end\nelse\n    if <<<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <touching (level v)?>> and <not <(!JumpPower) = [0]>>> then\n        set [y movements v] to (!JumpPower)\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <(!Power Name) = [Flying Cat]>> then\n        set [y movements v] to (!JumpPower)\n    end\nend\nchange y by (Y Movements)\nif << or > or < or <<touching color (#04ff9e)?> or <touching color (#96ff62)?>>>> then\n    if <touching color (#00ffc7)?> then\n        Powerup [12]\n    end\n    if <touching color (#ffc000)?> then\n        Powerup [11]\n    end\n    if <touching color (#3b3c77)?> then\n        Powerup [9]\n    end\n    if <touching color (#ff0b0b)?> then\n        Powerup [7]\n    end\n    if <touching color (#409fff)?> then\n        Powerup [6]\n    end\n    if <touching color (#9966ff)?> then\n        Powerup [5]\n    end\n    if <touching color (#ff7e7e)?> then\n        Powerup [2]\n    end\n    if <touching color (#ffc908)?> then\n        Powerup [1]\n    end\n    if <touching color (#96ff62)?> then\n        Powerup [4]\n    end\n    if <touching color (#04ff9e)?> then\n        Powerup [3]\n    end\n    if <touching color (#54ff00)?> then\n        Powerup [8]\n    end\nend\nif <touching (level v)?> then\n    if <(Y Movements) < [0]> then\n        repeat until <not <touching (level v)?>>\n            change y by (1)\n            set [y movements v] to [0]\n            set [wall jumpable? v] to [1]\n        end\n        if <<(!Power Name) = [Frog]> and <([abs v] of (X Movements) ) > [0]>> then\n            set [y movements v] to ((!JumpPower) * (.4))\n        end\n    else\n        repeat until <not <touching (level v)?>>\n            change y by (-1)\n            set [y movements v] to [0]\n        end\n    end\nend\nif <(Player Y) < [-200]> then\n    set [player x v] to [0]\n    set [player y v] to [0]\nend\nswitch costume to (last costume)\n\nwhen I receive [start game v]\nset [my player inactive v] to [0]\nswitch costume to (stand_1 v)\nset [frames drawn v] to [0]\n\nwait (.01) seconds\n\ndefine Add (val) to "encoded"\nset [@encoding v] to [0]\nrepeat (length of (val))\n    change [@encoding v] by (1)\n    set [encoded v] to (join (encoded) (item # of (letter (@Encoding) of (val)) in [characters v]))\nend\nset [encoded v] to (join (encoded) [00])\n\ndefine P (p#) = (value)\nset [sendout different? v] to [1]\nif <(p#) = [1]> then\n    if <(join [A] (value)) = (join [A] (☁ Player 1))> then\n        set [sendout different? v] to [0]\n    end\n    set [☁ player 1 v] to (value)\nelse\n    if <(p#) = [2]> then\n        if <(join [A] (value)) = (join [A] (☁ Player 2))> then\n            set [sendout different? v] to [0]\n        end\n        set [☁ player 2 v] to (value)\n    else\n        if <(p#) = [3]> then\n            if <(join [A] (value)) = (join [A] (☁ Player 3))> then\n                set [sendout different? v] to [0]\n            end\n            set [☁ player 3 v] to (value)\n        else\n            if <(p#) = [4]> then\n                if <(join (value) [banana]) = (join [A] (☁ Player 4))> then\n                    set [sendout different? v] to [0]\n                end\n                set [☁ player 4 v] to (value)\n            else\n                if <(p#) = [5]> then\n                    if <(join [A] (value)) = (join [A] (☁ Player 5))> then\n                        set [sendout different? v] to [0]\n                    end\n                    set [☁ player 5 v] to (value)\n                else\n                    if <(p#) = [6]> then\n                        if <(join [A] (☁ Player 6)) = (join [A] (value))> then\n                            set [sendout different? v] to [0]\n                        end\n                        set [☁ player 6 v] to (value)\n                    else\n                        if <(p#) = [7]> then\n                            if <(join [A] (☁ Player 7)) = (join [A] (value))> then\n                                set [sendout different? v] to [0]\n                            end\n                            set [☁ player 7 v] to (value)\n                        else\n                            if <(join [A] (value)) = (join [A] (☁ Player 8))> then\n                                set [sendout different? v] to [0]\n                            end\n                            set [☁ player 8 v] to (value)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Read Next item from (encoded) to "Decoded"\nset [decoded v] to []\nforever\n    set [char# v] to (join (letter (@Reading) of (encoded)) (letter ((@Reading) + (1)) of (encoded)))\n    change [@reading v] by (2)\n    if <(char#) < [1]> then\n        stop [this script v]\n    end\n    set [decoded v] to (join (decoded) (item (char#) of [characters v]))\nend\n\ndefine Move\nChangeY\nWalk [] (X Movements)\nScroll\n\ndefine Handle Keys\nif <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        set [x movements v] to ((-1) * (!SpeedPower))\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        set [x movements v] to (!SpeedPower)\n    end\n    if <(!Power Name) = [Frog]> then\n        set [x movements v] to ((2) * (X Movements))\n    end\nelse\n    set [x movements v] to [0]\nend\n\ndefine Update Cloud\nset [encoded v] to []\nchange [cloud updates v] by (1)\nset [decoded v] to [0]\nset [@reading v] to [1]\nAdd (Player X) to "encoded"\nAdd (Player Y) to "encoded"\nAdd (join (Username) []) to "encoded"\nsay []\nif <(Chat) = []> then\n    Add [] to "encoded"\nelse\n    Add (Chat) to "encoded"\n    say (item (Chat) of [chat options v])\nend\nAdd (direction) to "encoded"\nAdd (costume [number v]) to "encoded"\nAdd (size) to "encoded"\nif <<(Y Movements) < [-25]> and <(!Power Name) = [Bowling Ball]>> then\n    Add [1] to "encoded"\nelse\n    Add [0] to "encoded"\nend\nAdd (COMPUTER CODE) to "encoded"\nAdd (round ((timer) * (10))) to "encoded"\nP (MY PLAYER#) = (encoded)\n\ndefine Powerup (power#)\nset [!power name v] to (item (power#) of [!powerup name v])\nset [!speedpower v] to (item (power#) of [!powerup speed v])\nset [!jumppower v] to (item (power#) of [!powerup jump v])\nset [!gravitypower v] to (item (power#) of [!powerup gravity v])\nset size to (item (power#) of [!powerup size v]) %\nif <(!Power Name) = [UFO]> then\n    set [player x v] to [0]\n    set [player y v] to [0]\nend\nif <(!Power Name) = [Bowling Ball]> then\n    set [y movements v] to [0]\nend\n\nwhen flag clicked\nset [squished? v] to [0]\nset [bowling ball? v] to [0]\nhide variable [fuel v]\nPowerup [1]\n\ndefine Power Use?\nif <key (space v) pressed?> then\n    if <<(!Power Name) = [Bowling Ball Cat]> or <(!Power Name) = [Bowling Ball]>> then\n        if <(?Using power?) = [0]> then\n            if <(Bowling Ball?) = [1]> then\n                switch costume to (stand_1 v)\n                set [bowling ball? v] to [0]\n                Powerup [9]\n            else\n                set [bowling ball? v] to [1]\n                Powerup [10]\n            end\n            set [?using power? v] to [1]\n        end\n    end\n    if <(!Power Name) = [UFO]> then\n        if <(Fuel) > [0]> then\n            change [fuel v] by (-1)\n            set [!speedpower v] to [10]\n        else\n            set [!speedpower v] to [6]\n        end\n    end\n    if <(!Power Name) = [Gravity Scientist \(Press Space\)]> then\n        set [!gravitypower v] to [.01]\n    end\n    if <(!Power Name) = [Size Transformer \(Press Space\)]> then\n        if <(?Using power?) = [0]> then\n            set [?using power? v] to [1]\n            set size to ((45) - (size)) %\n            set [!speedpower v] to ((10) - (!SpeedPower))\n            set [!jumppower v] to ((25) - (!JumpPower))\n        end\n    end\nelse\n    if <(!Power Name) = [UFO]> then\n        if <(Fuel) < [100]> then\n            change [fuel v] by (1)\n        end\n        set [!speedpower v] to [6]\n    end\n    if <(!Power Name) = [Gravity Scientist \(Press Space\)]> then\n        set [!gravitypower v] to [1]\n    end\n    if <(!Power Name) = [Size Transformer \(Press Space\)]> then\n        set [?using power? v] to [0]\n    end\n    if <<(!Power Name) = [Bowling Ball Cat]> or <(!Power Name) = [Bowling Ball]>> then\n        set [?using power? v] to [0]\n    end\nend\nif <(!Power Name) = [UFO]> then\n    show variable [fuel v]\nelse\n    hide variable [fuel v]\nend\nif <(!Power Name) = [Rocket]> then\n    if <[520] < (Player Y)> then\n        Powerup [2]\n    end\nelse\n    set [rocket launch? v] to [0]\nend\n\ndefine Handle Looks\nif <(X Movements) > [1]> then\n    point in direction (90)\nend\nif <[-1] > (X Movements)> then\n    point in direction (-90)\nend\nif <(!Power Name) = [Eaten Kitty]> then\n    switch costume to (eyes v)\nelse\n    if <(squished?) = [1]> then\nend\n\nwhen I receive [connect to game v]\nswitch backdrop to (joining v)\nhide\ngo to x: (0) y: (0)\nset [computer code v] to (pick random (1) to (1000000))\nset [my player# v] to [0]\nset [username v] to (username)\nset [x movements v] to [0]\nset [y movements v] to [0]\nset [player x v] to [0]\nset [player y v] to [0]\nbroadcast (Setup - Opponents v) and wait\nbroadcast (Find Open Slot v) and wait\n\nwhen I receive [thumbnail done v]\nshow\nswitch backdrop to (blank v)\nif <[0] < (MY PLAYER#)> then\n    set [=myplayer v] to (MY PLAYER#)\n    broadcast (Start Game v)\n    set [chat# v] to [100]\n    reset timer\nelse\n    broadcast (Game Full v)\n    switch backdrop to (not enough positons v)\n    stop [all v]\nend\n\nwhen [x v] key pressed\nPowerup [1]\n\nwhen I receive [player flattened v]\nset [squished? v] to [1]\nswitch costume to (flattened v)\nset [!gravitypower v] to [1]\nset [!jumppower v] to [0]\nset [!speedpower v] to [0]\nset size to (30) %\nwait (3) seconds\nswitch costume to (stand_1 v)\nPowerup (item # of (!Power Name) in [!powerup name v])\nset [squished? v] to [0]\n\nwhen I receive [start game v]\nset [original player# v] to (MY PLAYER#)\n\ndefine Frame Tick\nMove\nif <<(join [A] (Player X)) = (last x)> and <(join [A] (Player Y)) = (last y)>> then\n    change [my player inactive v] by (1)\nelse\n    set [my player inactive v] to [0]\nend\nif <(MY PLAYER INACTIVE) = [1000]> then\n    stop [all v]\nend\nset [last x v] to (join [A] (Player X))\nset [last y v] to (join [A] (Player Y))\n\nwhen I receive [player tick v]\nPower Use?\n\nwhen I receive [player tick v]\nHandle Keys\n\nwhen I receive [player tick v]\nHandle Looks\n\nwhen I receive [player tick v]\nchange [frames drawn v] by (1)\nFrame Tick\n\nwhen I receive [player tick v]\nset [public player x v] to (Player X)\nset [public player y v] to (Player Y)\n\nwhen I receive [player tick v]\nUpdate Cloud\n\nwhen I receive [start game v]\nPowerup [1]\n\nif <(!Power Name) = [Astronaut]> then\n\ndefine Get Chat Catagory (cat)\ndelete all of [chat: v]\nset [@getchat v] to (((cat) - (1)) * (9))\nrepeat (9)\n    change [@getchat v] by (1)\n    add (item (@getChat) of [chat options v]) to [chat: v]\nend\n\ndefine Chat\nwait until <not <key (any v) pressed?>>\nshow list [chat: v]\nShow Chat Catagories\nhide list [chat: v]\nset [number pressed v] to []\nrepeat until <not <(number pressed) = []>>\n    Sense Number\nend\nGet Chat Catagory (number pressed)\nset [number pressed v] to []\nwait until <not <key (any v) pressed?>>\nrepeat until <not <(number pressed) = []>>\n    Sense Number\nend\nshow list [chat: v]\nset [chat v] to (item # of (item (number pressed) of [chat: v]) in [chat options v])\nset [chat# v] to [0]\nset [@doing chat? v] to [0]\n\ndefine Sense Number\nset [number pressed v] to []\nset [@key sense v] to [0]\nrepeat (9)\n    change [@key sense v] by (1)\n    if <key ((@key sense) v) pressed?> then\n        set [number pressed v] to (@key sense)\n    end\n    if <(@key sense) > [8]> then\n        set [@key sense v] to [0]\n    end\nend\n\ndefine Show Chat Catagories\ndelete all of [chat: v]\nset [@getchat v] to [0]\nrepeat (9)\n    change [@getchat v] by (1)\n    add (item (@getChat) of [chat catagories v]) to [chat: v]\nend\n\nwhen flag clicked\nset [chat v] to []\nshow list [chat: v]\nforever\n    Check Chat\nend\n\nwhen [p v] key pressed\nif <(DevMode?) = [1]> then\n    ask [Power Number:] and wait\n    Powerup (answer)\nend\n\ndefine Check Chat\nif <key (t v) pressed?> then\n    set [@doing chat? v] to [1]\n    broadcast (do chat v)\nelse\n    if <(@doing chat?) = [0]> then\n        if <(Chat#) < [150]> then\n            change [chat# v] by (1)\n        else\n            set [chat v] to []\n        end\n    end\nend\n\nwhen I receive [do chat v]\nChat\n\ndefine Scroll\nbroadcast (Reposition Level v)\nset [player x v] to ((Player X) + (x position))\nset [player y v] to ((Player Y) + (y position))\ngo to x: (0) y: (0)\n\n@Opponents\n\ndefine Add (val) to "encoded"\nset [@encoding v] to [0]\nrepeat (length of (val))\n    change [@encoding v] by (1)\n    set [encoded v] to (join (encoded) (item # of (letter (@Encoding) of (val)) in [characters v]))\nend\nset [encoded v] to (join (encoded) [00])\n\ndefine value# = P (p#)\nif <(p#) = [1]> then\n    set [value# v] to (☁ Player 1)\nelse\n    if <(p#) = [2]> then\n        set [value# v] to (☁ Player 2)\n    else\n        if <(p#) = [3]> then\n            set [value# v] to (☁ Player 3)\n        else\n            if <(p#) = [4]> then\n                set [value# v] to (☁ Player 4)\n            else\n                if <(p#) = [5]> then\n                    set [value# v] to (☁ Player 5)\n                else\n                    if <(p#) = [6]> then\n                        set [value# v] to (☁ Player 6)\n                    else\n                        if <(p#) = [7]> then\n                            set [value# v] to (☁ Player 7)\n                        else\n                            set [value# v] to (☁ Player 8)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Set X (x)\nset x to ((x) - (Player X))\n\ndefine Set Y (y)\nset y to ((y) - (Player Y))\n\ndefine Read Next item from (encoded) to "Decoded"\nset [decoded v] to []\nforever\n    set [char# v] to (join (letter (@Decoding) of (encoded)) (letter ((@Decoding) + (1)) of (encoded)))\n    change [@decoding v] by (2)\n    if <(char#) < [1]> then\n        stop [this script v]\n    end\n    set [decoded v] to (join (decoded) (item (char#) of [characters v]))\nend\n\nwhen flag clicked\nset size to (30) %\nset [ghost v] effect to (0)\nhide\n\ndefine Create Opponents\nset [player# v] to [0]\nrepeat (8)\n    change [player# v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [setup - opponents v]\nCreate Opponents\n\nwhen I receive [find open slot v]\nvalue# = P (player#)\nset [last value v] to (join [A] (value#))\nwait (3) seconds\nvalue# = P (player#)\nif <(join [A] (value#)) = (last value)> then\n    set [my player# v] to (player#)\nend\n\nwhen I receive [start game v]\ndelete all of [x positions v]\ndelete all of [y positions v]\ndelete all of [costumes v]\nforever\n    set rotation style [left-right v]\nend\n\ndefine Goto New Position\nGet Cloud Data\nif <<<(MY PLAYER#) = (player#)> or <(Original Player#) = (player#)>> or <(COMPUTER CODE) = (opponent code)>> then\n    set [inactive? v] to [100]\n    hide\nelse\n    if <(inactive?) = [100]> then\n        hide\n    end\n    if <(last value) = (join [A] (value#))> then\n        change [inactive? v] by (1)\n        if <(inactive?) > [100]> then\n            set [inactive? v] to [100]\n        end\n    else\n        show\n        set [inactive? v] to [0]\n        change [opponent's frames drawn v] by (1)\n        set [last value v] to (join [A] (value#))\n    end\n    if <<not <((opponent X) - (Player X)) = (x position)>> or <not <((opponent Y) - (Player Y)) = (y position)>>> then\n        switch costume to (players v)\n        point towards (middle v)\n        move (10) steps\n    end\nend\n\ndefine Get Cloud Data\nvalue# = P (player#)\nset [@decoding v] to [1]\nRead Next item from (value#) to "Decoded"\nSet X (decoded)\nset [opponent x v] to (decoded)\ninsert (decoded) at (1) of [x positions v] \ndelete (3) of [x positions v]\nRead Next item from (value#) to "Decoded"\nSet Y (decoded)\nset [opponent y v] to (decoded)\ninsert (decoded) at (1) of [y positions v] \ndelete (3) of [y positions v]\nRead Next item from (value#) to "Decoded"\nif <touching (mouse-pointer v)?> then\n    say (join (decoded) [])\n    set [@username v] to [30]\nend\nif <not <touching (mouse-pointer v)?>> then\n    if <(@username) > [0]> then\n        change [@username v] by (-1)\n    else\n        say []\n    end\nend\nset [opponentusername v] to (decoded)\nRead Next item from (value#) to "Decoded"\nif <not <(decoded) = []>> then\n    say (item (decoded) of [chat options v])\nend\nRead Next item from (value#) to "Decoded"\npoint in direction (decoded)\nRead Next item from (value#) to "Decoded"\nswitch costume to (decoded)\ninsert (decoded) at (1) of [costumes v] \ndelete (3) of [costumes v]\nRead Next item from (value#) to "Decoded"\nset size to (decoded) %\nRead Next item from (value#) to "Decoded"\nif <<(decoded) = [1]> and <touching (player v)?>> then\n    broadcast (Player Flattened v)\nend\nRead Next item from (value#) to "Decoded"\nset [opponent code v] to (decoded)\nRead Next item from (value#) to "Decoded"\n\nwhen I receive [count players v]\nif <(inactive?) < [100]> then\n    change [playersincounting v] by (1)\n    add (join (join (join (join (join (opponentUsername) [ | Inactivity Level: ]) (inactive?)) []) [ | ]) []) to [dev list in counting v]\nend\n\ndefine Update position (DO NOT CHANGE POSITION\nSet X (opponent X)\nSet Y (opponent Y)\n\ndefine Walk (direction) (speed)\nset [last costume v] to (costume [name v])\nswitch costume to (hitbox v)\nchange x by (speed)\nif <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 (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                                    set [x movements v] to [0]\n                                    change x by ((-1) * (speed))\n                                    change y by (-8)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nswitch costume to (last costume)\n\ndefine ChangeY\nset [last costume v] to (costume [name v])\nswitch costume to (hitbox v)\nchange y by (-1)\nchange y by (Y Movements)\nif <touching (level v)?> then\n    if <(Y Movements) < [0]> then\n        repeat until <not <touching (level v)?>>\n            change y by (1)\n            set [y movements v] to [0]\n        end\n    else\n        change y by ((Y Movements) * (-1))\n        set [y movements v] to [0]\n    end\nend\nif <(Player Y) < [-200]> then\n    set [player x v] to [0]\n    set [player y v] to [0]\nend\nswitch costume to (last costume)\n\nwhen I receive [start game v]\nset [inactive? v] to [100]\nvalue# = P (player#)\nset [last value v] to (join [A] (value#))\nset [opponent's frames drawn v] to [0]\n\nwhen I receive [check opponents fps v]\nset [opponent fps v] to (opponent's frames drawn)\nset [opponent's frames drawn v] to [0]\n\ndefine check value (p#)\nif <(p#) = [1]> then\n    set [checkvalue v] to (☁ Player 1)\nelse\n    if <(p#) = [2]> then\n        set [checkvalue v] to (☁ Player 2)\n    else\n        if <(p#) = [3]> then\n            set [checkvalue v] to (☁ Player 3)\n        else\n            if <(p#) = [4]> then\n                set [checkvalue v] to (☁ Player 4)\n            else\n                if <(p#) = [5]> then\n                    set [checkvalue v] to (☁ Player 5)\n                else\n                    if <(p#) = [6]> then\n                        set [checkvalue v] to (☁ Player 6)\n                    else\n                        if <(p#) = [7]> then\n                            set [checkvalue v] to (☁ Player 7)\n                        else\n                            set [checkvalue v] to (☁ Player 8)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nrepeat until <[.999] < ((timer) - (lastCloudGetter))>\n\nif <not <(opponent frames) = [0]>> then\n    wait ((.1) / (opponent frames)) seconds\nend\n\nwhen I receive [reposition level v]\nGoto New Position\n\nRead Next item from (☁ Player 3) to "Decoded"\n\nset [@decoding v] to [1]\n\n@Level\n\nwhen I receive [setup - opponents v]\nset [level width v] to [14]\nset [total level v] to ((level width) * (6))\nMake Level\n\ndefine Make Level\nset size to (50) %\nset [level sector# v] to [0]\nswitch costume to ((total level) + (1))\nrepeat (total level)\n    next costume\n    change [level sector# v] by (1)\n    set [scrollx v] to ((((Level Sector#) - (1)) mod (level width)) * (239))\n    set [scrolly v] to (([floor v] of (((Level Sector#) - (1)) / (level width)) ) * (179))\n    create clone of (_myself_ v)\nend\n\ndefine Goto X (x) Y (y) and Show\nswitch costume to (costume1 v)\ngo to x: ((x) - (Player X)) y: ((y) - (Player Y))\nif <<(round ((x) - (Player X))) = (round (x position))> and <(round ((y) - (Player Y))) = (round (y position))>> then\n    show\nelse\n    hide\nend\nswitch costume to (Level Sector#)\n\nwhen flag clicked\nset [total level clones v] to [0]\nhide\n\nwhen I receive [start game v]\ngo to x: (-999999999) y: (-9999999999)\nif <<(y position) = [-180]> and <(x position) = [-240]>> then\n    delete this clone\nend\nchange [total level clones v] by (1)\nset size to (50) %\nshow\n\nwhen flag clicked\nset size to (50) %\n\nwhen I receive [reposition level v]\nGoto X (scrollx) Y (scrolly) and Show\n\n@Curtain\n\nwhen I receive [thumbnail done v]\ngo to x: (0) y: (0)\nshow\ngo [forward v] (010000000) layers\n\nwhen flag clicked\ngo to [front v] layer\nhide\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (thumbnail v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nbroadcast (Connect to game v) and wait\nset [ghost v] effect to (100)\ngo to [front v] layer\nbroadcast (Thumbnail Done v)\nforever\n    go to [front v] layer\nend\n\n@Beginning anouncer\n\nwhen flag clicked\nshow\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I receive [connect to game v]\ngo to [front v] layer\nshow\nset [devmode? v] to [0]\nif <<(username) = [mathNinja9]> or <(username) = [superfireninja9]>> then\n    set [devmode? v] to [1]\nend\nsay [Your game should begin momentarily...]\n\nwhen I receive [start game v]\nhide\n\ndefine Read Next item from (encoded) to "Decoded"\nset [decoded v] to []\nforever\n    set [char# v] to (join (letter (@Reading) of (encoded)) (letter ((@Reading) + (1)) of (encoded)))\n    change [@reading v] by (2)\n    if <(char#) < [1]> then\n        stop [this script v]\n    end\n    set [decoded v] to (join (decoded) (item (char#) of [characters v]))\nend\n\nwhen [m v] key pressed\nif <(DevMode?) = [1]> then\n    set [encoded v] to []\n    ask [Set the GameCode variable to what?] and wait\n    Add (answer) to "encoded"\n    set [☁ gamecode v] to (encoded)\nend\n\ndefine Add (val) to "encoded"\nset [@encoding v] to [0]\nrepeat (length of (val))\n    change [@encoding v] by (1)\n    set [encoded v] to (join (encoded) (item # of (letter (@Encoding) of (val)) in [characters v]))\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen flag clicked\nhide variable [my player fps v]\nforever\n    wait (1) seconds\n    delete all of [dev list in counting v]\n    add (join (Username) [ \(Me\)]) to [dev list in counting v]\n    set [playersincounting v] to [1]\n    broadcast (Count Players v) and wait\n    set [playersonline v] to (playersincounting)\n    Update Dev List\nend\n\nwhen [n v] key pressed\nif <(DevMode?) = [1]> then\n    ask [New Name?] and wait\n    set [username v] to (answer)\nend\n\nwhen I receive [start game v]\nforever\n    wait (1) seconds\n    broadcast (check opponents FPS v)\nend\n\nwhen flag clicked\nhide variable [☁ gamecode v]\nforever\n    if <<(DevMode?) = [1]> and <key (b v) pressed?>> then\n        show variable [☁ gamecode v]\n    else\n        hide variable [☁ gamecode v]\n    end\nend\n\nwhen I receive [game full v]\nsay [Sorry, but the game is full! Please come back soon!] for (2) seconds\nstop [all v]\n\ndefine Update Dev List\ndelete all of [developer list v]\nrepeat (length of [dev list in counting v])\n    add (item (1) of [dev list in counting v]) to [developer list v]\n    delete (1) of [dev list in counting v]\nend\n\nwhen flag clicked\nset [viewing dev list? v] to [0]\nshow list [developer list v]\n\nwhen [z v] key pressed\nif <(viewing dev list?) = [0]> then\n    set [viewing dev list? v] to [1]\n    hide list [developer list v]\nelse\n    set [viewing dev list? v] to [0]\n    show list [developer list v]\nend\n\nwhen [r v] key pressed\nif <(VIEWING FPS?) = [0]> then\n    set [viewing fps? v] to [1]\n    show variable [my player fps v]\nelse\n    set [viewing fps? v] to [0]\n    hide variable [my player fps v]\nend\n\nwhen I receive [start game v]\nset [lastfps check v] to [0]\nset [lastcloudreset v] to [0]\nforever\n    change [frames drawn v] by (1)\n    broadcast (Player Tick v)\n    if <[.99] < ((timer) - (lastFPS check))> then\n        set [my player fps v] to (join (Frames Drawn) [ FPS \(Local\)])\n        set [frames drawn v] to [0]\n        set [lastfps check v] to (timer)\n    end\nend\n\n@Sounds\n\nwhen flag clicked\nforever\n    play sound [TheFatRat+-+Prelude+\(VIP+Edit+feat.+JJD\).mp3 v] until done\nend\n\nwhen flag clicked\nset volume to (0) %\nrepeat (20)\n    change volume by (5)\nend\n\n@ForeGround\n\nwhen flag clicked\nhide\n\ndefine create fore\nset [fore# v] to [0]\nrepeat (length of [foreground positions v])\n    change [fore# v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nswitch costume to (fore#)\ngo to [back v] layer\nforever\n    if <(see foreground?) = [1]> then\n        switch costume to (fore#)\n    else\n        switch costume to ((fore#) + (4))\n    end\n    Goto X ((((item (fore#) of [foreground positions v]) - (1)) mod (level width)) * (239)) Y (([floor v] of (((item (fore#) of [foreground positions v]) - (1)) / (level width)) ) * (179))\nend\n\ndefine Goto X (x) Y (y)\ngo to x: ((x) - (Player X)) y: ((y) - (Player Y))\nif <<((x) - (Player X)) = (x position)> and <((y) - (Player Y)) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [start game v]\ncreate fore\nforever\n    set [touching fore v] to [0]\n    broadcast (Check Touching Fore v) and wait\n    if <(touching Fore) > [0]> then\n        set [see foreground? v] to [0]\n    else\n        set [see foreground? v] to [1]\n    end\nend\n\nwhen I receive [check touching fore v]\nif <touching (middle v)?> then\n    change [touching fore v] by (1)\nend\n\n@Middle\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nrepeat (30)\n    go to [back v] layer\nend\n\n@Yoshi Costumes\n\nshow\ngo to [front v] layer\nswitch costume to (yoshi_stand v)\nforever\n    wait (.06) seconds\n    next costume\n    if <(costume [name v]) = [Yoshi_Walk_3]> then\n        wait (.06) seconds\n        switch costume to (yoshi_stand v)\n    end\n    if <key (space v) pressed?> then\n        switch costume to (yoshi_tongue v)\n        wait until <not <key (space v) pressed?>>\n        switch costume to (yoshi_stand v)\n    end\nend\n\n@Testing\n\n
☁ Multiplayer Platformer ☁\nPlay with other players and enjoy upgrading by standing on different colored platforms!\n\nFirst 4k Viewed Project! Thank you so much :)\n\nControls:\nArrow keys or WASD keys - Move around\nX key - Dispose of your powerup\nSpace - Use your special power up\nZ - See a list with player names and other debug info\nR - See your LOCAL fps (This number does not apply to other players on your screen! They are much slower!)\n\nLoved by:\n@The-Green-Dragon\n@Game_M-A-K-E-R\n\nAnnouncement!\nAnybody playing on laptops or low-processing power devices may experience lag and strange physics. Sorry for the inconvenience, I am adding a solution into the game to fix this!\n\nCredits:\nMusic - TheFatRat (Prelude)\n@griffpatch - The Super Cool Catwalk cycle and the inspiration\n@Superfireninja9 (Myself) - Everything else!\n\nPlease leave a Love and a Favorite if you like this game. Could you please leave a comment if there are any bugs or requests for the game. :) Also, you'll never know if I am playing!\n\nUpdates: \n7/17/20 - Made some major changes to the scrolling, so now you don't see the parts of the level disappearing/reappearing, as they come into sight!\n7/17/20 - Changed some scripts to speed up the scrolling of the level, making the game less laggy!\n6/24/20 - Changed the Frog Physics to make it better (NOT FINISHED)\n6/24/20 - Added the Frog skin the the Frog Upgrade\n6/24/20 - Fixed Flat Cat through the floor glitch\n6/22/20 - Disabled Wall Sliding\n6/14/20 - Fixed a Bowling Ball Glitch\n6/09/20 - Re-Added the Predetermined chat with a ton of chat options :)\n6/07/20 - Added "Moon Blob" powerup!\n6/07/20 - Added EVEN MORE to the level. You might not see it, but it's there! :)\n6/06/20 - Added one more upgrade (Rocket), added more map!\n6/03/20 - Fixed the Flying Cat physics!\n5/28/20 - Disabled predetermined chat. Too many possible messages to try and add\n5/27/20 - Fixed Multiplayer!\n5/21/20 - Added Music (TheFatRat)\n5/20/20 - Added scripts to improve LOCAL fps. (30 fps). This means that YOUR player and your player only is moving at that speed. The players around you are moving at about 8 - 10 fps. (Due to cloud variable delay)\n5/03/20 - Added @C0D3r_n's script for making the chat better.\n5/03/20 - The Bowling Ball Cat can now smash you!\n5/03/20 - Added UFO and Bowling Ball Cat!\n5/02/20 - Added safe, predetermined chat!\n5/02/20 - New Thumbnail\n5/02/20 - Fixed flying cat glitch\n5/02/20 - Made the map much bigger\n5/02/20 - Recolored map and changed the background\n4/30/20 - Eight players can now join!\n4/30/20 - Added some more upgrades and made ground green\n4/29/20 - Initial release\n\nThings to fix:\n\nThe Heavy Astronaut glitch - This means that when there is an upgrade with a lower gravity value, then the ground shakes - Not fixed yet.\n\nFaster FPS on both ends - Your player on your screen is updating at 30 fps. But the players around you are updating at about 10 fps. (Due to Cloud Variable restrictions). I know how to make this much faster, but it will cost about 0.1 seconds of delay of cloud updating - UPDATE: I have created an amazing cloud multiplayer engine that can support 50+ players, and is 3 times smoother than this game. Check it out my other profile, @mathNinja9\n\n\nTags:\n\n#multiplayer #platformer #superfireninja9 #fun #upgrades #powerups #cloud-multiplayer\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n