Biomes｜A multiplayer scrolling platformer ｜#games #platformer
@Stage\n\nwhen [m v] key pressed\n\nwhen I receive [setop 2 v]\nwait (0) seconds\nrepeat until <not <(EXIT) = []>>\n    if <<[-1] < (SCROLL X)> and <[2518] > (SCROLL X)>> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        switch backdrop to (back v)\n        repeat (10)\n            change [brightness v] effect by (10)\n        end\n        wait until <<<[2518] < (SCROLL X)> and <[4825] > (SCROLL X)>> or <not <(EXIT) = []>>>\n    end\n    if <<[2518] < (SCROLL X)> and <[4825] > (SCROLL X)>> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        switch backdrop to (back2 v)\n        repeat (10)\n            change [brightness v] effect by (10)\n        end\n        wait until <<[4825] < (SCROLL X)> or <not <(EXIT) = []>>>\n    end\n    if <[4825] < (SCROLL X)> then\n        repeat (10)\n            change [brightness v] effect by (-10)\n        end\n        switch backdrop to (back3 v)\n        repeat (10)\n            change [brightness v] effect by (10)\n        end\n        \n    end\nend\n\nwhen I receive [setup v]\nbroadcast (setop 2 v)\n\nwhen I receive [finish v]\nstop [other scripts in sprite v]\nforever\n    play sound [Upbeat Background Music For Videos and Presentations v] until done\nend\n\nshow variable [mouse x,y v]\nset [mouse x,y v] to (join ((mouse x) + (SCROLL X)) (join [,] ((mouse y) + (SCROLL Y))))\nwait (1) seconds\nhide variable [mouse x,y v]\n\nwhen flag clicked\nswitch backdrop to (start screen v)\nwait (0.5) seconds\nwait until <mouse down?>\nif <[banned players v] contains (username)?> then\n    switch backdrop to (banned v)\n    stop [all v]\nelse\n    switch backdrop to (loading v)\n    broadcast (start da stuff v)\n    broadcast (Green Flag v) and wait\n    broadcast (Play Game v) and wait\n    switch backdrop to (back v)\nend\n\nwhen I receive [begin v]\nswitch backdrop to (back v)\n\nwhen flag clicked\nclear graphic effects\nset volume to (100) %\nwait until <key (m v) pressed?>\nset volume to (0) %\n\nwhen flag clicked\nforever\n    if <[banned players v] contains (username)?> then\n        switch backdrop to (banned v)\n        stop [all v]\n    end\nend\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    repeat (17)\n        Clone at x: [480] y: [0]\n    end\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nbroadcast (end2 v)\ndelete this clone\n\nwhen I receive [end2 v]\nforever\n    hide\nend\n\ndelete this clone\n\nwhen flag clicked\nhide\n\n@DANGER\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((DANGER: x) - (SCROLL X)) ((DANGER: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    repeat (21)\n        Clone at x: [360] y: [0]\n    end\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\nnext costume\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\nwhen I receive [tick v]\nif <<key (h v) pressed?> and <<(username) = [_Twurtle_]> or <<(username) = [sussyayo]> or <(username) = [bendy897]>>>> then\n    hide\nend\n\nwhen I receive [tick v]\nif <<key (f v) pressed?> and <(username) = [_Twurtle_]>> then\n    if <key (w v) pressed?> then\n        change y by (-5)\n    end\n    if <key (s v) pressed?> then\n        change y by (5)\n    end\n    if <key (d v) pressed?> then\n        change x by (-5)\n    end\n    if <key (a v) pressed?> then\n        change x by (5)\n    end\nend\n\n@Landscape\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    repeat (17)\n        Clone at x: [480] y: [0]\n    end\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [end2 v]\nforever\n    hide\nend\n\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nif <<key (f v) pressed?> and <(username) = [_Twurtle_]>> then\n    if <key (w v) pressed?> then\n        change y by (-5)\n    end\n    if <key (s v) pressed?> then\n        change y by (5)\n    end\n    if <key (d v) pressed?> then\n        change x by (-5)\n    end\n    if <key (a v) pressed?> then\n        change x by (5)\n    end\nend\n\nwhen I receive [tick v]\nif <<key (m v) pressed?> and <(username) = [_Twurtle_]>> then\n    set [scroll x v] to [5000]\nend\n\nwhen I receive [tick v]\nif <<<key (t v) pressed?> and <key (1 v) pressed?>> and <<(username) = [_Twurtle_]> or <<(username) = [bendy897]> or <<(username) = [dogsrule360]> or <(username) = [sussyayo]>>>>> then\n    set [x v] to [0]\n    set [y v] to [0]\nend\nif <<<key (t v) pressed?> and <key (2 v) pressed?>> and <<(username) = [_Twurtle_]> or <<(username) = [bendy897]> or <<(username) = [dogsrule360]> or <(username) = [sussyayo]>>>>> then\n    set [x v] to [2000]\n    set [y v] to [500]\nend\nif <<<key (t v) pressed?> and <key (3 v) pressed?>> and <<(username) = [_Twurtle_]> or <<(username) = [bendy897]> or <<(username) = [dogsrule360]> or <(username) = [sussyayo]>>>>> then\n    set [x v] to [4300]\n    set [y v] to [2000]\nend\nif <<<key (t v) pressed?> and <key (4 v) pressed?>> and <<(username) = [_Twurtle_]> or <<(username) = [bendy897]> or <<(username) = [dogsrule360]> or <(username) = [sussyayo]>>>>> then\n    set [x v] to [5700]\n    set [y v] to [500]\nend\nif <<<key (t v) pressed?> and <key (5 v) pressed?>> and <<(username) = [_Twurtle_]> or <<(username) = [bendy897]> or <<(username) = [dogsrule360]> or <(username) = [sussyayo]>>>>> then\n    set [x v] to [8100]\n    set [y v] to [500]\nend\n\n@Saws\n\nwhen I receive [green flag v]\nhide variable [mouse v]\nhide\n\nwhen I receive [tick v]\nturn right (10) degrees\nPosition ((Saws: x) - (SCROLL X)) ((Saws: y) - (SCROLL Y))\ngo to [back v] layer\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [saws: x v] to [0]\nset [saws: y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [150] y: [-50]\nend\nset [saws: x v] to [-999999]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [saws: x v] to (x)\nset [saws: y v] to (y)\ncreate clone of (_myself_ v)\n\nClone at x: [340] y: [27]\nClone at x: [530] y: [27]\nClone at x: [786] y: [27]\nClone at x: [1124] y: [27]\nClone at x: [1331] y: [245]\nClone at x: [1065] y: [345]\nClone at x: [825] y: [272]\nClone at x: [392] y: [245]\nClone at x: [197] y: [335]\n\nClone at x: [631] y: [11]\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\nwhen I receive [end v]\nhide\n\n@Exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nswitch costume to (open v)\nPosition ((Exit: x) - (SCROLL X)) ((Exit: y) - (SCROLL Y))\nif <<touching (player v)?> and <(costume [number v]) = [1]>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [exit: x v] to [0]\nset [exit: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (closed v)\n    Clone at x: [1898] y: [71]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (closed v)\n        Clone at x: [2120] y: [87]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (closed v)\n            Clone at x: [1700] y: [-30]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (end v)\n            else\n                Clone at x: [3148734] y: [3273459]\n            end\n        end\n    end\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [exit: x v] to (x)\nset [exit: y v] to (y)\n\nshow\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\n@Chat\n\nwhen I receive [play game v]\nforever\n    if <(Chat) = [1]> then\n        show\n        go to x: (0) y: (60)\n        create clone of (_myself_ v)\n        repeat until <(y position) = [0]>\n            change y by (-10)\n        end\n        wait until <(Chat) = [0]>\n    else\n        hide\n    end\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen flag clicked\nset [chat v] to [0]\nhide\n\nwhen I receive [chat open v]\nset [chat v] to [1]\n\nwhen I receive [chat close v]\nset [chat v] to [0]\n\nwhen I receive [tick v]\nif <key (space v) pressed?> then\n    broadcast (Chat Close v)\n    hide\n    wait until <not <key (space v) pressed?>>\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (-60)\nrepeat until <(y position) = [1]>\n    change y by (10)\nend\nwait until <(Chat) = [0]>\ndelete this clone\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\n@Talk Button\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [119]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (Chat Open v)\n        hide\n        wait until <(Chat) = [0]>\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen I receive [chat close v]\nset size to (100) %\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [begin v]\nset [size v] to [.8]\nshow\nrepeat (40)\n    change [ghost v] effect by (-3)\nend\n\nwhen flag clicked\ngo to [front v] layer\nhide\ngo to x: (0) y: (0)\nchange [ghost v] effect by (100)\n\nwhen flag clicked\ngo to x: (-193) y: (-156)\nset size to (100) %\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\n@Joining\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nhide\n\nwhen I receive [connecting v]\nswitch costume to (joining v)\nshow\n\nwhen I receive [connected v]\ngo [forward v] (1322) layers\nstart sound [Connect v]\nswitch costume to (connected v)\nshow\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [full v]\nswitch costume to (full  v)\nshow\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\n@Loading\n\nwhen I receive [connecting v]\nshow\nrepeat (88)\n    turn right (20) degrees\nend\nhide\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\ngo [forward v] (213) layers\nset size to (100) %\nhide\npoint in direction (90)\nclear graphic effects\ngo to x: (0) y: (-80)\n\n@20mock\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    set [sp-x v] to (Platforms: x)\n    set [sp-y v] to (Platforms: y)\nend\ngo to [back v] layer\nbroadcast (chat can go frontt v)\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [0] y: [0]\n    Clone at x: [2012] y: [0]\n    Clone at x: [4330] y: [390]\n    Clone at x: [5710] y: [-25]\n    Clone at x: [6432] y: [700]\n    Clone at x: [9020] y: [165]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [platforms: x v] to (x)\nset [platforms: y v] to (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [back v] layer\n\nwhen flag clicked\nset [sp-x v] to [0]\nset [sp-y v] to [0]\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\nwhen I receive [tick v]\nif <<key (f v) pressed?> and <(username) = [_Twurtle_]>> then\n    if <key (w v) pressed?> then\n        change y by (-5)\n    end\n    if <key (s v) pressed?> then\n        change y by (5)\n    end\n    if <key (d v) pressed?> then\n        change x by (-5)\n    end\n    if <key (a v) pressed?> then\n        change x by (5)\n    end\nend\n\n@Others\n\nwhen I receive [begin v]\nset [names v] to [1]\nforever\n    if <key (n v) pressed?> then\n        if <(names) = [1]> then\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [0]\n        else\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [1]\n        end\n    end\nend\n\nwhen I receive [setup others v]\nsetup players\n\ndefine setup players\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ P9)\n                                else\n                                    if <(player) = [10]> then\n                                        set [value v] to (☁ P10)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        Tick\n    end\nend\n\ndefine Tick\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nif <(names) = [1]> then\n    say (join (player #) (join [:] (value)))\nelse\n    say []\nend\nvalue = read from encoded\nvalue = read from encoded\nset x to ((value) - (SCROLL X))\nvalue = read from encoded\nset y to (((value) - (SCROLL Y)) + (8))\nvalue = read from encoded\nbroadcast (Decode Chat v)\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\ndefine Decode Chat (chat)\nif <(chat) = [1]> then\n    say (item (1) of [chat v]) for (2) seconds\nelse\n    if <(chat) = [2]> then\n        say (item (2) of [chat v]) for (2) seconds\n    else\n        if <(chat) = [3]> then\n            say (item (3) of [chat v]) for (2) seconds\n        else\n            if <(chat) = [4]> then\n                say (item (4) of [chat v]) for (2) seconds\n            else\n                if <(chat) = [5]> then\n                    say (item (5) of [chat v]) for (2) seconds\n                else\n                    if <(chat) = [6]> then\n                        say (item (6) of [chat v]) for (2) seconds\n                    else\n                        if <(chat) = [7]> then\n                            say (item (7) of [chat v]) for (2) seconds\n                        else\n                            if <(chat) = [8]> then\n                                say (item (8) of [chat v]) for (2) seconds\n                            else\n                                if <(chat) = [9]> then\n                                    say (item (9) of [chat v]) for (2) seconds\n                                else\n                                    if <(chat) = [10]> then\n                                        say (item (10) of [chat v]) for (2) seconds\n                                    else\n                                        if <(chat) = [11]> then\n                                            say (item (11) of [chat v]) for (2) seconds\n                                        else\n                                            if <(chat) = [12]> then\n                                                say (item (12) of [chat v]) for (2) seconds\n                                            else\n                                                if <(chat) = [13]> then\n                                                    say (item (13) of [chat v]) for (2) seconds\n                                                else\n                                                    if <(chat) = [14]> then\n                                                        say (item (14) of [chat v]) for (2) seconds\n                                                    else\n                                                        if <(chat) = [15]> then\n                                                            say (item (15) of [chat v]) for (2) seconds\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\nwhen I receive [decode chat v]\nDecode Chat (value)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\n@Player\n\nwhen I receive [begin v]\nset [chat v] to [0]\nshow list [chat v]\nforever\n    Chat\nend\n\nif <<key (t v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n    if <(Chat) = [1]> then\n        show list [chat v]\n        set [chat v] to [0]\n        wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\n        if <(Chat) = [0]> then\n            set [chat v] to [1]\n            wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\n        end\n    end\nend\n\nwhen I receive [play game v]\nset [connected? v] to [0]\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\ndefine Change Player x by (sx)\npoint in direction (90)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nif <not <<key (f v) pressed?> and <(username) = [_Twurtle_]>>> then\n    repeat until <not <touching (platforms v)?>>\n        if <(sy) > [0]> then\n            change [y v] by (-1)\n        else\n            change [y v] by (1)\n            set [in air v] to [0]\n        end\n        Position\n        set [sy v] to [0]\n    end\nend\n\ndefine Game On\nset [scroll x v] to (sp-x)\nset [scroll y v] to (sp-y)\nset [x v] to (sp-x)\nset [y v] to (sp-y)\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [ghost v] effect to (0)\nset size to (100) %\n\ndefine Test - Die\nif <touching (danger v)?> then\n    start sound [Hurt v]\n    set [exit v] to [die]\nend\nif <touching (saws v)?> then\n    start sound [Hurt v]\n    set [exit v] to [die]\nend\n\ndefine Game - Die\nset [exit v] to []\nstart sound [Hurt v]\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\ndefine Tick\nif <not <<key (any v) pressed?> and <mouse down?>>> then\n    switch costume to (normal v)\nend\nif <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    switch costume to (left v)\n    change [sx v] by (-2)\nend\nif <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    switch costume to (right v)\n    change [sx v] by (2)\nend\nif <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n    switch costume to (left up v)\nend\nif <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>> then\n    switch costume to (right up v)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player y by (sy)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nif <(x) < [-220]> then\n    set [x v] to [-220]\nend\n\nif <not <key (any v) pressed?>> then\n    switch costume to (normal v)\nend\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ p8 v] to (value)\n                            else\n                                if <(player) = [9]> then\n                                    set [☁ p9 v] to (value)\n                                else\n                                    if <(player) = [10]> then\n                                        set [☁ p10 v] to (value)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) > [0]> then\n        send cloud data\n    end\nend\n\ndefine send cloud data\nset [encoded v] to []\nif <(username) = [_Twurtle_]> then\n    write [_Twurtle_] to encoded\nelse\n    if <(username) = [sussyayo]> then\n        write [hacker] to encoded\n    else\n        write (username) to encoded\n    end\nend\nwrite (round ((timer) * (10))) to encoded\nwrite (x) to encoded\nwrite (y) to encoded\nwrite (Chat Words) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\ndefine Chat\nif <(Chat) = [1]> then\n    if <key (1 v) pressed?> then\n        set [chat v] to [1]\n        say (item (1) of [chat v])\n        wait (2) seconds\n        say []\n        set [chat words v] to [0]\n    else\n        if <key (2 v) pressed?> then\n            set [chat words v] to [2]\n            say (item (2) of [chat v])\n            wait (2) seconds\n            say []\n            set [chat words v] to [0]\n        else\n            if <key (3 v) pressed?> then\n                set [chat words v] to [3]\n                say (item () of [chat v])\n                wait (2) seconds\n                say []\n                set [chat v] to [0]\n            else\n                if <key (4 v) pressed?> then\n                    set [chat words v] to [4]\n                    say (item (4) of [chat v])\n                    wait (2) seconds\n                    say []\n                    set [chat words v] to [0]\n                else\n                    if <key (5 v) pressed?> then\n                        set [chat words v] to [5]\n                        say (item (5) of [chat v])\n                        wait (2) seconds\n                        say []\n                        set [chat words v] to [0]\n                    else\n                        if <key (6 v) pressed?> then\n                            set [chat words v] to [6]\n                            say (item (6) of [chat v])\n                            wait (2) seconds\n                            say []\n                            set [chat words v] to [0]\n                        else\n                            if <key (7 v) pressed?> then\n                                set [chat words v] to [7]\n                                say (item (7) of [chat v])\n                                wait (2) seconds\n                                say []\n                                set [chat words v] to [0]\n                            else\n                                if <key (8 v) pressed?> then\n                                    set [chat words v] to [8]\n                                    say (item (8) of [chat v])\n                                    wait (2) seconds\n                                    say []\n                                    set [chat words v] to [0]\n                                else\n                                    if <key (9 v) pressed?> then\n                                        set [chat words v] to [9]\n                                        say (item (9) of [chat v])\n                                        wait (2) seconds\n                                        say []\n                                        set [chat words v] to [0]\n                                    else\n                                        if <<key (q v) pressed?> and <(username) = [_Twurtle_]>> then\n                                            set [chat words v] to [10]\n                                            say (item (10) of [chat v])\n                                            wait (2) seconds\n                                            say []\n                                            set [chat words v] to [0]\n                                        else\n                                            if <<key (w v) pressed?> and <(username) = [_Twurtle_]>> then\n                                                set [chat words v] to [11]\n                                                say (item (11) of [chat v])\n                                                wait (2) seconds\n                                                say []\n                                                set [chat words v] to [0]\n                                            else\n                                                if <<key (e v) pressed?> and <(username) = [_Twurtle_]>> then\n                                                    set [chat words v] to [12]\n                                                    say (item (12) of [chat v])\n                                                    wait (2) seconds\n                                                    say []\n                                                    set [chat words v] to [0]\n                                                else\n                                                    if <<key (r v) pressed?> and <(username) = [_Twurtle_]>> then\n                                                        set [chat words v] to [13]\n                                                        say (item (13) of [chat v])\n                                                        wait (2) seconds\n                                                        say []\n                                                        set [chat words v] to [0]\n                                                    else\n                                                        if <<key (t v) pressed?> and <(username) = [_Twurtle_]>> then\n                                                            set [chat words v] to [14]\n                                                            say (item (14) of [chat v])\n                                                            wait (2) seconds\n                                                            say []\n                                                            set [chat words v] to [0]\n                                                        else\n                                                            set [chat words v] to [0]\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\nwhen flag clicked\ngo to [back v] layer\n\nwhen I receive [connected v]\nset [connected? v] to [1]\nshow\n\nwhen I receive [connecting v]\nhide\n\nwhen I receive [play game v]\nforever\n    if <(Connected?) = [1]> then\n        broadcast (Reset v) and wait\n        broadcast (Setup v) and wait\n        Game On\n        repeat until <(EXIT) > []>\n            Tick\n            broadcast (Tick v)\n        end\n        if <(EXIT) = [win]> then\n            Game - Win\n        else\n            Game - Die\n        end\n    end\nend\n\nwhen I receive [connected v]\nset [level v] to [1]\n\nwhen I receive [finish v]\nset y to (-45)\nstop [other scripts in sprite v]\nswitch costume to (normal v)\nwait (1) seconds\nswitch costume to (right up v)\nwait (1) seconds\nglide (0.1) secs to x: (127) y: (180)\nbroadcast (END v) and wait\nswitch costume to (right v)\nhide\nwait (1) seconds\nswitch backdrop to (back4 v)\nwait (0.5) seconds\nshow\ngo to x: (-241) y: (180)\nglide (0.2) secs to x: (-131) y: (-6)\nbroadcast (confetti v)\n\nwhen I receive [green flag v]\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\n\nwhen I receive [tick v]\n\nwhen I receive [start da stuff v]\nhide\nset [max players v] to [8]\nset [my player # v] to [0]\nbroadcast (Connecting v)\nbroadcast (Setup Others v) and wait\nbroadcast (Join Game v) and wait\nif <(MY PLAYER #) > [0]> then\n    broadcast (Connected v)\n    start sound [Connect v]\nelse\n    broadcast (Full v)\n    start sound [Disconnect v]\nend\nbroadcast (Setup v) and wait\nbroadcast (Begin v)\n\nwhen I receive [tick v]\n\nwhen I receive [tick v]\nif <<key (g v) pressed?> and <<<(username) = [sussyayo]> or <(username) = [bendy897]>> or <(username) = [_Twurtle_]>>> then\n    change [y v] by (10)\nend\nif <<key (b v) pressed?> and <<<(username) = [sussyayo]> or <(username) = [bendy897]>> or <(username) = [_Twurtle_]>>> then\n    change [y v] by (-10)\nend\n\nwhen flag clicked\nif <(username) = [_Twurtle_]> then\n    set [hacked client v] to [_Twurtle_]\nend\nif <(username) = [sussyayo]> then\n    set [hacked client v] to [hacker]\nend\n\nwhen flag clicked\nforever\n    if <touching (floor v)?> then\n        set [exit v] to [die]\n    end\nend\n\nwhen I receive [tick v]\nif <<key (c v) pressed?> and <(username) = [_Twurtle_]>> then\n    show variable [mouse x,y v]\nend\n\nwhen flag clicked\nforever\n    if <touching (platforms v)?> then\n        wait (0.2) seconds\n        if <touching (platforms v)?> then\n            broadcast (Reset v)\n        end\n    end\nend\n\nwhen flag clicked\nif <(username) = [Dance_Fox]> then\n    set [hacked client v] to [Dance_Fox]\nend\n\nwhen I receive [speedrun v]\nhide variable [time v]\nforever\n    if <<key (s v) pressed?> and <key (p v) pressed?>> then\n        set [exit v] to [die]\n        set [time v] to [0]\n        show variable [time v]\n        wait (1) seconds\n        set [x v] to [0]\n        set [y v] to [0]\n        wait until <not <key (any v) pressed?>>\n        wait until <key (any v) pressed?>\n        reset timer\n        forever\n            set [time v] to (timer)\n            if <<key (s v) pressed?> and <key (p v) pressed?>> then\n                broadcast (speedrun v)\n                stop [this script v]\n            end\n        end\n    end\nend\n\nwhen I receive [begin v]\nbroadcast (speedrun v)\n\n@Comment thingy\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    set [sp-x v] to (Platforms: x)\n    set [sp-y v] to (Platforms: y)\nend\ngo to [back v] layer\nbroadcast (chat can go frontt v)\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [295] y: [625]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [platforms: x v] to (x)\nset [platforms: y v] to (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [back v] layer\n\nwhen flag clicked\nset [sp-x v] to [0]\nset [sp-y v] to [0]\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\nwait (0.5) seconds\nshow\nrepeat until <mouse down?>\n    if <touching (mouse-pointer v)?> then\n        repeat until <(size) > [119]>\n            change [size v] by (.9)\n            change size by (size)\n        end\n    else\n        repeat until <(size) < [101]>\n            set [size v] to [-.8]\n            change [size v] by (-.9)\n            change size by (size)\n        end\n    end\nend\nhide\n\nwhen flag clicked\nwait (0.5) seconds\nwait until <mouse down?>\nhide\n\n@Sprite2\n\nwhen flag clicked\nshow\nrepeat until <mouse down?>\n    set [ghost v] effect to (60)\n    go to x: (262) y: (17)\n    glide (1) secs to x: (-262) y: (17)\n    go to x: (262) y: (-30)\n    glide (1) secs to x: (-262) y: (-30)\nend\nhide\n\nwhen I receive [connecting v]\nhide\n\n@confetti\n\nwhen flag clicked\nhide\n\nwhen I receive [confetti v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\ngo to x: (pick random (-240) to (240)) y: (159)\nset [color v] effect to (pick random (1) to (100))\nrepeat until <touching (_edge_ v)?>\n    change y by (-10)\n    turn right (15) degrees\nend\ndelete this clone\n\n@20mock2\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    set [sp-x v] to (Platforms: x)\n    set [sp-y v] to (Platforms: y)\nend\ngo to [back v] layer\nbroadcast (chat can go frontt v)\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (flag2 v)\n    Clone at x: [8364] y: [187]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [platforms: x v] to (x)\nset [platforms: y v] to (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to [back v] layer\n\nwhen flag clicked\nset [sp-x v] to [0]\nset [sp-y v] to [0]\n\nwhen flag clicked\nwait until <touching (player v)?>\nbroadcast (finish v) and wait\nbroadcast (END v)\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\nwhen flag clicked\nwait (5) seconds\nforever\n    switch costume to (flag v)\nend\n\n@lag reducer\n\n@gem1\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [gems v] to [0]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\nend\n\nClone at x: [0] y: [0]\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<<(x) = (x position)> and <(y) = (y position)>> and <not <(gems) > [0]>>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        hide\n        change [gems v] by (1)\n        wait (0.5) seconds\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        hide\n        change [gems v] by (1)\n        wait (0.5) seconds\n    end\nend\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\n\nwhen I receive [end v]\nhide\n\n@Gems 2\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <not <(collected) = [1]>> then\n    Position ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\nend\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume11 v)\n    Clone at x: [6079] y: [300]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nbroadcast (end2 v)\ndelete this clone\n\nwhen I receive [end2 v]\nforever\n    hide\nend\n\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nset [collected v] to [0]\nforever\n    if <touching (player v)?> then\n        hide\n        stop [other scripts in sprite v]\n        set [collected v] to [1]\n    end\nend\n\n@bounce\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <not <(collected) = [1]>> then\n    Position ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\nend\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (costume1 v)\n    Clone at x: [6960] y: [202]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nnext costume\nnext costume\n\ncreate clone of (_myself_ v)\n\nwhen I receive [end v]\nstop [other scripts in sprite v]\nbroadcast (end2 v)\ndelete this clone\n\nwhen I receive [end2 v]\nforever\n    hide\nend\n\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nset [collected v] to [0]\nforever\n    if <touching (player v)?> then\n        repeat (23)\n            set [x v] to ((SCROLL X) + (12))\n            set [y v] to ((y) - (1))\n        end\n    end\nend\n\nwhen I receive [begin v]\nset [collected v] to [0]\nforever\n    if <<<(username) = [_Twurtle_]> or <(username) = [Sussyayo]>> and <key (space v) pressed?>> then\n        change [y v] by (20)\n    end\nend\n\n@sound\n\nwhen flag clicked\nclear graphic effects\nforever\n    play sound [Terraria Music - Alternate Day v] until done\n    play sound [Terraria Music - Night v] until done\n    play sound [Terraria Music - Day v] until done\n    play sound [Terraria Music - Ocean v] until done\nend\n\nwhen flag clicked\nforever\n    if <<key (s v) pressed?> and <key (p v) pressed?>> then\n        stop [other scripts in sprite v]\n        set language to (en v)::tts\n        set voice to (alto v)::tts\n        speak [entering speed run mode]::tts\n        stop all sounds\n        forever\n            play sound [Dream Speedrun Music v] until done\n        end\n    end\nend\n\n
—————————————————————\nINSTRUCTIONS:\n\n• Arrow keys and WASD to move.\n•Press the talk button to chat.\n•Do not touch spikes or fire\n•Collect secret gems\n•Travel through the biomes\n---------------------------------------------------\n\nPLEASE LOVE, FAV, AND FOLLOW FOR PART 2!\n\n--------------------------------------------------