Caves - A Platformer 

Instructions: New Game Out! :D https://scratch.mit.edu/projects/565092464/\n\nThe Green flag is land The orange block is a tranpoline\n\n\nThanks @Pizzarush for the intro Thanks @A_Wire for the platformer engine modified by me Thanks @-Xaf- For the music

@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 flag clicked\nswitch backdrop to (night 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]\nreplace item (1) of [dress up v] with []\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]\nreplace item (1) of [dress up v] with []\nreplace item (2) of [dress up v] with []\npoint in direction (90)\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 [respawn v] to []\nset [eaten by v] to [0]\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) + ((36) * (Frame)))\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 <(Player Mode) = [20]> then\n                                                                            if <(Speed X) = [0]> then\n                                                                                if <(Speed Y) < [0]> then\n                                                                                    set [nextcostume # v] to [84]\n                                                                                else\n                                                                                    if <(Speed Y) > [0]> then\n                                                                                        set [nextcostume # v] to [83]\n                                                                                    else\n                                                                                        set [nextcostume # v] to [81]\n                                                                                    end\n                                                                                end\n                                                                            else\n                                                                                set [nextcostume # v] to ((([floor v] of ((Frame) * (2)) ) mod (5)) + (82))\n                                                                            end\n                                                                            if <(In Water) > [0]> then\n                                                                                set [nextcostume # v] to ((([floor v] of ((Frame) * (2)) ) mod (5)) + (82))\n                                                                            end\n                                                                        else\n                                                                            if <<(Player Mode) > [20]> and <(Player Mode) < [24]>> then\n                                                                                set [nextcostume # v] to (((Player Mode) * (3)) + (24))\n                                                                                change [nextcostume # v] by ([abs v] of ((([floor v] of (Frame) ) mod (4)) - (1)) )\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\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 <([abs v] of ((Size) - (1)) ) < [0.2]>> then\n                if <<(Player Mode) = [7]> or <(Player Mode) = [13]>> then\n                    set [frame v] to [1]\n                end\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 <(item (Talk #) of [_safechat v]) = [Nyan nyan nyan!!!]> then\n        add [16] to [new achievement v]\n    end\nend\nif <<(Player Mode) > [20]> and <(Player Mode) < [24]>> then\n    if < (item (Talk #) of [_safechat v]) contains [Banana]?> then\n        add [77] 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) * (30)) - (1))\nset [_tick v] to [1]\nset [lag count v] to [0]\nrepeat until <((timer) - (IdleTime)) > [200]>\n    Lag Prevention\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    if <(RESPAWN) > [0]> then\n        change [respawn v] by (1)\n        if <(RESPAWN) > [15]> then\n            Re Spawn Player\n        end\n    end\n    delete all of [minions v]\n    broadcast (Pre-Tick v)\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 <not <(mode) = [19]>> then\n    set [eaten by v] to [0]\nend\nif <not <<(Player Mode) = [4]> and <(mode) = [17]>>> then\n    set [invert v] to [0]\nend\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]\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]> or <(Player Mode) = [20]>> 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 <(WantSize) = (Size)> then\n    if <touching (level v)?> then\n        Escape Stuck\n    end\nelse\n    Set Zoom (WantSize) at (1) (1)\nend\nif <(RESPAWN) > [0]> then\n    stop [this script v]\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                                    else\n                                        if <(Player Mode) = [20]> then\n                                            set [speed x v] to ((Speed X) * (1.5))\n                                        else\n                                            if <(Player Mode) = [13]> then\n                                                set [speed x v] to ((Speed X) * (1.2))\n                                            end\n                                        end\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 <<(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            add [84] to [new achievement v]\n            set [respawn v] to [1]\n        end\n    else\n        set [_airlevel v] to [26]\n    end\n    Check Touch Zones\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            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 [invert v] to [0]\n            if <<<(Player Mode) > [20]> and <(Player Mode) < [24]>> and <(Size) = [1.01]>> then\n                Set Zoom (1.02) at (1) (1)\n                set [player mode fuel v] to [120]\n                set [power v] to (Player Mode Fuel)\n            else\n                Set Zoom (1) at (1) (1)\n                hide variable [power v]\n                set [player mode v] to [0]\n            end\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    Calculate Costume\n    if <(Player Y) < [-180]> then\n        set [respawn v] to [1]\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        else\n            if <(Player Mode) = [17]> then\n                add [80] to [new achievement v]\n            end\n        end\n        set [respawn v] to [1]\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    Collect Hat [1013] []\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    Collect Hat [1011] []\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    Collect Hat [1010] []\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    Collect Hat [1014] []\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) = [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    Collect Hat [1015] []\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    Collect Hat [1009] []\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\nif <(Game Mode) = [15]> then\n    set [game mode v] to [0]\n    set [coins v] to [0]\n    hide variable [coins v]\n    add [82] to [new achievement v]\n    Collect Hat [1017] []\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 <>\nset [off v] to ((PMul) * ([@player id v] of [multiplayer v]))\nreplace item ((off) + (4)) of [players v] with (x position)\nreplace item ((off) + (5)) of [players v] with (y position)\nreplace item ((off) + (6)) of [players v] with (size)\nreplace item ((off) + (7)) of [players v] with (direction)\nreplace item ((off) + (8)) of [players v] with (nextCostume #)\nreplace item ((off) + (9)) of [players v] with (item (1) of [dress up v])\nreplace item ((off) + (10)) of [players v] with (item (2) of [dress up v])\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                                    else\n                                        if <(Player Mode) = [16]> then\n                                            add [71] to [new achievement v]\n                                        else\n                                            if <<(Player Mode) > [20]> and <(Player Mode) < [24]>> then\n                                                add [75] to [new achievement v]\n                                            else\n                                                if <(Player Mode) = [17]> then\n                                                    add [79] to [new achievement v]\n                                                else\n                                                    if <(Player Mode) = [20]> then\n                                                        add [83] to [new achievement v]\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 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            Collect Hat [1012] []\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                                    else\n                                        if <<(Player Mode) > [20]> and <(Player Mode) < [24]>> then\n                                            add [76] to [new achievement v]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [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.02]>> 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 <(Player Mode) = [12]> then\n        set [tmp v] to [24]\n    else\n        set [tmp v] to [20]\n    end\n    if <<([abs v] of ((Player X) - (4362)) ) < (tmp)> and <([abs v] of ((Player Y) - (248)) ) < (tmp)>> 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]> or <(Player Mode) = [20]>>> 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                    if <(Player Mode) = [12]> then\n                        add [69] to [new achievement v]\n                        Achieve Mini Station\n                        set [player x v] to [4362]\n                        Collect Power Up (20) (120) (1) at (1) (1)\n                        set [game mode v] to [13]\n                        broadcast (game mode change v)\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\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) - (5300)) ) < [50]> and <([abs v] of ((Player Y) - (-116)) ) < [30]>> then\n    if <not <(Player Mode) = [16]>> then\n        add [26] to [new achievement v]\n        if <([abs v] of (((item (26) of [achieved v]) - (145)) mod (150)) ) < [4]> then\n            replace item (26) of [achieved v] with [300]\n            Collect Power Up (16) (240) (1) at (0) (0)\n        end\n    end\nelse\n    set [tmp v] to ((item (26) of [achieved v]) mod (150))\n    if <(tmp) > [0]> then\n        replace item (26) of [achieved v] with ((item (26) of [achieved v]) - (tmp))\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)) ) < [20]>> 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        if <(Invert) > [0]> then\n            add [78] to [new achievement v]\n        end\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        else\n            if <<<(Size) > [1.5]> and <(Size) < [1.81]>> and <(Can Jump?) > [0]>> then\n                add [72] to [new achievement v]\n                Set Zoom (1.81) at (1) (1)\n                set [player mode fuel v] to [300]\n            end\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) = [20]> then\n        add [70] to [new achievement v]\n    else\n        if <<(Player Mode) > [0]> and <not <<<(Player Mode) > [7]> and <(Player Mode) < [10]>> or <(Player Mode) = [17]>>>> 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                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        else\n            if <(Player Mode) = [17]> then\n                add [81] to [new achievement v]\n            end\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\nif <<([abs v] of ((Player X) - (1868)) ) < [28]> and <([abs v] of ((Player Y) - (1734)) ) < [28]>> then\n    if <<(Size) = [1]> and <<(Player Mode) < [21]> or <(Player Mode) > [23]>>> then\n        add [73] to [new achievement v]\n        if <[minions v] contains [21]?> then\n            if <[minions v] contains [22]?> then\n                if <[minions v] contains [23]?> then\n                    Collect Power Up (pick random (21) to (23)) (200) (1) at (1868) (1740)\n                else\n                    Collect Power Up (23) (200) (1) at (1868) (1740)\n                end\n            else\n                Collect Power Up (22) (200) (1) at (1868) (1740)\n            end\n        else\n            Collect Power Up (21) (200) (1) at (1868) (1740)\n        end\n    end\nend\nif <<(Player Mode) > [20]> and <(Player Mode) < [24]>> then\n    if <<(Size) = [1]> and <[minions v] contains [TWO]?>> then\n        set [game mode v] to [0]\n        set [coins v] to [0]\n        hide variable [coins v]\n        add [74] to [new achievement v]\n        Collect Hat [1016] []\n        set [player mode fuel v] to [20]\n        set [power v] to [20]\n        Set Zoom (1.01) at (1) (1)\n        broadcast (game mode change v)\n    end\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    if <(Invert) = [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    else\n        point in direction ((180) - (direction))\n        turn left ((direction) / (3)) degrees\n        point in direction ((180) - (direction))\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    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            if <(Invert) = [0]> then\n                change [player y v] by (1)\n                change y by (1)\n            else\n                change [player y v] by (-1)\n                change y by (-1)\n            end\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\ndefine Escape Stuck\nset [max v] to [2]\nset [tmp v] to [0]\nrepeat (8)\n    repeat (16)\n        Position Player <>\n        change x by ((max) * ([sin v] of (tmp) ))\n        change y by ((max) * ([cos v] of (tmp) ))\n        change [tmp v] by (22.5)\n        if <not <touching (level v)?>> then\n            change [player x v] by ((max) * ([sin v] of (tmp) ))\n            change [player y v] by ((max) * ([cos v] of (tmp) ))\n            stop [this script v]\n        end\n    end\n    change [max v] by ((max) / (1.5))\nend\n\nCollect Power Up (13) (999) (1) at (Player X) (Player Y)\n\nCollect Hat [1014] []\n\ndefine Lag Prevention\nset [tmp v] to (((timer) * (30)) - (time))\nset [_tick v] to (round (tmp))\nif <(_Tick) < [1]> then\n    wait (((1) - (tmp)) / (30)) seconds\n    set [_tick v] to [1]\nend\nif <(_Tick) > [6]> then\n    set [_tick v] to [6]\n    change [lag count v] by (1)\n    if <(lag count) > [30]> then\n        if <(lagWarn #) < [20]> then\n            add [lag] to [new achievement v]\n        end\n        set [lag count v] to [0]\n        change [lagwarn # v] by (1)\n        set [time v] to ((timer) * (30))\n    end\nend\nchange [time v] by (_Tick)\n\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 <(lag count) > [0]> then\n            change [lag count v] by (-1)\n        end\n    else\n        if <(Lag Prevention) = [off]> then\n            change [lag count v] by (6)\n            set [_tick v] to [1]\n            if <<(lag count) > [400]> and <(lagWarn #) < [20]>> then\n                add [lag] to [new achievement v]\n                set [lag count 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\nend\n\nset [invert v] to [4]\n\ndefine Collect Hat (typ) (col)\nreplace item (1) of [dress up v] with ((typ) - (1000))\nreplace item (2) of [dress up v] with (col)\nif <[my hats v] contains (typ)?> then\n    stop [this script v]\nend\nadd (typ) to [my hats v]\nadd (col) to [my hats v]\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) mod (10)) = [1]>> then\n        set [color v] effect to (0)\n    end\nend\nif <((size) mod (10)) = [1]> then\n    change [color v] effect by (5)\nend\nif <((RESPAWN) mod (9)) < [5]> then\n    show\nelse\n    hide\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@DressUp\n\nwhen I receive [tick v]\nif <(Player ID) = []> then\n    Inventory\n    stop [this script v]\nend\nif <(item (off) of [players v]) = []> then\n    hide\n    stop [this script v]\nend\nif <(item ((off) + (9)) of [players v]) < [1]> then\n    hide\n    stop [this script v]\nend\nset [cost v] to (item ((off) + (8)) of [players v])\nset [ox v] to (item (cost) of [dress meta v])\nif <(ox) = []> then\n    hide\n    stop [this script v]\nend\nshow\nif <<(cost) = [28]> or <(cost) = [29]>> then\n    set [oy v] to [6]\nelse\n    set [oy v] to [0]\nend\nswitch costume to (item ((off) + (9)) of [players v])\nset [color v] effect to (item ((off) + (10)) of [players v])\nset [t v] to (item ((off) + (6)) of [players v])\nif <(t) = (size)> then\ngo to x: (item ((off) + (4)) of [players v]) y: (item ((off) + (5)) of [players v])\npoint in direction (item ((off) + (7)) of [players v])\nif <(direction) < [0]> then\n    set [ox v] to ((0) - (ox))\nend\nset [ox v] to (((ox) * (size)) / (100))\nchange x by (ox)\nchange y by (oy)\n\nwhen I receive [init level v]\nhide\nwait (0) seconds\nwait (0) seconds\nwait (0) seconds\nwait (0) seconds\ngo to [front v] layer\nswitch costume to (icon v)\nset [prev count v] to [0]\nset [flash v] to [0]\nset [player id v] to [1]\nset [off v] to (PMul)\nrepeat ([@max players v] of [multiplayer v])\n    create clone of (_myself_ v)\n    change [player id v] by (1)\n    change [off v] by (PMul)\nend\nset [player id v] to []\ngo to x: (221) y: (131)\n\ndefine Inventory\nif <(length of [my hats v]) = [0]> then\n    hide\n    stop [this script v]\nend\nif <(length of [my hats v]) > (prev count)> then\n    set [prev count v] to (length of [my hats v])\n    set [flash v] to [120]\nend\nif <(flash) > [0]> then\n    change [flash v] by (-1)\n    if <((flash) mod (15)) < [6]> then\n        hide\n    else\n        show\n    end\nelse\n    show\nend\nset [off v] to (item (1) of [dress up v])\nif <(off) = []> then\n    set [off v] to (item (1) of [my hats v])\n    set [col v] to (item (2) of [my hats v])\nelse\n    set [off v] to (item # of ((off) + (1000)) in [my hats v])\n    set [col v] to (item ((off) + (3)) of [my hats v])\n    set [off v] to (item ((off) + (2)) of [my hats v])\nend\nif <(off) = []> then\n    switch costume to (icon v)\nelse\n    change [off v] by (-1000)\n    switch costume to (off)\nend\nset [color v] effect to (col)\nif <<(Player Mode) > [0]> and <(Player Mode Fuel) > [0]>> then\n    set [want y v] to [106]\nelse\n    set [want y v] to [131]\nend\nchange [want y v] by (item (off) of [button dy v])\nif <(tmp) = [1.5]> then\n    set y to (want y)\nend\nif <mouse down?> then\n    change [tmp v] by (1)\nelse\n    set [tmp v] to [0]\nend\nif <<(mouse x) > [186]> and <(mouse y) > [110]>> then\n    change [want y v] by (-6)\n    change [ghost v] by (((0) - (ghost)) * (0.2))\n    set [ghost v] effect to (ghost)\n    change size by (((120) - (size)) * (0.2))\n    if <(tmp) = [1]> then\n        replace item (1) of [dress up v] with (off)\n        replace item (2) of [dress up v] with (col)\n        set [tmp v] to [1.5]\n    end\nelse\n    change [ghost v] by (((35) - (ghost)) * (0.2))\n    set [ghost v] effect to (ghost)\n    change size by (((100) - (size)) * (0.2))\nend\nchange y by (((want y) - (y position)) * (0.2))\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 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\n\nwhen I receive [tick v]\ntick\n\nwhen I receive [hide all v]\nhide\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\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                            if < (say) contains [There you go]?> then\n                                \n                                    if <(distance to [the player v]) < [100]> then\n                                        set [tmp v] to (item ((PlayersOffset) + (9)) of [players v])\n                                        if <(tmp) > [0]> then\n                                            replace item (1) of [dress up v] with (tmp)\n                                            replace item (2) of [dress up v] with (pick random (0) to (199))\n                                        end\n                                    end\n                                end\n                            end\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))\nreplace item ((PlayersOffset) + (7)) of [players v] with (direction)\nreplace item ((PlayersOffset) + (8)) of [players v] with (costume [number v])\nif <<(cost) > [87]> and <(cost) < [95]>> then\n    set [tmp v] to ((21) + ([floor v] of (((cost) - (88)) / (3)) ))\n    add (tmp) to [minions v]\n    if <not <(Arrow#) = (costume [number v])>> then\n        if <[minions v] contains [ONE]?> then\n            add [TWO] to [minions v]\n        else\n            add [ONE] to [minions v]\n        end\n    end\nend\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]> or <(cost) = [80]>> 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 [pre-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) mod (10)) = [1]>> then\n        set [color v] effect to (0)\n    end\nend\nif <((size) mod (10)) = [1]> 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)) ) < [45]> then\n                        if <([abs v] of (((PY) + (22)) - (Player Y)) ) < [45]> then\n                            set [eaten by v] to (Player ID)\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\n    In Water?\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 [11]\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]\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\ndefine In Water?\nif <<([abs v] of ((PX) - (732)) ) < [942]> and <(PY) < [494]>> then\n    if <(pick random (0) to (50)) = [0]> then\n        add [1] to [particle v]\n        add ((PX) + ((direction) / (10))) to [particle v]\n        add ((PY) + (10)) to [particle v]\n    end\nend\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]> or <not >>> 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 [tmp v] to (item (1) of [dress up v])\n            if <(tmp) = [16]> then\n                set [tmp v] to []\n            else\n                change [tmp v] by (1)\n                if <(tmp) = [1]> then\n                    change [tmp v] by (1)\n                end\n            end\n            replace item (1) of [dress up v] with (tmp)\n            if <(tmp) > [8]> then\n                replace item (2) of [dress up v] with [0]\n            else\n                replace item (2) of [dress up v] with [110]\n            end\n        end\n        if <(id) = [9]> then\n            set [player mode v] to [4]\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)\nif < (item (i) of [_safechat v]) contains [...]?> then\n    change [i v] by (1)\nend\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 [-100]\n\nwhen [t v] key pressed\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 Is Protected (idx)\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 Get LData For Tile (tile index)\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 (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 (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 (text)\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 <(Game Mode) = [13]> 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\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                    if <(Clone Type) = [22]> then\n                        set size to (200) %\n                        switch costume to (corn v)\n                    else\n                        switch costume to (coin v)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [type v] to [0]\nhide\nset size to (100) %\n\n    show\n    set size to (200) %\n    switch costume to (corn v)\nend\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)) )\nelse\n    go to (mouse-pointer v)\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) = [22]> then\n            if <<([abs v] of ((Position X) - (Player X)) ) < [24]> and <([abs v] of ((Position Y) - (Player Y)) ) < [24]>> then\n                if <(Game Mode) = [13]> then\n                    Spawn Chicken <>\n                    set [game mode v] to [14]\n                end\n                change [coins v] by (-1)\n                if <(Coins) = [0]> then\n                    set [game mode v] to [15]\n                end\n                delete this clone\n            end\n        else\n            if <<(Type) = [2]> or <<(Type) > [19]> and <(Type) < [22]>>> 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\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) = [20]> then\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 (last) of [chick coins v]\ndelete (last) of [chick coins v]\nchange [coins v] by (-1)\n\ndefine make coins (count)\nrepeat (count)\n    Make Water Coin\nend\n\ndelete (last) of [chick coins v]\ndelete (last) of [chick coins v]\n\nif <(Type) = [0]> then\n    set [clone type v] to [22]\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 [chick coins v]\n    add (Position Y) to [chick coins v]\n    set [coins v] to ((length of [chick coins v]) / (2))\n    show variable [coins v]\n    create clone of (_myself_ v)\nend\n\ndefine Spawn Chicken <initial?>\nif <initial?> then\n    set [coins v] to [0]\n    set [watercoinidx v] to [1]\nend\nrepeat (((length of [chick coins v]) / (2)) - (1))\n    set [position x v] to (item (WaterCoinIdx) of [chick coins v])\n    change [watercoinidx v] by (1)\n    set [position y v] to (item (WaterCoinIdx) of [chick coins v])\n    change [watercoinidx v] by (1)\n    set [clone type v] to [22]\n    change [coins v] by (1)\n    create clone of (_myself_ v)\n    if <initial?> then\n        stop [this script v]\n    end\nend\nshow variable [coins v]\n\nSpawn Chicken \nSpawn Chicken \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 None\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\ndelete all of [new achievement v]\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 [my hats v]\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\ntick\ntick\ntick\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)))\nif <(Count) = [10]> then\n    Collect Hat [1002] (pick random (0) to (200))\nend\nif <(Count) = [15]> then\n    Collect Hat [1003] (pick random (0) to (200))\nend\nif <(Count) = [20]> then\n    Collect Hat [1004] (pick random (0) to (200))\nend\nif <(Count) = [25]> then\n    Collect Hat [1005] (pick random (0) to (200))\nend\nif <(Count) = [30]> then\n    Collect Hat [1006] (pick random (0) to (200))\nend\nif <(Count) = [35]> then\n    Collect Hat [1007] (pick random (0) to (200))\nend\nif <(Count) = [40]> then\n    Collect Hat [1008] (pick random (0) to (200))\nend\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\ndefine tick\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        show\n        say [Your PC is running too slowly!!! :\(]\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                show\n                change [id v] by (1)\n                say (join [You have earned the '] (join (item (id) of [achievements v]) [' achievement!]))\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                \n                    broadcast (save game v) and wait\n                end\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 Collect Hat (typ) (col)\nreplace item (1) of [dress up v] with ((typ) - (1000))\nreplace item (2) of [dress up v] with (col)\nif <[my hats v] contains (typ)?> then\n    stop [this script v]\nend\nadd (typ) to [my hats v]\nadd (col) to [my hats 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 Update Air (airval)\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 Number (item (1) of [dress up v])\n    Write Number (item (2) of [dress up v])\n    Write Number (EATEN BY)\n    Write Data Block (Broadcast_Stream)\n    set [broadcast_stream v] to []\nelse\n    Write Number ()\n    Write Number ()\n    Write Number ()\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 <(length of (parseStr)) < [256]> then\n    if <(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\n    else\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\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            if  then\n                Read Number\n                replace item (((i1) * (PMul)) + (9)) of [players v] with (?Val)\n                Read Number\n                replace item (((i1) * (PMul)) + (10)) of [players v] with (?Val)\n                Read Number\n                if <<(?Val) = (@Player ID)> and <not <(i1) = (@Player ID)>>> then\n                    if <<(@Player ID) > [0]> and <(Player Mode) = [15]>> then\n                        add [85] to [new achievement v]\n                    end\n                end\n            end\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 [parsestr v] to (join (parseStr) (data))\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 [8]\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\n    set [?val v] to []\n    set [i2 v] to [1]\n    repeat (length of (data))\n        set [?val v] to (join (?Val) (letter (i2) of (data)))\n        change [i2 v] by (1)\n    end\n    set [parsestr v] to (join (parseStr) (?Val))\nend\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        go to x: ((Player X) - (Next Scr X)) y: (round ((Player Y) - (Next Scr Y)))\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        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    if <<(Player Mode) = [17]> and <<([invert v] of [the player v]) > [0]> and <(([direction v] of [avatar v]) mod (360)) < [180]>>> then\n        go to x: ((Player X) - (Next Scr X)) y: (round ((Player Y) - (Next Scr Y)))\n        point in direction (0)\n        show\n    else\n        hide\n    end\nend\n\n@Water\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)\nif <(Scroll X) > [1850]> then\n    hide\n    stop [this script v]\nend\nshow\nset [offset x v] to [1310]\nset [tmp v] to [0]\nset [offset x v] to (((((timer) * (50)) - (Scroll X)) mod (100)) - (50))\nset [tmp v] to ((1450) - ((Offset X) + (Scroll X)))\nif <(tmp) < [0]> then\n    change [offset x v] by (([floor v] of ((tmp) / (100)) ) * (100))\nend\nset [offset y v] to [184]\nPosition and Show ([floor v] of (Offset X) ) ([floor v] of ((Offset Y) - (Scroll Y)) )\nif <(Scroll X) < [1342]> then\n    change [offset x v] by (1)\nend\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\nset [player x v] to [1620]\nset [player y v] to [520]\n\n@Bubbles\n\nwhen I start as a clone\nset [ghost v] effect to (pick random (60) to (80))\nset [x v] to (item (2) of [particle v])\nset [y v] to (item (3) of [particle v])\ndelete (1) of [particle v]\ndelete (1) of [particle v]\ndelete (1) of [particle v]\nset size to (pick random (50.0) to (100.0)) %\nset [speed y v] to ((size) / (25))\ntick\nshow\n\nwhen I receive [tick v]\nif <(speed y) > [0]> then\n    tick\n    stop [this script v]\nend\nif <(length of [particle v]) > [0]> then\n    create clone of (_myself_ v)\nend\nif <([in water v] of [the player v]) > [0]> then\n    if <(pick random (0) to (45)) = [0]> then\n        add [1] to [particle v]\n        add ((Player X) + (([direction v] of [avatar v]) / (10))) to [particle v]\n        add ((Player Y) + (10)) to [particle v]\n        create clone of (_myself_ v)\n    end\nelse\n    set [bubble time v] to [40]\nend\n\ndefine tick\nchange [y v] by (speed y)\nchange [x v] by (pick random (-1.5) to (1.5))\ngo to x: ([floor v] of ((x) - (Next Scr X)) ) y: ([floor v] of ((y) - (Next Scr Y)) )\nif <<(y) > [486]> or <(distance to [blank v]) > [360]>> then\n    delete this clone\nend\nif <touching (level v)?> then\n    delete this clone\nend\n\nwhen flag clicked\nset [bubble time v] to [15]\nset [speed y v] to [0]\ndelete all of [particle v]\nhide\n\n