Alpine || A Multiplayer Scrolling platformer || For @Suhalo_351

Instructions: Alpine || A Multiplayer Scrolling Platformer\nBy @ProMaster39\n\n100 Loves and faves! :D TYSM!\n1000 views ! TYSM! :D\nCloud Fixed!\n\nJoin this game's studio! Link: https://scratch.mit.edu/studios/27909963/\n\nThis took me over 40+ hours (1 month) of coding, bug fixing, and drawing the art so if you enjoyed please ❤️ + ⭐ and follow! This has exactly 2139 blocks! :) \n\nInformation:\nWelcome scratchers to another game by ProMaster39. In this game you need to get to the end star to win the game. You can also get 99 coins. Have Fun!\n\nInstructions:\nWASD, Arrow keys or Mobile controls to move.\nClick the chat button to chat.\nN to toggle names.\nAvoid saws, spikes, lava, water, and enemies.\nJump on the enemies head to kill them and receive 5 coins.\n\nNotes:\nIf full play here on server 2: https://turbowarp.org/432172093\nIf laggy play here: https://turbowarp.org/432172093\n\nCredits:\n@0014049 for the trees.\n@Suhalo_351 for the contest. (Idk if I have to credit him.)\n@JTHEJET for chat scripts, loading, background, some of the scripts, and chat art.\n@StratfordJames for the player and the clouds.\n@griffpatch for the scrolling platformer and multiplayer tutorial.\n@QuaXX for the saws art.\n@GonSanVi for the end star and the line of stars.\n@--Air-- for the checkpoint art.\n@-Xaf- for the music, "Unlimited."\n@TimMcCool for pillar art\n@ProMaster39 for the rest! :D\n\nFamous Scratchers:\n@suhalo_351 - ❤️\n@Chiroyce - ❤️ and commented!\n@AUMSUMTHEGREATHULK - ❤️ + ⭐ and commented and followed!\n@Kindforall -  ❤️ and commented \n@AtomicSapper101 - ❤️ and commented \n@Pro-Code-Studios - ❤️ + ⭐ and commented and followed!\n@progtech - ❤️ + ⭐\n@Pavan2007 - ❤️ + ⭐\n@Mini_orionrobots - ❤️ + ⭐ and commented!\n@spazestudios - ❤️ + ⭐ and commented!\nAnd more...\n\nTags:\n#All #All #All #All #All #All #All #Games #Games #Games #Games #Games #Games #Scrolling #Platformer #ProMaster39 #ProMaster39 #Multiplayer #Scratch 

@Stage\n\nwhen flag clicked\nhide variable [mouse v]\nset [ghost v] effect to (100)\n\nwhen I receive [connected v]\nset [ghost v] effect to (0)\nswitch backdrop to (day v) and wait\n\nwhen [m v] key pressed\nif <[managers v] contains (username)?> then\n    set [mouse v] to (join ((mouse x) + (SCROLL X)) (join [ , ] ((mouse y) + (SCROLL Y))))\n    show variable [mouse v]\nelse\n    hide variable [mouse v]\nend\n\nwhen [e v] key pressed\nif <[managers v] contains (username)?> then\n    hide variable [mouse v]\nelse\n    wait until <not <key (e v) pressed?>>\nend\n\nshow variable [mouse v]\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [ , ] ((mouse y) + (SCROLL Y))))\n\nwhen I receive [connected v]\nforever\n    play sound [Unlimited v] until done\nend\n\n@Blank\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [-50]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [360]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nwhen flag clicked\nhide variable [platforms: x v]\nhide variable [platforms: y v]\n\nwhen I start as a clone\nif <(costume [number v]) = [14]> then\n    forever\n        repeat (160)\n            change [platforms: x v] by (2)\n        end\n        repeat (160)\n            change [platforms: x v] by (-2)\n        end\n    end\nend\n\n@Liquids\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Liquids: x) - (SCROLL X)) (((Liquids: y) - (SCROLL Y)) + (([cos v] of ((tim) * (300)) ) * (5)))\n\nwhen I receive [setup v]\nhide\nset [liquids: x v] to [0]\nset [liquids: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [liquids: x v] by (x)\nchange [liquids: y v] by (y)\nnext costume\n\nwhen flag clicked\nhide variable [liquids: x v]\nhide variable [liquids: y v]\n\nwhen flag clicked\nreset timer\nforever\n    set [tim v] to (timer)\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo [forward v] (1) layers\nforever\n    if <<(costume [number v]) = [3]> or <<(costume [number v]) = [4]> or <<(costume [number v]) = [5]> or <(costume [number v]) = [6]>>>> then\n        forever\n            set [ghost v] effect to (60)\n        end\n    else\n        if <<(costume [number v]) = [11]> or <(costume [number v]) = [10]>> then\n            forever\n                set [ghost v] effect to (0)\n            end\n        end\n    end\nend\n\n@DANGER\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((DANGER: x) - (SCROLL X)) ((DANGER: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [0]\nend\n\ndefine Position (x) (y)\ngo to [back v] layer\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\nnext costume\n\nwhen flag clicked\nhide variable [danger: x v]\nhide variable [danger: y v]\n\nClone at x: [480] y: [360]\nClone at x: [480] y: [0]\n\nClone at x: [480] y: [360]\nClone at x: [480] y: [0]\nClone at x: [480] y: [0]\n\n@Player\n\nwhen I receive [begin v]\nset [chat v] to [0]\nshow list [chat v]\nforever\n    Chat\nend\n\nwhen I receive [play game v]\nset [connected? v] to [0]\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\ndefine Change Player x by (sx)\npoint in direction (90)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Game On\nset rotation style [left-right v]\nif <(CheckpointCheckAccount#) = [0]> then\n    set [y v] to [0]\n    set [x v] to [0]\n    set [scroll x v] to (x)\n    set [scroll y v] to (y)\nend\nif <(CheckpointCheckAccount#) = [1]> then\n    set [y v] to [-36]\n    set [x v] to [699]\n    set [scroll x v] to (x)\n    set [scroll y v] to (y)\nend\nif <(CheckpointCheckAccount#) = [2]> then\n    set [y v] to [225]\n    set [x v] to [2728]\n    set [scroll x v] to (x)\n    set [scroll y v] to (y)\nend\nif <(CheckpointCheckAccount#) = [3]> then\n    set [y v] to [681]\n    set [x v] to [4231]\n    set [scroll x v] to (x)\n    set [scroll y v] to (y)\nend\npoint in direction (90)\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [ghost v] effect to (0)\nset size to (100) %\n\ndefine Test - Die\nif <touching (saws v)?> then\n    start sound [Hurt v]\n    set [exit v] to [die]\nend\nif <touching (danger v)?> then\n    start sound [Hurt v]\n    set [exit v] to [die]\nend\nif <touching (liquids v)?> then\n    start sound [Hurt v]\n    set [exit v] to [die]\nend\n\ndefine Game - Die\nset [exit v] to []\nstart sound [Hurt v]\nset rotation style [all around v]\ngo to [front v] layer\nset [sx v] to [0]\nset [sy v] to [5]\nrepeat (12)\n    turn right (8) degrees\n    change y by (sy)\n    change [sy v] by (-1)\n    change [ghost v] effect by (8)\nend\nrepeat until <[-183] > (y position)>\n    change y by (sy)\n    change [sy v] by (-1)\nend\n\ndefine Tick\nif <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    change [sx v] by (-2)\nend\nif <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    change [sx v] by (2)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nif <touching (bounce v)?> then\n    if <(in air) < [4]> then\n        set [sy v] to [25]\n    end\nend\nChange Player y by (sy)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nif <(x) < [-220]> then\n    set [x v] to [-220]\nend\n\nwhen flag clicked\nhide\nset [max players v] to [10]\nset [my player # v] to [0]\ndelete all of [buffer v]\nbroadcast (Connecting v)\nbroadcast (Setup Others v) and wait\nbroadcast (Join Game v) and wait\nif <(MY PLAYER #) > [0]> then\n    broadcast (Connected v)\n    start sound [Connect v]\nelse\n    broadcast (Full v)\n    start sound [Disconnect v]\nend\nbroadcast (Begin v)\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ p8 v] to (value)\n                            else\n                                if <(player) = [9]> then\n                                    set [☁ p9 v] to (value)\n                                else\n                                    if <(player) = [10]> then\n                                        set [☁ p10 v] to (value)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [begin v]\nforever\n    send cloud data\nend\n\ndefine send cloud data\nif <(MY PLAYER #) < [1]> then\n    stop [this script v]\nend\nadd (x) to [buffer v]\nadd (y) to [buffer v]\nchange [cloud timer v] by (1)\nif <(cloud timer) < [3]> then\n    stop [this script v]\nend\nset [cloud timer v] to [0]\nset [encoded v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (Chat Words) 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 Chat\nif <(Chat) = [1]> then\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 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                                    else\n                                        set [chat words v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [connected v]\nset [connected? v] to [1]\nshow\n\nwhen I receive [connecting v]\nhide\n\nwhen I receive [play game v]\nbroadcast (Setup@Coins v)\nset [y v] to [0]\nset [x v] to [0]\nforever\n    if <(Connected?) = [1]> then\n        broadcast (Reset v) and wait\n        broadcast (Setup v) and wait\n        Game On\n        repeat until <(EXIT) > []>\n            Tick\n            Costumes\n            broadcast (Tick v)\n        end\n    end\n    if <(EXIT) = [die]> then\n        Game - Die\n    end\nend\n\nwhen I receive [connected v]\nset [level v] to [1]\n\nwhen flag clicked\nVars\n\ndefine Vars\nhide variable [☁ p1 v]\nhide variable [☁ p2 v]\nhide variable [☁ p3 v]\nhide variable [☁ p4 v]\nhide variable [☁ p5 v]\nhide variable [☁ p6 v]\nhide variable [☁ p7 v]\nhide variable [☁ p8 v]\nhide variable [☁ p9 v]\nhide variable [☁ p10 v]\nhide variable [chat v]\nhide variable [chat words v]\nhide variable [clone id v]\nhide variable [coins v]\nhide variable [collected v]\nhide variable [connected? v]\nhide variable [encoded v]\nhide variable [exit v]\nhide variable [fav v]\nhide variable [faved___ v]\nhide variable [idx v]\nhide variable [in air v]\nhide variable [letter # v]\nhide variable [level v]\nhide variable [lives v]\nhide variable [love? v]\nhide variable [loved__ v]\nhide variable [max players v]\nhide variable [mouse v]\nhide variable [my player # v]\nhide variable [names v]\nhide variable [scroll x v]\nhide variable [scroll y v]\nhide variable [size v]\nhide variable [speed v]\nhide variable [sx v]\nhide variable [sy v]\nhide variable [value v]\nhide variable [x v]\nhide variable [y v]\nhide variable [checkpointcheckaccount# v]\n\nwhen I receive [connected v]\nbroadcast (Start Gamez v)\n\ndefine Costumes\nif <not <key (any v) pressed?>> then\n    switch costume to (normal v)\nend\nif <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    switch costume to (left v)\nend\nif <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    switch costume to (right v)\nend\nif <(sy) < [-1]> then\n    if <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        switch costume to (right down v)\n    else\n        if <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n            switch costume to (left down v)\n        else\n            if <<not <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>> and <not <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>>> then\n                switch costume to (down v)\n            end\n        end\n    end\nend\nif <[1] < (sy)> then\n    if <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        switch costume to (right up v)\n    else\n        if <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n            switch costume to (left up v)\n        else\n            if <<not <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> and <not <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>>> then\n                switch costume to (up v)\n            end\n        end\n    end\nend\n\n@Other Peeps\n\nwhen I receive [begin v]\nset [names v] to [1]\nforever\n    if <key (n v) pressed?> then\n        if <(names) = [1]> then\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [0]\n        else\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [1]\n        end\n    end\nend\n\nwhen I receive [setup others v]\nsetup players\n\ndefine setup players\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\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ P9)\n                                else\n                                    if <(player) = [10]> then\n                                        set [value v] to (☁ P10)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        hide\n        set [offline v] to [100]\n    else\n        Tick\n    end\n    go to [back v] layer\nend\n\ndefine Tick\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\n    begin decode of (value)\n    value = read from encoded\n    if <(names) = [1]> then\n        say (join (player #) (join [:] (value)))\n    else\n        say []\n    end\n    value = read from encoded\n    value = read from encoded\n    Decode Chat (value)\n    value = read from encoded\n    repeat until <(value) = []>\n        add (value) to [buffer v]\n        value = read from encoded\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\nif <<<(x position) > [200]> or <[-200] > (x position)>> or <<(y position) > [160]> or <[-160] > (y position)>>> then\n    set rotation style [all around v]\n    switch costume to (arrow v)\n    go to [front v] layer\n    point towards (player v)\n    if on edge, bounce\nelse\n    set rotation style [left-right v]\n    point in direction (90)\n    switch costume to (normal v)\nend\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\nwhen I receive [join game v]\nvalue = cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\ndefine Decode Chat (chat)\nif <(chat) = [1]> then\n    say (item (1) of [chat v]) for (2) seconds\nelse\n    if <(chat) = [2]> then\n        say (item (2) of [chat v]) for (2) seconds\n    else\n        if <(chat) = [3]> then\n            say (item (3) of [chat v]) for (2) seconds\n        else\n            if <(chat) = [4]> then\n                say (item (4) of [chat v]) for (2) seconds\n            else\n                if <(chat) = [5]> then\n                    say (item (5) of [chat v]) for (2) seconds\n                else\n                    if <(chat) = [6]> then\n                        say (item (6) of [chat v]) for (2) seconds\n                    else\n                        if <(chat) = [7]> then\n                            say (item (7) of [chat v]) for (2) seconds\n                        else\n                            if <(chat) = [8]> then\n                                say (item (8) of [chat v]) for (2) seconds\n                            else\n                                if <(chat) = [9]> then\n                                    say (item (9) of [chat v]) for (2) seconds\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide variable [encoded v]\nhide variable [idx v]\nhide variable [last value v]\nhide variable [letter # v]\nhide variable [offline v]\nhide variable [player # v]\nhide variable [value v]\n\n@Chat\n\nwhen I receive [tick v]\nif <(Chat) = [1]> then\n    show\nelse\n    hide\nend\nif <<key (space v) pressed?> or <<mouse down?> and <touching (mouse-pointer v)?>>> then\n    broadcast (Chat Close v)\n    hide\n    wait until <<not <key (space v) pressed?>> and <not <<mouse down?> and <touching (mouse-pointer v)?>>>>\nend\n\nwhen I receive [green flag v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [chat open v]\nset [chat v] to [1]\n\nwhen I receive [chat close v]\nset [chat v] to [0]\n\n@Chat Button\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    repeat until <(size) > [119]>\n        change [size v] by (.9)\n        change size by (size)\n    end\n    if <mouse down?> then\n        broadcast (Chat Open v)\n        hide\n        wait until <not <mouse down?>>\n    end\nelse\n    repeat until <(size) < [101]>\n        set [size v] to [-.8]\n        change [size v] by (-.9)\n        change size by (size)\n    end\nend\n\nwhen I receive [chat close v]\nset size to (100) %\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [begin v]\nset [size v] to [.8]\nshow\nrepeat (40)\n    change [ghost v] effect by (-3)\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo [forward v] (1000) layers\nhide\ngo to x: (0) y: (0)\nchange [ghost v] effect by (100)\n\nwhen flag clicked\ngo to x: (-193) y: (-156)\nset size to (100) %\n\nwhen flag clicked\nhide variable [abc v]\nforever\n    if <[managers v] contains (username)?> then\n        if <(item (1) of [managers v]) = (username)> then\n            set [abc v] to (join (join (join (join [Master] (join [Pro] (join [ ] [ProMaster39]))) [ 's]) (join [ ] (join [time ] [was: ]))) (join (timer) (join [ // ] (join (join [ and was playing on days from 2000:] [ ]) (join (days since 2000) (join [ Year:] (join (current [year v]) (join [ Month:] (join (current [month v]) (join [ Date:] (join (current [date v]) (join [ Day of week:] (join (current [dayofweek v]) (join [ Hour:] (join (current [hour v]) (join [ Minute:] (join (current [minute v]) (join [ Second:] (join (current [second v]) [])))))))))))))))))))\n        else\n            if <(item (2) of [managers v]) = (username)> then\n                set [abc v] to (join (join (join (join [Master] (join [Pro] (join [ ] [ProMaster38]))) [ 's]) (join [ ] (join [time ] [was: ]))) (join (timer) (join [ // ] (join (join [ and was playing on days from 2000:] [ ]) (join (days since 2000) (join [ Year:] (join (current [year v]) (join [ Month:] (join (current [month v]) (join [ Date:] (join (current [date v]) (join [ Day of week:] (join (current [dayofweek v]) (join [ Hour:] (join (current [hour v]) (join [ Minute:] (join (current [minute v]) (join [ Second:] (join (current [second v]) [])))))))))))))))))))\n            end\n        end\n    else\n        if <not <[managers v] contains (username)?>> then\n            set [abc v] to (join (join (join (username) [ 's]) (join [ ] (join [time ] [was: ]))) (join (timer) (join [ // ] (join (join [ and was playing on days from 2000:] [ ]) (join (days since 2000) (join [ Year:] (join (current [year v]) (join [ Month:] (join (current [month v]) (join [ Date:] (join (current [date v]) (join [ Day of week:] (join (current [dayofweek v]) (join [ Hour:] (join (current [hour v]) (join [ Minute:] (join (current [minute v]) (join [ Second:] (join (current [second v]) [])))))))))))))))))))\n        end\n    end\nend\n\n@Joining and end\n\nwhen flag clicked\nhide\n\nwhen I receive [begin v]\nhide\n\nwhen I receive [connecting v]\nswitch costume to (joining v)\nshow\n\nwhen I receive [connected v]\ngo [forward v] (1322) layers\nstart sound [Connect v]\nswitch costume to (connected v)\nshow\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [full v]\nswitch costume to (full  v)\nshow\n\n@clouds\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (2.5) to (3.5)) seconds\nend\n\nwhen I start as a clone\nshow\ngo [backward v] (1) layers\nset size to (pick random (50) to (70)) %\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (pick random (30) to (45))\nset [cloud side v] to (pick random (1) to (2))\nif <(Cloud side) = [1]> then\n    go to x: (246) y: (pick random (140) to (80))\n    repeat until <(x position) < [-243]>\n        change x by ((0) - (pick random (0.5) to (2)))\n    end\nelse\n    go to x: (-246) y: (pick random (140) to (80))\n    repeat until <(x position) > [243]>\n        change x by (pick random (0.5) to (2))\n    end\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide variable [cloud side v]\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 [connecting v]\nrepeat (11)\n    create clone of (_myself_ v)\n    turn right (40) degrees\nend\n\nwhen I receive [connected v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen I start as a clone\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\n@Saws\n\nwhen I receive [green flag v]\nhide variable [mouse v]\nhide\n\nwhen I receive [tick v]\nPosition ((Saws: x) - (SCROLL X)) ((Saws: y) - (SCROLL Y))\ngo to [back v] layer\n\nwhen I receive [setup v]\nhide\nset [saws: x v] to [0]\nset [saws: y v] to [0]\nif <(LEVEL) = [1]> then\n    Clone at x: [-183] y: [-60]\n    Clone at x: [150] y: [-60]\n    Clone at x: [2819] y: [124]\n    Clone at x: [2941] y: [124]\nend\nset [saws: x v] to [-999999]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [saws: x v] to (x)\nset [saws: y v] to (y)\ncreate clone of (_myself_ v)\n\nClone at x: [340] y: [27]\nClone at x: [530] y: [27]\nClone at x: [786] y: [27]\nClone at x: [1124] y: [27]\nClone at x: [1331] y: [245]\nClone at x: [1065] y: [345]\nClone at x: [825] y: [272]\nClone at x: [392] y: [245]\nClone at x: [197] y: [335]\n\nClone at x: [631] y: [11]\n\nwhen flag clicked\nhide variable [saws: x v]\nhide variable [saws: y v]\n\nClone at x: [2819] y: [140]\nClone at x: [2941] y: [140]\n\nwhen I start as a clone\nforever\n    point in direction ((([abs v] of ((sup) * (200)) ) * (5)) + (90))\n    change [sup v] by (0.02)\nend\n\n@love fave detector\n\nwhen flag clicked\nhide\ngo to [front v] layer\ngo [forward v] (3) layers\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id 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)\nreset timer\nswitch costume to (4 v)\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\n    change [collected v] by (10)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [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 id) = [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@Thumbnail\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    go [forward v] (100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) layers\n    set [ghost v] effect to (100)\n    show\nend\n\n@Bounce\n\nwhen I receive [green flag v]\nhide variable [mouse v]\nhide\n\nwhen I receive [tick v]\nPosition ((Bounce: x) - (SCROLL X)) ((Bounce: y) - (SCROLL Y))\ngo to [back v] layer\n\nwhen I receive [setup v]\nhide\nset [bounce: x v] to [0]\nset [bounce: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (b v)\n    Clone at x: [2684] y: [-47]\n    Clone at x: [3084] y: [-47]\nend\nset [bounce: x v] to [-999999]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [bounce: x v] to (x)\nset [bounce: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide variable [bounce: x v]\nhide variable [bounce: y v]\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        start sound [Big Boing v]\n        switch costume to (b2 v)\n        wait (0.09) seconds\n        switch costume to (b3 v)\n        wait (0.09) seconds\n        switch costume to (b4 v)\n        wait (0.09) seconds\n        switch costume to (b5 v)\n    else\n        if <not <touching (player v)?>> then\n            switch costume to (b v)\n        end\n    end\nend\n\n@Collectables\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((Collectables: x) - (SCROLL X)) (((Collectables: y) - (SCROLL Y)) + (([cos v] of ((tim) * (300)) ) * (5)))\nif <touching (player v)?> then\n    start sound [Collect v]\n    change [collected v] by (1)\n    delete this clone\nend\n\nwhen I receive [play game v]\nshow\nset [collected v] to (COLLECTED)\nset [collected max v] to (COLLECTED MAX)\nset [collectables: x v] to [0]\nset [collectables: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (coin v)\n    Clone at x: [-6] y: [65]\n    Clone at x: [-46] y: [65]\n    Clone at x: [-86] y: [65]\n    Clone at x: [-126] y: [65]\n    Clone at x: [36] y: [65]\n    Clone at x: [76] y: [65]\n    Clone at x: [116] y: [65]\n    Clone at x: [156] y: [65]\n    Clone at x: [196] y: [65]\n    Clone at x: [276] y: [65]\n    Clone at x: [236] y: [65]\n    Clone at x: [337] y: [136]\n    Clone at x: [377] y: [136]\n    Clone at x: [417] y: [136]\n    Clone at x: [457] y: [136]\n    Clone at x: [497] y: [136]\n    Clone at x: [537] y: [136]\n    Clone at x: [577] y: [136]\n    Clone at x: [610] y: [46]\n    Clone at x: [650] y: [46]\n    Clone at x: [690] y: [46]\n    Clone at x: [771] y: [37]\n    Clone at x: [983] y: [37]\n    Clone at x: [1112] y: [37]\n    Clone at x: [1254] y: [37]\n    Clone at x: [1457] y: [37]\n    Clone at x: [1587] y: [37]\n    Clone at x: [1741] y: [37]\n    Clone at x: [1908] y: [37]\n    Clone at x: [2049] y: [37]\n    Clone at x: [2217] y: [37]\n    Clone at x: [2388] y: [37]\n    Clone at x: [2525] y: [37]\n    Clone at x: [2680] y: [10]\n    Clone at x: [2680] y: [50]\n    Clone at x: [2680] y: [90]\n    Clone at x: [2680] y: [130]\n    Clone at x: [2680] y: [170]\n    Clone at x: [2680] y: [210]\n    Clone at x: [2720] y: [310]\n    Clone at x: [2760] y: [310]\n    Clone at x: [2800] y: [310]\n    Clone at x: [2840] y: [310]\n    Clone at x: [2880] y: [310]\n    Clone at x: [2920] y: [310]\n    Clone at x: [2960] y: [310]\n    Clone at x: [3000] y: [310]\n    Clone at x: [3040] y: [310]\n    Clone at x: [3080] y: [10]\n    Clone at x: [3080] y: [50]\n    Clone at x: [3080] y: [90]\n    Clone at x: [3080] y: [130]\n    Clone at x: [3080] y: [170]\n    Clone at x: [3080] y: [210]\n    Clone at x: [3320] y: [122]\n    Clone at x: [3380] y: [122]\n    Clone at x: [3600] y: [400]\n    Clone at x: [3660] y: [400]\n    Clone at x: [3800] y: [500]\n    Clone at x: [3860] y: [500]\n    Clone at x: [3970] y: [625]\n    Clone at x: [4030] y: [625]\n    Clone at x: [4100] y: [773]\n    Clone at x: [4150] y: [773]\n    Clone at x: [4200] y: [773]\n    Clone at x: [4330] y: [825]\n    Clone at x: [4370] y: [825]\n    Clone at x: [4410] y: [825]\n    Clone at x: [4660] y: [806]\n    Clone at x: [4700] y: [806]\n    Clone at x: [4740] y: [806]\n    Clone at x: [4880] y: [769]\n    Clone at x: [4930] y: [769]\n    Clone at x: [4980] y: [769]\n    Clone at x: [5075] y: [727]\n    Clone at x: [5115] y: [727]\n    Clone at x: [5155] y: [727]\n    Clone at x: [5230] y: [810]\n    Clone at x: [5270] y: [810]\n    Clone at x: [5310] y: [810]\n    Clone at x: [5370] y: [894]\n    Clone at x: [5410] y: [894]\n    Clone at x: [5450] y: [894]\n    Clone at x: [5550] y: [1070]\n    Clone at x: [5590] y: [1070]\n    Clone at x: [5630] y: [1070]\n    Clone at x: [5845] y: [1132]\n    Clone at x: [5885] y: [1132]\n    Clone at x: [5925] y: [1132]\nend\nset [collectables: 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\ndefine Clone at x: (x) y: (y)\nset [collectables: x v] to (x)\nset [collectables: y v] to (y)\nchange [collected max v] by (1)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset [collected v] to [0]\nset [collected max v] to [0]\n\n@Enemy\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition (((Collectables: x) - (SCROLL X)) + (([cos v] of ((tim) * (200)) ) * (50))) ((Collectables: y) - (SCROLL Y))\ngo to [back v] layer\n\nwhen I receive [play game v]\nshow\nset [collectables: x v] to [0]\nset [collectables: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (e v)\n    Clone at x: [467] y: [77]\n    Clone at x: [2884] y: [221]\nend\nset [collectables: 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\ndefine Clone at x: (x) y: (y)\nset [collectables: x v] to (x)\nset [collectables: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        change y by (-1)\n        if <<touching (platforms v)?> and <([y position v] of [player v]) > (y position)>> then\n            start sound [Cymbal v]\n            wait (0.01) seconds\n            switch costume to (e2 v)\n            wait (0.01) seconds\n            switch costume to (e3 v)\n            wait (0.01) seconds\n            switch costume to (e4 v)\n            wait (0.01) seconds\n            switch costume to (e5 v)\n            wait (0.01) seconds\n            switch costume to (e6 v)\n            wait (0.01) seconds\n            switch costume to (e7 v)\n            change [collected v] by (5)\n            wait (0.1) seconds\n            delete this clone\n        else\n            set [exit v] to [die]\n        end\n        change y by (1)\n    end\nend\n\n@CheckPoints\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x pos) - (SCROLL X)) ((y pos) - (SCROLL Y))\ngo to [back v] layer\n\nwhen I receive [setup v]\ngo to [front v] layer\nset size to (100) %\nclear graphic effects\nshow\nset [x pos v] to [0]\nset [y pos v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (checkpointa v)\n    Clone at x: [699] y: [-36]\n    Clone at x: [2728] y: [225]\n    Clone at x: [4231] y: [681]\nend\nset [x pos v] to [-9999999999]\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 pos v] to (x)\nset [y pos v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <(costume [number v]) = [1]> then\n            switch costume to (checkpointb v)\n            if <<(x pos) = [699]> and <(y pos) = [-36]>> then\n                set [checkpointcheckaccount# v] to [1]\n            else\n                if <<(x pos) = [2728]> and <(y pos) = [225]>> then\n                    set [checkpointcheckaccount# v] to [2]\n                else\n                    if <<(x pos) = [4231]> and <(y pos) = [681]>> then\n                        set [checkpointcheckaccount# v] to [3]\n                    end\n                end\n            end\n        else\n            set [checkpointcheckaccount# v] to (CheckpointCheckAccount#)\n        end\n    end\nend\n\nwhen flag clicked\nset [checkpointcheckaccount# v] to [0]\n\n@Background\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\ngo to [back v] layer\ngo [backward v] (1) layers\n\nwhen I receive [setup v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [-50]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [360]\n    Clone at x: [480] y: [360]\nend\n\ndefine Position (x) (y)\nset size to (100) %\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nwhen flag clicked\nhide variable [platforms: x v]\nhide variable [platforms: y v]\n\nwhen I start as a clone\nif <(costume [number v]) = [14]> then\n    forever\n        repeat (160)\n            change [platforms: x v] by (2)\n        end\n        repeat (160)\n            change [platforms: x v] by (-2)\n        end\n    end\nend\n\nwhen I start as a clone\ngo [backward v] (1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) layers\n\n@Star\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nset size to (100) %\nposition ((Star: x) - (SCROLL X)) (((Star: y) - (SCROLL Y)) + (([cos v] of ((tim) * (300)) ) * (5)))\nif <touching (player v)?> then\n    broadcast (Ani v)\nend\n\nwhen I receive [setup v]\nhide\nset [star: x v] to [0]\nset [star: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (star v)\n    Clone at x: [6571] y: [1227]\nend\nset [star: 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]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [star: x v] to (x)\nset [star: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [ani v]\nbroadcast (___ v)\n\nstop [this script v]\n\n@Ones\n\nwhen flag clicked\ngo to x: (-189) y: (153)\nforever\n    if <(COLLECTED) < [10]> then\n        switch costume to (COLLECTED)\n    else\n        if <(COLLECTED) > [10]> then\n            switch costume to (letter (2) of (COLLECTED))\n        else\n            if <(letter (2) of (COLLECTED)) = [10]> then\n                switch costume to (0 v)\n            end\n            if <(COLLECTED) > [9]> then\n                switch costume to (COLLECTED)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nshow\n\nwhen I receive [game! v]\nstop [other scripts in sprite v]\nhide\nif  then\n    delete this clone\nend\n\n@Tens\n\nwhen flag clicked\nhide\n\nwhen I receive [connected v]\nshow\ngo to x: (-205) y: (153)\nforever\n    if <(COLLECTED) < [10]> then\n        hide\n    else\n        if <<(COLLECTED) > [10]> or <(COLLECTED) = [10]>> then\n            show\n            switch costume to (letter (1) of (COLLECTED))\n        else\n            if <(letter (2) of (COLLECTED)) = [10]> then\n                switch costume to (0 v)\n            end\n        end\n    end\nend\n\nwhen I receive [game! v]\nstop [other scripts in sprite v]\nhide\nif  then\n    delete this clone\nend\n\n@Coin\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I receive [connected v]\nforever\n    go to x: (-163) y: (152)\n    clear graphic effects\n    show\nend\n\nwhen I receive [game! v]\nstop [other scripts in sprite v]\nhide\nif  then\n    delete this clone\nend\n\n@end\n\nwhen flag clicked\nhide\n\nwhen I receive [___ v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\n\n