Zoids Platformer Multiplayer (cloud)(unfinish)
@Stage\n\nwhen I receive [save game v]\ndelete (all) of [_savemydata v]\nbroadcast (save achievements v) and wait\nbroadcast (save my data now v) and wait\n\nwhen [l v] key pressed\n\n    if <(Lag Prevention) = [off]> then\n        set [lag prevention v] to [on]\n        show variable [lag prevention v]\n    else\n        set [lag prevention v] to [off]\n        wait (1) seconds\n        hide variable [lag prevention v]\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop v)\nif <<(username) = [griffpatch]> or <(username) = [griffpatch_tutor]>> then\n    set [glitches v] to [0]\n    show variable [glitches v]\nelse\n    hide variable [glitches v]\nend\nhide variable [glitches v]\nset [lag prevention v] to [off]\nhide variable [lag prevention v]\nhide variable [power v]\nhide variable [coins v]\nhide variable [game mode v]\nshow list [high score table v]\n\n@Blank\n\n@The Player\n\ndefine Do Jump?\nif <key (up arrow v) pressed?> then\n    if <(Can Jump?) > [0]> then\n        if <(Size) < [1]> then\n            set [is jumping? v] to [9]\n        else\n            set [is jumping? v] to [8]\n        end\n        set [can jump? v] to [0]\n        if <(On Wall) = [0]> then\n            add [1] to [new achievement v]\n        else\n            add [2] to [new achievement v]\n        end\n    end\n    if <(Is Jumping?) > [0]> then\n        if <(Is Jumping?) > [1]> then\n            if <<(Player Mode) = [10]> or <(Player Mode) = [11]>> then\n                set [speed y v] to [6]\n            else\n                if <(Player Mode) = [2]> then\n                    set [speed y v] to [11.5]\n                else\n                    set [speed y v] to [9]\n                end\n            end\n        end\n    end\nelse\n    set [is jumping? v] to [0]\n    if <<(Player Mode) = [10]> or <(Player Mode) = [11]>> then\n        set [can jump? v] to [2]\n    end\nend\nif <(Can Jump?) > [0]> then\n    change [can jump? v] by (-1)\nend\nif <(Is Jumping?) > [1]> then\n    change [is jumping? v] by (-1)\nend\nif <(Player Mode) = [2]> then\n    if <(Is Jumping?) > [0]> then\n        set [speed x v] to ((Speed X) * (2))\n    else\n        set [speed x v] to ((Speed X) * (0.75))\n    end\nend\nif <(In Water) > [0]> then\n    if <key (down arrow v) pressed?> then\n        change [speed y v] by (-0.13)\n    end\nend\n\nwhen [n v] key pressed\nif <(Show Names) > [1]> then\n    set [show names v] to [0]\nelse\n    change [show names v] by (2)\nend\nbroadcast (toggle player names v)\n\ndefine Check Talk\nif <(Talk #) > [0]> then\n    if <(timer) > (TalkTimeout)> then\n        say []\n        set [talk # v] to [0]\n    end\nend\n\nwhen [r v] key pressed\nRe Spawn Player\nadd [25] to [new achievement v]\n\nwhen flag clicked\nwait (1) seconds\nset [number of players v] to [0]\nset [offset scroll v] to [0]\nset [lagwarn # v] to [0]\ndelete (all) of [_savemydata v]\nadd [2] to [_savemydata v]\nadd [9999] to [_savemydata v]\nbroadcast (@get my ranking v) and wait\nbroadcast (load my data v) and wait\nbroadcast (load achievements v) and wait\nbroadcast (@allocate gaming slot v) and wait\nif <(Level #) = [1]> then\n    set [spawn x v] to [0]\n    set [spawn y v] to [-43]\nelse\n    set [spawn x v] to ((7) * (470))\n    set [spawn y v] to [43]\nend\nset [whoisit # v] to [0]\nset [player mode v] to [0]\nset [show names v] to [2]\nset [talktimeout v] to [0]\nset [talk # v] to [0]\nset [idletime v] to (timer)\nRe Spawn Player\nPosition Player <>\nbroadcast (init level v) and wait\ngo [backward v] (1000) layers\nshow\nswitch costume to (hit mask2 v)\nset [ghost v] effect to (100)\nif <([me index v] of [save game v]) > [64]> then\n    if <([myscore v] of [save game v]) > [0]> then\n        broadcast (save game v) and wait\n    end\nend\nGame Loop\n\ndefine Set Zoom (zoom) at (x) (y)\nset [wantsize v] to (zoom)\nchange [player y v] by ((11) - ((11) * (Size)))\nchange [player y v] by (((11) * (zoom)) - (11))\nset size to ((zoom) * (100)) %\nHit Check (Player X) (Player Y) (1) (zoom)\nif <(Hit) > [-99999]> then\n    if <(x) > [10]> then\n        set [player x v] to (x)\n        set [player y v] to (y)\n        set [size v] to (zoom)\n    else\n        set size to ((Size) * (100)) %\n        change [player y v] by ((11) - ((11) * (zoom)))\n        change [player y v] by (((11) * (Size)) - (11))\n    end\nelse\n    set [size v] to (zoom)\nend\n\ndefine Re Spawn Player\nset [player x v] to (Spawn X)\nset [player y v] to (Spawn Y)\nset [scroll x v] to (Spawn X)\nset [scroll y v] to (Spawn Y)\nset [next scr x v] to (Spawn X)\nset [next scr y v] to (Spawn Y)\nset [speed x v] to [0]\nset [speed y v] to [0]\nset [can jump? v] to [0]\nset [frame v] to [0]\nset [player mode v] to [0]\nset [player mode fuel v] to [0]\nset [on wall v] to [0]\nset [zoom v] to [1]\nset [size v] to [1]\nset [wantsize v] to [1]\nset [minscry v] to [0]\nhide variable [power v]\nset [invert v] to [0]\nset [senddelay v] to [0]\nset [game mode v] to [0]\nset [_airlevel v] to [26]\nset [wall jump timer v] to [0]\nset [ufo_pull v] to [0]\nset [fromwater v] to [0]\nswitch costume to (hit mask2 v)\nset size to (100) %\nbroadcast (game mode change v) and wait\n\ndefine Position Player <even?>\ngo to x: ((Player X) - (Next Scr X)) y: (round ((Player Y) - (Next Scr Y)))\n\ndefine Calculate Costume\nif <<(Player Mode) = [0]> or <(Player Mode) = [3]>> then\n    set [nextcostume # v] to (([abs v] of ((([floor v] of (Frame) ) mod (4)) - (1)) ) + (1))\nelse\n    if <(Player Mode) = [1]> then\n        set [nextcostume # v] to ((5) + (Frame))\n    else\n        if <(Player Mode) = [5]> then\n            set [nextcostume # v] to ((25) + (Frame))\n        else\n            if <(Player Mode) = [6]> then\n                set [nextcostume # v] to ((27) + (Frame))\n            else\n                if <(Player Mode) = [7]> then\n                    set [nextcostume # v] to ((28) + (Frame))\n                else\n                    if <(Player Mode) = [2]> then\n                        if <(Is Jumping?) = [0]> then\n                            set [nextcostume # v] to ((([floor v] of ((Frame) * (1)) ) mod (9)) + (7))\n                        else\n                            set [nextcostume # v] to [16]\n                        end\n                    else\n                        if <(Player Mode) = [8]> then\n                            set [nextcostume # v] to (([abs v] of ((([floor v] of ((Frame) * (0.3)) ) mod (4)) - (1)) ) + (30))\n                        else\n                            if <(Player Mode) = [9]> then\n                                set [nextcostume # v] to (([abs v] of ((([floor v] of ((Frame) * (0.6)) ) mod (4)) - (1)) ) + (33))\n                            else\n                                if <(Player Mode) = [10]> then\n                                    set [nextcostume # v] to ((([floor v] of ((Frame) * (0.5)) ) mod (2)) + (36))\n                                else\n                                    if <(Player Mode) = [11]> then\n                                        set [nextcostume # v] to ((([floor v] of ((Frame) * (0.5)) ) mod (2)) + (38))\n                                    else\n                                        if <(Player Mode) = [12]> then\n                                            if <(direction) > [0]> then\n                                                set [nextcostume # v] to ((([floor v] of ((Frame) * (0.5)) ) mod (2)) + (40))\n                                            else\n                                                set [nextcostume # v] to ((([floor v] of ((Frame) * (0.5)) ) mod (2)) + (42))\n                                            end\n                                        else\n                                            if <(Player Mode) = [13]> then\n                                                set [nextcostume # v] to [44]\n                                            else\n                                                if <(Player Mode) = [14]> then\n                                                    if <<(Is Jumping?) > [0]> and <(Speed Y) > [-4]>> then\n                                                        if <(Speed Y) > [4]> then\n                                                            set [nextcostume # v] to [47]\n                                                        else\n                                                            set [nextcostume # v] to [45]\n                                                        end\n                                                    else\n                                                        set [nextcostume # v] to ((([floor v] of (((Frame) + (3)) * (0.3)) ) mod (2)) + (45))\n                                                    end\n                                                else\n                                                    if <(Player Mode) = [15]> then\n                                                        if <<key (space v) pressed?> and <(Speed X) = [0]>> then\n                                                            set [nextcostume # v] to [52]\n                                                        else\n                                                            set [nextcostume # v] to ((([floor v] of ((Frame) * (0.5)) ) mod (4)) + (48))\n                                                        end\n                                                    else\n                                                        if <(Player Mode) = [16]> then\n                                                            if <(Can Jump?) > [0]> then\n                                                                set [nextcostume # v] to [53]\n                                                            else\n                                                                if <([abs v] of ([direction v] of [tool v]) ) > [33]> then\n                                                                    set [nextcostume # v] to [54]\n                                                                else\n                                                                    set [nextcostume # v] to [55]\n                                                                end\n                                                            end\n                                                        else\n                                                            if <(Player Mode) = [17]> then\n                                                                set [nextcostume # v] to [56]\n                                                                if <(Can Jump?) > [1]> then\n                                                                    change [nextcostume # v] by ([ceiling v] of ((((Can Jump?) - (1)) / (14)) * (3)) )\n                                                                    if <(action) > [0]> then\n                                                                        change [nextcostume # v] by (3)\n                                                                    end\n                                                                end\n                                                                if <(Speed X) < [0]> then\n                                                                    change [nextcostume # v] by (7)\n                                                                end\n                                                            else\n                                                                if <(Player Mode) = [18]> then\n                                                                    if <(Can Jump?) = [0]> then\n                                                                        if <(Speed Y) < [0]> then\n                                                                            set [nextcostume # v] to [78]\n                                                                        else\n                                                                            set [nextcostume # v] to [77]\n                                                                        end\n                                                                    else\n                                                                        if <(Speed X) = [0]> then\n                                                                            set [nextcostume # v] to (([abs v] of ((([floor v] of ((timer) * (5)) ) mod (4)) - (1)) ) + (70))\n                                                                        else\n                                                                            set [nextcostume # v] to (([abs v] of ((([floor v] of ((Frame) * (0.5)) ) mod (6)) - (2)) ) + (73))\n                                                                        end\n                                                                    end\n                                                                else\n                                                                    if <(Player Mode) = [19]> then\n                                                                        set [nextcostume # v] to [79]\n                                                                    else\n                                                                        if <(Is Jumping?) = [0]> then\n                                                                            if <(Frame) = [0]> then\n                                                                                set [nextcostume # v] to ((17) + (Invert))\n                                                                            else\n                                                                                set [nextcostume # v] to (((([floor v] of ((Frame) * (0.5)) ) mod (3)) + (18)) + (Invert))\n                                                                            end\n                                                                        else\n                                                                            set [nextcostume # v] to ((18) + (Invert))\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Do UFO or Fish <isufo>\nif <<isufo> or <(In Water) > [0]>> then\n    set [gravity v] to [0]\n    if <<key (up arrow v) pressed?> and <(Speed Y) < [6]>> then\n        change [speed y v] by (0.2)\n    else\n        if <<key (down arrow v) pressed?> and <(Speed Y) > [-6]>> then\n            change [speed y v] by (-0.2)\n        else\n            set [speed y v] to ((Speed Y) * (0.95))\n        end\n    end\n    if <isufo> then\n        if <(Player Mode) = [19]> then\n            change [speed y v] by ((0.1) * ([sin v] of ((timer) * (180)) ))\n        else\n            set [frame v] to [0]\n            if <<key (space v) pressed?> and <<(Size) = [1]> and <(Player Mode) = [7]>>> then\n                set [frame v] to [1]\n            end\n        end\n    else\n        if <(pick random (1) to (30)) = [1]> then\n            change [speed y v] by (pick random (-0.3) to (0.3))\n        end\n    end\nelse\n    if <key (up arrow v) pressed?> then\n        if <<(On Wall) = [0]> and <(Can Jump?) > [0]>> then\n            if <(Player Mode) = [9]> then\n                set [is jumping? v] to [1000]\n            else\n                set [is jumping? v] to [8]\n            end\n            set [can jump? v] to [0]\n            add [40] to [new achievement v]\n        end\n        if <(Is Jumping?) > [1]> then\n            set [speed y v] to [7]\n        end\n    else\n        set [is jumping? v] to [0]\n    end\n    if <(Can Jump?) > [0]> then\n        change [can jump? v] by (-1)\n    end\n    if <(Is Jumping?) > [1]> then\n        change [is jumping? v] by (-1)\n    end\n    if <(Is Jumping?) > [0]> then\n        if <(Player Mode) = [9]> then\n            set [speed x v] to ((Speed X) * (2))\n        else\n            set [speed x v] to ((Speed X) * (0.9))\n        end\n    else\n        if <(Can Jump?) > [0]> then\n            set [speed x v] to [0]\n        end\n    end\nend\n\nif <(_TalkMode) > [1000]> then\n    set [talk # v] to ((_TalkMode) - (1000))\n    set [_talkmode v] to [0]\n    set [talktimeout v] to ((timer) + (4))\n    set [senddelay v] to [0]\n    say (item (Talk #) of [_safechat v])\n    add [3] to [new achievement v]\n    if <<(Player Mode) = [6]> and <(item (Talk #) of [_safechat v]) = [Nyan nyan nyan!!!]>> then\n        add [16] to [new achievement v]\n    end\nelse\n    if <(Talk #) > [0]> then\n        if <(timer) > (TalkTimeout)> then\n            say []\n            set [talk # v] to [0]\n        end\n    end\nend\n\nwhen I receive [log chat v]\nsay (Filtered Chat)\nadd [3] to [new achievement v]\nset [talk # v] to ((_TalkMode) - (1000))\nif <(Player Mode) = [6]> then\n    if <(Talk #) = [35]> then\n        add [16] to [new achievement v]\n    end\nend\nset [talktimeout v] to ((timer) + (4))\nset [senddelay v] to [0]\nset [_talkmode v] to [0]\n\ndefine Game Loop\nset [time v] to ((timer) - (0.1))\nset [_tick v] to [1]\nset [frames v] to [0]\nrepeat until <((timer) - (IdleTime)) > [200]>\n    set [calc_tick v] to (round (((timer) - (Time)) / (0.1)))\n    change [time v] by ((calc_tick) * (0.034))\n    if <(calc_tick) < [1]> then\n        wait (0.015) seconds\n    end\n    if <(calc_tick) < [2]> then\n        set [_tick v] to [1]\n        if <(frames) > [0]> then\n            change [frames v] by (-1)\n        end\n    else\n        if <(Lag Prevention) = [off]> then\n            change [frames v] by (6)\n            set [_tick v] to [1]\n            if <<(frames) > [400]> and <(lagWarn #) < [20]>> then\n                add [lag] to [new achievement v]\n                set [frames v] to [0]\n                change [lagwarn # v] by (1)\n            end\n        else\n            if <(calc_tick) > (_Tick)> then\n            set [_tick v] to (calc_tick)\n            wait (0.002) seconds\n        end\n    end\n    broadcast (@update multiplayer v) and wait\n    set [number of players v] to ([@player count v] of [multiplayer v])\n    Do Player Tick\n    Check Talk\n    broadcast (tick v) and wait\nend\ngo to x: (0) y: (0)\npoint in direction (90)\nswitch costume to (timeout v)\ngo to [front v] layer\nstop [all v]\n\nwhen [x v] key pressed\nif <<(Game Mode) = [1]> and <(Player Mode) = [1]>> then\n    stop [this script v]\nend\nif <(Player Mode) = [13]> then\n    if <(Size) < [1]> then\n        Collect Power Up (4) (120) (0.25) at (Player X) (Player Y)\n        add [56] to [new achievement v]\n    else\n        Collect Power Up (4) (5) (0.5) at (Player X) (Player Y)\n    end\nelse\n    if <(Player Mode) > [0]> then\n        hide variable [power v]\n        set [player mode v] to [0]\n        set [invert v] to [0]\n        Set Zoom (1) at (1) (1)\n        switch costume to (hit mask2 v)\n        hide variable [fuel v]\n        add [24] to [new achievement v]\n        if <(Game Mode) > [0]> then\n            set [game mode v] to [0]\n            broadcast (game mode change v) and wait\n        end\n    end\nend\n\ndefine Collect Power Up (mode) (time) (zoom) at (x) (y)\nif <(mode) < [0]> then\n    if <<(Player Mode) = [0]> or <<(Player Mode) = [10]> or <(Player Mode) = [11]>>> then\n        set [player mode v] to ((0) - (mode))\n    end\nelse\n    set [player mode v] to (mode)\nend\nif <(mode) > [0]> then\n    set [fromwater v] to [0]\nend\nif <(Player Mode) = [12]> then\n    set [can jump? v] to [30]\nend\nset [player mode fuel v] to (time)\nset [power v] to (Player Mode Fuel)\nset [frame v] to [0]\nset [invert v] to [0]\nshow variable [power v]\nif <(direction) > [0]> then\n    point in direction (90)\nelse\n    point in direction (-90)\nend\nif <(Player Mode) = [14]> then\n    switch costume to (hit mask3 v)\nelse\n    if <(Player Mode) = [19]> then\n        switch costume to (hit mask eyes v)\n    else\n        if <not <(costume [number v]) = [1]>> then\n            switch costume to (hit mask2 v)\n        end\n    end\nend\nSet Zoom (zoom) at (x) (y)\nif <(Game Mode) > [2]> then\n    broadcast (game mode change v)\n    set [game mode v] to [0]\n    set [coins v] to [0]\n    hide variable [coins v]\nend\n\ndefine Do Player Tick\nif <not <(WantSize) = (Size)>> then\n    Set Zoom (WantSize) at (1) (1)\nend\nrepeat (_Tick)\n    if <(Game Mode) = [11]> then\n        set size to (60) %\n        if <touching (enemy v)?> then\n            wait (0.5) seconds\n            repeat until <not <key (any v) pressed?>>\n                wait (0.1) seconds\n            end\n            set [player x v] to [3314]\n            set [player y v] to [1398]\n            set [scroll x v] to (Player X)\n            set [scroll y v] to (Player Y)\n            set [next scr x v] to (Player X)\n            set [next scr y v] to (Player Y)\n            set [speed y v] to [4]\n            Collect Power Up (18) (120) (1) at (1) (1)\n            set [game mode v] to [11]\n            broadcast (game mode change v)\n        end\n        set size to (100) %\n    end\n    if <(Player Mode) = [17]> then\n        set [gravity v] to [-1]\n        Do Snail (prev Angle)\n    else\n        if <<(Player Mode) = [10]> or <(Player Mode) = [11]>> then\n            set [gravity v] to [-0.3]\n        else\n            set [gravity v] to [-1]\n        end\n        if <(Wall Jump Timer) > [0]> then\n            change [wall jump timer v] by (-1)\n        else\n            if <(Player Mode) = [16]> then\n                Do Toad\n            else\n                if <key (left arrow v) pressed?> then\n                    if <(direction) > [0]> then\n                        point in direction (-90)\n                        set [senddelay v] to [0]\n                    end\n                    set [speed x v] to [-4]\n                    change [frame v] by (0.5)\n                    set [idletime v] to (timer)\n                else\n                    if <key (right arrow v) pressed?> then\n                        if <(direction) < [0]> then\n                            point in direction (90)\n                            set [senddelay v] to [0]\n                        end\n                        set [speed x v] to [4]\n                        change [frame v] by (0.5)\n                        set [idletime v] to (timer)\n                    else\n                        if <<(Player Mode) = [10]> or <(Player Mode) = [11]>> then\n                            set [speed x v] to ((0.95) * (Speed X))\n                            change [frame v] by (0.25)\n                        else\n                            if <not <<(Player Mode) = [6]> or <(Player Mode) = [12]>>> then\n                                set [speed x v] to [0]\n                                set [frame v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        if <(Player Mode) = [12]> then\n            Do Flappy\n        else\n            if <(Player Mode) = [6]> then\n                Do Nyan\n            else\n                if <<(Player Mode) = [8]> or <(Player Mode) = [9]>> then\n                    Do UFO or Fish \n                else\n                    if <<<(Player Mode) = [7]> or <(Player Mode) = [13]>> or <(Player Mode) = [19]>> then\n                        Do UFO or Fish \n                    else\n                        if <<(Player Mode) = [1]> or <(Player Mode) = [5]>> then\n                            Do Jet Pack\n                        else\n                            if <(Player Mode) = [16]> then\n                                Do Toad\n                            else\n                                Do Jump?\n                                if <(Player Mode) = [4]> then\n                                    set [speed x v] to ((Speed X) * (0.8))\n                                else\n                                    if <(Player Mode) = [18]> then\n                                        set [speed x v] to ((Speed X) * (1.6))\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        if <not <<(Suck X) = [0]> and <(Suck Y) = [0]>>> then\n            set [speed x v] to (Suck X)\n            set [speed y v] to (Suck Y)\n            set [suck x v] to [0]\n            set [suck y v] to [0]\n        end\n        if <<(In Water) > [0]> and <not <<(Player Mode) = [8]> or <(Player Mode) = [9]>>>> then\n            set [gravity v] to [0.1]\n            set [speed y v] to ((Speed Y) * (0.98))\n        end\n        if <(Player Mode) = [8]> then\n            set [movemul v] to ((zoom) / (Size))\n        else\n            set [movemul v] to ((zoom) * (Size))\n        end\n        Move Player ((Speed X) * (moveMul)) (0) ((zoom) * (Size)) (moveMul)\n        change [speed y v] by (gravity)\n        if <(Speed Y) < [-14]> then\n            set [speed y v] to [-14]\n        end\n        if <not <(Speed Y) = [0]>> then\n            Move Player (0) ((Speed Y) * (moveMul)) ((zoom) * (Size)) (moveMul)\n        end\n    end\n    if <<(Player Mode) > [1]> and <not <(Player Mode) = [5]>>> then\n        change [player mode fuel v] by (-0.03333)\n        set [power v] to (round (Player Mode Fuel))\n        if <not <(Player Mode Fuel) > [0]>> then\n            hide variable [power v]\n            if <(Player Mode) = [12]> then\n                add [52] to [new achievement v]\n                set [player x v] to [-96]\n                set [player y v] to [1296]\n                set [next scr x v] to (Player X)\n                set [next scr y v] to (Player Y)\n                set [speed x v] to [0]\n                set [speed y v] to [0]\n            end\n            set [player mode v] to [0]\n            set [invert v] to [0]\n            Set Zoom (1) at (1) (1)\n            switch costume to (hit mask2 v)\n            if <<(Game Mode) = [3]> or <<(Game Mode) = [5]> or <<(Game Mode) = [7]> or <<(Game Mode) = [9]> or <(Game Mode) = [11]>>>>> then\n                broadcast (game mode change v)\n                set [game mode v] to [0]\n                set [coins v] to [0]\n                hide variable [coins v]\n            end\n        end\n    end\n    if <<(In Water) > [0]> and <not <<(Player Mode) = [8]> or <(Player Mode) = [9]>>>> then\n        change [_airlevel v] by (-0.05)\n        if <(_AirLevel) < [0]> then\n            Re Spawn Player\n        end\n    else\n        set [_airlevel v] to [26]\n    end\n    Check Touch Zones\n    Calculate Costume\n    if <(Player Y) < [-180]> then\n        Re Spawn Player\n        add [4] to [new achievement v]\n    end\n    if <(Player Y) > [1930]> then\n        if <(Player Mode) = [9]> then\n            add [44] to [new achievement v]\n        end\n        Re Spawn Player\n        add [5] to [new achievement v]\n    end\n    Send Data\nend\nif <(Game Mode) = [2]> then\n    set [game mode v] to [0]\n    set [coins v] to [0]\n    hide variable [coins v]\n    add [32] to [new achievement v]\n    broadcast (fish dash won v)\nend\nif <(Game Mode) = [4]> then\n    set [game mode v] to [0]\n    set [coins v] to [0]\n    hide variable [coins v]\n    add [47] to [new achievement v]\n    broadcast (game mode change v)\n    Collect Power Up (11) (150) (1.4) at (0) (0)\nend\nif <(Game Mode) = [6]> then\n    set [game mode v] to [0]\n    set [coins v] to [0]\n    hide variable [coins v]\n    add [49] to [new achievement v]\n    set [player mode v] to [0]\n    Set Zoom (1.01) at (1) (1)\n    broadcast (game mode change v)\nend\nif <(Game Mode) = [8]> then\n    set [game mode v] to [0]\n    set [coins v] to [0]\n    hide variable [coins v]\n    add [59] to [new achievement v]\n    set [power v] to [300]\n    Set Zoom (1.01) at (1) (1)\n    broadcast (game mode change v)\nend\nif <(Game Mode) = [10]> then\n    set [game mode v] to [0]\n    set [coins v] to [0]\n    hide variable [coins v]\n    add [64] to [new achievement v]\n    set [player mode fuel v] to [300]\n    set [power v] to [300]\n    Set Zoom (1.01) at (1) (1)\n    broadcast (game mode change v)\nend\nif <(Game Mode) = [12]> then\n    set [game mode v] to [0]\n    set [coins v] to [0]\n    hide variable [coins v]\n    add [67] to [new achievement v]\n    set [player mode fuel v] to [999]\n    set [power v] to [999]\n    Set Zoom (1.01) at (1) (1)\n    broadcast (game mode change v)\nend\nrepeat (_Tick)\n    if <(Game Mode) = [1]> then\n        set [next scr x v] to (round ((((Next Scr X) * (7)) + ((Player X) + (200))) / (8)))\n        set [next scr y v] to (round ((((Next Scr Y) * (4)) + (0)) / (5)))\n    else\n        if <(Player Mode) = [16]> then\n            set [next scr x v] to (round ((((Next Scr X) * (7)) + ((Player X) + ((120) * ([sin v] of ([direction v] of [tool v]) )))) / (8)))\n            set [next scr y v] to (round ((((Next Scr Y) * (4)) + ((Player Y) + ((80) * ([cos v] of ([direction v] of [tool v]) )))) / (5)))\n        else\n            set [next scr x v] to (round ((((Next Scr X) * (7)) + ((Player X) + (Offset Scroll))) / (8)))\n            set [next scr y v] to (round ((((Next Scr Y) * (4)) + (Player Y)) / (5)))\n        end\n    end\nend\nif <(Next Scr Y) < (minScrY)> then\n    set [next scr y v] to (minScrY)\nend\nif <(Next Scr Y) > [1750]> then\n    set [next scr y v] to [1750]\nend\nif <(Next Scr X) < [0]> then\n    set [next scr x v] to [0]\nend\nPosition Player <>\n\ndefine Do Nyan\nset [frame v] to [0]\nset [gravity v] to [0]\nset [speed x v] to (round ((direction) / (10)))\nset [speed y v] to [0]\nif <key (up arrow v) pressed?> then\n    change [speed y v] by (8)\nend\nif <key (down arrow v) pressed?> then\n    change [speed y v] by (-8)\nend\n\ndefine Do Flappy\nset [senddelay v] to [0]\nif <(direction) > [0]> then\n    set [speed x v] to [5]\nelse\n    set [speed x v] to [-5]\nend\nif <<key (up arrow v) pressed?> and <(Can Jump?) > [-1]>> then\n    set [speed y v] to [10]\nend\nif <(Can Jump?) > [0]> then\n    change [can jump? v] by (-1)\n    set [speed y v] to [1]\n    if <(direction) > [0]> then\n        point in direction (90)\n    else\n        point in direction (-90)\n    end\n    if <(Can Jump?) = [0]> then\n        set [speed y v] to [11]\n    end\nelse\n    if <(direction) > [0]> then\n        if <(Speed Y) > [-5]> then\n            if <(direction) > [90]> then\n                turn left (30) degrees\n            else\n                point in direction (60)\n            end\n        else\n            if <(direction) < [170]> then\n                turn right (7) degrees\n            end\n        end\n    else\n        if <(Speed Y) > [-5]> then\n            if <(direction) < [-90]> then\n                turn right (30) degrees\n            else\n                point in direction (-60)\n            end\n        else\n            if <(direction) > [-170]> then\n                turn left (7) degrees\n            end\n        end\n    end\nend\n\ndefine Hit Check (x) (y) (my) (zoom)\nif <touching (level v)?> then\n    set [hit v] to [1]\nelse\n    set [hit v] to [-99999]\nend\n\ndefine Move Player (sx) (sy) (zoom) (movemul)\nif <(Invert) = [0]> then\n    set [my v] to [1]\nelse\n    set [my v] to [-1]\nend\nchange [player x v] by (sx)\nchange [player y v] by ((sy) * (my))\nPosition Player \nHit Check (Player X) (Player Y) (my) (zoom)\nif <(Hit) = [-99999]> then\n    set [prevx v] to (Player X)\n    set [prevy v] to (Player Y)\n    stop [this script v]\nend\nif <(sx) = [0]> then\n    set [speed y v] to [0]\nend\nif <(Hit) = [1]> then\n    set [wall jump timer v] to [0]\n    if <(sy) > [-6]> then\n        set [tmp v] to [6]\n    else\n        set [tmp v] to ((6) - (sy))\n    end\n    repeat (tmp)\n        change [player y v] by (my)\n        Position Player \n        Hit Check (Player X) (Player Y) (my) (zoom)\n        if <(Hit) = [-99999]> then\n            if <(sx) = [0]> then\n                if <(Player Mode) = [12]> then\n                    set [can jump? v] to [-1]\n                else\n                    set [can jump? v] to [5]\n                    set [on wall v] to [0]\n                end\n            end\n            set [stuckcount v] to [0]\n            set [player y v] to (round (Player Y))\n            if <(Player Mode) = [12]> then\n                set [player mode fuel v] to [0]\n            end\n            stop [this script v]\n        end\n    end\n    change [player y v] by ((((-1) * (my)) * (tmp)) - ((sy) * (my)))\n    if <<(sy) = [0]> and <(Player Mode) = [19]>> then\n        repeat (4)\n            change [player y v] by (-1)\n            Position Player \n            Hit Check (Player X) (Player Y) (my) (zoom)\n            if <(Hit) = [-99999]> then\n                set [stuckcount v] to [0]\n                set [player y v] to (round (Player Y))\n                stop [this script v]\n            end\n        end\n        change [player y v] by (4)\n    end\n    change [player x v] by ((0) - (sx))\n    Position Player \n    Hit Check (Player X) (Player Y) (my) (zoom)\n    if <(Hit) > [-99999]> then\n        change [stuckcount v] by (1)\n        if <(stuckCount) > [8]> then\n            broadcast (trapped! v)\n            set [stuckcount v] to [0]\n        end\n    else\n        set [stuckcount v] to [0]\n    end\nelse\n    if <(((Hit) - (Player Y)) * (my)) < ((movemul) * (10))> then\n        set [player y v] to (Hit)\n        if <(sx) = [0]> then\n            if <(Player Mode) = [12]> then\n                set [player mode fuel v] to [0]\n                set [can jump? v] to [-1]\n            else\n                set [can jump? v] to [5]\n                set [on wall v] to [0]\n            end\n        end\n        set [stuckcount v] to [0]\n        stop [this script v]\n    else\n        change [player x v] by ((0) - (sx))\n        change [player y v] by ((0) - ((sy) * (my)))\n        Position Player \n        Hit Check (Player X) (Player Y) (my) (zoom)\n        if <(Hit) > [-99999]> then\n            set [player x v] to (prevX)\n            set [player y v] to (prevY)\n            change [stuckcount v] by (1)\n            if <(stuckCount) > [8]> then\n                broadcast (trapped! v)\n                set [stuckcount v] to [0]\n            end\n        else\n            set [prevx v] to (Player X)\n            set [prevy v] to (Player Y)\n            set [stuckcount v] to [0]\n            if <(Player Mode) = [12]> then\n                set [player mode fuel v] to [0]\n            end\n        end\n    end\nend\nif <(In Water) > [0]> then\n    set [on wall v] to [0]\nend\nif <<<(sx) = [0]> and <(sy) < [0]>> or <<(Player Mode) = [2]> or <(Player Mode) = [12]>>> then\n    set [on wall v] to [0]\nelse\n    if <<(Player Mode) = [16]> or <<(Player Mode) = [15]> and <(Size) > [1]>>> then\n        set [on wall v] to [0]\n    else\n        if <(sy) > [0]> then\n            set [can jump? v] to [0]\n        else\n            if <(Speed Y) < [0]> then\n                set [speed y v] to ((Speed Y) * (0.5))\n                set [speed x v] to ((0) - (sx))\n            end\n            if <(sx) > [0]> then\n                if <(On Wall) < [1]> then\n                    set [on wall v] to [8]\n                    set [can jump? v] to [6]\n                end\n            else\n                if <(On Wall) > [-1]> then\n                    set [on wall v] to [-8]\n                    set [can jump? v] to [6]\n                end\n            end\n        end\n    end\nend\n\ndefine Achieve Giant Station\nadd [11] to [new achievement v]\nif <(Player Mode) = [1]> then\n    add [33] to [new achievement v]\nelse\n    if <(Player Mode) = [2]> then\n        add [37] to [new achievement v]\n    else\n        if <(Player Mode) = [4]> then\n            add [39] to [new achievement v]\n        else\n            if <(Player Mode) = [5]> then\n                add [35] to [new achievement v]\n            else\n                if <(Player Mode) = [6]> then\n                    add [42] to [new achievement v]\n                else\n                    if <(Player Mode) = [7]> then\n                        add [36] to [new achievement v]\n                    else\n                        if <(Player Mode) = [8]> then\n                            add [38] to [new achievement v]\n                        else\n                            if <(Player Mode) = [9]> then\n                                add [38] to [new achievement v]\n                            else\n                                if <(Player Mode) = [14]> then\n                                    add [58] to [new achievement v]\n                                else\n                                    if <(Player Mode) = [19]> then\n                                        add [68] to [new achievement v]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Do Jet Pack\nif <(Player Mode) = [5]> then\n    set [speed x v] to ((Speed X) * (1.5))\nend\nset [gravity v] to [-0.5]\nset [frame v] to [0]\nif <(Game Mode) = [1]> then\n    if <(Player X) < [9090]> then\n        set [speed x v] to [5]\n        if <key (up arrow v) pressed?> then\n            if <(Speed Y) < [6]> then\n                change [speed y v] by (1.5)\n            end\n            set [frame v] to [1]\n        end\n    else\n        set [player x v] to [5310]\n        set [player y v] to [160]\n        set [scroll x v] to (Player X)\n        set [scroll y v] to (Player Y)\n        set [next scr x v] to (Player X)\n        set [next scr y v] to (Player Y)\n        set [speed y v] to [4]\n        set [game mode v] to [0]\n        add [17] to [new achievement v]\n        if <(Coins) = [0]> then\n            Collect Power Up (5) (400) (1) at (1) (1)\n            add [18] to [new achievement v]\n        end\n        broadcast (game mode change v)\n    end\nelse\n    if <<(Player X) > [5960]> and <<(Player X) < [6060]> and <(Player Y) < [180]>>> then\n        set [game mode v] to [1]\n        broadcast (jet pack joyride v)\n    end\n    if <key (up arrow v) pressed?> then\n        if <(Speed Y) < [4]> then\n            change [speed y v] by (2)\n        end\n        change [player mode fuel v] by (-0.03333)\n        set [power v] to (round (Player Mode Fuel))\n        if <not <(Player Mode Fuel) > [0]>> then\n            hide variable [power v]\n            set [player mode v] to [0]\n            Set Zoom (1) at (1) (1)\n            broadcast (game mode change v)\n        end\n        set [frame v] to [1]\n    end\nend\n\ndefine Achieve Mini Station\nadd [10] to [new achievement v]\nif <(Player Mode) = [1]> then\n    add [7] to [new achievement v]\nelse\n    if <(Player Mode) = [2]> then\n        add [9] to [new achievement v]\n    else\n        if <(Player Mode) = [4]> then\n            add [13] to [new achievement v]\n        else\n            if <(Player Mode) = [5]> then\n                add [19] to [new achievement v]\n            else\n                if <(Player Mode) = [6]> then\n                    add [15] to [new achievement v]\n                else\n                    if <(Player Mode) = [7]> then\n                        add [30] to [new achievement v]\n                    else\n                        if <(Player Mode) = [8]> then\n                            add [41] to [new achievement v]\n                        else\n                            if <(Player Mode) = [9]> then\n                                add [41] to [new achievement v]\n                            else\n                                if <(Player Mode) = [12]> then\n                                    add [50] to [new achievement v]\n                                else\n                                    if <(Player Mode) = [16]> then\n                                        add [62] to [new achievement v]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [fish dash won v]\nCollect Power Up (9) (600) (1) at (1) (1)\n\nwhen [space v] key pressed\nif <(Player Mode) = [4]> then\n    if <(Can Jump?) > [0]> then\n        set [invert v] to ((4) - (Invert))\n        set [can jump? v] to [0]\n        add [22] to [new achievement v]\n    end\nend\n\ndefine Send Data\nif <(UFO_Pull) = [0]> then\n    add (round (Player X)) to [@broadcast v]\n    add (round (Player Y)) to [@broadcast v]\nelse\n    add [-999] to [@broadcast v]\n    add (UFO_Pull) to [@broadcast v]\nend\nadd (round (nextCostume #)) to [@broadcast v]\nif <(SendDelay) < [1]> then\n    add (round (direction)) to [@broadcast v]\n    add ((Size) * (100)) to [@broadcast v]\n    add (round (Talk #)) to [@broadcast v]\n    if <(WhoIsIT #) = ([@player id v] of [multiplayer v])> then\n        change [whoisittimer v] by (1)\n        add (round (WhoIsItTimer)) to [@broadcast v]\n    else\n        add [0] to [@broadcast v]\n    end\n    add (([count v] of [announcer v]) + (1)) to [@broadcast v]\n    set [senddelay v] to [7]\nelse\n    change [senddelay v] by (-1)\nend\nif <([@player id v] of [multiplayer v]) > [0]> then\n    set [tmp v] to (([@player id v] of [multiplayer v]) * (PMul))\n    replace item ((tmp) + (0)) of [players v] with (username)\n    replace item ((tmp) + (1)) of [players v] with (Player X)\n    replace item ((tmp) + (2)) of [players v] with (Player Y)\nend\nadd [@TICK] to [@broadcast v]\n\nwhen I receive [hide all v]\nhide\n\ndefine Check Touch Zones\nif <not <(Player Mode) = [1]>> then\n    if <<([abs v] of ((Player X) - (5310)) ) < [20]> and <([abs v] of ((Player Y) - (83)) ) < [20]>> then\n        Collect Power Up (1) (20) (1) at (5310) (76)\n        add [6] to [new achievement v]\n    end\nend\nif <not <(Player Mode) = [2]>> then\n    if <<([abs v] of ((Player X) - (2778)) ) < [20]> and <([abs v] of ((Player Y) - (462)) ) < [20]>> then\n        Collect Power Up (2) (30) (1) at (2775) (456)\n        add [8] to [new achievement v]\n    end\nend\nif <not <(Size) > [1]>> then\n    if <<([abs v] of ((Player X) - (5174)) ) < [40]> and <([abs v] of ((Player Y) - (1377)) ) < [70]>> then\n        set [player y v] to [1395]\n        if <(Player Mode) = [12]> then\n            Collect Power Up (15) (100) (1.8) at (5172) (1395)\n            add [60] to [new achievement v]\n        else\n            if <(Size) < [1]> then\n                Collect Power Up (-3) (45) (1.8) at (5172) (1395)\n                add [43] to [new achievement v]\n            else\n                Collect Power Up (-3) (45) (1.8) at (5172) (1395)\n            end\n        end\n        Achieve Giant Station\n    end\nend\nif <not <(Size) < [1]>> then\n    if <<([abs v] of ((Player X) - (4362)) ) < [20]> and <([abs v] of ((Player Y) - (248)) ) < [20]>> then\n        if <(Player Mode) = [10]> then\n            Collect Power Up (14) (240) (1) at (1) (1)\n            add [57] to [new achievement v]\n            set [game mode v] to [7]\n            broadcast (game mode change v)\n        else\n            if <not <(Player Mode) = [14]>> then\n                if <(Player Mode) = [15]> then\n                    add [61] to [new achievement v]\n                    Achieve Mini Station\n                    Collect Power Up (-3) (45) (0.9) at (1) (1)\n                else\n                    Achieve Mini Station\n                    Collect Power Up (-3) (60) (0.5) at (1) (1)\n                end\n            end\n        end\n    end\nend\nif <not <(Player Mode) = [4]>> then\n    if <<([abs v] of ((Player X) - (2570)) ) < [20]> and <([abs v] of ((Player Y) - (834)) ) < [20]>> then\n        Collect Power Up (4) (60) (1) at (2570) (828)\n        add [12] to [new achievement v]\n    end\nend\nif <not <<(Player Mode) = [6]> or <(Player Mode) = [18]>>> then\n    if <<([abs v] of ((Player X) - (3312)) ) < [20]> and <([abs v] of ((Player Y) - (1329)) ) < [20]>> then\n        if <(Player Mode) = [2]> then\n            Collect Power Up (18) (120) (1) at (1) (1)\n            add [66] to [new achievement v]\n            set [game mode v] to [11]\n            broadcast (game mode change v)\n        else\n            Collect Power Up (6) (45) (1) at (1) (1)\n            add [14] to [new achievement v]\n        end\n    end\nend\nif <not <(Player Mode) = [7]>> then\n    if <<([abs v] of ((Player X) - (1762)) ) < [20]> and <([abs v] of ((Player Y) - (335)) ) < [20]>> then\n        if <not <(Player Mode) = [13]>> then\n            if <(Player Mode) = [4]> then\n                if <(Size) < [1]> then\n                    Collect Power Up (13) (120) (1) at (1764) (330)\n                    add [55] to [new achievement v]\n                end\n            else\n                Collect Power Up (7) (90) (1) at (1764) (330)\n                add [29] to [new achievement v]\n            end\n        end\n    end\nend\nif <not <(Player Mode) = [8]>> then\n    if <<([abs v] of ((Player X) - (1548)) ) < [28]> and <([abs v] of ((Player Y) - (230)) ) < [28]>> then\n        Collect Power Up (8) (120) (1) at (1) (1)\n        add [31] to [new achievement v]\n    end\nend\nif <not <(Player Mode) = [10]>> then\n    if <<([abs v] of ((Player X) - (3421)) ) < [28]> and <([abs v] of ((Player Y) - (1822)) ) < [28]>> then\n        Collect Power Up (10) (130) (1) at (3421) (1822)\n        add [46] to [new achievement v]\n        broadcast (flower game v)\n    end\nend\nif <not <(Player Mode) = [12]>> then\n    if <<([abs v] of ((Player X) - (-24)) ) < [28]> and <([abs v] of ((Player Y) - (1332)) ) < [28]>> then\n        Collect Power Up (12) (240) (1) at (-24) (1332)\n        add [48] to [new achievement v]\n        set [game mode v] to [5]\n        broadcast (game mode change v)\n    end\nend\nif <<([abs v] of ((Player X) - (5190)) ) < [20]> and <([abs v] of ((Player Y) - (90)) ) < [10]>> then\n    replace item (1) of [trigger v] with ((timer) + (0.5))\n    add [20] to [new achievement v]\nend\nif <<([abs v] of ((Player X) - (2157)) ) < [20]> and <([abs v] of ((Player Y) - (-87)) ) < [10]>> then\n    replace item (2) of [trigger v] with ((timer) + (3))\n    add [21] to [new achievement v]\nend\nif <<([abs v] of ((Player X) - (-150)) ) < [20]> and <([abs v] of ((Player Y) - (1269)) ) < [10]>> then\n    replace item (3) of [trigger v] with ((timer) + (10))\n    add [54] to [new achievement v]\n    if <(fromWater) > [0]> then\n        add [53] to [new achievement v]\n    end\nend\nif <<([abs v] of ((Player X) - (2125)) ) < [35]> and <([abs v] of ((Player Y) - (337)) ) < [20]>> then\n    add [23] to [new achievement v]\n    if <(Player Mode) = [4]> then\n        add [27] to [new achievement v]\n    end\nend\nif <<([abs v] of ((Player X) - (5292)) ) < [50]> and <([abs v] of ((Player Y) - (-135)) ) < [30]>> then\n    add [26] to [new achievement v]\n    if <<not <(item (26) of [achieved v]) < [300]>> and <(((item (26) of [achieved v]) + (1)) mod (300)) < [5]>> then\n        Collect Power Up (16) (240) (1) at (0) (0)\n    end\nend\nif <<([abs v] of ((Player X) - (4368)) ) < [40]> and <([abs v] of ((Player Y) - (-74)) ) < [40]>> then\n    add [28] to [new achievement v]\nend\nif <<([abs v] of ((Player X) - (4266)) ) < [20]> and <([abs v] of ((Player Y) - (-152)) ) < [10]>> then\n    if <not <(Player Mode) = [17]>> then\n        add [63] to [new achievement v]\n        Collect Power Up (17) (150) (1) at (0) (0)\n        set [game mode v] to [9]\n        broadcast (game mode change v)\n    end\nend\nif <(Player Mode) = [16]> then\n    if <<([abs v] of ((Player X) - (848)) ) < [90]> and <([abs v] of ((Player Y) - (505)) ) < [40]>> then\n        if <<(Size) = [1]> and <(Can Jump?) > [0]>> then\n            add [65] to [new achievement v]\n            Set Zoom (1.01) at (1) (1)\n            set [player mode fuel v] to [300]\n        end\n    end\nend\nif <<<([abs v] of ((Player X) - (732)) ) < [942]> and <(Player Y) < [494]>> and <not <<(Player Mode) = [16]> or <(Player Mode) = [19]>>>> then\n    if <(Player Mode) = [0]> then\n        set [fromwater v] to [1]\n    else\n        set [fromwater v] to [0]\n    end\n    if <<(Player Mode) > [0]> and <not <<<(Player Mode) > [7]> and <(Player Mode) < [10]>> or <(Player Mode) = [17]>>>> then\n        hide variable [power v]\n        set [player mode v] to [0]\n        set [invert v] to [0]\n        Set Zoom (1) at (1) (1)\n        switch costume to (hit mask2 v)\n        hide variable [fuel v]\n        if <(Game Mode) > [0]> then\n            set [game mode v] to [0]\n            broadcast (game mode change v)\n        end\n    end\n    if <<(Player Mode) = [9]> and <<(In Water) = [0]> and <(Size) < [1]>>> then\n        add [45] to [new achievement v]\n    end\n    set [in water v] to [1]\nelse\n    if <<(Player Mode) = [8]> or <(Player Mode) = [9]>> then\n        \n            hide variable [power v]\n            set [player mode v] to [0]\n            set [invert v] to [0]\n            Set Zoom (1) at (1) (1)\n            hide variable [fuel v]\n            broadcast (game mode change v)\n        end\n    end\n    set [in water v] to [0]\nend\n\nset [spawn x v] to [-96]\nset [spawn y v] to [1260]\n\ndefine Do Toad\nset [ufo_pull v] to [0]\nif <([smoosh v] of [tool v]) > [0]> then\n    set [tmp v] to (([sqrt v] of ([smoosh v] of [tool v]) ) * (30))\n    set [speed x v] to (([sin v] of ([direction v] of [tool v]) ) * (tmp))\n    set [speed y v] to (([cos v] of ([direction v] of [tool v]) ) * (tmp))\n    set [is jumping? v] to [8]\n    set [can jump? v] to [-1]\nelse\n    if <(Can Jump?) > [0]> then\n        set [speed x v] to [0]\n        if <([direction v] of [tool v]) > [0]> then\n            point in direction (90)\n        else\n            point in direction (-90)\n        end\n    end\nend\n\ndefine Do Snail (prev angle)\nset [senddelay v] to [0]\nset [ufo_pull v] to [0]\nset [head x v] to [0]\nset [head y v] to [0]\nswitch costume to (dot24 v)\nturn left (90) degrees\nset [prev angle v] to (direction)\nset [tmp v] to (direction)\ngo to x: ((Player X) - (Next Scr X)) y: ((Player Y) - (Next Scr Y))\nif <(Can Jump?) > [0]> then\n    if <key (down arrow v) pressed?> then\n        set [can jump? v] to [0]\n    else\n        move (-4) steps\n        if <touching (level v)?> then\n            move (4) steps\n            if <key (up arrow v) pressed?> then\n                set [action v] to [0]\n                if <(Can Jump?) > [0.5]> then\n                    if <(Can Jump?) < [15]> then\n                        change [can jump? v] by (1)\n                        turn right (90) degrees\n                        move ((Speed X) * (16)) steps\n                        turn left (90) degrees\n                        move (8) steps\n                        if <touching (level v)?> then\n                            go to x: ((Player X) - (Next Scr X)) y: ((Player Y) - (Next Scr Y))\n                            set [can jump? v] to [0.5]\n                        else\n                            move ((Can Jump?) * (5)) steps\n                            set [head x v] to ((x position) + (Next Scr X))\n                            set [head y v] to ((y position) + (Next Scr Y))\n                            if <touching (level v)?> then\n                                repeat until <not <touching (level v)?>>\n                                    move (-1) steps\n                                end\n                                turn right (180) degrees\n                                Settle Level (direction)\n                                turn left (90) degrees\n                                set [tmp v] to (direction)\n                                set [can jump? v] to [0.5]\n                                set [player x v] to ((x position) + (Next Scr X))\n                                set [player y v] to ((y position) + (Next Scr Y))\n                                set [speed x v] to ((0) - (Speed X))\n                            else\n                                go to x: ((Player X) - (Next Scr X)) y: ((Player Y) - (Next Scr Y))\n                            end\n                        end\n                    end\n                end\n            else\n                if <key (space v) pressed?> then\n                    set [action v] to [1]\n                    if <(Can Jump?) > [0.5]> then\n                        if <(Can Jump?) < [15]> then\n                            change [can jump? v] by (1)\n                            turn right ((Speed X) * (85)) degrees\n                            move (((Can Jump?) * (5)) + (8)) steps\n                            set [head x v] to ((x position) + (Next Scr X))\n                            set [head y v] to ((y position) + (Next Scr Y))\n                            if <<(Can Jump?) = [15]> and <not <touching (level v)?>>> then\n                                move (((Can Jump?) * (-5)) + (-8)) steps\n                                turn right ((Speed X) * (10)) degrees\n                                move (((Can Jump?) * (5)) + (8)) steps\n                                turn right ((Speed X) * (85)) degrees\n                            end\n                            if <touching (level v)?> then\n                                repeat until <not <touching (level v)?>>\n                                    move (-1) steps\n                                end\n                                Settle Level (direction)\n                                turn left (90) degrees\n                                set [tmp v] to (direction)\n                                set [can jump? v] to [0.5]\n                                set [player x v] to ((x position) + (Next Scr X))\n                                set [player y v] to ((y position) + (Next Scr Y))\n                            else\n                                go to x: ((Player X) - (Next Scr X)) y: ((Player Y) - (Next Scr Y))\n                                point in direction (tmp)\n                            end\n                        end\n                    end\n                else\n                    set [can jump? v] to [1]\n                    set [action v] to [0]\n                end\n            end\n        else\n            set [can jump? v] to [0]\n            move (4) steps\n        end\n    end\nend\nif <(Can Jump?) = [0]> then\n    turn left ((direction) / (3)) degrees\n    turn right (90) degrees\n    change [speed y v] by (gravity)\n    if <(Speed Y) < [-14]> then\n        set [speed y v] to [-14]\n    end\n    change [player y v] by (Speed Y)\n    go to x: ((Player X) - (Next Scr X)) y: ((Player Y) - (Next Scr Y))\n    if <touching (level v)?> then\n        repeat until <not <touching (level v)?>>\n            change [player y v] by (1)\n            change y by (1)\n            set [speed y v] to [0]\n            set [can jump? v] to [1]\n        end\n        Settle Level ((direction) - (90))\n    end\n    stop [this script v]\nend\nif <key (left arrow v) pressed?> then\n    set [speed x v] to [-1]\n    if <(Can Jump?) > [1]> then\n        set [can jump? v] to [1]\n    end\nelse\n    if <key (right arrow v) pressed?> then\n        set [speed x v] to [1]\n        if <(Can Jump?) > [1]> then\n            set [can jump? v] to [1]\n        end\n    else\n        turn right (90) degrees\n        stop [this script v]\n    end\nend\nset [pci v] to ((Speed X) * (90))\nturn right (pci) degrees\nmove (4) steps\nrepeat (8)\n    set [pci v] to ((pci) / (2))\n    if <touching (level v)?> then\n        move (-4) steps\n        turn left (pci) degrees\n    else\n        move (-4) steps\n        turn right (pci) degrees\n    end\n    move (4) steps\nend\nif <touching (level v)?> then\n    move (-4) steps\n    turn left (pci) degrees\n    move (4) steps\nend\nturn right ((Speed X) * (-90)) degrees\nset [tmp v] to (((((tmp) - (direction)) + (180)) mod (360)) - (180))\nif <([abs v] of (tmp) ) < [25]> then\n    turn right ((tmp) / (1.2)) degrees\nelse\n    if <([abs v] of (tmp) ) < [90]> then\n        turn right ((tmp) / (1.3)) degrees\n    end\nend\nturn right (90) degrees\nset [player x v] to ((x position) + (Next Scr X))\nset [player y v] to ((y position) + (Next Scr Y))\n\ndefine Settle Level (dir)\npoint in direction (dir)\nmove (-4) steps\nif <(direction) < [0]> then\n    set [pci v] to [-5]\nelse\n    set [pci v] to [5]\nend\nif <touching (level v)?> then\n    repeat until <not <touching (level v)?>>\n        move (4) steps\n        turn left (pci) degrees\n        move (-4) steps\n    end\n    move (4) steps\n    set [min v] to (direction)\n    point in direction (dir)\n    move (-4) steps\nelse\n    repeat until <touching (level v)?>\n        move (4) steps\n        turn right (pci) degrees\n        move (-4) steps\n    end\n    set [min v] to ((direction) - (pci))\nend\nrepeat until <not <touching (level v)?>>\n    move (4) steps\n    turn right (pci) degrees\n    move (-4) steps\nend\nmove (4) steps\nset [max v] to (direction)\nif <<(min) > (max)> = <(pci) > [0]>> then\n    if <(min) > (max)> then\n        change [min v] by (-360)\n    else\n        change [min v] by (360)\n    end\nend\npoint in direction (((min) + (max)) / (2))\nturn right (90) degrees\n\nwhen [any v] key pressed\nif <key (left arrow v) pressed?> then\n    set [idletime v] to (timer)\nend\nif <key (right arrow v) pressed?> then\n    set [idletime v] to (timer)\nend\nif <key (up arrow v) pressed?> then\n    set [idletime v] to (timer)\nend\nif <key (down arrow v) pressed?> then\n    set [idletime v] to (timer)\nend\n\nwhen I receive [eaten v]\nCollect Power Up (19) (40) (1) at (1) (1)\nset [speed y v] to [6]\n\n@Avatar\n\nwhen I receive [tick v]\ngo to x: ((Player X) - (Next Scr X)) y: (round ((Player Y) - (Next Scr Y)))\nset [nextcostume # v] to ([nextcostume # v] of [the player v])\nif <not <(nextCostume #) = (costume [number v])>> then\n    if <(LR) = <<<(nextCostume #) > [39]> and <(nextCostume #) < [44]>> or <<(nextCostume #) > [55]> and <(nextCostume #) < [70]>>>> then\n        if <(LR) = [true]> then\n            set [lr v] to [false]\n            set rotation style [all around v]\n        else\n            set [lr v] to [true]\n            set rotation style [left-right v]\n        end\n    end\n    switch costume to (nextCostume #)\nend\nif <not <(direction) = ([direction v] of [the player v])>> then\n    point in direction ([direction v] of [the player v])\nend\nif <not <(size) = ([size v] of [the player v])>> then\n    set size to ([size v] of [the player v]) %\n    if <not <(size) = [101]>> then\n        set [color v] effect to (0)\n    end\nend\nif <(size) = [101]> then\n    change [color v] effect by (5)\nend\n\nwhen flag clicked\nshow\ngo to [front v] layer\nset rotation style [left-right v]\nset [lr v] to [true]\nswitch costume to (walk1 v)\n\nwhen I receive [init level v]\nwait (0) seconds\nwait (0) seconds\ngo to [front v] layer\n\n@Level\n\nwhen flag clicked\nset [zoom v] to [1]\nset [triggerid v] to [0]\nset [trapped v] to [0]\nif <(username) = [griffpatch]> then\n    set [level # v] to [2]\nelse\n    set [level # v] to [1]\nend\nset [level # v] to [2]\ngo to x: (0) y: (0)\nset [shown v] to [0]\nhide\ndelete (all) of [trigger v]\nadd [0] to [trigger v]\nadd [0] to [trigger v]\nadd [0] to [trigger v]\nDo Cloning\n\nset [max_lx v] to [20]\nset [max_ly v] to [7]\n\ndefine GetCostume (ox) (oy)\nset [tile id v] to ((ox) + (((oy) * (MAX_LX)) + (1)))\nset [costume name v] to [02]\nif <(ox) < [10]> then\n    set [costume name v] to (join (Costume Name) (join [.0] (ox)))\nelse\n    set [costume name v] to (join (Costume Name) (join [.] (ox)))\nend\nif <(oy) < [10]> then\n    set [costume name v] to (join (Costume Name) (join [.0] (oy)))\nelse\n    set [costume name v] to (join (Costume Name) (join [.] (oy)))\nend\nif <(Costume Name) = [02.11.00]> then\n    set [triggerid v] to [1]\nelse\n    if <(Costume Name) = [02.05.00]> then\n        set [triggerid v] to [2]\n    else\n        if <(Costume Name) = [02.00.04]> then\n            set [triggerid v] to [3]\n        else\n            set [triggerid v] to [0]\n        end\n    end\nend\nif <<(TriggerID) > [0]> and <(item (TriggerID) of [trigger v]) > (timer)>> then\n    set [costume name v] to (join [@] (Costume Name))\nend\n\ndefine Do Cloning\nswitch costume to (dot v)\nset [tile id v] to [0]\nset [offset x v] to [0]\nset [offset y v] to [0]\ncreate clone of (_myself_ v)\nset [offset x v] to [470]\nset [offset y v] to [0]\ncreate clone of (_myself_ v)\nset [offset x v] to [0]\nset [offset y v] to [350]\ncreate clone of (_myself_ v)\nset [offset x v] to [470]\nset [offset y v] to [350]\n\ndefine Position and Show (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    if <(shown) = [0]> then\n        set [shown v] to [1]\n        show\n    end\nelse\n    if <(shown) = [1]> then\n        set [shown v] to [0]\n        hide\n    end\nend\n\nwhen I receive [tick v]\ntick\n\ndefine tick\nset [scroll x v] to (Next Scr X)\nset [scroll y v] to (Next Scr Y)\nrepeat until <((Offset X) - (Scroll X)) > [-471]>\n    change [offset x v] by (940)\n    set [tile id v] to [0]\nend\nrepeat until <((Offset X) - (Scroll X)) < [471]>\n    change [offset x v] by (-940)\n    set [tile id v] to [0]\nend\nrepeat until <((Offset Y) - (Scroll Y)) > [-351]>\n    change [offset y v] by (700)\n    set [tile id v] to [0]\nend\nrepeat until <((Offset Y) - (Scroll Y)) < [351]>\n    change [offset y v] by (-700)\n    set [tile id v] to [0]\nend\nif <(TriggerID) > [0]> then\n    if <(letter (1) of (Costume Name)) = [@]> then\n        if <(item (TriggerID) of [trigger v]) < (timer)> then\n            set [tile id v] to [0]\n        end\n    else\n        if <(item (TriggerID) of [trigger v]) > (timer)> then\n            set [tile id v] to [0]\n        end\n    end\nend\nif <(Tile ID) = [0]> then\n    GetCostume ((Offset X) / (470)) ((Offset Y) / (350))\n    switch costume to (dot v)\n    switch costume to (Costume Name)\nend\nif <(Tile ID) > [0]> then\n    Position and Show ([floor v] of ((Offset X) - (Scroll X)) ) ([floor v] of ((Offset Y) - (Scroll Y)) )\nend\n\nwhen I receive [trapped! v]\nif <(TriggerID) > [0]> then\n    set [trapped v] to ((timer) + (3))\n    if <(TriggerID) = [2]> then\n        replace item (TriggerID) of [trigger v] with ((timer) + (3))\n    else\n        replace item (TriggerID) of [trigger v] with [0]\n    end\nend\n\nwhen I receive [hide all v]\nhide\n\n@Background\n\nwhen flag clicked\nset [zoom v] to [1]\nset [level # v] to [2]\ngo to x: (0) y: (0)\nset [shown v] to [0]\nhide\nDo Cloning\n\nset [max_lx v] to [20]\nset [max_ly v] to [7]\n\ndefine None\nset [tile id v] to ((ox) + (((oy) * (MAX_LX)) + (1)))\nset [costume name v] to [02]\nif <(ox) < [10]> then\n    set [costume name v] to (join (Costume Name) (join [.0] (ox)))\nelse\n    set [costume name v] to (join (Costume Name) (join [.] (ox)))\nend\nif <(oy) < [10]> then\n    set [costume name v] to (join (Costume Name) (join [.0] (oy)))\nelse\n    set [costume name v] to (join (Costume Name) (join [.] (oy)))\nend\n\nwhen I receive [tick v]\ntick\n\nwhen I receive [hide all v]\nhide\n\ndefine None\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    if <(shown) = [0]> then\n        set [shown v] to [1]\n        show\n    end\nelse\n    if <(shown) = [1]> then\n        set [shown v] to [0]\n        hide\n    end\nend\n\ngo [backward v] (1000) layers\n\ndefine Do Cloning\nswitch costume to (dot v)\nset [tile id v] to [0]\nset [offset x v] to [0]\nset [offset y v] to [0]\ncreate clone of (_myself_ v)\nset [offset x v] to [470]\nset [offset y v] to [0]\ncreate clone of (_myself_ v)\nset [offset x v] to [0]\nset [offset y v] to [350]\ncreate clone of (_myself_ v)\nset [offset x v] to [470]\nset [offset y v] to [350]\n\ndefine tick\nset [scroll x v] to (Next Scr X)\nset [scroll y v] to (Next Scr Y)\nrepeat until <((Offset X) - (Scroll X)) > [-471]>\n    change [offset x v] by (940)\n    set [tile id v] to [0]\nend\nrepeat until <((Offset X) - (Scroll X)) < [471]>\n    change [offset x v] by (-940)\n    set [tile id v] to [0]\nend\nrepeat until <((Offset Y) - (Scroll Y)) > [-351]>\n    change [offset y v] by (700)\n    set [tile id v] to [0]\nend\nrepeat until <((Offset Y) - (Scroll Y)) < [351]>\n    change [offset y v] by (-700)\n    set [tile id v] to [0]\nend\nif <(Tile ID) = [0]> then\n    GetCostume ((Offset X) / (470)) ((Offset Y) / (350))\n    switch costume to (dot v)\n    switch costume to (Costume Name)\nend\nif <(Tile ID) > [0]> then\n    Position and Show ([floor v] of ((Offset X) - (Scroll X)) ) ([floor v] of ((Offset Y) - (Scroll Y)) )\nend\n\n@Parallax\n\nwhen flag clicked\nset [sprwid v] to [470]\nset [hsw v] to (sprWid)\ngo to x: (0) y: (0)\ngo [backward v] (100) layers\nhide\nDo Cloning\n\nwhen I receive [tick v]\nset [looping x v] to (((((Offset X) - ((Next Scr X) / (2))) + (hsw)) mod ((sprWid) * (2))) - (hsw))\nPosition and Show ([floor v] of (Looping X) ) ([floor v] of ((Next Scr Y) / (-2)) )\n\ndefine Do Cloning\npoint in direction (90)\nswitch costume to (00.00.00 v)\nset [offset x v] to ((0) - (sprWid))\ncreate clone of (_myself_ v)\nswitch costume to (00.01.00 v)\nchange [offset x v] by (sprWid)\n\ndefine Position and Show (x) (y)\ngo to x: (x) y: (y)\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [init level v]\ngo [backward v] (100) layers\nshow\n\n@Other Players\n\nwhen I receive [init level v]\nclone\n\nwhen I receive [hide all v]\nhide\n\ndefine Do Player Tick <silent?>\nset [offset v] to (item (Player ID) of [@playeroffset v])\nrepeat (_Tick)\n    set [tmp v] to (item ((offset) + (0)) of [@playerdata v])\n    if <(tmp) = [-1]> then\n        replace item (PlayersOffset) of [players v] with []\n    else\n        if <(tmp) > [2]> then\n            set [px v] to (item ((offset) + (1)) of [@playerdata v])\n            set [py v] to (item ((offset) + (2)) of [@playerdata v])\n            if <(PX) = [-999]> then\n                set [px v] to ((PY) * (PMul))\n                set [py v] to ((item ((PX) + (2)) of [players v]) - (80))\n                set [px v] to (item ((PX) + (1)) of [players v])\n            end\n            set [cost v] to (item ((offset) + (3)) of [@playerdata v])\n            if <(tmp) > [3]> then\n                set [dir v] to (item ((offset) + (4)) of [@playerdata v])\n                if <(tmp) > [4]> then\n                    set [myzoom v] to ((item ((offset) + (5)) of [@playerdata v]) / (100))\n                    if <(tmp) > [5]> then\n                        if <(item ((offset) + (6)) of [@playerdata v]) > [0]> then\n                            set [say v] to (item (item ((offset) + (6)) of [@playerdata v]) of [_safechat v])\n                            set Say (say)\n                            set [talktimeout v] to ((timer) + (2))\n                        end\n                        if <(tmp) > [6]> then\n                            if <(item ((offset) + (7)) of [@playerdata v]) > [0]> then\n                                if <<(item ((offset) + (7)) of [@playerdata v]) < (WhoIsItTimer)> or <(WhoIsIT #) = (Player ID)>> then\n                                    set [whoisit # v] to (Player ID)\n                                    set [whoisittimer v] to (item ((offset) + (7)) of [@playerdata v])\n                                end\n                            end\n                            if <(tmp) > [7]> then\n                                if <not <(item ((offset) + (8)) of [@playerdata v]) = (Rank)>> then\n                                    set [rank v] to (item ((offset) + (8)) of [@playerdata v])\n                                    set [username v] to []\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [offset v] by ((tmp) + (1))\nend\n\n    if <not <(say) = (item ((PlayersOffset) + (3)) of [players v])>> then\n        set [say v] to (item ((PlayersOffset) + (3)) of [players v])\n        set [talktimeout v] to ((timer) + (3.5))\n    end\nend\nposition and hide (round ((PX) - (Next Scr X))) (round ((PY) - (Next Scr Y)))\nif <([abs v] of ((PX) - (5190)) ) < [20]> then\n    if <([abs v] of ((PY) - (86)) ) < [20]> then\n        if <(TRAPPED) < (timer)> then\n            replace item (1) of [trigger v] with ((timer) + (0.5))\n        end\n    end\nend\nif <([abs v] of ((PX) - (2157)) ) < [20]> then\n    if <([abs v] of ((PY) - (-87)) ) < [20]> then\n        if <(TRAPPED) < (timer)> then\n            replace item (2) of [trigger v] with ((timer) + (3))\n        end\n    end\nend\nif <([abs v] of ((PX) - (-150)) ) < [20]> then\n    if <([abs v] of ((PY) - (1269)) ) < [15]> then\n        if <(TRAPPED) < (timer)> then\n            replace item (3) of [trigger v] with ((timer) + (10))\n        end\n    end\nend\nreplace item ((PlayersOffset) + (1)) of [players v] with (PX)\nreplace item ((PlayersOffset) + (2)) of [players v] with (PY)\nreplace item ((PlayersOffset) + (4)) of [players v] with (x position)\nreplace item ((PlayersOffset) + (5)) of [players v] with (y position)\nreplace item ((PlayersOffset) + (6)) of [players v] with ((myZoom) * (100))\nif <<(WhoIsIT #) = (Player ID)> and <(WhoIsItTimer) > [10]>> then\n    if <([abs v] of ((PX) - (Player X)) ) < [40]> then\n        if <([abs v] of ((PY) - (Player Y)) ) < [40]> then\n            set [whoisit # v] to ([@player id v] of [multiplayer v])\n            set [whoisittimer v] to [1]\n            set [senddelay v] to [0]\n        end\n    end\nend\nif <<<(cost) = [29]> and <((timer) - ([idletime v] of [the player v])) > [0.4]>> and <not <(Player Mode) = [7]>>> then\n    if <(UFO_Pull) = (Player ID)> then\n        set [suck x v] to ((PX) - (Player X))\n        set [suck y v] to (((PY) - (80)) - (Player Y))\n    else\n        if <(UFO_Pull) = [0]> then\n            if <([abs v] of ((PX) - (Player X)) ) < [120]> then\n                if <([abs v] of ((Player Y) - ((PY) - (80))) ) < [80]> then\n                    set [ufo_pull v] to (Player ID)\n                end\n            end\n        end\n    end\nelse\n    if <(UFO_Pull) = (Player ID)> then\n        set [ufo_pull v] to [0]\n    end\nend\n\nwhen I receive [toggle player names v]\nset [username v] to []\nif <(TalkTimeout) < (timer)> then\n    replace item ((PlayersOffset) + (3)) of [players v] with []\nend\n\ndefine Do Tick\nif <<(TalkTimeout) > [0]> and <(timer) > (TalkTimeout)>> then\n    set [username v] to []\n    set [talktimeout v] to [0]\n    set Say []\nend\nif <(Player ID) = ([@player id v] of [multiplayer v])> then\n    if <(shown) = [1]> then\n        set Say []\n        set [shown v] to [0]\n        hide\n    end\nelse\n    if <not <(username) = (item (Player ID) of [@playernames v])>> then\n        set [username v] to (item (Player ID) of [@playernames v])\n        replace item (PlayersOffset) of [players v] with (username)\n        if <([show names v] of [the player v]) = [1]> then\n            set Say (username)\n        else\n            if <<([show names v] of [the player v]) = [2]> and <(Rank) > [0]>> then\n                set Say (join (username) (join [ #] ((Rank) - (1))))\n            end\n        end\n    end\n    if <(username) = []> then\n        replace item (PlayersOffset) of [players v] with []\n        if <(shown) = [1]> then\n            set Say []\n            set [shown v] to [0]\n            hide\n        end\n    else\n        Do Player Tick <>\n    end\nend\nif <<(shown) = [0]> and <(UFO_Pull) = (Player ID)>> then\n    set [ufo_pull v] to [0]\nend\n\nif <(item ((offset) + (6)) of [@playerdata v]) > [0]> then\n    set [say v] to (item (item ((offset) + (6)) of [@playerdata v]) of [_safechat v])\n    set [talktimeout v] to ((timer) + (2))\nend\n\nwhen I receive [tick v]\nDo Tick\n\ndefine position and hide (x) (y)\nif <not <(size) = (round (((100) * (myZoom)) / (zoom)))>> then\n    set size to (round (((100) * (myZoom)) / (zoom))) %\n    if <not <(size) = [101]>> then\n        set [color v] effect to (0)\n    end\nend\nif <(size) = [101]> then\n    change [color v] effect by (5)\nend\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <not <(cost) = []>> then\n        if <(costume [number v]) = [52]> then\n            if <not <<(Player Mode) = [15]> or <(Player Mode) = [19]>>> then\n                if <<(cost) > [47]> and <(cost) < [52]>> then\n                    if <([abs v] of (((PX) + ((direction) * (0.5))) - (Player X)) ) < [30]> then\n                        if <([abs v] of (((PY) + (22)) - (Player Y)) ) < [35]> then\n                            add [51] to [new achievement v]\n                            broadcast (Eaten v)\n                        end\n                    end\n                end\n            end\n        end\n        switch costume to (cost)\n        setLR\n    end\n    if <not <(dir) = (direction)>> then\n        point in direction (dir)\n    end\n    if <(shown) = [0]> then\n        set [shown v] to [1]\n        show\n    end\nelse\n    if <not <(Arrow#) = (costume [number v])>> then\n        switch costume to (arrow v)\n        setLR\n    end\n    set [tmp v] to ((y) * ((220) / ([abs v] of (x) )))\n    if <([abs v] of (tmp) ) < [166]> then\n        if <(x) > [0]> then\n            go to x: (220) y: (tmp)\n        else\n            go to x: (-220) y: (tmp)\n        end\n    else\n        set [tmp v] to ((x) * ((165) / ([abs v] of (y) )))\n        if <(y) > [0]> then\n            go to x: (tmp) y: (165)\n        else\n            go to x: (tmp) y: (-165)\n        end\n    end\n    point towards (the player v)\n    if <(shown) = [0]> then\n        set [shown v] to [1]\n        show\n    end\nend\n\ndefine setLR\nif <<(costume [number v]) = [4]> or <<<(cost) > [39]> and <(cost) < [44]>> or <<(cost) > [55]> and <(cost) < [70]>>>> then\n    if <(LR) = [true]> then\n        set [lr v] to [false]\n        set rotation style [all around v]\n    end\nelse\n    if <(LR) = [false]> then\n        set [lr v] to [true]\n        set rotation style [left-right v]\n    end\nend\n\ndefine clone\ngo to [front v] layer\nswitch costume to (arrow v)\nset [arrow# v] to (costume [number v])\nset rotation style [all around v]\nset [lr v] to [false]\nset [player id v] to [1]\nset [rank v] to [0]\nset [myzoom v] to [1]\nset [talktimeout v] to [0]\nset [say v] to []\nset [myzoom v] to [1]\nset [playersoffset v] to (PMul)\nset [shown v] to [0]\nrepeat (([@max players v] of [multiplayer v]) - (1))\n    create clone of (_myself_ v)\n    change [player id v] by (1)\n    change [playersoffset v] by (PMul)\nend\n\ndefine set Say (say)\nreplace item ((PlayersOffset) + (3)) of [players v] with (say)\nset [say v] to (say)\n\ndefine Init Players\nset [pmul v] to [7]\ndelete (all) of [players v]\nrepeat ((PMul) - (1))\n    add [0] to [players v]\nend\nrepeat ([@max players v] of [multiplayer v])\n    add [] to [players v]\n    add [0] to [players v]\n    add [0] to [players v]\n    add [] to [players v]\n    add [] to [players v]\n    add [] to [players v]\n    add [] to [players v]\nend\n\nwhen flag clicked\nhide\nInit Players\n\n@Other Think\n\nwhen flag clicked\nclone\n\ndefine clone\nset [ghost v] effect to (100)\ngo to [front v] layer\nswitch costume to (hit mask2 v)\nset rotation style [don't rotate v]\nset [player id v] to [1]\nset [say v] to []\nrepeat (([@max players v] of [multiplayer v]) - (1))\n    create clone of (_myself_ v)\n    change [player id v] by (1)\nend\n\nchange [playersoffset v] by (PMul)\n\nwhen I receive [tick v]\nset [off v] to ((PMul) * (Player ID))\nif <(item ((off) + (3)) of [players v]) = (say)> then\nif <(say) = []> then\n\nwhen I receive [toggle player names v]\nset [username v] to []\nif <(TalkTimeout) < (timer)> then\n    think []\nend\n\nset [off v] to ((PMul) * (Player ID))\nset [say v] to (item ((off) + (3)) of [players v])\n\n@Talk\n\nwhen flag clicked\nset [_talkmode v] to [0]\nHide All\nhide variable [achievements v]\n\nwhen [1 v] key pressed\nSelect Number (1)\n\nwhen [2 v] key pressed\nSelect Number (2)\n\nwhen [3 v] key pressed\nSelect Number (3)\n\nwhen [4 v] key pressed\nSelect Number (4)\n\ndefine Set Option (id) (txt)\nif <(id) = [1]> then\n    if <(txt) = []> then\n        hide variable [option1 v]\n    else\n        set [option1 v] to (txt)\n        show variable [option1 v]\n    end\nend\nif <(id) = [2]> then\n    if <(txt) = []> then\n        hide variable [option2 v]\n    else\n        set [option2 v] to (txt)\n        show variable [option2 v]\n    end\nend\nif <(id) = [3]> then\n    if <(txt) = []> then\n        hide variable [option3 v]\n    else\n        set [option3 v] to (txt)\n        show variable [option3 v]\n    end\nend\nif <(id) = [4]> then\n    if <(txt) = []> then\n        hide variable [option4 v]\n    else\n        set [option4 v] to (txt)\n        show variable [option4 v]\n    end\nend\nif <(id) = [5]> then\n    if <(txt) = []> then\n        hide variable [option5 v]\n    else\n        set [option5 v] to (txt)\n        show variable [option5 v]\n    end\nend\nif <(id) = [6]> then\n    if <(txt) = []> then\n        hide variable [option6 v]\n    else\n        set [option6 v] to (txt)\n        show variable [option6 v]\n    end\nend\nif <(id) = [7]> then\n    if <(txt) = []> then\n        hide variable [option7 v]\n    else\n        set [option7 v] to (txt)\n        show variable [option7 v]\n    end\nend\nif <(id) = [8]> then\n    if <(txt) = []> then\n        hide variable [option8 v]\n    else\n        set [option8 v] to (txt)\n        show variable [option8 v]\n    end\nend\nif <(id) = [9]> then\n    if <(txt) = []> then\n        hide variable [option9 v]\n    else\n        set [option9 v] to (txt)\n        show variable [option9 v]\n    end\nend\nif <(id) = [10]> then\n    if <(txt) = []> then\n        hide variable [option0 v]\n    else\n        set [option0 v] to (txt)\n        show variable [option0 v]\n    end\nend\nif <(id) = [11]> then\n    if <(txt) = []> then\n        hide variable [optiona v]\n    else\n        set [optiona v] to (txt)\n        show variable [optiona v]\n    end\nend\nif <(id) = [12]> then\n    if <(txt) = []> then\n        hide variable [optionb v]\n    else\n        set [optionb v] to (txt)\n        show variable [optionb v]\n    end\nend\nif <(id) = [13]> then\n    if <(txt) = []> then\n        hide variable [optionc v]\n    else\n        set [optionc v] to (txt)\n        show variable [optionc v]\n    end\nend\nif <(id) = [14]> then\n    if <(txt) = []> then\n        hide variable [optiond v]\n    else\n        set [optiond v] to (txt)\n        show variable [optiond v]\n    end\nend\nif <(id) = [15]> then\n    if <(txt) = []> then\n        hide variable [optione v]\n    else\n        set [optione v] to (txt)\n        show variable [optione v]\n    end\nend\n\ndefine Select Number (id)\nif <(_TalkMode) > [0]> then\n    if <not <(id) > (length of [options v])>> then\n        Hide All\n        set [_talkmode v] to ((item (id) of [options v]) + (1000))\n        set [filtered chat v] to (item (item (id) of [options v]) of [_safechat v])\n        if <not <(Filtered Chat) = []>> then\n            set [filtered chat v] to (join (username) (join [: ] (Filtered Chat)))\n            broadcast (log chat v) and wait\n        end\n        set [chatting v] to [2]\n    end\nend\nif <(_TalkMode) = [-1]> then\n    if <not <(id) > (length of [options v])>> then\n        set [_talkmode v] to (item (id) of [options v])\n        Show Sub Options\n    end\nend\nif <key (g v) pressed?> then\n    if <<(_TalkMode) = [0]> and <(username) = [griffpatch]>> then\n        if <(id) = [1]> then\n            set [player mode v] to [5]\n            set [player mode fuel v] to [1000]\n        end\n        if <(id) = [3]> then\n            set [player mode v] to [12]\n            set [player mode fuel v] to [1000]\n        end\n        if <(id) = [4]> then\n            set [player mode v] to [7]\n            set [player mode fuel v] to [1000]\n        end\n        if <(id) = [5]> then\n            set [player mode v] to [16]\n            set [player mode fuel v] to [1000]\n        end\n        if <(id) = [6]> then\n            set [player mode v] to [17]\n            set [player mode fuel v] to [1000]\n        end\n        if <(id) = [7]> then\n            set [player mode v] to [18]\n            set [player mode fuel v] to [1000]\n        end\n        if <(id) = [8]> then\n            set [player mode v] to [18]\n            set [player mode fuel v] to [1000]\n        end\n        if <(id) = [10]> then\n            set [whoisit # v] to ([@player id v] of [multiplayer v])\n            set [whoisittimer v] to [1]\n        end\n        if <(id) = [2]> then\n            replace item (2) of [trigger v] with ((timer) + (3))\n        end\n    end\n    if <<(_TalkMode) = [0]> and <(username) = [griffingirl2]>> then\n        if <(id) = [4]> then\n            set [player mode v] to [7]\n            set [player mode fuel v] to [1000]\n        end\n        if <(id) = [6]> then\n            set [player mode v] to [17]\n            set [player mode fuel v] to [1000]\n        end\n    end\nend\n\nwhen [6 v] key pressed\nSelect Number (6)\n\nwhen [7 v] key pressed\nSelect Number (7)\n\nwhen [8 v] key pressed\nSelect Number (8)\n\nwhen [9 v] key pressed\nSelect Number (9)\n\nwhen [0 v] key pressed\nSelect Number (10)\n\nwhen [5 v] key pressed\nSelect Number (5)\n\nwhen [a v] key pressed\nSelect Number (11)\n\nwhen [b v] key pressed\nSelect Number (12)\n\nwhen [c v] key pressed\nSelect Number (13)\n\nwhen [d v] key pressed\nSelect Number (14)\n\ndefine Show Sub Options\ndelete (all) of [options v]\nset [opt v] to [1]\nset [i v] to (_TalkMode)\nrepeat until <<(i) > (length of [_safechat v])> or <(item (i) of [_safechat v]) = []>>\n    Set Option (opt) (join (item (opt) of [key v]) (join [ ... ] (item (i) of [_safechat v])))\n    add (i) to [options v]\n    change [opt v] by (1)\n    change [i v] by (1)\nend\nrepeat until <(opt) > [14]>\n    Set Option (opt) []\n    change [opt v] by (1)\nend\n\ndefine Show Headings\nset [opt v] to [1]\nset [i v] to [1]\ndelete (all) of [options v]\nrepeat until <(i) > (length of [_safechat v])>\n    Set Option (opt) (join (item (opt) of [key v]) (join [ ... ] (item (i) of [_safechat v])))\n    add (i) to [options v]\n    change [opt v] by (1)\n    change [i v] by (1)\n    repeat until <<(i) > (length of [_safechat v])> or <(item (i) of [_safechat v]) = []>>\n        change [i v] by (1)\n    end\n    change [i v] by (1)\nend\nrepeat until <(opt) > [15]>\n    Set Option (opt) []\n    change [opt v] by (1)\nend\nset [offset scroll v] to [-40]\n\nwhen [t v] key pressed\nbroadcast (no v)\n\nif <(_TalkMode) = [0]> then\n    set [_talkmode v] to [-1]\n    hide variable [achievements v]\n    Show Headings\nelse\n    Hide All\n    set [_talkmode v] to [0]\nend\n\ndefine Hide All\nset [i v] to [1]\nrepeat (15)\n    Set Option (i) []\n    change [i v] by (1)\nend\nset [offset scroll v] to [0]\nshow variable [achievements v]\n\nwhen I receive [chat sent v]\nset [_talkmode v] to [0]\nset [filtered chat v] to []\n\nwhen [e v] key pressed\nSelect Number (15)\n\n@Safe Chat\n\nwhen I receive [reset blocked v]\nset [chatting v] to [3]\nset [filtered chat v] to [\(You must wait 30 seconds between resets\)]\n\nwhen [t v] key pressed\n\nset [chatting v] to [1]\nset [canhelp v] to [1]\nask [Filtered Safe Chat:] and wait\nset [canhelp v] to [0]\nswitch costume to (blank v)\nhide\nif <(answer) = []> then\n    set [chatting v] to [0]\nelse\n    Filter (join (answer) [ ])\n    if <not <(Filtered Chat) = []>> then\n        set [filtered chat v] to (join (username) (join [: ] (Filtered Chat)))\n        broadcast (Log Chat v) and wait\n    end\n    set [chatting v] to [2]\nend\n\ndefine None\nset [tile type v] to [0]\nset [i v] to [1]\nrepeat ([@max players v] of [multiplayer v])\n    if <not <(i) = ([@player id v] of [multiplayer v])>> then\n        set [tmp v] to (item ((i) + (50)) of [@playernames v])\n        if <(tmp) > [0]> then\n            if <([abs v] of (((idx) mod (MAP_WIDTH)) - ((tmp) mod (MAP_WIDTH))) ) < [10]> then\n                if <([abs v] of (((idx) - (tmp)) / (MAP_WIDTH)) ) < [9]> then\n                    set [tile type v] to (i)\n                end\n            end\n        end\n    end\n    change [i v] by (1)\nend\n\ndefine None\nset [i v] to [1]\nrepeat until <<(i) > (length of [_ldata v])> or <(item (i) of [_ldata v]) = (tile index)>>\n    change [i v] by (item ((i) + (1)) of [_ldata v])\nend\n\ndefine Remove Bad Words\nrepeat (length of [bad v])\n    Remove Word (item (last) of [bad v])\n    delete (last) of [bad v]\nend\n\ndefine Remove Word []\nset [i v] to [0]\nrepeat (length of [dictionary v])\n    if <(word) = (item (i) of [dictionary v])> then\n        delete (i) of [dictionary v]\n    else\n        change [i v] by (1)\n    end\nend\n\ndefine Add Word []\nif <not <[dictionary v] contains (word)?>> then\n    add (word) to [dictionary v]\nend\n\nwhen I receive [chat sent v]\nset [chatting v] to [0]\nset [filtered chat v] to []\n\ndefine Filter []\nset [isfiltered v] to [0]\nset [filtered chat v] to []\nset [word v] to []\nset [i v] to [1]\nset [pre v] to []\nrepeat until <<(i) > (length of (text))> or <(i) > [50]>>\n    set [c v] to (letter (i) of (text))\n    if <(c) = [']> then\n        set [pre v] to (word)\n    end\n    if <<[whitespace v] contains (c)?> or <<(c) = [-]> and <(length of (word)) = [0]>>> then\n        if <(length of (word)) > [0]> then\n            if <(Player Mode) = [6]> then\n                set [filtered chat v] to (join (Filtered Chat) [NYAN])\n            else\n                if <<[dictionary v] contains (word)?> or <<[@playernames v] contains (word)?> or <(word) = (username)>>> then\n                    set [filtered chat v] to (join (Filtered Chat) (word))\n                else\n                    if <not <(join (pre) ['s]) = (word)>> then\n                        set [pre v] to [@@@]\n                    end\n                    if <<[dictionary v] contains (pre)?> or <<[@playernames v] contains (pre)?> or <(pre) = (username)>>> then\n                        set [filtered chat v] to (join (Filtered Chat) (word))\n                    else\n                        if <((0) + (word)) = [0]> then\n                            if <<(username) = [griffpatch]> or <(username) = [griffpatch_tutor]>> then\n                                add (word) to [dictionary v]\n                                set [filtered chat v] to (join (Filtered Chat) (join [*] (join (word) [*])))\n                            else\n                                repeat (length of (word))\n                                    set [filtered chat v] to (join (Filtered Chat) [.])\n                                end\n                                change [isfiltered v] by (1)\n                            end\n                        else\n                            set [filtered chat v] to (join (Filtered Chat) (word))\n                        end\n                    end\n                end\n            end\n        end\n        if <(i) < (length of (text))> then\n            set [filtered chat v] to (join (Filtered Chat) (c))\n        end\n        set [pre v] to []\n        set [word v] to []\n    else\n        set [word v] to (join (word) (c))\n    end\n    change [i v] by (1)\nend\n\nwhen flag clicked\nset [canhelp v] to [0]\nswitch costume to (blank v)\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [clone sprites v]\nset [chatting v] to [0]\n\nRemove Word []\n\nRemove Bad Words\n\ndefine Add Words\nrepeat (length of [bad v])\n    Add Word (item (last) of [bad v])\n    delete (last) of [bad v]\nend\n\nAdd Word []\n\n@Save Game\n\ndefine Load My Data\ndelete (all) of [_savemydata v]\n\n    Read In Data Lists\n    if <(Me Index) > [0]> then\n        Init Reader (item (Me Index) of [data list v])\n        repeat until <(parseIdx) > (length of (parseStr))>\n            Read Number\n            add (?Val) to [_savemydata v]\n        end\n    end\nend\n\ndefine Save Full List - DANGER!\ndelete (all) of [who list v]\ndelete (all) of [data list v]\nset [i3 v] to [1]\nrepeat until <(i3) > (length of [_savemydata v])>\n    add (item (i3) of [_savemydata v]) to [who list v]\n    change [i3 v] by (1)\n    Init Reader []\n    repeat until <(item (i3) of [_savemydata v]) = [@]>\n        Write Number (item (i3) of [_savemydata v])\n        change [i3 v] by (1)\n    end\n    add (parseStr) to [data list v]\n    change [i3 v] by (1)\nend\nWrite Out Data Lists\n\nwhen I receive [@save all game data - danger! v]\nSave Full List - DANGER!\n\ndefine Get Full List\ndelete (all) of [_savemydata v]\nRead In Data Lists\nrepeat until <(length of [data list v]) = [0]>\n    add (item (1) of [who list v]) to [_savemydata v]\n    Init Reader (item (1) of [data list v])\n    repeat until <(parseIdx) > (length of (parseStr))>\n        Read Number\n        add (?Val) to [_savemydata v]\n    end\n    delete (1) of [data list v]\n    delete (1) of [who list v]\n    add [@] to [_savemydata v]\nend\n\ndefine Read Data Block\nRead Number\nset [parselen v] to (?Val)\nset [?val v] to []\nrepeat (parseLen)\n    set [?val v] to (join (?Val) (letter (parseIdx) of (parseStr)))\n    change [parseidx v] by (1)\nend\n\ndefine Delete User []\nRead In Data Lists\nset [whoidx v] to [1]\nrepeat until <(whoIdx) > (length of [who list v])>\n    if <(item (whoIdx) of [who list v]) = (username)> then\n        delete (whoIdx) of [who list v]\n        delete (whoIdx) of [data list v]\n    else\n        change [whoidx v] by (1)\n    end\nend\nWrite Out Data Lists\n\ndefine Read In Data Lists\nset [copy v] to (☁ SAVE_DATA2)\nSplit Data Lists\nif <((LastPlayerCount) - (length of [who list v])) > [10]> then\n    set [copy v] to (LastGoodSave)\n    Split Data Lists\nelse\n    set [lastplayercount v] to (length of [who list v])\n    set [lastgoodsave v] to (Copy)\nend\n\ndefine Split Data Lists\nset [me index v] to [0]\ndelete (all) of [who list v]\ndelete (all) of [data list v]\nif <(length of (Copy)) < [2]> then\n    stop [this script v]\nend\nInit Reader (Copy)\nrepeat until <(parseIdx) > (length of (parseStr))>\n    Read String\n    if <<(length of (?Val)) > [3]> and <(length of (?Val)) < [25]>> then\n        add (?Val) to [who list v]\n        if <(username) = (?Val)> then\n            set [me index v] to (length of [who list v])\n        end\n        Read Data Block\n        add (?Val) to [data list v]\n    else\n        Read Data Block\n    end\nend\n\nset [i3 v] to <(round (i3)) = (i3)>\n\nwhen flag clicked\nset [rememberscorerow v] to [1]\nshow list [who list v]\n\nwhen I receive [@get my ranking v]\nshow list [high score table v]\nif <(length of [_savemydata v]) > [0]> then\n    set [rememberscorerow v] to (item (1) of [_savemydata v])\nend\nLoad High Score Table (RememberScoreRow) (99999) <not >\ndelete (all) of [_savemydata v]\n\ndefine None\nset [i1 v] to (length of [score list v])\nrepeat until <<(i1) < [1]> or <not <(score) > (item (i1) of [score list v])>>>\n    change [i1 v] by (-1)\nend\nchange [i1 v] by (1)\ninsert (score) at (i1) of [score list v] \ninsert (username) at (i1) of [score name v] \nset [tmp v] to (score)\nrepeat ((12) - ((length of (score)) * (2.8)))\n    set [tmp v] to (join (tmp) [ ])\nend\nset [tmp v] to (join (tmp) (join [   ] (username)))\ninsert (tmp) at (i1) of [high score table v] \n\nwhen I receive [hide high scores v]\nshow list [high score table v]\n\nwhen I receive [load high scores v]\nset [rememberscorerow v] to (item (1) of [_savemydata v])\nLoad High Score Table (RememberScoreRow) (item (2) of [_savemydata v]) <not >\nhide list [high score table v]\ndelete (all) of [_savemydata v]\nFlash My Score (item (My Ranking) of [high score table v]) (My Ranking)\n\nGet Full List\n\nwhen [b v] key pressed\nif <key (z v) pressed?> then\n    if <<(username) = [griffpatch]> and <(_TalkMode) = [0]>> then\n        ask [Back up Saved Games? \(Y/N\)] and wait\n        if <(answer) = [y]> then\n            set [backup v] to (☁ SAVE_DATA2)\n        end\n    end\nend\n\ndefine Init Reader []\nset [parsestr v] to (text)\nset [parseidx v] to [1]\nif <(text) = []> then\n    delete (all) of [var_hack v]\nend\n\ndelete (all) of [who list v]\ndelete (all) of [data list v]\nset [i3 v] to [1]\nrepeat until <(i3) > (length of [_savemydata v])>\n    add (item (i3) of [_savemydata v]) to [who list v]\n    change [i3 v] by (1)\n    Init Reader []\n    repeat until <(item (i3) of [_savemydata v]) = [@]>\n        Write Number (item (i3) of [_savemydata v])\n        change [i3 v] by (1)\n    end\n    add (parseStr) to [data list v]\n    change [i3 v] by (1)\nend\nWrite Out Data Lists\n\nDelete User [griffpatch]\n\ndefine Fix Broken Data\nRead In Data Lists\nset [whoidx v] to [1]\nrepeat until <(whoIdx) > (length of [who list v])>\n    Init Reader (item (whoIdx) of [data list v])\n    Read Number\n    if <<(?Val) = []> or <(item (whoIdx) of [who list v]) = []>> then\n        delete (whoIdx) of [who list v]\n        delete (whoIdx) of [data list v]\n    else\n        Read Number\n        if <<(whoIdx) < ((length of [who list v]) - (100))> and <(?Val) < [6]>> then\n            delete (whoIdx) of [who list v]\n            delete (whoIdx) of [data list v]\n        else\n            change [whoidx v] by (1)\n        end\n    end\nend\n\nFix Broken Data\n\ndefine Skip Number\nif <(letter (parseIdx) of (parseStr)) = [0]> then\n    change [parseidx v] by (1)\n    Skip String\nelse\n    change [parseidx v] by ((letter (parseIdx) of (parseStr)) + (1))\nend\n\ndefine Skip String\nRead Number\nchange [parseidx v] by ((?Val) * (2))\n\ndefine Save My Data\n\n    stop [other scripts in sprite v]\n    show\n    go to [front v] layer\n    Init Reader []\n    set [myscore v] to (item (RememberScoreRow) of [_savemydata v])\n    repeat until <(length of [_savemydata v]) = [0]>\n        Write Number (item (1) of [_savemydata v])\n        delete (1) of [_savemydata v]\n    end\n    set [mysentdata v] to (VAR_HACK)\n    delete (all) of [var_hack v]\n    broadcast (check saved game v)\nend\n\nset [backup v] to []\n\nwhen [r v] key pressed\nif <key (z v) pressed?> then\n    if <<(username) = [griffpatch]> and <(_TalkMode) = [0]>> then\n        ask [Restore Saved Games? \(Y/N\)] and wait\n        if <(answer) = [y]> then\n            set [☁ save_data2 v] to (BACKUP)\n            set [lastgoodsave v] to (BACKUP)\n            set [lastplayercount v] to [-1]\n        end\n    end\nend\n\nset [backup v] to []\n\nwhen flag clicked\nset [lastgoodsave v] to []\nset [lastplayercount v] to [-1]\nhide\ngo to x: (218) y: (-156)\n\ndefine Read String\nRead Number\nset [parselen v] to (?Val)\nset [?val v] to []\nrepeat (parseLen)\n    set [?val v] to (join (?Val) (item (join (letter (parseIdx) of (parseStr)) (letter ((parseIdx) + (1)) of (parseStr))) of [ascii v]))\n    change [parseidx v] by (2)\nend\n\nwhen flag clicked\nset [_chars v] to [ !"#$%&'\(\)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~]\n\ndefine None\nif <(val) = (round (val))> then\n    if <(val) = [0]> then\n        add [0] to [var_hack v]\n        change [i1 v] by (1)\n    else\n        if <(val) < [0]> then\n            set [?val v] to (round ((val) + (16777215)))\n        else\n            set [?val v] to (round (val))\n        end\n        add (letter (1) of (length of (?Val))) to [var_hack v]\n        set [i1 v] to [1]\n        repeat (length of (?Val))\n            add (letter (i1) of (?Val)) to [var_hack v]\n            change [i1 v] by (1)\n        end\n    end\nelse\n    add [9] to [var_hack v]\n    Write String (val)\nend\n\nset [parsestr v] to (join (parseStr) (join (length of (?Val)) (?Val)))\n\ndefine Write String []\nWrite Number (length of (txt))\nset [i1 v] to [1]\nrepeat (length of (txt))\n    set [char v] to ([\['letter:of:', \['readvariable', 'i1'\], \['getparam', 'txt', 'r'\]\] v] of [save game v])\n    add (letter (1) of (char)) to [var_hack v]\n    add (letter (2) of (char)) to [var_hack v]\n    change [i1 v] by (1)\nend\n\nwhen I receive [@get all saved game data v]\nGet Full List\n\nset [parsestr v] to (join (parseStr) (?Val))\n\ndefine Write Data Block []\nWrite Number (length of (data))\nset [i1 v] to [1]\nrepeat (length of (data))\n    add (letter (i1) of (data)) to [var_hack v]\n    change [i1 v] by (1)\nend\n\nwhen [d v] key pressed\nif <key (z v) pressed?> then\n    if <(username) = [griffpatch]> then\n        ask [Delete Which User] and wait\n        if <(length of (answer)) > [0]> then\n            Delete User (answer)\n        end\n    end\nend\n\nwhen I receive [load my data v]\nLoad My Data\n\ndefine None\ndelete (all) of [high score table v]\ndelete (all) of [score list v]\ndelete (all) of [score name v]\nRead In Data Lists\nset [whoidx v] to [1]\nrepeat until <(whoIdx) > (length of [who list v])>\n    Init Reader (item (whoIdx) of [data list v])\n    repeat ((score index) - (1))\n        Skip Number\n    end\n    Read Number\n    Add High Score (item (whoIdx) of [who list v]) (?Val)\n    change [whoidx v] by (1)\nend\nrepeat until <not <(length of [high score table v]) > (top#)>>\n    delete (last) of [high score table v]\nend\nset [my ranking v] to [1]\nset [i1 v] to [1]\nset [tmp v] to [1]\nrepeat until <(i1) > (length of [score name v])>\n    if <not <(tmp) = (item (i1) of [score list v])>> then\n        set [tmp v] to (item (i1) of [score list v])\n        set [my ranking v] to (i1)\n    end\n    if <(username) = (item (i1) of [score name v])> then\n        set [i1 v] to (length of [score name v])\n    end\n    change [i1 v] by (1)\nend\n\nRead In Data Lists\n\nWrite Out Data Lists\n\nOrder Scores (2)\n\nset [☁ save_data2 v] to (☁ SAVE_DATA)\n\nshow list [high score table v]\nrepeat (5)\n    Load High Score Table (2) (99999) <not >\nend\nhide list [high score table v]\n\ndefine Write Out Data Lists\n\n    set [whoidx v] to [1]\n    Init Reader []\n    repeat (length of [who list v])\n        Write String (item (whoIdx) of [who list v])\n        Write Data Block (item (whoIdx) of [data list v])\n        change [whoidx v] by (1)\n    end\n    set [☁ save_data2 v] to (VAR_HACK)\n    delete (all) of [var_hack v]\nend\n\nwhen I receive [save my data now v]\nSave My Data\n\nLoad High Score Table (RememberScoreRow) (99999) \n\nRead In Data Lists\n\nwhen I receive [check saved game v]\nLoad High Score Table (RememberScoreRow) (99999) <not >\nif <<<(Me Index) > [0]> and <(Me Index) < [32]>> and <(join [@] (MySentData)) = (join [@] (item (Me Index) of [data list v]))>> then\n    hide\nelse\n    if <(Me Index) = [1]> then\n        replace item (Me Index) of [data list v] with (MySentData)\n    else\n        if <(Me Index) > [0]> then\n            delete (Me Index) of [who list v]\n            delete (Me Index) of [data list v]\n        end\n        set [me index v] to [1]\n        insert (username) at (Me Index) of [who list v] \n        insert (MySentData) at (Me Index) of [data list v] \n        repeat until <(length of [who list v]) < [501]>\n            delete (last) of [who list v]\n            delete (last) of [data list v]\n        end\n    end\n    Write Out Data Lists\n    wait (pick random (1.5) to (3.5)) seconds\n    broadcast (check saved game v)\nend\n\ndefine Read Number\nset [?val v] to (letter (parseIdx) of (parseStr))\nif <(?Val) = [9]> then\n    change [parseidx v] by (1)\n    Read String\nelse\n    if <(?Val) = [0]> then\n        change [parseidx v] by (1)\n    else\n        set [?val v] to []\n        repeat (letter (parseIdx) of (parseStr))\n            change [parseidx v] by (1)\n            set [?val v] to (join (?Val) (letter (parseIdx) of (parseStr)))\n        end\n        if <(?Val) > [8388608]> then\n            set [?val v] to ((?Val) - (16777215))\n        end\n        change [parseidx v] by (1)\n    end\nend\n\nset [☁ save_data2 v] to []\nset [lastplayercount v] to [0]\n\ndefine None\nset [tmp v] to (item ((index) - (6)) of [high score table v])\nreplace item ((index) - (6)) of [high score table v] with []\nwait (0.05) seconds\nreplace item ((index) - (6)) of [high score table v] with (tmp)\nrepeat (3)\n    replace item (index) of [high score table v] with (text)\n    wait (0.3) seconds\n    replace item (index) of [high score table v] with (join (text) [ <----])\n    wait (0.3) seconds\nend\n\nwhen I receive [cloud dump v]\nRead In Data Lists\nrepeat until <(length of [data list v]) = [0]>\n    set [tmp v] to []\n    Init Reader (item (last) of [data list v])\n    Read Number\n    set [tmp v] to (?Val)\n    repeat until <(parseIdx) > (length of (parseStr))>\n        Read Number\n        set [tmp v] to (join (tmp) (join [, ] (?Val)))\n    end\n    repeat ((40) - ((length of (item (length of [data list v]) of [who list v])) * (2.8)))\n        set [tmp v] to (join [ ] (tmp))\n    end\n    set [tmp v] to (join [,      ] (tmp))\n    set [tmp v] to (join (item (length of [data list v]) of [who list v]) (tmp))\n    replace item (length of [data list v]) of [who list v] with (tmp)\n    delete (last) of [data list v]\nend\nhide list [who list v]\n\ndelete (all) of [who list v]\ndelete (all) of [data list v]\ndelete (all) of [score list v]\ndelete (all) of [score name v]\ndelete (all) of [var_hack v]\ndelete (all) of [debug v]\n\ndelete (1) of [ascii v]\n\ninsert (item (whoIdx) of [who list v]) at (i1) of [who list v] \ninsert (item (whoIdx) of [data list v]) at (i1) of [data list v] \ndelete ((whoIdx) + (1)) of [who list v]\ndelete ((whoIdx) + (1)) of [data list v]\n\ndefine None\ndelete (all) of [high score table v]\ndelete (all) of [score list v]\ndelete (all) of [score name v]\nif <reload?> then\n    Read In Data Lists\nend\nset [whoidx v] to [1]\nrepeat until <(whoIdx) > (length of [who list v])>\n    Init Reader (item (whoIdx) of [data list v])\n    repeat ((score index) - (1))\n        Skip Number\n    end\n    Read Number\n    Add High Score (item (whoIdx) of [who list v]) (?Val)\n    change [whoidx v] by (1)\nend\nrepeat until <not <(length of [high score table v]) > (top#)>>\n    delete (last) of [high score table v]\nend\nset [my ranking v] to ((length of [score name v]) + (1))\nset [i1 v] to [1]\nset [tmp v] to [1]\nrepeat until <(i1) > (length of [score name v])>\n    if <not <(tmp) = (item (i1) of [score list v])>> then\n        set [tmp v] to (item (i1) of [score list v])\n        set [my ranking v] to (i1)\n    end\n    if <(username) = (item (i1) of [score name v])> then\n        set [i1 v] to (length of [score name v])\n    end\n    change [i1 v] by (1)\nend\n\nDelete User [griffpatch]\n\n@collectables\n\ndefine Add Coins Line (x) (y) (count) (space) (sy)\nchange [position x v] by (x)\nset [position y v] to (y)\nset [clone type v] to [1]\nrepeat (count)\n    create clone of (_myself_ v)\n    change [position x v] by (space)\n    change [position y v] by (sy)\n    change [coins v] by (1)\nend\nshow variable [coins v]\n\ndefine Make Water Coin\nif <(Game Mode) = [5]> then\n    if <(WaterCoinIdx) < (length of [flappy coins v])> then\n        set [position x v] to (item (WaterCoinIdx) of [flappy coins v])\n        change [watercoinidx v] by (1)\n        set [position y v] to (item (WaterCoinIdx) of [flappy coins v])\n        change [watercoinidx v] by (1)\n        set [clone type v] to [2]\n        create clone of (_myself_ v)\n    end\nelse\n    if <(Game Mode) = [9]> then\n        if <(WaterCoinIdx) < (length of [snail treats v])> then\n            set [position x v] to (item (WaterCoinIdx) of [snail treats v])\n            change [watercoinidx v] by (1)\n            set [position y v] to (item (WaterCoinIdx) of [snail treats v])\n            change [watercoinidx v] by (1)\n            set [clone type v] to [20]\n            create clone of (_myself_ v)\n        end\n    else\n        if <(Game Mode) = [11]> then\n            if <(WaterCoinIdx) < (length of [pokeballs v])> then\n                set [position x v] to (item (WaterCoinIdx) of [pokeballs v])\n                change [watercoinidx v] by (1)\n                set [position y v] to (item (WaterCoinIdx) of [pokeballs v])\n                change [watercoinidx v] by (1)\n                set [clone type v] to [21]\n                create clone of (_myself_ v)\n            end\n        else\n            if <(WaterCoinIdx) < (length of [water coins v])> then\n                set [position x v] to (item (WaterCoinIdx) of [water coins v])\n                change [watercoinidx v] by (1)\n                set [position y v] to (item (WaterCoinIdx) of [water coins v])\n                change [watercoinidx v] by (1)\n                set [clone type v] to [2]\n                create clone of (_myself_ v)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nset [type v] to (Clone Type)\nif <(Clone Type) = [3]> then\n    switch costume to (flower v)\nelse\n    if <(Clone Type) = [4]> then\n        switch costume to (((WaterCoinIdx) / (2)) + (3.5))\n    else\n        if <(Clone Type) = [4.5]> then\n            switch costume to (((length of [hungry coins v]) / (2)) + (4))\n        else\n            if <(Clone Type) = [20]> then\n                switch costume to (snailtreat v)\n            else\n                if <(Clone Type) = [21]> then\n                    switch costume to (pokeball v)\n                else\n                    switch costume to (coin v)\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [type v] to [0]\nhide\n\nwhen I receive [init level v]\nif <(Type) = [0]> then\n    set [watercoinidx v] to [1]\n    Make Water Coin\nend\n\nwhen I receive [tick v]\nif <(Type) > [0]> then\n    if <(Type) = [999]> then\n        suck ((Player X) - (Position X)) ((Player Y) - (Position Y))\n    end\n    Position and Show ([floor v] of (((Position X) - (Next Scr X)) / (zoom)) ) ([floor v] of (((Position Y) - (Next Scr Y)) / (zoom)) )\nend\n\nwhen [z v] key pressed\n\nif <(Type) = [0]> then\n    if <(username) = [griffpatch]> then\n        set [clone type v] to [21]\n        set [position x v] to (round ((mouse x) + (Next Scr X)))\n        set [position y v] to (round ((mouse y) + (Next Scr Y)))\n        add (Position X) to [pokeballs v]\n        add (Position Y) to [pokeballs v]\n        set [coins v] to ((length of [pokeballs v]) / (2))\n        show variable [coins v]\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [jet pack joyride v]\nif <(Type) = [0]> then\n    set [position x v] to (Player X)\n    set [position y v] to [0]\n    set [coins v] to [0]\n    Add Coins Line (200) (0) (8) (40) (0)\n    Add Coins Line (240) (100) (8) (40) (0)\n    Add Coins Line (240) (-120) (8) (40) (0)\n    Add Coins Line (240) (80) (8) (40) (-20)\n    Add Coins Line (240) (-80) (8) (40) (20)\nend\n\ndefine Add Flower (x) (y)\nset [position x v] to (x)\nset [position y v] to ((y) + (3))\nset [clone type v] to [3]\nchange [coins v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I receive [flower game v]\nif <(Type) = [0]> then\n    set [coins v] to [0]\n    Add Flower (3110) (-60)\n    Add Flower (3464) (-60)\n    Add Flower (4556) (-57)\n    Add Flower (5294) (-137)\n    Add Flower (5048) (1382)\n    Add Flower (3710) (693)\n    Add Flower (3200) (1226)\n    Add Flower (2516) (-79)\n    Add Flower (1988) (662)\n    Add Flower (880) (504)\n    Add Flower (176) (517)\n    Add Flower (2516) (1685)\n    Add Flower (4846) (480)\n    Add Flower (4413) (239)\n    Add Flower (3891) (326)\n    show variable [coins v]\n    set [game mode v] to [3]\nend\n\ndefine Position and Show (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    if <(Type) = [1]> then\n        if <<([abs v] of ((Position X) - (Player X)) ) < [10]> and <([abs v] of ((Position Y) - (Player Y)) ) < [26]>> then\n            set [clone type v] to [0.2]\n            set [type v] to [999]\n        end\n    else\n        if <<(Type) = [2]> or <<(Type) = [20]> or <(Type) = [21]>>> then\n            if <<(Game Mode) = [5]> or <(Game Mode) = [11]>> then\n                if <<([abs v] of ((Position X) - (Player X)) ) < [34]> and <([abs v] of ((Position Y) - (Player Y)) ) < [34]>> then\n                    if <not <(Player Mode) = [7]>> then\n                        change [coinadd v] by (1)\n                        broadcast (make a coin v)\n                        set [clone type v] to [0.2]\n                        set [type v] to [999]\n                    end\n                end\n            else\n                if <<([abs v] of ((Position X) - (Player X)) ) < [26]> and <([abs v] of ((Position Y) - (Player Y)) ) < [26]>> then\n                    if <not <(Player Mode) = [7]>> then\n                        change [coinadd v] by (1)\n                        broadcast (make a coin v)\n                        set [clone type v] to [0.2]\n                        set [type v] to [999]\n                    end\n                else\n                    if <<([abs v] of ((Position X) - (head x)) ) < [26]> and <([abs v] of ((Position Y) - (head y)) ) < [26]>> then\n                        change [coinadd v] by (1)\n                        broadcast (make a coin v)\n                        set [clone type v] to [0.2]\n                        set [type v] to [999]\n                    end\n                end\n            end\n        else\n            if <(Type) = [3]> then\n                if <<([abs v] of ((Position X) - (Player X)) ) < [26]> and <([abs v] of (((Position Y) + (75)) - (Player Y)) ) < [26]>> then\n                    switch costume to (flowerfound v)\n                    change [coins v] by (-1)\n                    set [type v] to [0.5]\n                    if <(Coins) = [0]> then\n                        set [game mode v] to [4]\n                    end\n                end\n            else\n                if <(Type) = [4]> then\n                    if <<([abs v] of ((Position X) - (Player X)) ) < [34]> and <([abs v] of ((Position Y) - (Player Y)) ) < [50]>> then\n                        set [clone type v] to [0.2]\n                        set [type v] to [999]\n                    end\n                end\n            end\n        end\n    end\nelse\n    hide\nend\n\ndefine suck (dx) (dy)\nchange [position x v] by ((dx) * (Clone Type))\nchange [position y v] by ((dy) * (Clone Type))\nchange [clone type v] by (0.2)\nif <(Clone Type) > [0.8]> then\n    change [coins v] by (-1)\n    if <(Coins) = [0]> then\n        if <(Game Mode) = [5]> then\n            set [game mode v] to [6]\n        else\n            if <(Game Mode) = [7]> then\n                set [game mode v] to [8]\n            else\n                if <(Game Mode) = [2.5]> then\n                    set [game mode v] to [2]\n                else\n                    if <(Game Mode) = [9]> then\n                        set [game mode v] to [10]\n                    else\n                        if <(Game Mode) = [11]> then\n                            set [game mode v] to [12]\n                        end\n                    end\n                end\n            end\n        end\n    end\n    delete this clone\nend\nif <(Game Mode) = [7]> then\n    change size by (-10)\nend\n\ndefine spawnHungry\nset [coins v] to [0]\nset [watercoinidx v] to [1]\nrepeat ((length of [hungry coins v]) / (2))\n    set [position x v] to (item (WaterCoinIdx) of [hungry coins v])\n    change [watercoinidx v] by (1)\n    set [position y v] to ((item (WaterCoinIdx) of [hungry coins v]) + (32))\n    change [watercoinidx v] by (1)\n    set [clone type v] to [4]\n    change [coins v] by (1)\n    create clone of (_myself_ v)\nend\nshow variable [coins v]\n\nwhen I receive [game mode change v]\nif <(Type) > [0]> then\n    set [coinadd v] to [0]\n    delete this clone\nelse\n    if <(Game Mode) = [5]> then\n        set [coins v] to ((length of [flappy coins v]) / (2))\n        show variable [coins v]\n        set [watercoinidx v] to [1]\n        Make Water Coin\n        Make Water Coin\n        Make Water Coin\n        Make Water Coin\n        Make Water Coin\n    else\n        if <(Game Mode) = [9]> then\n            set [coins v] to ((length of [snail treats v]) / (2))\n            set [watercoinidx v] to [1]\n            Make Water Coin\n        else\n            if <(Game Mode) = [11]> then\n                set [coins v] to ((length of [pokeballs v]) / (2))\n                set [watercoinidx v] to [1]\n                Make Water Coin\n            else\n                if <(Game Mode) = [7]> then\n                    spawnHungry\n                else\n                    hide variable [coins v]\n                    set [watercoinidx v] to [1]\n                    set [coins v] to [0]\n                    Make Water Coin\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [make a coin v]\nif <(Type) = [0]> then\n    if <(Game Mode) = [5]> then\n        Make Water Coin\n    else\n        if <(WaterCoinIdx) = [3]> then\n            if <<(Game Mode) = [9]> or <(Game Mode) = [11]>> then\n                if <(Game Mode) = [11]> then\n                    set [player mode fuel v] to [200]\n                else\n                    set [player mode fuel v] to [300]\n                end\n                show variable [coins v]\n                Make Water Coin\n                Make Water Coin\n                Make Water Coin\n                broadcast (begin collecting coins v)\n            else\n                set [coins v] to (((length of [water coins v]) / (2)) - (1))\n                set [game mode v] to [2.5]\n                show variable [coins v]\n                Make Water Coin\n                Make Water Coin\n                Make Water Coin\n                Make Water Coin\n                Make Water Coin\n            end\n        else\n            if <(coinAdd) > [0]> then\n                make coins (coinAdd)\n                set [coinadd v] to [0]\n            else\n                Make Water Coin\n            end\n        end\n    end\nend\n\ndelete all of [pokeballs v]\n\nif <(Type) = [0]> then\n    if <(username) = [griffpatch]> then\n        set [clone type v] to [21]\n        set [position x v] to (round ((mouse x) + (Next Scr X)))\n        set [position y v] to (round ((mouse y) + (Next Scr Y)))\n        insert (Position Y) at ((WaterCoinIdx) - (8)) of [pokeballs v] \n        insert (Position X) at ((WaterCoinIdx) - (8)) of [pokeballs v] \n        change [watercoinidx v] by (2)\n        set [coins v] to ((length of [pokeballs v]) / (2))\n        show variable [coins v]\n        create clone of (_myself_ v)\n    end\nend\ndelete (last) of [pokeballs v]\ndelete (last) of [pokeballs v]\n\ndelete ((WaterCoinIdx) - (2)) of [pokeballs v]\ndelete ((WaterCoinIdx) - (2)) of [pokeballs v]\nchange [watercoinidx v] by (-2)\n\ndefine make coins (count)\nrepeat (count)\n    Make Water Coin\nend\n\nchange [watercoinidx v] by (-48)\n\nMake Water Coin\n\n@Enemy\n\nwhen flag clicked\nset [type v] to [0]\nset [keydown v] to []\nset [seen v] to []\nswitch costume to (spikes2l v)\nhide\n\nwhen I start as a clone\nset [type v] to (Clone Type)\nswitch costume to (Clone Type)\n\nwhen I receive [tick v]\nif <(Type) > [0]> then\n    tick\nelse\n    if <(Type) < [0]> then\n        Edit (round ((mouse x) + (Next Scr X))) (round ((mouse y) + (Next Scr Y)))\n    end\nend\n\ndefine Position and Show (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    change [seen v] by (1)\nelse\n    hide\n    if <(seen) > [0]> then\n        change [seen v] by (1)\n        if <(seen) > [90]> then\n            if <<(Type) = [1]> or <(Type) = [9]>> then\n                if <([abs v] of ((item ((idx) + (2)) of [spawn v]) - (Next Scr X)) ) > [260]> then\n                    set [position x v] to (item ((idx) + (2)) of [spawn v])\n                    set [position y v] to (item ((idx) + (3)) of [spawn v])\n                    set [seen v] to []\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [make a coin v]\nif <(Type) = [0]> then\n    if <(Game Mode) = [5]> then\n        Make Water Coin\n    else\n        if <(WaterCoinIdx) = [3]> then\n            if <(Game Mode) = [9]> then\n                show variable [coins v]\n                Make Water Coin\n                Make Water Coin\n                Make Water Coin\n            else\n                set [coins v] to (((length of [water coins v]) / (2)) - (1))\n                set [game mode v] to [2.5]\n                show variable [coins v]\n                Make Water Coin\n                Make Water Coin\n                Make Water Coin\n                Make Water Coin\n                Make Water Coin\n            end\n        else\n            Make Water Coin\n        end\n    end\nend\n\ndefine Edit (x) (y)\nif <([abs v] of (mouse x) ) > [238]> then\n    hide\n    stop [this script v]\nend\nif <([abs v] of (mouse y) ) > [178]> then\n    hide\n    stop [this script v]\nend\ngo to (mouse-pointer v)\nidx = get near (x) (y)\nif <(idx) > []> then\n    hide\nelse\n    show\nend\nif <key (s v) pressed?> then\n    if <(keyDown) = []> then\n        Add (x) (y)\n        set [keydown v] to [s]\n    end\nelse\n    if <key (d v) pressed?> then\n        if <(keyDown) = []> then\n            set [keydown v] to [d]\n            if <(idx) > []> then\n                repeat (4)\n                    delete (idx) of [spawn v]\n                end\n                broadcast (begin collecting coins v)\n            end\n        end\n    else\n        if <key (f v) pressed?> then\n            if <(keyDown) = []> then\n                set [keydown v] to [f]\n                switch costume to ((costume [number v]) - (1))\n            end\n        else\n            if <key (g v) pressed?> then\n                if <(keyDown) = []> then\n                    set [keydown v] to [g]\n                    next costume\n                end\n            else\n                set [keydown v] to []\n            end\n        end\n    end\nend\n\ndefine idx = get near (x) (y)\nset [idx v] to []\nset [min v] to [30]\nset [i v] to [1]\nrepeat ((length of [spawn v]) / (4))\n    if <(item (i) of [spawn v]) = (Game Mode)> then\n        get distance ((x) - (item ((i) + (2)) of [spawn v])) ((y) - (item ((i) + (3)) of [spawn v]))\n        if <(distance) < (min)> then\n            set [idx v] to (i)\n            set [min v] to (distance)\n        end\n    end\n    change [i v] by (4)\nend\n\ndefine get distance (x) (y)\nset [distance v] to ([sqrt v] of (((x) * (x)) + ((y) * (y))) )\n\ndefine Add (x) (y)\nadd ([abs v] of (Type) ) to [spawn v]\nadd (costume [number v]) to [spawn v]\nadd (x) to [spawn v]\nadd (y) to [spawn v]\nSpawn ((length of [spawn v]) - (3))\n\nwhen I receive [begin collecting coins v]\nif <(Type) > [0]> then\n    delete this clone\nend\ninit\n\ndefine init\nset [i v] to [1]\nrepeat ((length of [spawn v]) / (4))\n    if <(item (i) of [spawn v]) = (Game Mode)> then\n        Spawn (i)\n    end\n    change [i v] by (4)\nend\n\n\n    delete all of [spawn v]\nend\n\ndefine Spawn (idx)\nset [idx v] to (idx)\nset [clone type v] to (item ((idx) + (1)) of [spawn v])\nset [position x v] to (item ((idx) + (2)) of [spawn v])\nset [position y v] to (item ((idx) + (3)) of [spawn v])\ncreate clone of (_myself_ v)\n\nset [game mode v] to [11]\nshow variable [game mode v]\nset [type v] to ((0) - (Game Mode))\nbroadcast (game mode change v)\n\nwhen I receive [game mode change v]\nif <(Type) > [0]> then\n    delete this clone\nend\n\ndefine tick\nif <(seen) > []> then\n    if <(Type) = [1]> then\n        change [position x v] by (4)\n    end\n    if <(Type) = [9]> then\n        change [position x v] by (-4)\n    end\nend\nPosition and Show ([floor v] of (((Position X) - (Next Scr X)) / (zoom)) ) ([floor v] of (((Position Y) - (Next Scr Y)) / (zoom)) )\n\nset [game mode v] to [11]\nset [type v] to ((0) - (Game Mode))\n\n@You Are IT\n\nwhen flag clicked\nhide\nswitch costume to (it v)\ngo to [front v] layer\n\nwhen I receive [tick v]\nif <<(WhoIsIT #) = [0]> or <<(WhoIsItTimer) < [10]> and <((WhoIsItTimer) mod (2)) = [0]>>> then\n    hide\nelse\n    set [offset v] to ((WhoIsIT #) * (PMul))\n    if <(item (offset) of [players v]) = []> then\n        hide\n    else\n        Position and Hide (round ((item ((offset) + (1)) of [players v]) - (Next Scr X))) (round (((item ((offset) + (2)) of [players v]) - (Next Scr Y)) + ((4) * ([sin v] of ((timer) * (360)) ))))\n    end\nend\n\ndefine Position and Hide (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ngo [backward v] (1000) layers\n\n@Announcer\n\nwhen flag clicked\nhide variable [achievements v]\nset size to (200) %\ngo to x: (-209) y: (-158)\nhide\nInit\n\ndefine Init\nif <(username) = (lastUser)> then\n    Display Achievement String\n    stop [this script v]\nend\nset [lastuser v] to (username)\nset [flash v] to [0]\nset [count v] to [0]\nset [achievements v] to [0]\nset [achievement # v] to [0]\ndelete (all) of [new achievement v]\ndelete (all) of [achieved v]\ndelete (all) of [aoffset v]\ndelete (all) of [achievedlevels v]\nset [max v] to [0]\nset [i v] to [1]\nrepeat until <(i) > (length of [achievements v])>\n    set [id v] to (item (i) of [achievements v])\n    change [i v] by (1)\n    if <(id) > [0]> then\n        repeat until <not <(length of [achieved v]) < (id)>>\n            add [0] to [aoffset v]\n            add [0] to [achieved v]\n            add [0] to [achievedlevels v]\n        end\n        replace item (id) of [aoffset v] with (i)\n    end\n    repeat until <<(i) > (length of [achievements v])> or <(item (i) of [achievements v]) = []>>\n        if <(id) > [0]> then\n            change [max v] by (1)\n        end\n        change [i v] by (2)\n    end\n    change [i v] by (1)\nend\nDisplay Achievement String\n\ndefine Transform\nset [idx v] to [1]\nrepeat until <(idx) > (length of [_savemydata v])>\n    change [idx v] by (1)\n    set [row v] to (idx)\n    Init\n    set [id v] to (item ((row) + (2)) of [_savemydata v])\n    delete ((row) + (2)) of [_savemydata v]\n    change [row v] by (2)\n    set [achievement # v] to [1]\n    set [encode v] to []\n    repeat (id)\n        set [i v] to (item (row) of [_savemydata v])\n        delete (row) of [_savemydata v]\n        replace item (Achievement #) of [achieved v] with (i)\n        set [id v] to (item (Achievement #) of [aoffset v])\n        repeat until <<(id) < [1]> or <(i) < (item (id) of [achievements v])>>\n            change [id v] by (2)\n            change [count v] by (1)\n            if <(item (id) of [achievements v]) = []> then\n                set [id v] to [0]\n            end\n            replace item (Achievement #) of [aoffset v] with (id)\n            replace item (Achievement #) of [achievedlevels v] with ((1) + (item (Achievement #) of [achievedlevels v]))\n        end\n        set [encode v] to (join (encode) (item (Achievement #) of [achievedlevels v]))\n        change [achievement # v] by (1)\n    end\n    insert (encode) at (row) of [_savemydata v] \n    set [idx v] to ((row) + (2))\nend\n\nwhen I receive [tick v]\nif <(Flash) > [0]> then\n    change [flash v] by (-1)\n    if <((Flash) mod (15)) = [6]> then\n        hide variable [achievements v]\n    end\n    if <((Flash) mod (15)) = [0]> then\n        show variable [achievements v]\n    end\nend\nif <<(length of [new achievement v]) > [0]> and <(Achievement #) = [0]>> then\n    set [achievement # v] to (item (1) of [new achievement v])\n    delete (1) of [new achievement v]\n    if <(Achievement #) = [lag]> then\n        go to [front v] layer\n        switch costume to (face v)\n        show\n        say (translate [Your PC is running too slowly!!! :\(] to ((language::translate) v)::translate)\n        broadcast (achievement_ok v)\n    else\n        missing\n        set [i v] to ((item (Achievement #) of [achieved v]) + (1))\n        replace item (Achievement #) of [achieved v] with (i)\n        set [id v] to (item (Achievement #) of [aoffset v])\n        if <(id) > [0]> then\n            if <(i) < (item (id) of [achievements v])> then\n                set [achievement # v] to [0]\n            else\n                change [count v] by (1)\n                Display Achievement String\n                switch costume to (face v)\n                show\n                change [id v] by (1)\n                say (translate (join [You have earned the '] (join (item (id) of [achievements v]) [' achievement!])) to ((language::translate) v)::translate)\n                change [id v] by (1)\n                if <(item (id) of [achievements v]) = []> then\n                    replace item (Achievement #) of [aoffset v] with [0]\n                else\n                    replace item (Achievement #) of [aoffset v] with (id)\n                end\n                broadcast (save game v) and wait\n                broadcast (achievement_ok v)\n            end\n        else\n            set [achievement # v] to [0]\n        end\n    end\nend\nif <not <([my ranking v] of [save game v]) = (Last Rank)>> then\n    Display Achievement String\nend\n\ndefine Do Load\nInit\nif <(length of [_savemydata v]) > [0]> then\n    set [i v] to (item (1) of [_savemydata v])\n    delete (1) of [_savemydata v]\n    delete (1) of [_savemydata v]\n    repeat ((i) - (1))\n        delete (1) of [_savemydata v]\n    end\n    set [id v] to (item (1) of [_savemydata v])\n    delete (1) of [_savemydata v]\n    set [achievement # v] to [1]\n    repeat (id)\n        set [i v] to (item (1) of [_savemydata v])\n        replace item (Achievement #) of [achieved v] with (i)\n        delete (1) of [_savemydata v]\n        set [id v] to (item (Achievement #) of [aoffset v])\n        repeat until <<(id) < [1]> or <(i) < (item (id) of [achievements v])>>\n            change [id v] by (2)\n            change [count v] by (1)\n            if <(item (id) of [achievements v]) = []> then\n                set [id v] to [0]\n            end\n            replace item (Achievement #) of [aoffset v] with (id)\n            replace item (Achievement #) of [achievedlevels v] with ((1) + (item (Achievement #) of [achievedlevels v]))\n        end\n        change [achievement # v] by (1)\n    end\nend\nset [achievement # v] to [0]\nDisplay Achievement String\n\nwhen I receive [load achievements v]\nDo Load\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [save achievements v]\nDo Save\n\ndefine Do Save\nadd [1] to [_savemydata v]\nadd (Count) to [_savemydata v]\nadd (length of [achieved v]) to [_savemydata v]\nset [i v] to [1]\nrepeat (length of [achieved v])\n    add (item (i) of [achieved v]) to [_savemydata v]\n    change [i v] by (1)\nend\n\ndefine Display Achievement String\nset [achievements v] to (join (join [Rank #] ([my ranking v] of [save game v])) (join [    Achv. ] (join (join (Count) [ / ]) (Max))))\nset [achievements v] to (join [Achievements ] (join (join (Count) [ / ]) (Max)))\n\nwhen [h v] key pressed\n\n    delete (all) of [_savemydata v]\n    add [2] to [_savemydata v]\n    add [9999] to [_savemydata v]\n    set [offset scroll v] to [120]\n    broadcast (load high scores v) and wait\n    wait (0.2) seconds\n    wait until <key (h v) pressed?>\n    wait until <not <key (h v) pressed?>>\n    broadcast (hide high scores v) and wait\n    set [offset scroll v] to [0]\nend\n\nwhen [a v] key pressed\nif <(_TalkMode) = [0]> then\n    set [offset scroll v] to [120]\n    Show Achievements\n    wait (0.2) seconds\n    wait until <key (a v) pressed?>\n    wait until <not <key (a v) pressed?>>\n    show list [high score table v]\n    set [offset scroll v] to [0]\nend\n\ndefine Show Achievements\ndelete (all) of [high score table v]\nadd [*** Achievements to find ***] to [high score table v]\nset [i v] to [1]\nrepeat until <(i) > (length of [achievements v])>\n    set [id v] to (item (i) of [achievements v])\n    change [i v] by (1)\n    repeat until <<(i) > (length of [achievements v])> or <(item (i) of [achievements v]) = []>>\n        if <(item (i) of [achievements v]) > (item (id) of [achieved v])> then\n            add (item ((i) + (1)) of [achievements v]) to [high score table v]\n        end\n        change [i v] by (2)\n    end\n    change [i v] by (1)\nend\nif <(length of [high score table v]) = [1]> then\n    add [None... Awesome work!] to [high score table v]\nend\nadd [] to [high score table v]\nadd [*** Achieved ***] to [high score table v]\nset [i v] to [1]\nrepeat until <(i) > (length of [achievements v])>\n    set [id v] to (item (i) of [achievements v])\n    change [i v] by (1)\n    repeat until <<(i) > (length of [achievements v])> or <(item (i) of [achievements v]) = []>>\n        if <not <(item (i) of [achievements v]) > (item (id) of [achieved v])>> then\n            add (item ((i) + (1)) of [achievements v]) to [high score table v]\n        end\n        change [i v] by (2)\n    end\n    change [i v] by (1)\nend\nhide list [high score table v]\n\nwhen I receive [achievement_ok v]\nwait (4) seconds\nsay []\nhide\nset [achievement # v] to [0]\n\nwhen I receive [init level v]\nshow variable [achievements v]\n\n\n    if <([my ranking v] of [save game v]) = (Last Rank)> then\n        show variable [achievements v]\n    else\n        set [last rank v] to ([my ranking v] of [save game v])\n        set [flash v] to [45]\n    end\nend\n\nset [lastuser v] to [0]\n\ndefine missing\nrepeat ((Achievement #) - (length of [achieved v]))\n    add [0] to [achieved v]\nend\n\nwhen I receive [no v]\nshow\nswitch costume to (face v)\nsay [sorry! the chat haven't finish yet. \(press enter to close\)]\nwait until <key ((join [enter] []) v) pressed?>\nsay []\nhide\n\nsay [] for (2) seconds\n\ninsert [神槍飛狐 statino] at (45) of [achievements v] \n\n@Oxygen\n\nwhen flag clicked\ngo to x: (0) y: (140)\nset size to (200) %\nhide\nset [lastair v] to [-1]\n\ndefine None\nif <<(airval) < [1]> or <(airval) > [21]>> then\n    hide\n    set [lastair v] to [-1]\nelse\n    if <not <(airval) = (lastAir)>> then\n        switch costume to (airval)\n        set [lastair v] to (airval)\n        show\n        go to [front v] layer\n    end\nend\n\nwhen I receive [tick v]\nUpdate Air ([floor v] of (_AirLevel) )\n\n@Multiplayer\n\ndefine Assign Player (player id) (username) (is master)\nreplace item (player id) of [@playernames v] with (username)\nreplace item (((player id) * (PMUL)) + (4)) of [player data v] with [1]\nreplace item (((player id) * (PMUL)) + (5)) of [player data v] with []\nSend My Cloud Data (player id) (is master)\n\ndefine Send My Cloud Data (player id) (is master)\nchange [ticksend v] by (pick random (1) to (3))\nInit Reader []\nWrite Number ((tickSend) mod (10))\nWrite Number (is master)\nif <(player id) = (@Player ID)> then\n    Write String (username)\nelse\n    Write String (item (player id) of [@playernames v])\nend\nWrite Number ([floor v] of (timer) )\nif <(player id) = (@Player ID)> then\n    Write Data Block (Broadcast_Stream)\n    set [broadcast_stream v] to []\nelse\n    Write Data Block []\nend\n\n    if <(player id) = (@Player ID)> then\n        Write String (Filtered Chat)\n        set [filtered chat v] to []\n    else\n        Write String []\n    end\nend\nif <(player id) < [5]> then\n    if <(player id) < [3]> then\n        if <(player id) < [2]> then\n            set [☁ player_1 v] to (parseStr)\n        else\n            set [☁ player_2 v] to (parseStr)\n        end\n    else\n        if <(player id) < [4]> then\n            set [☁ player_3 v] to (parseStr)\n        else\n            set [☁ player_4 v] to (parseStr)\n        end\n    end\nelse\n    if <(player id) < [7]> then\n        if <(player id) < [6]> then\n            set [☁ player_5 v] to (parseStr)\n        else\n            set [☁ player_6 v] to (parseStr)\n        end\n    else\n        if <(player id) < [8]> then\n            set [☁ player_7 v] to (parseStr)\n        else\n            set [☁ player_8 v] to (parseStr)\n        end\n    end\nend\nreplace item (((player id) * (PMUL)) + (3)) of [player data v] with (timer)\n\nwhen I receive [@update multiplayer v]\nFill Broadcast\nProcess Cloud Data <(timer) > (tickTock)>\nif <(timer) > (tickTock)> then\n    if <(@Player ID) = [-1]> then\n        set [@player id v] to [0]\n        set [@master id v] to [0]\n        wait (1) seconds\n        Allocate Gaming Slot \n    end\n    if <(@Player ID) > [0]> then\n        if <(@Master ID) = (@Player ID)> then\n            Send My Cloud Data (@Player ID) (2)\n        else\n            Send My Cloud Data (@Player ID) (1)\n        end\n    end\n    set [ticktock v] to ((timer) + ((BufferTime) + (pick random (0.0) to (0.1))))\n    set [broadcast_stream v] to []\nend\nRead Player Data Tick\n\nwhen I receive [@fade message v]\nset [fadecostume v] to (costume [number v])\nset [ghost v] effect to (0)\nwait (1) seconds\nif <(FadeCostume) = (costume [number v])> then\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    hide\n    set [ghost v] effect to (0)\n    if <(@Player Count) > [1]> then\n        switch costume to (blank v)\n    else\n        switch costume to (empty game v)\n        show\n        go to [front v] layer\n    end\nend\n\ndefine Skip String\nRead Number\nchange [parseidx v] by ((?Val) * (2))\n\ndefine Write Number (val)\nif <(val) < [0]> then\n    set [?val v] to ([abs v] of (round (val)) )\n    set [parsestr v] to (join (parseStr) (join [0] (join (length of (?Val)) (?Val))))\nelse\n    set [?val v] to (round (val))\n    set [parsestr v] to (join (parseStr) (join (length of (?Val)) (?Val)))\nend\n\ndefine Read Number\nif <(letter (parseIdx) of (parseStr)) = [0]> then\n    set [?val v] to [-]\n    change [parseidx v] by (1)\nelse\n    set [?val v] to []\nend\nrepeat (letter (parseIdx) of (parseStr))\n    change [parseidx v] by (1)\n    set [?val v] to (join (?Val) (letter (parseIdx) of (parseStr)))\nend\nchange [parseidx v] by (1)\n\ndefine Init Reader (text)\nset [parsestr v] to (text)\nset [parseidx v] to [1]\n\nwhen flag clicked\nset [_chars v] to [ !"#$%&'\(\)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~]\nset [_chars v] to [ !"#$%&'\(\)*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz\[\\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~]\n\ndefine Process Cloud Data <check self?>\nRead Cloud Data\nset [last count v] to (@Player Count)\nif <<not <check self?>> and <(@Player ID) = [1]>> then\n    set [i1 v] to [2]\n    set [@player count v] to [1]\nelse\n    set [i1 v] to [1]\n    set [@player count v] to [0]\nend\nrepeat until <(i1) > (@Max Players)>\n    set [send ok v] to [0]\n    set [changed? v] to (item (((i1) * (PMUL)) + (2)) of [player data v])\n    if <(join [a] (item (i1) of [cloud data v])) = (join [a] (changed?))> then\n        if <(item (i1) of [@playernames v]) > []> then\n            if <(item (((i1) * (PMUL)) + (3)) of [player data v]) < ((timer) - (TIME_OUT))> then\n                replace item (i1) of [@playernames v] with []\n                if <(@Master ID) = (i1)> then\n                    set [@master id v] to (@Player ID)\n                    set [master time v] to ((timer) + (5))\n                end\n                set [debug v] to [Timeout!!!]\n            else\n                change [@player count v] by (1)\n            end\n        end\n    else\n        replace item (i1) of [_change v] with ((item (i1) of [_change v]) + (1))\n        Init Reader (item (i1) of [cloud data v])\n        Read Number\n        Read Number\n        if <(?Val) > [0]> then\n            change [@player count v] by (1)\n            if <(?Val) = [2]> then\n                set [@master id v] to (i1)\n            end\n            Read String\n            set [tmp v] to (?Val)\n            Read Number\n            if <(@Player ID) = (i1)> then\n                if <not <(username) = (tmp)>> then\n                    if <<(timer) < ((?Val) + (1))> or <(pick random (1) to (500)) = [1]>> then\n                        set [@player id v] to [-1]\n                    end\n                end\n            else\n                if <<(@Player ID) = [0]> and <(tmp) = (username)>> then\n                    set [@player id v] to (i1)\n                end\n            end\n            replace item (i1) of [@playernames v] with (tmp)\n            replace item (((i1) * (PMUL)) + (2)) of [player data v] with (parseStr)\n            replace item (((i1) * (PMUL)) + (3)) of [player data v] with (timer)\n            replace item (((i1) * (PMUL)) + (4)) of [player data v] with [1]\n            Read Data Block\n            replace item (((i1) * (PMUL)) + (5)) of [player data v] with (?Val)\n            \n                Read Number\n                if <not <<(@Player ID) = (i1)> or <(?Val) = []>>> then\n                    replace item (((i1) * (PMul)) + (3)) of [players v] with (?Val)\n                end\n            end\n        else\n            Read String\n            if <<(@Master ID) = (@Player ID)> and <(timer) > (Master Time)>> then\n                if <<(item (i1) of [@playernames v]) = []> or <(item (i1) of [@playernames v]) = (?Val)>> then\n                    set [send ok v] to [1]\n                    set [debug v] to [Request Received...]\n                    replace item (i1) of [@playernames v] with (?Val)\n                    replace item (((i1) * (PMUL)) + (2)) of [player data v] with (parseStr)\n                    replace item (((i1) * (PMUL)) + (3)) of [player data v] with (timer)\n                    replace item (((i1) * (PMUL)) + (4)) of [player data v] with [1]\n                    replace item (((i1) * (PMUL)) + (5)) of [player data v] with []\n                    Send My Cloud Data (i1) (1)\n                end\n            end\n        end\n    end\n    change [i1 v] by (1)\n    if <<not <check self?>> and <(@Player ID) = (i1)>> then\n        change [i1 v] by (1)\n        change [@player count v] by (1)\n    end\nend\nif <(costume [number v]) < [3]> then\n    if <(@Player Count) < [2]> then\n        set [tmp v] to [2]\n    else\n        set [tmp v] to [1]\n    end\n    if <not <(tmp) = (costume [number v])>> then\n        if <(tmp) = [1]> then\n            switch costume to (blank v)\n            hide\n        else\n            switch costume to (empty game v)\n            show\n            go to [front v] layer\n        end\n    end\nend\n\ndefine Write Data Block (data)\nWrite Number (length of (data))\nset [?val v] to []\nset [i2 v] to [1]\nrepeat (length of (data))\n    set [?val v] to (join (?Val) (letter (i2) of (data)))\n    change [i2 v] by (1)\nend\nset [parsestr v] to (join (parseStr) (?Val))\n\nwhen I receive [hide all v]\nhide variable [@max players v]\nhide variable [@master id v]\nhide variable [@player id v]\nhide variable [@player count v]\nhide\n\ndefine Read Data Block\nRead Number\nif <((parseIdx) + (?Val)) > ((length of (parseStr)) + (1))> then\n    set [i3 v] to (((length of (parseStr)) + (1)) - (parseIdx))\n    change [glitches v] by (1)\nelse\n    set [i3 v] to (?Val)\nend\nset [?val v] to []\nrepeat (i3)\n    set [?val v] to (join (?Val) (letter (parseIdx) of (parseStr)))\n    change [parseidx v] by (1)\nend\n\ndefine Write String (txt)\nWrite Number (length of (txt))\nset [?val v] to []\nset [i3 v] to [1]\nrepeat (length of (txt))\n    set [i2 v] to (item # of (letter (i3) of (txt)) in [chars v])\n    if <(i2) < [10]> then\n        set [?val v] to (join (?Val) (join [0] (i2)))\n    else\n        set [?val v] to (join (?Val) (i2))\n    end\n    change [i3 v] by (1)\nend\nset [parsestr v] to (join (parseStr) (?Val))\n\ndefine Read String\nRead Number\nif <((parseIdx) + ((?Val) * (2))) > ((length of (parseStr)) + (1))> then\n    set [i2 v] to ((((length of (parseStr)) + (1)) - (parseIdx)) / (2))\n    change [glitches v] by (1)\nelse\n    set [i2 v] to (?Val)\nend\nset [?val v] to []\nrepeat (i2)\n    set [i2 v] to (join (letter (parseIdx) of (parseStr)) (letter ((parseIdx) + (1)) of (parseStr)))\n    set [?val v] to (join (?Val) (item (i2) of [chars v]))\n    change [parseidx v] by (2)\nend\n\nwhen I receive [@multiplayer tick request v]\nRead Player Data Tick\n\ndefine Read Player Data Tick\ndelete (all) of [@playerdata v]\ndelete (all) of [@playeroffset v]\nset [i1 v] to [1]\nrepeat (@Max Players)\n    add ((length of [@playerdata v]) + (1)) to [@playeroffset v]\n    repeat (_Tick)\n        if <<(i1) = (@Player ID)> or <(item (i1) of [@playernames v]) = []>> then\n            add [0] to [@playerdata v]\n        else\n            Init Reader (item (((i1) * (PMUL)) + (5)) of [player data v])\n            set [parseidx v] to (item (((i1) * (PMUL)) + (4)) of [player data v])\n            if <(parseIdx) < (length of (parseStr))> then\n                Read Number\n                add (?Val) to [@playerdata v]\n                repeat (?Val)\n                    Read Number\n                    add (?Val) to [@playerdata v]\n                end\n                replace item (((i1) * (PMUL)) + (4)) of [player data v] with (parseIdx)\n            else\n                add [0] to [@playerdata v]\n            end\n        end\n    end\n    change [i1 v] by (1)\nend\nadd ((length of [@playerdata v]) + (1)) to [@playeroffset v]\n\ndefine Fill Broadcast\nInit Reader []\nset [i1 v] to [0]\nrepeat until <(length of [@broadcast v]) = [0]>\n    if <(item (1) of [@broadcast v]) = [@TICK]> then\n        delete (1) of [@broadcast v]\n        set [tmp v] to (parseStr)\n        Init Reader []\n        Write Number (i1)\n        set [broadcast_stream v] to (join (Broadcast_Stream) (join (parseStr) (tmp)))\n        Init Reader []\n        set [i1 v] to [0]\n    else\n        change [i1 v] by (1)\n        Write Number (item (1) of [@broadcast v])\n        delete (1) of [@broadcast v]\n    end\nend\nif <(i1) > [0]> then\n    Write Number (i1)\n    set [broadcast_stream v] to (join (Broadcast_Stream) (join (parseStr) (tmp)))\nend\n\nWrite String (item (1) of [@broadcast v])\n\nwhen I receive [game revision out of date v]\nif <(☁ GameData) = [-1]> then\n    switch costume to (planned down time v)\nelse\n    switch costume to (out of date v)\nend\nshow\ngo to [front v] layer\nstop [all v]\n\ndefine Init Cloud Data\nset [@player id v] to [0]\nset [@master id v] to [0]\nRead Cloud Data\nset [i1 v] to [1]\ndelete (all) of [@playernames v]\ndelete (all) of [player data v]\ndelete (all) of [_change v]\nrepeat (PMUL)\n    add [] to [player data v]\nend\nrepeat (@Max Players)\n    add [] to [@playernames v]\n    add [] to [player data v]\n    add (item (i1) of [cloud data v]) to [player data v]\n    add [-99] to [player data v]\n    add [0] to [player data v]\n    add [] to [player data v]\n    add [0] to [_change v]\n    change [i1 v] by (1)\nend\n\ndefine Read Cloud Data\ndelete (all) of [cloud data v]\nadd (☁ Player_1) to [cloud data v]\nadd (☁ Player_2) to [cloud data v]\nadd (☁ Player_3) to [cloud data v]\nadd (☁ Player_4) to [cloud data v]\nadd (☁ Player_5) to [cloud data v]\nadd (☁ Player_6) to [cloud data v]\nadd (☁ Player_7) to [cloud data v]\nadd (☁ Player_8) to [cloud data v]\nif <<not <(☁ GameData) = (Game Revision)>> and <not <(username) = [griffpatch]>>> then\n    broadcast (game revision out of date v)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (blank v)\nclear graphic effects\nhide\nset [pmul v] to [5]\nset [time_out v] to [5]\nset [@player id v] to [0]\nset [@master id v] to [0]\nset [@player count v] to [0]\nset [@max players v] to [8]\nset [ticktock v] to [0]\nset [last count v] to [0]\nset [broadcast_stream v] to []\ndelete (all) of [_broadcast v]\ndelete (all) of [player data v]\ndelete (all) of [@playernames v]\nset [show debug v] to [0]\nset [master time v] to [0]\n\ndefine Allocate Gaming Slot <reconnect?>\nif <reconnect?> then\n    switch costume to (re-connecting v)\nelse\n    switch costume to (scanning v)\nend\nshow\ngo to [front v] layer\nset [debug v] to [Looking for Master...]\nset [count v] to [1]\nrepeat until <(count) > [8]>\n    wait (1.8) seconds\n    Process Cloud Data <>\n    if <<(@Player Count) = [0]> and <(count) > [4]>> then\n        set [count v] to [999]\n    else\n        if <(@Master ID) > [0]> then\n            set [count v] to [999]\n        else\n            change [count v] by (1)\n        end\n    end\nend\nif <(@Master ID) = [0]> then\n    set [debug v] to [No Master Found...]\n    if <(@Player Count) = [0]> then\n        set [@player id v] to [1]\n        set [@master id v] to [1]\n        set [master time v] to [0]\n        Assign Player (@Player ID) (username) (2)\n    end\nelse\n    switch costume to (requesting v)\n    go to [front v] layer\n    set [debug v] to [Master Found]\n    set [count v] to [1]\n    repeat until <<(count) > [8]> or <(@Player ID) > [0]>>\n        set [i1 v] to [1]\n        repeat until <<(i1) > (@Max Players)> or <(@Player ID) > [0]>>\n            set [tmp v] to (item (i1) of [@playernames v])\n            if <<(tmp) = []> or <(tmp) = (username)>> then\n                wait (0.8) seconds\n                Assign Player (i1) (username) (0)\n                wait (2) seconds\n                Process Cloud Data <>\n                set [i1 v] to [999]\n            end\n            change [i1 v] by (1)\n        end\n        change [count v] by (1)\n    end\nend\nif <(@Player ID) > [0]> then\n    if <(@Player ID) = (@Master ID)> then\n        switch costume to (new game v)\n    else\n        switch costume to (allocated v)\n    end\n    broadcast (@fade message v) and wait\nelse\n    if <(@Max Players) = (@Player Count)> then\n        switch costume to (full v)\n        broadcast (@fade message v) and wait\n    else\n        switch costume to (unable v)\n        wait (5) seconds\n        switch costume to (unable \(small\) v)\n    end\nend\n\nwhen I receive [@allocate gaming slot v]\nset [buffertime v] to [0.1]\nset [game revision v] to [2]\nif <(username) = [griffpatch]> then\n    set [☁ gamedata v] to (Game Revision)\nelse\n    if <(☁ GameData) = [-1]> then\n        broadcast (game revision out of date v)\n    else\n        if <(☁ GameData) = [0]> then\n            switch costume to (new scratcher v)\n            show\n            go to [front v] layer\n            wait until <key (space v) pressed?>\n            wait until <not <key (space v) pressed?>>\n            set [☁ gamedata v] to (Game Revision)\n        end\n    end\nend\nset [@player id v] to [0]\nInit Cloud Data\nAllocate Gaming Slot <>\n\ndelete all of [chars v]\nset [i v] to [1]\nrepeat (length of (_Chars))\n    add (letter (i) of (_Chars)) to [chars v]\n    change [i v] by (1)\nend\n\nset [☁ player_1 v] to []\nwait (0.1) seconds\nset [☁ player_2 v] to []\nwait (0.1) seconds\nset [☁ player_3 v] to []\nwait (0.1) seconds\nset [☁ player_4 v] to []\nwait (0.1) seconds\nset [☁ player_5 v] to []\nwait (0.1) seconds\nset [☁ player_6 v] to []\nwait (0.1) seconds\nset [☁ player_7 v] to []\nwait (0.1) seconds\nset [☁ player_8 v] to []\n\nset [@player id v] to [1]\nset [@master id v] to [1]\n\n@Splash\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset [ghost v] to [0]\nrepeat (10)\n    go to [front v] layer\n    wait (0) seconds\nend\n\nwhen I receive [tick v]\nif <(ghost) < [21]> then\n    change [ghost v] by (1)\n    if <(ghost) = [21]> then\n        hide\n    end\n    change [ghost v] effect by (5)\nend\n\n@tool\n\nwhen I receive [tick v]\nif <(Player Mode) = [16]> then\n    if <([can jump? v] of [the player v]) > [0]> then\n        if <<key (space v) pressed?> or <key (up arrow v) pressed?>> then\n            change [held power v] by (1)\n        else\n            if <<(held power) > [0]> and <(held power) < ((12) * (8))>> then\n                set [smoosh v] to ((held power) / ((12) * (5)))\n                if <(smoosh) > [1]> then\n                    set [smoosh v] to [1]\n                end\n                set [held power v] to [0]\n            else\n                set [held power v] to [0]\n                set [smoosh v] to [0]\n            end\n        end\n        go to x: ((Player X) - (Next Scr X)) y: ((round ((Player Y) - (Next Scr Y))) + (4))\n        if <key (left arrow v) pressed?> then\n            if <(direction) > [-80]> then\n                turn left (2.5) degrees\n            end\n        else\n            if <key (right arrow v) pressed?> then\n                if <(direction) < [80]> then\n                    turn right (2.5) degrees\n                end\n            end\n        end\n        if <(held power) < ((12) * (5))> then\n            switch costume to ([floor v] of (((held power) + (5)) / (5)) )\n        else\n            if <(held power) > ((12) * (8))> then\n                switch costume to (arrow v)\n            else\n                switch costume to (arrow13 v)\n            end\n        end\n        show\n    else\n        set [held power v] to [0]\n        set [smoosh v] to [0]\n        hide\n    end\nelse\n    hide\nend\n\n@Parallax2\n\nwhen flag clicked\nset [sprwid v] to [470]\nset [hsw v] to (sprWid)\ngo to x: (0) y: (0)\ngo [backward v] (100) layers\nhide\nDo Cloning\n\nwhen I receive [tick v]\nset [looping x v] to (((((Offset X) - ((Next Scr X) / (2))) + (hsw)) mod ((sprWid) * (2))) - (hsw))\nPosition and Show ([floor v] of (Looping X) ) ([floor v] of ((Next Scr Y) / (-2)) )\n\ndefine Do Cloning\npoint in direction (90)\nswitch costume to (00.00.00 v)\n\nset [offset x v] to ((0) - (sprWid))\n\ncreate clone of (_myself_ v)\nswitch costume to (00.01.00 v)\nchange [offset x v] by (sprWid)\n\ndefine Position and Show (x) (y)\ngo to x: (x) y: (y)\n\nwhen I receive [hide all v]\nhide\n\nwhen I receive [init level v]\ngo [backward v] (100) layers\nshow\n\n
[arrow key] - To Move and Jump\n[Space] - Use special ability (if you have one)\n[T] - Safe Chat   [X] - Discard power up\n[R] - Respawn   [A] - Achievement list\n[N] - Toggle Names