☁ Minion Mission! // cloud multiplayer scrolling platformer racing game #games#all 
@Stage\n\nwhen I receive [mg intro done =d v]\nset volume to (50) %\nforever\n    play sound [Vexento - Tevo \(Original Mix\) v] until done\nend\n\nwhen flag clicked\nbroadcast (mg intro done =D v)\ndelete all of [sub to my yt channel "joshcre8s" for fun content! v]\nadd [https://www.youtube.com/channel/UCS-MpseSsGhtijbHt0aevzw] to [sub to my yt channel "joshcre8s" for fun content! v]\nhide list [sub to my yt channel "joshcre8s" for fun content! v]\nwait (4) seconds\nshow list [sub to my yt channel "joshcre8s" for fun content! v]\n\nwhen I receive [win v]\nstop [all v]\n\nwhen [z v] key pressed\nif <(username) = [mGR8T]> then\n    repeat until <not <key (z v) pressed?>>\n        set [mouse pos v] to (join ((mouse x) + (scroll x)) (join [ . ] ((mouse y) + (scroll y))))\n    end\nend\n\n@blank\n\n@player\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [data v] to (item # of (letter (letter #) of (val)) in [code v])\n    uppercase detect (letter (letter #) of (val))\n    set [encoded v] to (join (encoded) (DATA))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [begin v]\nforever\n    send cloud data\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                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine send cloud data\nif <[1] > (MY PLAYER #)> then\n    stop [this script v]\nend\nadd (x) to [buffer v]\nadd (y) to [buffer v]\nchange [cloud timer v] by (1)\nif <[3] > (cloud timer)> then\n    stop [this script v]\nend\nset [cloud timer v] to [0]\nset [encoded v] to []\nwrite (username) to encoded\nwrite (Chat Words) to encoded\nwrite (cos#) to encoded\nwrite (direction) to encoded\nwrite (round ((timer) * (10))) to encoded\nrepeat (length of [buffer v])\n    write (item (1) of [buffer v]) to encoded\n    delete (1) of [buffer v]\nend\nset cloud # (MY PLAYER #) to (encoded)\n\ndefine game on\nset rotation style [left-right v]\nset size to (180) %\nclear graphic effects\npoint in direction (90)\nshow\nset [in air v] to [0]\nset [sy v] to [0]\nset [sx v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [exit v] to []\nreset timer\n\nwhen I receive [green flag v]\nset volume to (100) %\nhide\ngo to [front v] layer\n\ndefine tick\nif <<<key (right arrow v) pressed?> or <<(x position) < (mouse x)> and <mouse down?>>> or <key (d v) pressed?>> then\n    change [sx v] by (2)\nend\nif <<<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>> or <key (a v) pressed?>> then\n    change [sx v] by (-2)\nend\nif <<<key (up arrow v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>> or <key (w v) pressed?>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\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 <(sy) > [-15]> then\n    change [sy v] by (-2)\nend\nif <touching (jump v)?> then\n    start sound [Big Boing v]\n    set [sy v] to [32]\nend\nchange player y by (sy)\nposition\ntest - die\nchange [scroll x v] by (round (((x) - (scroll x)) / (10)))\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) < [-200]> then\n    set [exit v] to [die]\nend\nif <<key (any v) pressed?> or <mouse down?>> then\n    set [timeout? v] to [1100]\nelse\n    if <not <(username) = [mGR8T]>> then\n        change [timeout? v] by (-1)\n    end\nend\nif <(timeout?) < [1]> then\n    broadcast (session timeout v) and wait\nend\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (reset v)\n    broadcast (setup v)\n    game on\n    repeat until <(exit) > []>\n        switch costume to (hitbox v)\n        tick\n        broadcast (tick v)\n        switch costume to (cos#)\n    end\n    if <(exit) = [win]> then\n        Game - win\n    else\n        game - die\n    end\nend\n\ndefine change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nposition\nif <touching (platforms v)?> then\n    if <(sy) > [0]> then\n        touching platformer out [-1]\n    else\n        touching platformer out [1]\n    end\nend\n\nwhen I receive [begin v]\nbroadcast (green flag v) and wait\nbroadcast (play game v) and wait\n\ndefine position\ngo to x: ((x) - (scroll x)) y: ((y) - (scroll y))\n\ndefine change player x by (sx)\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    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\ndefine game - die\nshow\nstart sound [Door Closing v]\nset rotation style [all around v]\nrepeat until <(y position) < [-179]>\n    show\n    switch costume to (idle11 v)\n    change y by (-10)\n    turn left (25) degrees\nend\nset rotation style [left-right v]\nhide\nset [exit v] to []\nwait (0.5) seconds\n\ndefine test - die\nif <<<<touching (enemy v)?> or <touching (saws v)?>> or <touching (enemy2 v)?>> or <touching (spikes v)?>> then\n    broadcast (gg v)\n    set [exit v] to [die]\nend\n\ndefine Game - win\nstop [other scripts in sprite v]\nswitch costume to (idle12 v)\nglide (1) secs to x: (0) y: (0)\nset [level v] to [2]\nwait (0.4) seconds\nbroadcast (win v)\n\ndefine touching platformer out (out)\nchange [y v] by (out)\nposition\nrepeat until <not <touching (platforms v)?>>\n    change [y v] by (out)\n    position\nend\nset [sy v] to [0]\nif <(out) > [0]> then\n    set [in air v] to [0]\nend\n\nwhen I receive [tick v]\nif <touching (ladders v)?> then\n    set [sy v] to [2]\n    if <<<key (up arrow v) pressed?> or <<<(mouse y) > (y position)> and <mouse down?>> and <not <touching (mouse-pointer v)?>>>> or <key (w v) pressed?>> then\n        change [sy v] by (8)\n    end\n    if <<<key (down arrow v) pressed?> or <<<(y position) > (mouse y)> and <mouse down?>> and <not <touching (mouse-pointer v)?>>>> or <key (s v) pressed?>> then\n        change [sy v] by (-8)\n    end\n    if <<<key (right arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>> or <key (d v) pressed?>> then\n        change [sx v] by (2)\n    end\n    if <<<key (right arrow v) pressed?> or <<(x position) > (mouse x)> and <mouse down?>>> or <key (a v) pressed?>> then\n        change [sx v] by (-2)\n    end\n    set [sx v] to ((SX) * (0.8))\n    position\nend\n\nwhen flag clicked\nset [chat v] to [0]\nshow list [opponent chat v]\nshow list [chat v]\ndelete all of [chat v]\ndelete all of [opponent chat v]\nadd [Hello!] to [chat v]\nadd [Bye!] to [chat v]\nadd [wait for me!] to [chat v]\nadd [HARD!] to [chat v]\nadd [c'mon!] to [chat v]\nadd [yes] to [chat v]\nadd [no thanks!] to [chat v]\nadd [Ok] to [chat v]\nadd [race to the top?] to [chat v]\nset [i v] to [0]\nrepeat (length of [chat v])\n    change [i v] by (1)\n    add (join [: ] (item (i) of [chat v])) to [opponent chat v]\nend\n\nwhen I receive [begin v]\nforever\n    if <key (1 v) pressed?> then\n        set [chat words v] to [1]\n        say (item (Chat Words) 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 (Chat Words) 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 (Chat Words) of [chat v])\n                wait (2) seconds\n                say []\n                set [chat words v] to [0]\n            else\n                if <key (4 v) pressed?> then\n                    set [chat words v] to [4]\n                    say (item (Chat Words) 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 (Chat Words) 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 (Chat Words) 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 (Chat Words) 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 (Chat Words) 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 (Chat Words) of [chat v])\n                                        wait (2) seconds\n                                        say []\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\nend\n\nwhen flag clicked\nset [timeout? v] to [1100]\n\nwhen I receive [mg intro done =d v]\nhide\nset [max players v] to [9]\nset [my player # v] to [0]\ndelete all of [buffer v]\nbroadcast (setup opponents v) and wait\nbroadcast (joinibng v)\nbroadcast (join game v) and wait\nif <(MY PLAYER #) > [0]> then\n    broadcast (joined v)\nelse\n    broadcast (full  v)\nend\nwait (1) seconds\nbroadcast (begin v)\n\nwhen I receive [begin v]\nforever\n    if <key (t v) pressed?> then\n        if <(Chat) = [0]> then\n            set [chat v] to [1]\n        else\n            set [chat v] to [0]\n        end\n        wait until <not <key (t v) pressed?>>\n    end\n    if <(Chat) = [0]> then\n        show list [chat v]\n    else\n        hide list [chat v]\n    end\nend\n\nwhen flag clicked\nset [cos# v] to [2]\nforever\n    if <<<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <<key (a v) pressed?> or <key (d v) pressed?>>> or <<<(mouse x) < (x position)> and <mouse down?>> or <<(x position) < (mouse x)> and <mouse down?>>>> then\n        change [cos# v] by (1)\n        if <(cos#) = [20]> then\n            set [cos# v] to [2]\n        end\n    else\n        set [cos# v] to [1]\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\n\ndefine uppercase detect (input)\nif <(DATA) < [36]> then\n    switch costume to (blank v)\n    switch costume to (input)\n    if <(costume [name v]) = [blank]> then\n        change [data v] by (26)\n    end\nend\n\nwhen I receive [tick v]\nif <key (right arrow v) pressed?> then\n    point in direction (90)\nend\nif <key (left arrow v) pressed?> then\n    point in direction (-90)\nend\nif <key (d v) pressed?> then\n    point in direction (90)\nend\nif <key (a v) pressed?> then\n    point in direction (-90)\nend\nif <<(x position) < (mouse x)> and <mouse down?>> then\n    point in direction (90)\nend\nif <<(mouse x) < (x position)> and <mouse down?>> then\n    point in direction (-90)\nend\n\n@enemy2\n\ndefine point towards x: (x) y: (y) (xx) (yy)\npoint in direction (((180) * <<(yy) > (y)> or <(yy) = (y)>>) + ([atan v] of (((xx) - (x)) / ((yy) - (y))) ))\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nset rotation style [left-right v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\nswitch costume to (costume#)\n\nwhen I receive [setup v]\nhide\nset rotation style [left-right v]\nset [move x v] to [0]\nset [minx v] to [0]\nset [miny v] to [0]\nclone at [100] [588] [270] [588] [6] [-1] [13]\nclone at [-170] [1039] [35] [1039] [8] [-1] [8]\nset [x v] to [-9999]\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]\nhide\ndelete this clone\n\ndefine clone at (min x) (min y) (max x) (max y) (power) (costume lag) (wait time)\nset [x v] to (min x)\nset [y v] to (min y)\nset [minx v] to (min x)\nset [miny v] to (min y)\nset [maxx v] to (max x)\nset [maxy v] to (max y)\nset [power v] to (power)\nset [costume speed v] to (costume lag)\nset [wait time v] to (wait time)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [costume# v] to [1]\nforever\n    repeat until <<<((x) - (scroll x)) = ((maxx) - (scroll x))> or <((x) - (scroll x)) > ((maxx) - (scroll x))>> and <<((y) - (scroll y)) = ((maxy) - (scroll y))> or <((y) - (scroll y)) > ((maxy) - (scroll y))>>>\n        point towards x: ((maxx) - (scroll x)) y: ((maxy) - (scroll y)) ((x) - (scroll x)) ((y) - (scroll y))\n        change [x v] by (([sin v] of (direction) ) * (power))\n        change [y v] by (([cos v] of (direction) ) * (power))\n        change [costume# v] by (1)\n        if <not <(costume speed) < [0]>> then\n            wait (costume speed) seconds\n        end\n        if <(costume#) = [19]> then\n            set [costume# v] to [1]\n        end\n    end\n    repeat (wait time)\n        set [costume# v] to [1]\n    end\n    repeat until <<<((x) - (scroll x)) = ((minx) - (scroll x))> or <((x) - (scroll x)) < ((minx) - (scroll x))>> and <<((y) - (scroll y)) = ((miny) - (scroll y))> or <((miny) - (scroll y)) > ((y) - (scroll y))>>>\n        point towards x: ((minx) - (scroll x)) y: ((miny) - (scroll y)) ((x) - (scroll x)) ((y) - (scroll y))\n        change [x v] by (([sin v] of (direction) ) * (power))\n        change [y v] by (([cos v] of (direction) ) * (power))\n        change [costume# v] by (1)\n        if <not <(costume speed) < [0]>> then\n            wait (costume speed) seconds\n        end\n        if <(costume#) = [19]> then\n            set [costume# v] to [1]\n        end\n    end\n    repeat (wait time)\n        set [costume# v] to [1]\n    end\nend\n\nwhen I receive [gg v]\nforever\n    switch costume to (idle v)\nend\n\n@opponents\n\ndefine begin decoding of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = read from ecoded\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\ndefine setup players\ndelete all of [buffer v]\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\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 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                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup opponents v]\nsetup players\n\ndefine tick\ngo to [front v] layer\ngo [backward v] (1) layers\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]\n    begin decoding of (value)\n    value = read from ecoded\n    set [username v] to (value)\n    value = read from ecoded\n    if <(names) = [1]> then\n        say (join (username) (item (value) of [opponent chat v]))\n    else\n        say []\n    end\n    value = read from ecoded\n    set [costume# v] to (value)\n    value = read from ecoded\n    set [dir v] to (value)\n    value = read from ecoded\n    value = read from ecoded\n    repeat until <(value) = []>\n        add (value) to [buffer v]\n        value = read from ecoded\n    end\nend\nif <(length of [buffer v]) > [0]> then\n    set x to ((item (1) of [buffer v]) - (scroll x))\n    delete (1) of [buffer v]\n    set y to ((item (1) of [buffer v]) - (scroll y))\n    delete (1) of [buffer v]\nend\ncheck if of edge\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\nwhen flag clicked\nset [names v] to [1]\nforever\n    if <key (n v) pressed?> then\n        if <(names) = [1]> then\n            set [names v] to [0]\n        else\n            set [names v] to [1]\n        end\n    end\n    wait until <not <key (n v) pressed?>>\nend\n\ndefine check if of edge\nif <<<(x position) > [200]> or <(x position) < [-200]>> or <<(y position) > [150]> or <(y position) < [-150]>>> then\n    set size to (50) %\n    set rotation style [all around v]\n    set [color v] effect to (0)\n    set [brightness v] effect to (0)\n    switch costume to (arrow v)\n    point towards (player v)\n    if on edge, bounce\nelse\n    set size to (180) %\n    set rotation style [left-right v]\n    switch costume to (costume#)\n    set [color v] effect to (8)\n    set [brightness v] effect to (-5)\n    point in direction (dir)\nend\n\n@crown\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\npoint in direction ((([cos v] of ((timer) * (180)) ) * (-6)) + (90))\nif <touching (player v)?> then\n    start sound [Goal Cheer v]\n    set [exit v] to [win]\n    hide\nend\n\nwhen I receive [setup v]\nset [collected2 v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(level) = [1]> then\n    switch costume to (open v)\n    clone at x: [420] y: [1770]\nend\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 [x v] to (x)\nset [y v] to (y)\n\n@platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\ngo to [back v] layer\ngo [forward v] (5) layers\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (blank v)\nset size to (220) %\nswitch costume to (1 v)\nclone at x: [0] y: [230]\nclone at x: [80] y: [280]\nclone at x: [-200] y: [-100]\nclone at x: [-200] y: [-100]\nclone at x: [170] y: [650]\nclone at x: [615] y: [200]\nclone at x: [0] y: [0]\nclone at x: [0] y: [370]\nset [x v] to [-99999]\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]\nhide\ndelete this clone\n\ndefine clone at x: (x) y: (y)\nchange [x v] by (x)\nchange [y v] by (y)\ncreate clone of (_myself_ v)\nnext costume\n\n@ladders\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nclone at x: [295] y: [50]\nclone at x: [80] y: [400]\nclone at x: [0] y: [0]\nclone at x: [-460] y: [-260]\nclone at x: [-180] y: [150]\nclone at x: [500] y: [850]\nclone at x: [0] y: [300]\nclone at x: [-200] y: [0]\nset [x v] to [-99999]\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]\nhide\ndelete this clone\n\ndefine clone at x: (x) y: (y)\nchange [x v] by (x)\nchange [y v] by (y)\ncreate clone of (_myself_ v)\nnext costume\n\n@glow\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\npoint in direction ((timer) * (15))\nif <(exit) = [win]> then\n    hide\nend\n\nwhen I receive [setup v]\nset size to (30) %\nset [collected2 v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nif <(level) = [1]> then\n    switch costume to (open v)\n    clone at x: [420] y: [1770]\nend\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 [x v] to (x)\nset [y v] to (y)\n\n@enemy\n\ndefine point towards x: (x) y: (y) (xx) (yy)\npoint in direction (((180) * <<(yy) > (y)> or <(yy) = (y)>>) + ([atan v] of (((xx) - (x)) / ((yy) - (y))) ))\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nset rotation style [don't rotate v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nset rotation style [left-right v]\nset [move x v] to [0]\nset [minx v] to [0]\nset [miny v] to [0]\nswitch costume to (1 v)\nclone at [-70] [350] [10] [350] [6] [0.2]\nclone at [135] [1400] [360] [1400] [6] [0.2]\nset [x v] to [-9999]\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]\nhide\ndelete this clone\n\ndefine clone at (min x) (min y) (max x) (max y) (power) (delay)\nset [x v] to (min x)\nset [y v] to (min y)\nset [minx v] to (min x)\nset [miny v] to (min y)\nset [maxx v] to (max x)\nset [maxy v] to (max y)\nset [power v] to (power)\nset [delay v] to (delay)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    repeat until <<<((x) - (scroll x)) = ((maxx) - (scroll x))> or <((x) - (scroll x)) > ((maxx) - (scroll x))>> and <<((y) - (scroll y)) = ((maxy) - (scroll y))> or <((y) - (scroll y)) > ((maxy) - (scroll y))>>>\n        point towards x: ((maxx) - (scroll x)) y: ((maxy) - (scroll y)) ((x) - (scroll x)) ((y) - (scroll y))\n        change [x v] by (([sin v] of (direction) ) * (power))\n        change [y v] by (([cos v] of (direction) ) * (power))\n    end\n    wait (delay) seconds\n    repeat until <<<((x) - (scroll x)) = ((minx) - (scroll x))> or <((x) - (scroll x)) < ((minx) - (scroll x))>> and <<((y) - (scroll y)) = ((miny) - (scroll y))> or <((miny) - (scroll y)) > ((y) - (scroll y))>>>\n        point towards x: ((minx) - (scroll x)) y: ((miny) - (scroll y)) ((x) - (scroll x)) ((y) - (scroll y))\n        change [x v] by (([sin v] of (direction) ) * (power))\n        change [y v] by (([cos v] of (direction) ) * (power))\n    end\n    wait (delay) seconds\nend\n\n@Joining\n\nwhen flag clicked\nhide\n\nwhen I receive [joined v]\ngo [forward v] (1322) layers\ngo to [front v] layer\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)\nstart sound [Disconnect v]\nshow\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [mg intro done =d v]\nswitch costume to (joining v)\nshow\n\n@Loading\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\nwhen I receive [joinibng v]\nrepeat (10)\n    create clone of (_myself_ v)\n    turn right (40) degrees\nend\n\nwhen I receive [joined v]\nhide\ndelete this clone\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\nforever\n    repeat (20)\n        turn right (7.5) degrees\n        change [ghost v] effect by (-6)\n        change size by (1)\n    end\n    repeat (20)\n        turn right (7.5) degrees\n        change [ghost v] effect by (6)\n        change size by (-1)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [full  v]\nhide\ndelete this clone\n\n@intro bg :P\n\nwhen I receive [front v]\ngo to [front v] layer\nshow\nwait (2) seconds\nhide\n\n@tn\n\nwhen flag clicked\nhide variable [collected show v]\nhide variable [collected2 v]\nshow\nswitch costume to (co3stume1 v)\nset [ghost v] effect to (100)\nrepeat (20)\n    hide variable [collected show v]\nend\nforever\n    go to [front v] layer\n    if <(level) = [2]> then\n        switch costume to (costume2 v)\n    end\nend\n\nwhen flag clicked\ngo to x: (0) y: (300)\nswitch costume to (costume 1 v)\nset [level v] to [1]\nwait until <(level) = [2]>\nstop [other scripts in sprite v]\nclear graphic effects\nshow list [cloud chat items v]\nhide variable [collected show v]\nset [show v] to (seconds)\nbroadcast (hi v)\nshow variable [output v]\nshow variable [show v]\nstop [all v]\n\nwhen flag clicked\nset [play? v] to [0]\nreset timer\nhide variable [output v]\nhide variable [show v]\nhide variable [seconds v]\nforever\n    set [seconds v] to (timer)\nend\n\nwhen flag clicked\nwait (1) seconds\nrepeat (200)\n    hide variable [collected show v]\nend\n\nwhen I receive [session timeout v]\nswitch costume to (timeout2 v)\ngo to [front v] layer\nstop [all v]\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (timer)\nshow list [sub to my yt channel "joshcre8s" for fun content! v]\nhide variable [display v]\nif <(turbo?) = [false]> then\n    show list [chat v]\n    repeat until <(y position) < [0]>\n        go to [front v] layer\n        change y by (((0) - (y position)) / (5))\n    end\n    go to x: (0) y: (0)\n    stop [this script v]\nend\n\nwhen I receive [turbo mode v]\nstop [other scripts in sprite v]\nset [timer v] to ((timer) - (0.001))\ngo to x: (0) y: (0)\nswitch costume to (turbomode v)\nstop [all v]\n\n@☁ Highscore\n\nwhen flag clicked\nRESET\n\ndefine encode (input)\nset [letter_num v] to [1]\nrepeat (length of (input))\n    set [__i v] to (item # of (letter (letter_num) of (input)) in [chars v])\n    if <(__i) < [36]> then\n        switch costume to (blank v)\n        switch costume to (letter (letter_num) of (input))\n        if <(costume [number v]) = [1]> then\n            change [__i v] by (26)\n        end\n    end\n    set [_encoded v] to (join (_encoded) (__i))\n    change [letter_num v] by (1)\nend\nset [_encoded v] to (join (_encoded) [00])\n\ndefine decode (cloud)\nset [decoded v] to []\nforever\n    set [#decode v] to (join (letter (letter_num) of (cloud)) (letter ((letter_num) + (1)) of (cloud)))\n    change [letter_num v] by (2)\n    if <(#decode) < [1]> then\n        stop [this script v]\n    end\n    set [decoded v] to (join (decoded) (item (#decode) of [chars v]))\nend\n\nwhen flag clicked\nforever\n    set [output v] to (join (join (join (_highscore) [sec]) [ By: ]) (_decoded username))\nend\n\ndefine RESET\ndelete all of [chars v]\nrepeat (9)\n    add [] to [chars v]\nend\nset [chars v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_.]\nset [char# v] to [1]\nrepeat (length of (chars))\n    add (letter (char#) of (chars)) to [chars v]\n    change [char# v] by (1)\nend\nset [score v] to [0]\nset [_username v] to (username)\nset [letter_num v] to [1]\ndecode (☁ HIscore cloud)\nset [_decoded username v] to (decoded)\ndecode (☁ HIscore cloud)\nset [_highscore v] to (decoded)\nset [output v] to (join (join (_highscore) [ By: ]) (_decoded username))\n\nwhen I receive [hi v]\nquick execution\n\ndefine quick execution\nrepeat (10)\n    set [score v] to (seconds)\n    set [letter_num v] to [1]\n    decode (☁ HIscore cloud)\n    set [_decoded username v] to (decoded)\n    decode (☁ HIscore cloud)\n    set [_highscore v] to (decoded)\n    if <(SCORE) < (_highscore)> then\n        set [_encoded v] to []\n        encode (_username)\n        encode (SCORE)\n        set [☁ hiscore cloud v] to (_encoded)\n    end\n    set [output v] to (join (join (_highscore) [ By: ]) (_decoded username))\nend\n\nwhen [p v] key pressed\nif <(username) = [mGR8T]> then\n    ask [are you 100% sure you want to reset the highscore? \(y/n\)] and wait\n    if <(answer) = [y]> then\n        set [_encoded v] to []\n        encode [mGR8T]\n        encode [100]\n        set [☁ hiscore cloud v] to (_encoded)\n    end\nend\n\n@clouds2\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nswitch costume to (costume4 v)\ngo to x: (250) y: (pick random (-50) to (180))\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (pick random (0) to (50))\nset size to (pick random (50) to (100)) %\nset [brightness v] effect to (100)\nif <(pick random (1) to (3)) = [2]> then\n    set [ghost v] effect to (pick random (50) to (80))\n    go to [front v] layer\n    set [ggg v] to [-1.1]\nelse\n    go to [back v] layer\n    set [ggg v] to (pick random (-0.5) to (-0.8))\nend\nrepeat until <(x position) < [-230]>\n    change x by (ggg)\nend\nrepeat (10)\n    change [ghost v] effect by (10)\n    change x by (-2)\nend\ndelete this clone\n\nwhen I receive [begin v]\ncreate clone of (_myself_ v)\nforever\n    wait (pick random (10) to (15)) seconds\n    repeat (pick random (1) to (3))\n        create clone of (_myself_ v)\n        wait (6) seconds\n    end\nend\n\n@jump\n\nwhen I receive [setup v]\nset rotation style [left-right v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nclone at x: [470] y: [167]\nclone at x: [-435] y: [728]\nclone at x: [-360] y: [169]\nclone at x: [530] y: [1146]\nclone at x: [135] y: [1360]\nset [x v] to [-9999]\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\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 [green flag v]\nhide\n\nwhen I receive [reset v]\nhide\ndelete this clone\n\nwhen I receive [tick v]\ngo to [back v] layer\ngo [forward v] (5) layers\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\n@saws\n\nwhen I receive [setup v]\nset rotation style [all around v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nclone at x: [455] y: [440]\nclone at x: [-360] y: [460]\nclone at x: [130] y: [1605]\nset [x v] to [-9999]\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\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 [green flag v]\nhide\n\nwhen I receive [reset v]\nhide\ndelete this clone\n\nwhen I receive [tick v]\ngo to [back v] layer\ngo [forward v] (5) layers\npoint in direction ((timer) * (220))\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\n@spikes\n\nwhen I receive [setup v]\nset rotation style [don't rotate v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nclone at x: [-255] y: [165]\nclone at x: [-385] y: [725]\nclone at x: [-300] y: [1018]\nclone at x: [-220] y: [1018]\nclone at x: [478] y: [1140]\nclone at x: [400] y: [1355]\nclone at x: [140] y: [1722]\nclone at x: [210] y: [1722]\nclone at x: [280] y: [1722]\nset [x v] to [-9999]\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\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 [green flag v]\nhide\n\nwhen I receive [reset v]\nhide\ndelete this clone\n\nwhen I receive [tick v]\ngo to [back v] layer\ngo [forward v] (5) layers\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\n@detector\n\nwhen flag clicked\nhide\nset [clone id2 v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id2 v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\nswitch costume to (1 v)\nset [ghost v] effect to (100)\nrepeat (80)\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nwait until <mouse down?>\nrepeat (50)\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nset [faved___ v] to [0]\nset [loved__ v] to [0]\n\nwhen I start as a clone\nif <(clone id2) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id2) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\n@ads\n\nwhen I receive [begin v]\nhide\n\nwhen I receive [begin v]\nforever\n    wait (pick random (10) to (15)) seconds\n    set size to (80) %\n    switch costume to (pick random (1) to (13))\n    go to x: (-160) y: (180)\n    show\n    go to [front v] layer\n    go [backward v] (1) layers\n    transitions\nend\n\nwhen flag clicked\nhide\n\ndefine transitions\nif <(costume [name v]) = [10]> then\n    repeat (9)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (1)\n    end\n    start sound [pop v]\n    repeat (5)\n        change y by (-1)\n    end\n    wait (pick random (3) to (5)) seconds\n    repeat (9)\n        change y by (6)\n    end\n    hide\n    stop [this script v]\nend\nif <(costume [name v]) = [7]> then\n    repeat (4)\n        change y by (-6)\n    end\n    repeat (5)\n        change y by (1)\n    end\n    start sound [pop v]\n    repeat (5)\n        change y by (-1)\n    end\n    wait (pick random (3) to (5)) seconds\n    repeat (4)\n        change y by (6)\n    end\n    hide\n    stop [this script v]\nend\nrepeat (6)\n    change y by (-6)\nend\nrepeat (5)\n    change y by (1)\nend\nstart sound [pop v]\nrepeat (5)\n    change y by (-1)\nend\nwait (pick random (3) to (5)) seconds\nrepeat (6)\n    change y by (6)\nend\nhide\n\n
-NOTES-\nwalkthrough:\nhttps://www.youtube.com/watch?v=ft-pDoAfoeE&t=9s\n(scroll to the bottom for a surprise!! :3)\n⚠ this area is prone to rage quits >:3 ⚠\nSUPER HARD!! but not impossible!\nclick flag x2 idk why but just do it xP\nonly 9 slots available...\n⚠ new scratchers can't see online players... ⚠\nfull-screen and 100% volume for BEST experience!\n========================================\nshoutout to PGMA [a contest]  (requested)\nvote here: http://bitly.ws/dY2V\n========================================\n-story-\nYou are given a MISSION from the gr8 ones of your town! your mission is actually a TEST to overcome! there is a legend spoken of a priceless crown!! find it and you KEEP it! but wait, there are other competitors too! who will retrieve the legendary crown the fastest! will so many dangerous obstacles ahead of you! you have one chance! if you fail halfway, you will be found at the very start again! no turning back fellow minion! the one to overcome it all and to obtain the legendary crown the fastest, has his name imprinted on the \n"live orange board of Winners!" also known as The "Cloud variable!!!" XP beat the Fastest and you become a WORLD-WIDE LEGEND!!!!! until a new star may arise... and that star may...be...YOU!\n========================================\n-controls-\n>> W,A,S,D or arrow keys to move.\n>> reach the crown to win!\n>> your on timer, so run your FASTEST!!\n>> press "T" to show/hide chat items.\n>> if you want to chat, press the number of the slot in the chat list you want to say!\n>> press "N" to show/hide the names of the people online\n>> comment your time!! and tips you'de like to share!\n>> (veryy IMPORTANT)  ❤ & ⭐!! XD\n>> ENJOY!!!\n========================================\n-work stats-\n2k+ blocks!\n100+ assets!\n150+ scripts!\n28+ hours of HARD work!\nas you might have already figured! i spent QUITE A LOT of time in this and i REALLY hope you could ❤, ⭐ and follow cuz it makes my day!! =D\nalso, comment your feedback and remix to add your own levels!! HOPE YOU ENJOY!!!\nalso if you find bugs and/or glitches, plz report them to me as soon as possible!\n========================================\n-credits-\n- @Shocker-Games for 50% of the amazing art!\n- @TimMCcool for the ❤ & ⭐ detector!\n- @JTHEJET for the ad notes (edited by me)\n- @HenryWolfe for the contest we could compete in!\n- thanks to scratch for some SFXs\n- thanks to Vexento @ youtube.com for the music!\n- thanks to @griffpatch for some help!\n- thanks to @mGR8T (me) for everything else! =D\n======================================\n-extras-\nI CAME 3RD!!!!!\nTYSM for #17 TRENDING ALL AND TRENDING GAMES!!!  [7th June (IST)] =DDD\nTYSM for TOP-LOVED [8 June (IST)] =DDD\ncomment whatever you think is sus in this game xD\nThis is literally my 2nd BEST game yet!!\nif you enjoyed then don't forget to ❤ & ⭐ for more!!\n======================================\n-TAGS (ignore) -\n#games#all#cool#pls#get#on#trending#i#worked#hard#on#it#lol#mGR8T#like#fav#follow#comment#remix#ENJOY#multiplayer#scrolling#platformer#cuteplayers#fun#chat#and#muchmore#support\n=======================================\n-SURPRISE-\n>> ❤ & ⭐ for a surprise that's worth it!\n>> also, there is an easter egg in the game!!\nif you find it, (which is not easy) comment:\n "I found the easter egg!!"\nand get a free follow from @mGR8T 's test account!! \n(if you found it then don't spoil it for others =P)