Rainbow | Platformer (Mobile & Multiplayer)
@Stage\n\nwhen flag clicked\nforever\n    play sound [Vexento - Forever v] until done\nend\n\n@Player\n\nwhen flag clicked\nhide\nhide variable [level v]\nhide variable [☁ p7 v]\nhide variable [☁ p8 v]\nhide variable [# of letter v]\nhide variable [encoded v]\n\nwhen I receive [begin v]\nshow\nswitch costume to (player v)\nReset\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change x by (x)\n    change [y v] by (-0.6)\n    if <<<[100] < (mouse x)> and <mouse down?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n        switch costume to (right v)\n        change [x v] by (0.8)\n    else\n        if <<<(mouse x) < [-100]> and <mouse down?>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n            switch costume to (left v)\n            change [x v] by (-0.8)\n        else\n            switch costume to (player v)\n        end\n    end\n    set [x v] to ((x) * (0.9))\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change y by (1)\n                        if <touching (ground v)?> then\n                            change y by (-4)\n                            if <<<[100] < (mouse y)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n                                if <[0] < (x)> then\n                                    set [x v] to [-10]\n                                else\n                                    set [x v] to [10]\n                                end\n                            else\n                                change x by ((x) * (-1))\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<<[100] < (mouse y)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            set [y v] to [11]\n        end\n    end\n    change y by (1)\n    if <key (r v) pressed?> then\n        Reset\n    end\n    if <touching (water v)?> then\n        die\n    end\n    if <[230] < (x position)> then\n        broadcast (level v)\n        Reset\n    end\n    if <touching (saws v)?> then\n        die\n    end\n    if <touching (trampoline v)?> then\n        broadcast (Bounce v)\n        set [y v] to [16]\n    end\n    if <touching (spikes v)?> then\n        die\n    end\nend\n\ndefine Reset\ngo to x: (-170) y: (0)\nset [x v] to [0]\nset [y v] to [0]\n\nwhen I receive [begin v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (costume1 v)\nrepeat (16)\n    change size by (-5)\n    change [color v] effect by (8)\n    change [ghost v] effect by (6.25)\nend\ndelete this clone\n\nwhen I receive [level v]\nReset\n\nwhen I receive [reset v]\nReset\n\ndefine die\nbroadcast (die v)\nplay sound [Crunch v] until done\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-2)\nend\nReset\nset [ghost v] effect to (0)\nset size to (100) %\n\nwhen I receive [talk v]\nif <(level) = [15]> then\n    Say [Run to the right and some of the lighter dirt in that wall is fake!] and then wait [1] seconds\n    Say (join [So ] (join (username) [, when you leave, remember to go follow Aqury! And if you love and favorite this project, then he will check out your projects as well as making my world even better! And if you remix, then there will be more of this world, so there would be more wonders!])) and then wait [2] seconds\n    Stop talking\nend\nif <(level) = [16]> then\n    Say [Good job finding the Easter egg!] and then wait [1] seconds\n    Say (join [So ] (join (username) [, when you leave, remember to go follow Aqury! And if you love and favorite this project, then he will check out your projects as well as making my world even better! And if you remix, then there will be more of this world, so there would be more wonders!])) and then wait [2] seconds\n    Stop talking\nend\n\ndefine Say (text) and then wait (#) seconds\nset [sentence v] to []\nset [letter# v] to [1]\nrepeat (length of (text))\n    set [sentence v] to (join (sentence) (letter (letter#) of (text)))\n    change [letter# v] by (1)\n    say (sentence)\n    wait (0.01) seconds\nend\nwait (#) seconds\n\nwhen this sprite clicked\nSay [Hey! That kind of hurt!] and then wait [1] seconds\nSay [\(But it's okay, you didn't know not to smack me\)] and then wait [1] seconds\nSay (join [Hey ] (join (username) (join [, ] [do you know the guy Aqury who made this game?]))) and then wait [1.5] seconds\nSay [He created me and this wonderful world! No Aqury, no me!] and then wait [1] seconds\nSay (join [So ] (join (username) [, when you leave, remember to go follow Aqury! And if you love and favorite this project, then he will check out your projects as well as making my world even better! And if you remix, then there will be more of this world so there would be more wonders!])) and then wait [2] seconds\nSay [Thank you!] and then wait [2] seconds\nStop talking\n\ndefine Stop talking\nsay []\nset [sentence v] to []\nset [letter# v] to [0]\n\nwhen I receive [start v]\nset [max players v] to [10]\nset [my player # v] to [0]\nbroadcast (Setup opponents v) and wait\nbroadcast (Joining... v)\nbroadcast (Join Game v) and wait\nif <(my player #) > [0]> then\n    broadcast (Joined! v)\nelse\n    broadcast (Game Full v)\nend\nbroadcast (Begin v)\n\ndefine Write (val) to encoded\nset [# of letter v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (# of letter) of (val)) in [code v]))\n    change [# of 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 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 send cloud data\nset [encoded v] to []\nWrite (username) to encoded\nWrite (round ((timer) * (10))) to encoded\nWrite (x position) to encoded\nWrite (y position) to encoded\nWrite (level) to encoded\nSet cloud # (my player #) to (encoded)\n\nwhen [t v] key pressed\nwait (2) seconds\n\n@Sprite1\n\nwhen flag clicked\nshow\ngo to x: (0) y: (-50)\nswitch costume to (costume1 v)\nswitch backdrop to (start screen v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (8)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen this sprite clicked\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nset [ghost v] effect to (0)\nswitch backdrop to (game v)\nbroadcast (Start v)\ndelete this clone\n\nwhen I receive [level v]\nplay sound [Magic Spell v] until done\n\n@Ground\n\nwhen flag clicked\nhide\nset [level v] to [0]\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (0)\nset [level v] to [1]\n\nwhen I receive [level v]\nnext costume\nchange [level v] by (1)\n\n@Grass\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [start v]\nshow\nswitch costume to (costume1 v)\ngo to [back v] layer\nset [ghost v] effect to (1)\n\nwhen I receive [level v]\nnext costume\nif <(level) = [15]> then\n    go to [back v] layer\nend\n\n@Water\n\nwhen flag clicked\nclear graphic effects\nhide\ngo to x: (0) y: (0)\n\nwhen I start as a clone\nshow\nforever\n    set [ghost v] effect to (60)\n    go to [back v] layer\n    set y to ((([sin v] of (((timer) + (Water: me)) * (300)) ) * (8)) - ((Water: me) * (10)))\nend\n\nwhen I receive [start v]\nset [water: me v] to [1]\nswitch costume to (costume1 v)\nrepeat (3)\n    create clone of (_myself_ v)\n    change y by (-5)\n    change [brightness v] effect by (-10)\n    change [water: me v] by (1)\nend\n\nwhen I receive [level v]\nnext costume\n\n@Dots\n\nwhen flag clicked\nset size to (30) %\nhide\n\nwhen I start as a clone\nshow\ngo to (player v)\nturn right (pick random (0) to (360)) degrees\nset [ghost v] effect to (5)\nset [color v] effect to (pick random (5) to (80))\nrepeat (15)\n    move (5) steps\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [die v]\nrepeat (10)\n    create clone of (_myself_ v)\nend\n\n@htstrflw\n\nwhen flag clicked\nhide\nshow list [follow aqury v]\n\nwhen I receive [start v]\ngo to x: ((Ht+Str+Flw) * (0)) y: (0)\npoint in direction (90)\nwait until <(level) = [15]>\nset [ht+str+flw v] to [0]\nshow\nswitch costume to (costume1 v)\nforever\n    change y by (([cos v] of ((Ht+Str+Flw) * (2.1)) ) * (1.4))\n    point in direction ((([cos v] of ((Ht+Str+Flw) * (1.4)) ) * (5)) + (90))\n    change [ht+str+flw v] by (5)\nend\n\nwhen I receive [start v]\nforever\n    if <(level) = [16]> then\n        go to x: ((Ht+Str+Flw) * (0)) y: (0)\n        show\n        switch costume to (costume2 v)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Talk v)\nrepeat (4)\n    wait (1) seconds\n    hide list [follow aqury v]\n    wait (1) seconds\n    show list [follow aqury v]\nend\n\n@Skip\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nforever\n    go to x: (-176) y: (-142)\n    change y by (([cos v] of ((Tic) * (2.1)) ) * (1.4))\n    point in direction ((([cos v] of ((Tic) * (1.4)) ) * (5)) + (90))\n    change [tic v] by (10)\nend\n\ngo to x: (-176) y: (-142)\nchange y by (([cos v] of ((Tic) * (2.1)) ) * (1.4))\npoint in direction ((([cos v] of ((Tic) * (1.4)) ) * (5)) + (90))\nchange [tic v] by (10)\n\ngo to x: (-176) y: (-142)\nchange y by (([cos v] of ((Tic) * (2.1)) ) * (1.4))\npoint in direction ((([cos v] of ((Tic) * (1.4)) ) * (5)) + (90))\nchange [tic v] by (1)\n\nwhen this sprite clicked\nif <not <<(level) = [15]> or <(level) = [16]>>> then\n    broadcast (level v)\nend\n\n@Reset\n\nwhen I receive [start v]\nshow\nforever\n    go to x: (176) y: (-142)\n    change y by (([cos v] of ((Tic) * (2.1)) ) * (1.4))\n    point in direction ((([cos v] of ((Tic) * (1.4)) ) * (5)) + (90))\n    change [tic v] by (10)\nend\n\nwhen flag clicked\nhide\n\nwhen this sprite clicked\nbroadcast (Reset v)\n\n@Light\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ngo to [back v] layer\nforever\n    show\n    go to (player v)\n    set size to (120) %\n    set [ghost v] effect to (50)\nend\n\n@Shade\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nswitch costume to (costume1 v)\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (55)\nforever\n    repeat (5)\n        wait (0.02) seconds\n        change [ghost v] effect by (-1)\n    end\n    repeat (10)\n        wait (0.02) seconds\n        change [ghost v] effect by (1)\n    end\n    repeat (5)\n        wait (0.02) seconds\n        change [ghost v] effect by (-1)\n    end\n    go to [back v] layer\nend\n\nwhen I receive [level v]\nnext costume\n\n@Sun\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\ngo to x: (22) y: (22)\nset size to (100) %\nswitch costume to (costume1 v)\ngo to [front v] layer\nforever\n    go to [back v] layer\n    repeat (50)\n        change size by (0.1)\n    end\n    repeat (50)\n        change size by (-0.1)\n    end\nend\n\n@Saws\n\nwhen flag clicked\nhide\nset [saw v] to [0]\nforever\n    point in direction (([cos v] of ((Saw) * (2)) ) * (50))\n    change [saw v] by (8)\nend\n\nwhen I receive [start v]\nhide\nforever\n    go to [back v] layer\n    if <(level) = [7]> then\n        show\n        go to x: (38) y: (-105)\n    else\n        if <(level) = [8]> then\n            show\n            go to x: (38) y: (-50)\n        else\n            if <(level) = [9]> then\n                show\n                go to x: (0) y: (-75)\n            else\n                if <(level) = [13]> then\n                    show\n                    go to x: (0) y: (185)\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\n@Trampoline\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen I receive [start v]\nforever\n    if <(level) = [11]> then\n        show\n        go to x: (-125) y: (-30)\n    else\n        if <(level) = [12]> then\n            show\n            go to x: (0) y: (-65)\n        else\n            if <(level) = [13]> then\n                show\n                go to x: (0) y: (-35)\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen I receive [bounce v]\nBounce\n\ndefine Bounce\nswitch costume to (1 v)\nrepeat (3)\n    wait (0.01) seconds\n    next costume\nend\nrepeat (3)\n    wait (0.01) seconds\n    switch costume to ((costume [number v]) - (1))\nend\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nswitch costume to (costume1 v)\nforever\n    point in direction (90)\n    go to x: (0) y: (0)\n    go to [back v] layer\nend\n\nwhen I receive [level v]\nnext costume\n\n@Sprite2\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\ngo to x: (20) y: (0)\ngo to [front v] layer\n\n@clouds\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nshow\nswitch costume to (pick random (1) to (2))\nset [x cloud v] to [-1]\nset [ghost v] effect to (pick random (25) to (50))\nset size to (pick random (20) to (99)) %\nset y to (13)\nset x to (345)\nrepeat until <<(x position) = [-98]> or <<(x position) = [-99]> or <(x position) = [-100]>>>\n    go to [back v] layer\n    change x by (x cloud)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    create clone of (_myself_ v)\n    wait (pick random (0) to (1)) seconds\nend\n\n@Opponent\n\ndefine Begin decode of (encoded)\nset [encoded v] to (encoded)\nset [# of letter v] to [1]\n\ndefine Value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (# of letter) of (encoded)) (letter ((# of letter) + (1)) of (encoded)))\n    change [# of 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\nset [color v] effect to (90)\nset [ghost v] effect to (0)\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)\n    set [players online v] to [0]\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n        set [players online v] to [1]\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n            set [players online v] to [2]\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n                set [players online v] to [3]\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                    set [players online v] to [4]\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                        set [players online v] to [5]\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                            set [players online v] to [6]\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                                set [players online v] to [7]\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ P9)\n                                    set [players online v] to [8]\n                                else\n                                    if <(player) = [10]> then\n                                        set [value v] to (☁ P10)\n                                        set [players online v] to [9]\n                                    end\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\nValue = cloud # (player #)\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 <[99] < (offline)> then\n        show\n    end\n    set [offline v] to [0]\nend\nBegin decode of (Value)\nValue = read from encoded\nthink (join (player #) (join [: ] (Value)))\nValue = read from encoded\nValue = read from encoded\nset x to (Value)\nValue = read from encoded\nset y to (Value)\nValue = read from encoded\nif <(Value) = (level)> then\n    show\nelse\n    hide\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\nwhen flag clicked\nhide variable [☁ p1 v]\nhide variable [encoded v]\nhide variable [value v]\nhide variable [my player # v]\nhide variable [offline v]\nhide variable [last value v]\nhide variable [player # v]\n\n@On/offline\n\nwhen flag clicked\nswitch costume to (blank v)\ngo to x: (0) y: (0)\n\nwhen I receive [joining... v]\nswitch costume to (joining... v)\n\nwhen I receive [game full v]\nswitch costume to (full :\( v)\n\nwhen I receive [joined! v]\nswitch costume to (joined! v)\nwait (1) seconds\nrepeat (20)\n    change [ghost v] effect by (5)\nend\n\n@Leaves\n\nwhen flag clicked\nhide\npoint in direction (90)\nset size to (100) %\nset [ghost v] effect to (0)\n\nwhen I receive [begin v]\nhide\ngo to x: (300) y: (300)\nwait (2) seconds\nforever\n    wait (pick random (0.1) to (0.2)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (pick random (30) to (50))\ngo to x: (pick random (-220) to (220)) y: (180)\npoint in direction (pick random (45) to (-35))\nrepeat until <(y position) < [-180]>\n    change y by (-3)\n    turn right (2) degrees\nend\nhide\ndelete this clone\n\n@Parallax\n\nwhen I receive [begin v]\nshow\nforever\n    go to [back v] layer\n    go to x: (([x position v] of [player v]) / (10)) y: (([y position v] of [player v]) / (10))\nend\n\nwhen flag clicked\nhide\n\n
                      Rainbow | Platformer\n                                v. 1.08\n              Updated with multiplayer! 10 slots!\n\nArrow keys, WASD, or tap the sides of the screen to move. Avoid water, spikes, and saws. Bounce on trampolines. All levels are 100% possible. Level 7 is pretty hard, but it is still possible. 15 levels of fun. I hope this has good graphics :P\nT to show the world total deaths. 