Wonder-World || A Multiplayer Platformer #Games #All
@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    play sound (pick random (1) to (4)) until done\nend\n\nwhen [m v] key pressed\n\n    set [mouse v] to (join (round ([x position v] of [platforms \[main engine\] v])) (join [, ] (() + ([y position v] of [platforms \[main engine\] v]))))\n    show variable [mouse v]\nend\n\nwhen flag clicked\nset [hide? v] to [1]\nforever\n    set volume to (volume) %\nend\n\nwhen [space v] key pressed\nset [hide? v] to ((hide?) / (-1))\n\nwhen I receive [tick v]\nif <(hide?) = [1]> then\n    hide variable [volume v]\nelse\n    show variable [volume v]\nend\n\n@Blank\n\n@Player\n\nwhen flag clicked\ndelete all of [chat v]\nadd [Hi!] to [chat v]\nadd [Come with me!] to [chat v]\nadd [Ok!] to [chat v]\nadd [Nice!] to [chat v]\nadd [Look at me!] to [chat v]\nadd [Be careful!] to [chat v]\nadd [lol] to [chat v]\nadd [Bye!] to [chat v]\nadd [No thank you.] to [chat v]\n\nwhen flag clicked\nshow list [chat v]\nset [is the chat open v] to [0]\nforever\n    if <<key (t v) pressed?> or <<touching (mouse-pointer v)?> and <mouse down?>>> then\n        if <(is the chat open) = [1]> then\n            set [is the chat open v] to [0]\n        else\n            set [is the chat open v] to [1]\n        end\n        wait until <<not <<touching (mouse-pointer v)?> and <mouse down?>>> and <not <key (t v) pressed?>>>\n    end\n    Chat\nend\n\ndefine Chat\nif <(is the chat open) = [1]> then\n    if <key (1 v) pressed?> then\n        set [chat v] to [1]\n        say (item (CHAT) of [chat v])\n        wait (2) seconds\n        say []\n        set [chat v] to [0]\n    else\n        if <key (2 v) pressed?> then\n            set [chat v] to [2]\n            say (item (CHAT) of [chat v])\n            wait (2) seconds\n            say []\n            set [chat v] to [0]\n        else\n            if <key (3 v) pressed?> then\n                set [chat v] to [3]\n                say (item (CHAT) 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 v] to [4]\n                    say (item (CHAT) of [chat v])\n                    wait (2) seconds\n                    say []\n                    set [chat v] to [0]\n                else\n                    if <key (5 v) pressed?> then\n                        set [chat v] to [5]\n                        say (item (CHAT) of [chat v])\n                        wait (2) seconds\n                        say []\n                        set [chat v] to [0]\n                    else\n                        if <key (6 v) pressed?> then\n                            set [chat v] to [6]\n                            say (item (CHAT) of [chat v])\n                            wait (2) seconds\n                            say []\n                            set [chat v] to [0]\n                        else\n                            if <key (7 v) pressed?> then\n                                set [chat v] to [7]\n                                say (item (CHAT) of [chat v])\n                                wait (2) seconds\n                                say []\n                                set [chat v] to [0]\n                            else\n                                if <key (8 v) pressed?> then\n                                    set [chat v] to [8]\n                                    say (item (CHAT) of [chat v])\n                                    wait (2) seconds\n                                    say []\n                                    set [chat v] to [0]\n                                else\n                                    if <key (9 v) pressed?> then\n                                        set [chat v] to [9]\n                                        say (item (CHAT) of [chat v])\n                                        wait (2) seconds\n                                        say []\n                                        set [chat v] to [0]\n                                    else\n                                        if <key (a v) pressed?> then\n                                            set [chat v] to [9]\n                                            say (item (CHAT) of [chat v])\n                                            wait (2) seconds\n                                            say []\n                                            set [chat v] to [0]\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\nset [max players v] to [10]\nset [my player # v] to [0]\nset [connect v] to [Connecting]\nbroadcast (setup opponents v) and wait\nbroadcast (join game v) and wait\nif <(MY PLAYER #) > [0]> then\n    set [connect v] to [Connected]\nelse\n    set [connect v] to [Full]\nend\nbroadcast (begin v)\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 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 (costume [number v]) to encoded\nwrite (direction) to encoded\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite ([x position v] of [platforms \[main engine\] v]) to encoded\nwrite ([y position v] of [platforms \[main engine\] v]) to encoded\nwrite (CHAT) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\nwhen I receive [timeout v]\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\n\nwhen I receive [tick v]\nset rotation style [all around v]\nif <key (right arrow v) pressed?> then\n    change [rotate v] by (2)\nend\nif <key (left arrow v) pressed?> then\n    change [rotate v] by (-2)\nend\nset [rotate v] to ((rotate) * (0.9))\nturn right (rotate) degrees\n\nwhen I receive [die v]\nset [ghost v] effect to (0)\nrepeat (5)\n    change [ghost v] effect by (20)\nend\nwait (0.1) seconds\nrepeat (5)\n    change [ghost v] effect by (-20)\nend\nset [ghost v] effect to (0)\n\nwhen I receive [die v]\nforever\n    set [brightness v] effect to (brightness effect)\nend\n\nwhen I receive [change costume v]\nset [_choice? v] to [1]\nswitch costume to (middle2 v)\n\nwhen flag clicked\nset [_choice? v] to [0]\nswitch costume to (middle v)\n\nwhen [c v] key pressed\nif <(_choice?) = [1]> then\n    next costume\nend\n\n@Opponents\n\ndefine Decode chat (#)\nif <(round (#)) = [0]> then\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\ndefine setup players\nhide\nclear graphic effects\nset [ghost v] effect to (0)\nset [color v] effect to (370)\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    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                                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 [decode chat v]\nDecode chat (value)\n\ndefine tick\nvalue = cloud # (player #)\nif <(join (value) [A]) = (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 (value) [A])\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nswitch costume to (value)\nvalue = read from encoded\npoint in direction (value)\nvalue = read from encoded\nif <<<(y position) < [-160]> or <[160] < (y position)>> or <<(x position) < [-220]> or <[220] < (x position)>>> then\n    set rotation style [all around v]\n    go to [front v] layer\n    point towards (player v)\n    switch costume to (arrow v)\n    if on edge, bounce\n    think []\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (10)\n    if <(names?) = [0]> then\n        think []\n    else\n        think (value)\n    end\nend\nvalue = read from encoded\nvalue = read from encoded\nset x to (([x position v] of [platforms \[main engine\] v]) - (value))\nvalue = read from encoded\nset y to (([y position v] of [platforms \[main engine\] v]) - (value))\nvalue = read from encoded\nbroadcast (Decode chat v)\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join (value) [A])\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join (value) [A]) = (last value)> then\n    set [my player # v] to (player #)\nend\n\nwhen I receive [setup opponents v]\nsetup players\n\nwhen flag clicked\nset [names? v] to [1]\nforever\n    if <key (n v) pressed?> then\n        if <(names?) = [0]> then\n            set [names? v] to [1]\n        else\n            set [names? v] to [0]\n        end\n    end\nend\n\n@Connnect\n\nwhen flag clicked\nshow\nclear graphic effects\nswitch costume to (connecting v)\ngo to x: (167) y: (-123)\nforever\n    wait (1) seconds\n    if <(CONNECT) = [Connected]> then\n        switch costume to (connected v)\n        play sound [Connect v] until done\n        wait (2) seconds\n        repeat (20)\n            change [ghost v] effect by (5)\n        end\n        stop [this script v]\n    else\n        if <(CONNECT) = [Full]> then\n            switch costume to (full v)\n            play sound [Disconnect v] until done\n        else\n            switch costume to (connecting v)\n        end\n    end\n    go to [front v] layer\nend\n\nwhen I receive [timeout v]\ngo to x: (0) y: (0)\nclear graphic effects\nswitch costume to (timeout v)\nshow\ngo to [front v] layer\nstop [all v]\n\nwhen flag clicked\nforever\n    if <(win?) = [1]> then\n        hide\n    end\nend\n\n@Chat\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    set size to (0) %\n    wait until <(is the chat open) = [1]>\n    repeat (10)\n        set size to ((size) + (((100) - (size)) / (3))) %\n        change [ghost v] effect by (-10)\n    end\n    wait until <(is the chat open) = [0]>\n    repeat (10)\n        set size to ((size) + (((0) - (size)) / (3))) %\n        change [ghost v] effect by (10)\n    end\nend\n\ndefine GO\ngo to [front v] layer\ngo to [front v] layer\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nshow\nset [ghost v] effect to (100)\nforever\n    GO\nend\n\n@Platforms [Main Engine]\n\nwhen flag clicked\nset [sx2 v] to [0]\nset [sy2 v] to [0]\ngo to x: (1600) y: (-100)\nforever\n    broadcast (Tick v)\nend\n\nwhen I receive [tick v]\nif <(shop open?) = [0]> then\n    if <([costume # v] of [player v]) = [2]> then\n        change [sx2 v] by ((<<key (left arrow v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>> - <<key (right arrow v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>) * (3))\n        set [sx2 v] to ((sx2) * (0.8))\n        change x by (sx2)\n        change x by ((<touching (player v)?> * (sx2)) * (-1))\n        change y by (1)\n        if <touching (player v)?> then\n            change y by ((sy2) * (-1))\n            set [sy2 v] to ((-18) * <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>)\n        end\n        if <(swim?) = [1]> then\n            if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n                set [sy2 v] to [-5]\n            else\n                if <<key (down arrow v) pressed?> or <<[0] > (mouse y)> and <mouse down?>>> then\n                    set [sy2 v] to [5]\n                else\n                    set [sy2 v] to [2]\n                end\n            end\n        end\n        if <(climb?) = [1]> then\n            if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n                set [sy2 v] to [-6]\n            else\n                if <<key (down arrow v) pressed?> or <<[0] > (mouse y)> and <mouse down?>>> then\n                    set [sy2 v] to [6]\n                else\n                    set [sy2 v] to [-1]\n                end\n            end\n        end\n        if <(swim?) = [1]> then\n            if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n                set [sy2 v] to [-5]\n            else\n                if <<key (down arrow v) pressed?> or <<[0] > (mouse y)> and <mouse down?>>> then\n                    set [sy2 v] to [5]\n                else\n                    set [sy2 v] to [2]\n                end\n            end\n        end\n        change [sy2 v] by (1)\n        change y by ((sy2) - (1))\n        if <touching (player v)?> then\n            change y by ((sy2) * (-1))\n            set [sy2 v] to [0]\n        end\n        if <(y position) > [1000]> then\n            broadcast (Die v)\n        end\n    else\n        change [sx2 v] by ((<<key (left arrow v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>> - <<key (right arrow v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>) * (2))\n        set [sx2 v] to ((sx2) * (0.8))\n        change x by (sx2)\n        change x by ((<touching (player v)?> * (sx2)) * (-1))\n        change y by (1)\n        if <touching (player v)?> then\n            change y by ((sy2) * (-1))\n            set [sy2 v] to ((-15) * <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>)\n        end\n        if <(swim?) = [1]> then\n            if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n                set [sy2 v] to [-5]\n            else\n                if <<key (down arrow v) pressed?> or <<[0] > (mouse y)> and <mouse down?>>> then\n                    set [sy2 v] to [5]\n                else\n                    set [sy2 v] to [2]\n                end\n            end\n        end\n        if <(climb?) = [1]> then\n            if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n                set [sy2 v] to [-6]\n            else\n                if <<key (down arrow v) pressed?> or <<[0] > (mouse y)> and <mouse down?>>> then\n                    set [sy2 v] to [6]\n                else\n                    set [sy2 v] to [-1]\n                end\n            end\n        end\n        if <(swim?) = [1]> then\n            if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n                set [sy2 v] to [-5]\n            else\n                if <<key (down arrow v) pressed?> or <<[0] > (mouse y)> and <mouse down?>>> then\n                    set [sy2 v] to [5]\n                else\n                    set [sy2 v] to [2]\n                end\n            end\n        end\n        change [sy2 v] by (1)\n        change y by ((sy2) - (1))\n        if <touching (player v)?> then\n            change y by ((sy2) * (-1))\n            set [sy2 v] to [0]\n        end\n        if <(y position) > [1000]> then\n            broadcast (Die v)\n        end\n    end\nend\n\nwhen I receive [die v]\nstop [other scripts in sprite v]\nif <(checkpoint#) = [0]> then\n    glide (0.5) secs to x: (1600) y: (-100)\nelse\n    if <(checkpoint#) = [1]> then\n        glide (0.5) secs to x: (-60) y: (300)\n    else\n        glide (0.5) secs to x: (8) y: (-1123)\n    end\nend\nrepeat (5)\n    change [brightness effect v] by (20)\nend\nwait (0.1) seconds\nrepeat (5)\n    change [brightness effect v] by (-20)\nend\nset [brightness effect v] to [0]\nset [sx2 v] to [0]\nset [sy2 v] to [0]\nforever\n    broadcast (Tick v)\nend\n\nwhen [space v] key pressed\n\n    ask [Where to teleport? \[x-pos\]] and wait\n    set x to (answer)\n    ask [Where to teleport? \[y-pos\]] and wait\n    set y to (answer)\nend\n\nwhen [right arrow v] key pressed\nset volume to (60) %\nstart sound (pick random (2) to (6))\n\nwhen [left arrow v] key pressed\nset volume to (60) %\nstart sound (pick random (2) to (6))\n\nwhen [up arrow v] key pressed\nset volume to (60) %\nstart sound [snLanding v]\n\n@Spikes\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    broadcast (Die v)\nend\n\nwhen I receive [tick v]\ngo to (platforms \[main engine\] v)\n\nwhen flag clicked\ngo to x: (-50) y: (-100)\n\nwhen I receive [die v]\nforever\n    go to (platforms \[main engine\] v)\nend\n\n@Sprite1\n\n@Saws\n\nwhen flag clicked\ngo to x: (-50) y: (-100)\n\nwhen flag clicked\nswitch costume to (level-2 v)\nset [clone# v] to [0]\nrepeat (6)\n    create clone of (_myself_ v)\n    change [clone# v] by (1)\nend\n\nwhen I start as a clone\nswitch costume to (level-1 v)\n\nwhen I receive [tick v]\nif <(clone#) = [1]> then\n    go to x: (([x position v] of [platforms \[main engine\] v]) - (820)) y: (([y position v] of [platforms \[main engine\] v]) - (90))\nelse\n    if <(clone#) = [2]> then\n        go to x: (([x position v] of [platforms \[main engine\] v]) - (300)) y: (([y position v] of [platforms \[main engine\] v]) - (210))\n    else\n        if <(clone#) = [3]> then\n            go to x: (([x position v] of [platforms \[main engine\] v]) - (-70)) y: (([y position v] of [platforms \[main engine\] v]) - (690))\n        else\n            if <(clone#) = [4]> then\n                go to x: (([x position v] of [platforms \[main engine\] v]) - (-560)) y: (([y position v] of [platforms \[main engine\] v]) - (-320))\n            else\n                if <(clone#) = [5]> then\n                    go to x: (([x position v] of [platforms \[main engine\] v]) - (500)) y: (([y position v] of [platforms \[main engine\] v]) - (-1000))\n                else\n                    go to x: (([x position v] of [platforms \[main engine\] v]) - (-660)) y: (([y position v] of [platforms \[main engine\] v]) - (-320))\n                end\n            end\n        end\n    end\nend\nturn right (8) degrees\n\nwhen I receive [die v]\nforever\n    if <(clone#) = [1]> then\n        go to x: (([x position v] of [platforms \[main engine\] v]) - (810)) y: (([y position v] of [platforms \[main engine\] v]) - (80))\n    else\n        go to x: (([x position v] of [platforms \[main engine\] v]) - (10000000000000)) y: (([y position v] of [platforms \[main engine\] v]) - (150))\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        broadcast (Die v)\n        wait until <not <touching (player v)?>>\n    end\nend\n\n@Shop Button\n\nwhen flag clicked\nset [shop open? v] to [0]\nshow\nswitch costume to (shop button v)\nforever\n    if <(win?) = [0]> then\n        go to [front v] layer\n        if <<(costume [number v]) = [2]> and <(shop open?) = [0]>> then\n            go to x: (-180) y: (-140)\n            show\n            forever\n                if <touching (mouse-pointer v)?> then\n                    change size by (((120) - (size)) / (5))\n                    set [brightness v] effect to (10)\n                    if <mouse down?> then\n                        repeat (10)\n                            change y by (-4)\n                        end\n                        wait (0.05) seconds\n                        set [shop open? v] to [1]\n                    end\n                else\n                    change size by (((100) - (size)) / (5))\n                    set [brightness v] effect to (0)\n                    clear graphic effects\n                end\n                point in direction ((([cos v] of (((timer) * (200)) + ((costume [number v]) * (45))) ) * (3)) + (90))\n                if <(shop open?) = [1]> then\n                    hide\n                else\n                    show\n                    go to x: (-180) y: (-140)\n                    if <(win?) = [1]> then\n                        hide\n                    end\n                end\n            end\n        else\n        end\n    else\n        hide\n    end\nend\n\n@Checkpoints\n\nwhen flag clicked\ngo to x: (-50) y: (-100)\n\nwhen flag clicked\nset [checkpoint# v] to [0]\nswitch costume to (costume1 v)\nset [clone# v] to [1]\nrepeat (3)\n    create clone of (_myself_ v)\n    change [clone# v] by (1)\nend\n\nwhen I start as a clone\nswitch costume to (close v)\nforever\n    if <<touching (player v)?> and <(costume [number v]) = [1]>> then\n        set [checkpoint# v] to (clone#)\n        switch costume to (open v)\n        wait until <not <touching (player v)?>>\n    end\n    if <(checkpoint#) = [3]> then\n        set [win? v] to [1]\n    end\nend\n\nwhen I receive [tick v]\nif <(clone#) = [1]> then\n    go to x: (([x position v] of [platforms \[main engine\] v]) - (-60)) y: (([y position v] of [platforms \[main engine\] v]) - (382))\nelse\n    if <(clone#) = [2]> then\n        go to x: (([x position v] of [platforms \[main engine\] v]) - (19)) y: (([y position v] of [platforms \[main engine\] v]) - (-1060))\n    else\n        go to x: (([x position v] of [platforms \[main engine\] v]) - (984)) y: (([y position v] of [platforms \[main engine\] v]) - (-1310))\n    end\nend\n\nwhen I receive [die v]\nforever\n    if <(clone#) = [1]> then\n        go to x: (([x position v] of [platforms \[main engine\] v]) - (-60)) y: (([y position v] of [platforms \[main engine\] v]) - (382))\n    else\n        if <(clone#) = [2]> then\n            go to x: (([x position v] of [platforms \[main engine\] v]) - (19)) y: (([y position v] of [platforms \[main engine\] v]) - (-1060))\n        else\n            go to x: (([x position v] of [platforms \[main engine\] v]) - (984)) y: (([y position v] of [platforms \[main engine\] v]) - (-1310))\n        end\n    end\nend\n\nwhen flag clicked\nset [win? v] to [0]\n\n@Shop\n\nwhen flag clicked\nswitch costume to (shop v)\nrepeat (7)\n    create clone of (_myself_ v)\n    next costume\nend\ngo to [front v] layer\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [1]> then\n        go to x: (0) y: (0)\n        point in direction (90)\n    else\n        if <(costume [number v]) = [2]> then\n            forever\n                go to x: (-188) y: (-36)\n                if <(shop open?) = [1]> then\n                    show\n                    point in direction ((([cos v] of ((timer) * (200)) ) * (6)) + (90))\n                    if <touching (mouse-pointer v)?> then\n                        change size by (((120) - (size)) / (5))\n                        set [brightness v] effect to (10)\n                        if <mouse down?> then\n                            if <(which item on?) = [item-2]> then\n                                set [which item on? v] to [item-1]\n                            end\n                        end\n                    else\n                        change size by (((100) - (size)) / (5))\n                        set [brightness v] effect to (0)\n                        clear graphic effects\n                    end\n                else\n                    hide\n                end\n            end\n        else\n            if <(costume [number v]) = [3]> then\n                forever\n                    go to x: (188) y: (-36)\n                    if <(shop open?) = [1]> then\n                        show\n                        if <touching (mouse-pointer v)?> then\n                            change size by (((120) - (size)) / (5))\n                            set [brightness v] effect to (10)\n                            if <mouse down?> then\n                                if <(which item on?) = [item-1]> then\n                                    set [which item on? v] to [item-2]\n                                end\n                            end\n                        else\n                            change size by (((100) - (size)) / (5))\n                            set [brightness v] effect to (0)\n                            clear graphic effects\n                        end\n                        point in direction ((([cos v] of ((timer) * (200)) ) * (6)) + (90))\n                    else\n                        hide\n                    end\n                end\n            else\n                if <(costume [number v]) = [4]> then\n                    forever\n                        go to x: (145) y: (78)\n                        if <(shop open?) = [1]> then\n                            show\n                            if <touching (mouse-pointer v)?> then\n                                change size by (((120) - (size)) / (5))\n                                set [brightness v] effect to (10)\n                                if <mouse down?> then\n                                    set [shop open? v] to [0]\n                                end\n                            else\n                                change size by (((100) - (size)) / (5))\n                                set [brightness v] effect to (0)\n                                clear graphic effects\n                            end\n                        else\n                            hide\n                        end\n                    end\n                else\n                    if <(costume [name v]) = [Buy Now!]> then\n                        forever\n                            go to [front v] layer\n                            go to x: (30) y: (-110)\n                            if <touching (mouse-pointer v)?> then\n                                change size by (((120) - (size)) / (5))\n                                set [brightness v] effect to (10)\n                                if <mouse down?> then\n                                    if <(which item on?) = [item-1]> then\n                                        if <(Cash:) > [9]> then\n                                            change [cash: v] by (-10)\n                                            set [bought? v] to [item-1 ]\n                                        end\n                                    else\n                                        if <(which item on?) = [item-2]> then\n                                            if <(Cash:) > [19]> then\n                                                change [cash: v] by (-20)\n                                                set [bought? v] to (join (bought?) [item-2])\n                                                broadcast (Change costume v)\n                                            end\n                                        end\n                                    end\n                                end\n                            else\n                                change size by (((100) - (size)) / (5))\n                                set [brightness v] effect to (0)\n                                clear graphic effects\n                                if <(shop open?) = [1]> then\n                                    show\n                                else\n                                    hide\n                                end\n                            end\n                        end\n                    else\n                        if <(costume [name v]) = [item-1]> then\n                            go to x: (0) y: (0)\n                            if <touching (mouse-pointer v)?> then\n                                change size by (((120) - (size)) / (5))\n                                set [brightness v] effect to (10)\n                            else\n                                change size by (((100) - (size)) / (5))\n                                set [brightness v] effect to (0)\n                                clear graphic effects\n                            end\n                            if <(which item on?) = [item-1]> then\n                                set [ghost v] effect to (0)\n                            else\n                                repeat (1)\n                                    change x by (15)\n                                end\n                                forever\n                                    if <(which item on?) = [item-1]> then\n                                        go to x: (0) y: (0)\n                                        set [ghost v] effect to (0)\n                                        if <touching (mouse-pointer v)?> then\n                                            change size by (((120) - (size)) / (5))\n                                            set [brightness v] effect to (10)\n                                        else\n                                            change size by (((100) - (size)) / (5))\n                                            set [brightness v] effect to (0)\n                                            clear graphic effects\n                                        end\n                                    else\n                                        repeat (20)\n                                            change x by (15)\n                                        end\n                                        set [ghost v] effect to (100)\n                                    end\n                                    if <(shop open?) = [1]> then\n                                        show\n                                    else\n                                        hide\n                                    end\n                                end\n                            end\n                        else\n                            if <(which item on?) = [item-2]> then\n                                go to x: (0) y: (0)\n                                if <touching (mouse-pointer v)?> then\n                                    change size by (((120) - (size)) / (5))\n                                    set [brightness v] effect to (10)\n                                else\n                                    change size by (((100) - (size)) / (5))\n                                    set [brightness v] effect to (0)\n                                    clear graphic effects\n                                end\n                                set [ghost v] effect to (0)\n                            else\n                                repeat (20)\n                                    change x by (15)\n                                end\n                                set [ghost v] effect to (100)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <(shop open?) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [which item on? v] to [item-1]\n\nwhen flag clicked\nset [cash: v] to [0]\n\n@Collectables\n\nwhen flag clicked\nset [collected v] to [0]\ngo to x: (-50) y: (-100)\n\nwhen flag clicked\nswitch costume to (level-2 v)\nset [clone# v] to [0]\nrepeat (32)\n    create clone of (_myself_ v)\n    change [clone# v] by (1)\nend\n\nwhen I start as a clone\nforever\n    switch costume to (level-1 v)\n    repeat (12)\n        next costume\n    end\nend\n\nwhen I receive [tick v]\nchange [tick v] by (0.125)\nif <(clone#) = [1]> then\n    go to x: (([x position v] of [platforms \[main engine\] v]) - (400)) y: (([y position v] of [platforms \[main engine\] v]) + (Trigo))\nelse\n    if <(clone#) = [2]> then\n        go to x: (([x position v] of [platforms \[main engine\] v]) - (1900)) y: ((([y position v] of [platforms \[main engine\] v]) + (30)) + (Trigo))\n    else\n        if <(clone#) = [3]> then\n            go to x: (([x position v] of [platforms \[main engine\] v]) - (1000)) y: ((([y position v] of [platforms \[main engine\] v]) + (30)) + (Trigo))\n        else\n            if <(clone#) = [4]> then\n                go to x: (([x position v] of [platforms \[main engine\] v]) - (685)) y: ((([y position v] of [platforms \[main engine\] v]) + (140)) + (Trigo))\n            else\n                if <(clone#) = [5]> then\n                    go to x: (([x position v] of [platforms \[main engine\] v]) - (300)) y: ((([y position v] of [platforms \[main engine\] v]) + (0)) + (Trigo))\n                else\n                    if <(clone#) = [6]> then\n                        go to x: (([x position v] of [platforms \[main engine\] v]) - (200)) y: ((([y position v] of [platforms \[main engine\] v]) + (0)) + (Trigo))\n                    else\n                        if <(clone#) = [7]> then\n                            go to x: (([x position v] of [platforms \[main engine\] v]) - (-350)) y: ((([y position v] of [platforms \[main engine\] v]) + (-350)) + (Trigo))\n                        else\n                            if <(clone#) = [8]> then\n                                go to x: (([x position v] of [platforms \[main engine\] v]) - (-50)) y: ((([y position v] of [platforms \[main engine\] v]) + (-300)) + (Trigo))\n                            else\n                                if <(clone#) = [9]> then\n                                    go to x: (([x position v] of [platforms \[main engine\] v]) - (-236)) y: ((([y position v] of [platforms \[main engine\] v]) + (-55)) + (Trigo))\n                                else\n                                    if <(clone#) = [10]> then\n                                        go to x: (([x position v] of [platforms \[main engine\] v]) - (-236)) y: ((([y position v] of [platforms \[main engine\] v]) + (-55)) + (Trigo))\n                                    else\n                                        if <(clone#) = [11]> then\n                                            go to x: (([x position v] of [platforms \[main engine\] v]) - (-316)) y: ((([y position v] of [platforms \[main engine\] v]) + (-55)) + (Trigo))\n                                        else\n                                            if <(clone#) = [12]> then\n                                                go to x: (([x position v] of [platforms \[main engine\] v]) - (-396)) y: ((([y position v] of [platforms \[main engine\] v]) + (-55)) + (Trigo))\n                                            else\n                                                if <(clone#) = [13]> then\n                                                    go to x: (([x position v] of [platforms \[main engine\] v]) - (-476)) y: ((([y position v] of [platforms \[main engine\] v]) + (-55)) + (Trigo))\n                                                else\n                                                    if <(clone#) = [14]> then\n                                                        go to x: (([x position v] of [platforms \[main engine\] v]) - (70)) y: ((([y position v] of [platforms \[main engine\] v]) + (-330)) + (Trigo))\n                                                    else\n                                                        if <(clone#) = [15]> then\n                                                            go to x: (([x position v] of [platforms \[main engine\] v]) - (-803)) y: ((([y position v] of [platforms \[main engine\] v]) + (-550)) + (Trigo))\n                                                        else\n                                                            if <(clone#) = [16]> then\n                                                                go to x: (([x position v] of [platforms \[main engine\] v]) - (-1600)) y: ((([y position v] of [platforms \[main engine\] v]) + (385)) + (Trigo))\n                                                            else\n                                                                if <(clone#) = [17]> then\n                                                                    go to x: (([x position v] of [platforms \[main engine\] v]) - (-1750)) y: ((([y position v] of [platforms \[main engine\] v]) + (150)) + (Trigo))\n                                                                else\n                                                                    if <(clone#) = [18]> then\n                                                                        go to x: (([x position v] of [platforms \[main engine\] v]) - (-450)) y: ((([y position v] of [platforms \[main engine\] v]) + (-519)) + (Trigo))\n                                                                    else\n                                                                        if <(clone#) = [19]> then\n                                                                            go to x: (([x position v] of [platforms \[main engine\] v]) - (-450)) y: ((([y position v] of [platforms \[main engine\] v]) + (-380)) + (Trigo))\n                                                                        else\n                                                                            if <(clone#) = [20]> then\n                                                                                go to x: (([x position v] of [platforms \[main engine\] v]) - (-830)) y: ((([y position v] of [platforms \[main engine\] v]) + (3)) + (Trigo))\n                                                                            else\n                                                                                if <(clone#) = [21]> then\n                                                                                    go to x: (([x position v] of [platforms \[main engine\] v]) - (-860)) y: ((([y position v] of [platforms \[main engine\] v]) + (360)) + (Trigo))\n                                                                                else\n                                                                                    if <(clone#) = [22]> then\n                                                                                        go to x: (([x position v] of [platforms \[main engine\] v]) - (-260)) y: ((([y position v] of [platforms \[main engine\] v]) + (345)) + (Trigo))\n                                                                                    else\n                                                                                        if <(clone#) = [23]> then\n                                                                                            go to x: (([x position v] of [platforms \[main engine\] v]) - (130)) y: ((([y position v] of [platforms \[main engine\] v]) + (1048)) + (Trigo))\n                                                                                        else\n                                                                                            if <(clone#) = [24]> then\n                                                                                                go to x: (([x position v] of [platforms \[main engine\] v]) - (408)) y: ((([y position v] of [platforms \[main engine\] v]) + (1048)) + (Trigo))\n                                                                                            else\n                                                                                                if <(clone#) = [25]> then\n                                                                                                    go to x: (([x position v] of [platforms \[main engine\] v]) - (745)) y: ((([y position v] of [platforms \[main engine\] v]) + (1048)) + (Trigo))\n                                                                                                else\n                                                                                                    if <(clone#) = [26]> then\n                                                                                                        go to x: (([x position v] of [platforms \[main engine\] v]) - (995)) y: ((([y position v] of [platforms \[main engine\] v]) + (1048)) + (Trigo))\n                                                                                                    else\n                                                                                                        if <(clone#) = [27]> then\n                                                                                                            go to x: (([x position v] of [platforms \[main engine\] v]) - (1245)) y: ((([y position v] of [platforms \[main engine\] v]) + (1048)) + (Trigo))\n                                                                                                        else\n                                                                                                            if <(clone#) = [28]> then\n                                                                                                                go to x: (([x position v] of [platforms \[main engine\] v]) - (1872)) y: ((([y position v] of [platforms \[main engine\] v]) + (1048)) + (Trigo))\n                                                                                                            else\n                                                                                                                if <(clone#) = [29]> then\n                                                                                                                    go to x: (([x position v] of [platforms \[main engine\] v]) - (876)) y: ((([y position v] of [platforms \[main engine\] v]) + (1320)) + (Trigo))\n                                                                                                                else\n                                                                                                                    if <(clone#) = [30]> then\n                                                                                                                        go to x: (([x position v] of [platforms \[main engine\] v]) - (251)) y: ((([y position v] of [platforms \[main engine\] v]) + (-814)) + (Trigo))\n                                                                                                                    else\n                                                                                                                        go to x: (([x position v] of [platforms \[main engine\] v]) - (-3160000)) y: ((([y position v] of [platforms \[main engine\] v]) + (-55)) + (Trigo))\n                                                                                                                    end\n                                                                                                                end\n                                                                                                            end\n                                                                                                        end\n                                                                                                    end\n                                                                                                end\n                                                                                            end\n                                                                                        end\n                                                                                    end\n                                                                                end\n                                                                            end\n                                                                        end\n                                                                    end\n                                                                end\n                                                            end\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nset [trigo v] to ((10) * ([sin v] of ((TICK) * (4)) ))\n\nwhen I receive [die v]\nforever\n    if <(clone#) = [1]> then\n        go to x: (([x position v] of [platforms \[main engine\] v]) - (400)) y: (([y position v] of [platforms \[main engine\] v]) + (Trigo))\n    else\n        go to x: (([x position v] of [platforms \[main engine\] v]) - (10000000000000)) y: (([y position v] of [platforms \[main engine\] v]) - (150))\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        broadcast (Coin Collected v)\n        change [collected v] by (1)\n        change [cash: v] by (1)\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset [trigo v] to [0]\n\n@Coin Effect\n\nwhen I receive [coin collected v]\nswitch costume to (effect v)\ngo to x: (0) y: (0)\ngo to (player v)\nset size to (70) %\nset [ghost v] effect to (0)\nshow\nrepeat (15)\n    change x by (-4)\n    change y by (4)\n    change [ghost v] effect by (7)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [enemy killed v]\nswitch costume to (effect2 v)\ngo to x: (0) y: (0)\ngo to (player v)\nset size to (70) %\nset [ghost v] effect to (0)\nshow\nrepeat (15)\n    change x by (-4)\n    change y by (4)\n    change [ghost v] effect by (7)\nend\n\n@Sprite2\n\n@Decors\n\nwhen I receive [tick v]\ngo to (platforms \[main engine\] v)\n\nwhen I receive [die v]\nforever\n    go to (platforms \[main engine\] v)\nend\n\n@Water\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    set [swim? v] to [1]\nelse\n    set [swim? v] to [0 ]\nend\n\nwhen I receive [tick v]\ngo to (platforms \[main engine\] v)\nchange y by ([trigo v] of [collectables v])\n\nwhen flag clicked\ngo to x: (-50) y: (-100)\n\nwhen I receive [die v]\nforever\n    go to (platforms \[main engine\] v)\n    change y by ([trigo v] of [collectables v])\nend\n\n@Ladder\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    set [climb? v] to [1]\nelse\n    set [climb? v] to [0 ]\nend\n\nwhen I receive [tick v]\ngo to (platforms \[main engine\] v)\n\nwhen flag clicked\ngo to x: (-50) y: (-100)\n\nwhen I receive [die v]\nforever\n    go to (platforms \[main engine\] v)\nend\n\n@Lava\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    broadcast (Die v)\nend\n\nwhen I receive [tick v]\ngo to (platforms \[main engine\] v)\nchange y by ([trigo v] of [collectables v])\n\nwhen flag clicked\ngo to x: (-50) y: (-100)\n\nwhen I receive [die v]\nforever\n    go to (platforms \[main engine\] v)\n    change y by ([trigo v] of [collectables v])\nend\n\n@Spikes2\n\nwhen I receive [tick v]\nif <touching (player v)?> then\n    set [sy2 v] to [-20]\n    switch costume to (level-3 v)\nelse\n    switch costume to (level-1 v)\nend\n\nwhen I receive [tick v]\ngo to (platforms \[main engine\] v)\n\nwhen flag clicked\ngo to x: (-50) y: (-100)\n\nwhen I receive [die v]\nforever\n    go to (platforms \[main engine\] v)\nend\n\n@you win\n\nwhen flag clicked\ngo to [front v] layer\nset [win? v] to [0]\nforever\n    if <(win?) = [1]> then\n        show\n        set [ghost v] effect to (100)\n        repeat (20)\n            change [ghost v] effect by (-5)\n        end\n        set [ghost v] effect to (0)\n        repeat (5)\n            change x by (10)\n            wait (0.01) seconds\n            change y by (10)\n            wait (0.01) seconds\n            change x by (-10)\n            wait (0.01) seconds\n            change y by (-10)\n        end\n        hide variable [cash: v]\n        repeat (1)\n            stop [all v]\n        end\n        wait until <not <(win?) = [1]>>\n    else\n        show variable [cash: v]\n        set [ghost v] effect to (100)\n    end\nend\n\n@Effect\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (80)\ngo to [back v] layer\n\n@TB\n\nwhen I receive [tick v]\nset [ghost v] effect to (100)\nhide\nset [__tb timer v] to (timer)\nset size to (0) %\n\nwhen [timer v] > (__tb timer)\nswitch costume to (costume2 v)\nset size to (100) %\nswitch costume to (costume1 v)\ngo to [front v] layer\nshow\nhide variable [cash: v]\ngo to [front v] layer\n\nwhen flag clicked\nshow variable [cash: v]\n\nwhen I receive [die v]\n\n
Wonder-World | A Platformer \nby @Indian-Programmer\n\nI made this for @-UltraProgrammer-'s Contest! Hope he reaches good place as further he go! And hope i win the contest!\n\nLove, Fave and Follow for more amazing quality contents!\n\nNOTES:\n1) Use "Space" key if u want to change the volume!\n2) Press "C" to change the emojis (YOU CAN ONLY CHANGE THE EMOJIS WHEN U HAVE AN EXTRA EMOJI, YOU CAN BUY THAT FROM THE SHOP) !\n3) "T" or tap on the player to chat...\n\nIF THIS IS FULL GO HERE:\nhttps://scratch.mit.edu/projects/504673633/\n\nYou already know the basics of the platformer...\n\nCredits:\nThanks to @Indian-Programmer(me) for most of the Art and Code!\nThanks to @H-Indian-Developer for the title name!\nThanks to @INorth for the Bridge Art!\nThanks to @TheCactusMaster for the Multiplayer engine!(Edited by me)\nThanks to @JC_ProGold for the rolling inspiration !\nThanks to Google Fonts for the fonts!\nAnd finally...\nBIG THANKS TO SCRATCH FOR EXISTING... lol\n\nLet me know if i forgot to credit anyone!\n\nScrolling Engine that i used in this game:\nhttps://scratch.mit.edu/projects/489541304/\n\nI might edit this later...\n\nTags:\n#Games #Art #All #Music #Platformer #Emojis #Platformers #Platforms #Love #Fave #And #Follow #Griffpatch #And #Others\n#Games #Art #All #Music #Platformer #Emojis #Platformers #Platforms #Love #Fave #And #Follow #Griffpatch #And #Others  #Trending #Trending \n#ScratchOn