☁ The Plains {DEMO} || A Multiplayer Scrolling Platformer #Games

Instructions: Please Love and Fave and Follow\nUse Arrow keys, WASD, or if you have a phone it is mobile friendly.\nSPAM FLAG FOR NO LAG!!!\nTry to beat my time of 28:776\n\nGOOD\n_____________________________________________\nland, character, clouds, coins, other people.\n\nBAD\n_____________________________________________\nspikes, saws, enemy, gaps.\n

@Stage\n\nwhen [m v] key pressed\nshow variable [mouse x,y v]\nset [mouse x,y v] to (join ((mouse x) + (SCROLL X)) (join [,] ((mouse y) + (SCROLL Y))))\n\nwhen flag clicked\nbroadcast (Green flag v) and wait\nbroadcast (Play Game v) and wait\n\nwhen flag clicked\nswitch backdrop to (backdrop6 v)\n\nwhen I receive [outro v]\nswitch backdrop to (backdrop1 v)\n\nbroadcast (Outro v)\n\nwhen flag clicked\nforever\n    play sound [Alan Walker - Force v] until done\nend\n\n@BLANK\n\n@Player\n\ndefine Reset\nif <(CHECKPOINT) = [0]> then\n    set [x v] to [-100]\n    set [y v] to [0]\n    set [scroll y v] to (y)\n    set [scroll x v] to (x)\nelse\n    if <(CHECKPOINT) = [1]> then\n        set [x v] to [830]\n        set [y v] to [0]\n        set [scroll y v] to (y)\n        set [scroll x v] to (x)\n    else\n        if <(CHECKPOINT) = [2]> then\n            set [x v] to [1820]\n            set [y v] to [0]\n            set [scroll y v] to (y)\n            set [scroll x v] to (x)\n        else\n            if <(CHECKPOINT) = [3]> then\n                set [x v] to [2970]\n                set [y v] to [-95]\n                set [scroll y v] to (y)\n                set [scroll x v] to (x)\n            else\n                if <(CHECKPOINT) = [4]> then\n                    set [x v] to [3000]\n                    set [y v] to [490]\n                    set [scroll y v] to (y)\n                    set [scroll x v] to (x)\n                else\n                    if <(CHECKPOINT) = [5]> then\n                        set [x v] to [3000]\n                        set [y v] to [490]\n                        set [scroll y v] to (y)\n                        set [scroll x v] to (x)\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [play game v]\nset [connected? v] to [0]\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\ndefine Change Player x by (sx)\npoint in direction (90)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    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 [y v] to [0]\nset [x v] to [-100]\nset [scroll x v] to [-100]\nset [scroll y v] to [0]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\npoint in direction (90)\nset [ghost v] effect to (0)\n\ndefine Test - Die\nif <touching (danger v)?> then\n    start sound [Hurt v]\n    set [exit v] to [die]\nend\nif <touching (saws v)?> then\n    start sound [Hurt v]\n    set [exit v] to [die]\nend\n\ndefine Game - Die\nset [exit v] to []\nstart sound [Hurt v]\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\ndefine Tick\nif <not <key (any v) pressed?>> then\n    switch costume to (normal v)\nend\nif <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n    switch costume to (left v)\n    change [sx v] by (-2)\nend\nif <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n    switch costume to (right v)\n    change [sx v] by (2)\nend\nif <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(mouse x) < (x position)> and <mouse down?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n    switch costume to (left up v)\nend\nif <<<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <<<(x position) < (mouse x)> and <mouse down?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>>> then\n    switch costume to (right up v)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<<(y position) < (mouse y)> and <mouse down?>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player y by (sy)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\nif <(x) < [-220]> then\n    set [x v] to [-220]\nend\nif <touching (bouncy v)?> then\n    set [sy v] to [30]\nend\nif <touching color (#ff0000)?> then\n    set [exit v] to [die]\nend\n\nwhen flag clicked\n\ndefine set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            else\n                if <(player) = [5]> then\n                    set [☁ p5 v] to (value)\n                else\n                    if <(player) = [6]> then\n                        set [☁ p6 v] to (value)\n                    else\n                        if <(player) = [7]> then\n                            set [☁ p7 v] to (value)\n                        else\n                            if <(player) = [8]> then\n                                set [☁ p8 v] to (value)\n                            else\n                                if <(player) = [9]> then\n                                    set [☁ p9 v] to (value)\n                                else\n                                    if <(player) = [10]> then\n                                        set [☁ p10 v] to (value)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine write (val) to encoded\nset [letter # v] to [1]\nrepeat (length of (val))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (val)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) > [0]> then\n        send cloud data\n    end\nend\n\ndefine send cloud data\nset [encoded v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite ((SCROLL X) + (x position)) to encoded\nwrite ((SCROLL Y) + (y position)) to encoded\nwrite (Chat Words) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\nwhen flag clicked\ngo to [front v] layer\n\nwhen I receive [connected v]\nset [connected? v] to [1]\nshow\n\nwhen I receive [connecting v]\nhide\n\nwhen I receive [play game v]\nforever\n    if <(Connected?) = [1]> then\n        broadcast (Reset v) and wait\n        broadcast (Setup v) and wait\n        Game On\n        Reset\n        repeat until <(EXIT) > []>\n            Tick\n            broadcast (Tick v)\n        end\n        if <(EXIT) = [win]> then\n            Game - Win\n        else\n            Game - Die\n        end\n    end\nend\n\nwhen I receive [connected v]\nset [level v] to [1]\n\ndefine Player Tick\n\nwhen flag clicked\nforever\n    set size to (80) %\nend\n\nwhen flag clicked\nforever\n    \nend\n\nstart sound [Connect v]\n\nwhen I receive [play game v]\nhide\nset [max players v] to [8]\nset [my player # v] to [0]\nbroadcast (Connecting v)\nbroadcast (Setup Others v) and wait\nbroadcast (Join Game v) and wait\nif <(MY PLAYER #) > [0]> then\n    broadcast (Connected v)\nelse\n    broadcast (Full v)\n    start sound [Disconnect v]\nend\nbroadcast (Begin v)\n\nwhen I receive [outro v]\nhide\n\n@Others\n\ndefine X: (x)\nset x to (x)\nif <(x) = (x position)> then\n    set [visible v] to [1]\n    set [ghost v] effect to (0)\nelse\n    set [visible v] to [0]\n    set [ghost v] effect to (100)\nend\n\ndefine Y: (y)\nset y to (y)\nif <(y) = (y position)> then\n    if <(visible) = [1]> then\n        set [visible v] to [1]\n        set [ghost v] effect to (0)\n    end\nelse\n    set [visible v] to [0]\n    set [ghost v] effect to (100)\nend\n\nwhen I receive [begin v]\nset [names v] to [1]\nforever\n    if <key (n v) pressed?> then\n        if <(names) = [1]> then\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [0]\n        else\n            wait until <not <key (n v) pressed?>>\n            set [names v] to [1]\n        end\n    end\nend\n\nwhen I receive [setup others v]\nsetup players\n\ndefine setup players\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            else\n                if <(player) = [5]> then\n                    set [value v] to (☁ P5)\n                else\n                    if <(player) = [6]> then\n                        set [value v] to (☁ P6)\n                    else\n                        if <(player) = [7]> then\n                            set [value v] to (☁ P7)\n                        else\n                            if <(player) = [8]> then\n                                set [value v] to (☁ P8)\n                            else\n                                if <(player) = [9]> then\n                                    set [value v] to (☁ P9)\n                                else\n                                    if <(player) = [10]> then\n                                        set [value v] to (☁ P10)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        Tick\n    end\nend\n\ndefine Tick\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nif <(names) = [1]> then\n    say (join (player #) (join [:] (value)))\nelse\n    say []\nend\nvalue = read from encoded\nvalue = read from encoded\nX: ((value) - (SCROLL X))\nvalue = read from encoded\nY: (((value) - (SCROLL Y)) + (8))\nvalue = read from encoded\nbroadcast (Decode Chat v)\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\nwhen I receive [join game v]\nswitch costume to (pick random (1) to (7))\nvalue = cloud # (player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue = cloud # (player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (player #)\nend\n\nwhen flag clicked\nforever\n    set size to (80) %\nend\n\nwhen I receive [end v]\nforever\n    hide\nend\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(LOVED__) = [1]> and <(FAVED___) = [1]>>> then\n        wait (pick random (30) to (40)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\n@Detector\n\nwhen flag clicked\nhide\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\nbroadcast (Thanks v)\n\ngo to x: (0) y: (0)\nshow\nreset timer\nswitch costume to (pick random (1) to (4))\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)\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@Thanks\n\nwhen I receive [thanks v]\nswitch costume to (costume2 v)\ngo to x: (-210) y: (50)\nshow\ngo to [front v] layer\nstart sound [pop v]\nrepeat (9)\n    change y by (-6)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-3)\nend\nwait (1) seconds\nrepeat (10)\n    change y by (6)\nend\nhide\n\nwhen I start as a clone\ngo to x: (0) y: (-50)\nshow\ngo to [front v] layer\nrepeat (12)\n    change y by (-9)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-1)\nend\nforever\n    if <touching (mouse-pointer v)?> then\n        set [ghost v] effect to (50)\n        if <(costume [number v]) = [2]> then\n            if <mouse down?> then\n                set [costume v] to [2]\n                repeat (25)\n                    change y by (10)\n                end\n                hide\n                delete this clone\n            end\n        else\n            if <(costume [number v]) = [3]> then\n                if <mouse down?> then\n                    set [costume v] to [1]\n                    repeat (25)\n                        change y by (15)\n                    end\n                    hide\n                    delete this clone\n                end\n            end\n        end\n    else\n        set [ghost v] effect to (0)\n    end\n    if <(Costume) > [0.99]> then\n        repeat (25)\n            change y by (15)\n        end\n        hide\n        delete this clone\n    end\n    hide\n    delete this clone\nend\n\nwhen flag clicked\nhide\nset [costume v] to [0.9]\n\nwhen I receive [begin v]\nset [costume v] to [0.9]\nwait (0.1) seconds\nset [costume v] to [0.9]\nwait (0.2) seconds\nset [costume v] to [0.9]\n\n@Joining\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\nshow\nwait (1) seconds\nhide\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [full v]\nswitch costume to (full  v)\nshow\n\n@Loading\n\nwhen flag clicked\ngo [forward v] (213) layers\nset size to (100) %\nhide\npoint in direction (90)\nclear graphic effects\ngo to x: (0) y: (-80)\n\nwhen I receive [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@TB\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\ngo [backward v] (23330) layers\n\nwhen I receive [outro v]\nhide\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nswitch costume to (1 v)\nClone at [200] [0]\nClone at [400] [0]\nClone at [1000] [0]\nClone at [900] [0]\nClone at [400] [500]\nClone at [400] [500]\nClone at [-100] [-500]\n\nwhen I receive [tick v]\nposition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\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) (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nwhen I start as a clone\nif <(costume [number v]) = [6]> then\n    forever\n        repeat (100)\n            change [platforms: y v] by (2)\n        end\n        repeat (100)\n            change [platforms: y v] by (-2)\n        end\n    end\nend\n\n@Danger\n\nwhen I receive [green flag v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nswitch costume to (1 v)\nClone at [600] [-50]\nClone at [800] [-50]\nClone at [500] [-50]\nClone at [700] [-50]\nClone at [300] [500]\n\nwhen I receive [tick v]\nposition ((Danger: x) - (SCROLL X)) ((Danger: y) - (SCROLL Y))\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) (y)\ncreate clone of (_myself_ v)\nchange [danger: x v] by (x)\nchange [danger: y v] by (y)\nnext costume\n\nbroadcast (Green flag v)\n\n@Saws\n\nwhen I receive [tick v]\nposition ((Saws: x) - (SCROLL X)) ((Saws: y) - (SCROLL Y))\nturn right (11.5) degrees\ngo to [back v] layer\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 [play game v]\nhide\nset [saws: x v] to [0]\nset [saws: y v] to [0]\nswitch costume to (1 v)\nif <not <((10) + (19)) = [21]>> then\n    Clone at [20] [-105]\n    Clone at [320] [-105]\n    Clone at [2580] [-115]\nend\nset [saws: x v] to [-99999]\n\ndefine Clone at (x) (y)\nset [saws: x v] to (x)\nset [saws: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nforever\n\nwhen I start as a clone\n\n@Bouncy\n\nwhen I receive [green flag v]\nhide\nset [bouncy: x v] to [0]\nset [bouncy: y v] to [0]\nswitch costume to (i v)\nClone at [580] [-104]\nClone at [260] [33]\nClone at [1540] [-110]\nset [bouncy: x v] to [-99999]\n\nwhen I receive [tick v]\nposition ((Bouncy: x) - (SCROLL X)) ((Bouncy: y) - (SCROLL Y))\nif <touching (player v)?> then\n    switch costume to (ii v)\nelse\n    switch costume to (i v)\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [bouncy: x v] to (x)\nset [bouncy: y v] to (y)\ncreate clone of (_myself_ v)\n\nClone at [2000] [495]\nClone at [1770] [755]\nClone at [1570] [755]\n\n@Checkpoint\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (SCROLL X)) (join [,] (join [ ] ((mouse y) + (SCROLL Y)))))\nshow variable [mouse v]\n\nwhen I receive [green flag v]\nset size to (11) %\nhide\nClone at [830] [-95]\nClone at [1820] [-95]\nClone at [2970] [-95]\nClone at [3000] [490]\n\nwhen I receive [tick v]\nposition ((Checkpoint: x) - (SCROLL X)) ((Checkpoint: y) - (SCROLL Y))\nif <(costume [name v]) = [Closed]> then\n    if <touching (player v)?> then\n        switch costume to (open v)\n        change [checkpoint v] by (1)\n        set [brightness v] effect to (30)\n    end\nend\ngo to [back v] layer\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) (y)\nset [checkpoint: x v] to (x)\nset [checkpoint: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\nset [checkpoint v] to [0]\nset [checkpoint: x v] to [0]\nset [checkpoint: y v] to [0]\nswitch costume to (closed v)\n\nset [checkpoint: x v] to [-99999]\n\n@Win\n\nwhen I receive [end v]\nshow\nset [ghost v] effect to (80)\ngo to x: (0) y: (0)\nshow\nswitch costume to (blank v)\nset size to (150) %\nswitch costume to (win screen v)\nrepeat (80)\n    go [forward v] (100) layers\n    go to [front v] layer\n    switch costume to (blank v)\n    switch costume to (win screen v)\n    change [ghost v] effect by (-5)\n    change size by (((100) - (size)) / (40))\n    set x to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n    set y to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\nend\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide variable [time: v]\nset [? v] to [1]\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [green flag v]\nwait (3) seconds\nreset timer\nrepeat until <[2] = (?)>\n    set [time: v] to (timer)\nend\n\nwhen I receive [end v]\nset [? v] to [2]\nset [time: v] to (Time:)\nshow variable [time: v]\nforever\n    set [names v] to [0]\nend\n\n@Signs\n\nwhen I receive [green flag v]\nset [username v] to (username)\nset size to (110) %\nhide\nset [signs: x v] to [0]\nset [signs: y v] to [0]\nswitch costume to (1 v)\nhide\n\nwhen I receive [tick v]\nposition ((Signs: x) - (SCROLL X)) ((Signs: y) - (SCROLL Y))\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) (y)\nshow\ncreate clone of (_myself_ v)\nchange [signs: x v] by (x)\nchange [signs: y v] by (y)\nnext costume\n\nwhen I start as a clone\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        switch costume to (space key? mouse down? v)\n    else\n        switch costume to (middle v)\n    end\n    if <<<<key (space v) pressed?> or <mouse down?>> and <touching (player v)?>> and <(costume [number v]) = [3]>> then\n        repeat until <not <touching (player v)?>>\n            say (join [Hello ] (join (Username) (join [. ] (join [Avoid spikes, saws, lava and gaps. Collect coins and get to the checkpoints and get to the end. Have fun and] [ please ❤️️,⭐, and follow and enjoy :D]))))\n        end\n    else\n        if <not <touching (player v)?>> then\n            say []\n        end\n    end\nend\n\n@Scenery\n\nwhen I receive [green flag v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nswitch costume to (level 1 1 v)\nClone at [400] [0]\n\nwhen I receive [tick v]\nposition ((Platforms: x) - (SCROLL X)) ((Platforms: y) - (SCROLL Y))\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) (y)\ncreate clone of (_myself_ v)\nchange [platforms: x v] by (x)\nchange [platforms: y v] by (y)\nnext costume\n\nwhen flag clicked\ngo to [back v] layer\n\n@Collectibles\n\nwhen I receive [tick v]\nposition ((Collectibles: x) - (SCROLL X)) ((Collectibles: y) - (SCROLL Y))\nif <(tick) > [1]> then\n    set [tick v] to [0]\nelse\n    change [tick v] by (1)\nend\nif <touching (player v)?> then\n    change [coins v] by (1)\n    Clone at [-99999] [-999999]\nend\n\nwhen I receive [green flag v]\nhide\npoint in direction (90)\nset [coins v] to [0]\nset [collectibles: x v] to [0]\nset [tick v] to [0]\nset [collectibles: y v] to [0]\nswitch costume to (1 v)\nClone at [210] [60]\nClone at [130] [185]\nClone at [430] [-90]\nClone at [460] [-90]\nClone at [400] [-90]\nClone at [370] [-90]\nClone at [490] [-90]\nClone at [448] [220]\nClone at [481] [220]\n\nset [collectibles: 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) (y)\nset [collectibles: x v] to (x)\nset [collectibles: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    set size to (75) %\nend\n\nwhen flag clicked\nforever\n    wait (.1) seconds\nend\n\nwhen I receive [begin v]\n\nClone at [430] [15\\]\nClone at [460] [80]\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 (70) to (100)) %\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (pick random (30) to (45))\nset [side of cloud v] to (pick random (1) to (2))\nif <(side of cloud) = [1]> then\n    go to x: (246) y: (pick random (140) to (9))\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 [side of cloud v]\n\n@Moving Enemy\n\ndefine Clone at x: (x) y: (y) MAX (i)\nset [enemies max x v] to (i)\nset [enemies: x v] to (x)\nset [enemies: y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [green flag v]\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [tick v]\nset size to (28) %\nPosition ((enemies: X CHANGE) + ((enemies: x) - (SCROLL X))) ((enemies: y) - (SCROLL Y))\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 start as a clone\nset [enemies: x change v] to [0]\nset rotation style [left-right v]\nforever\n    repeat until <(enemies: X CHANGE) > (enemies MAX X)>\n        point in direction (90)\n        change [enemies: x change v] by (2)\n    end\n    repeat until <(enemies: X CHANGE) < [1]>\n        point in direction (-90)\n        change [enemies: x change v] by (-2)\n    end\nend\n\nwhen I receive [enemy killed v]\ngo to [back v] layer\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        if <([y position v] of [player v]) > (y position)> then\n            broadcast (JUMP v)\n            broadcast (Enemy Killed v)\n        else\n            set [exit v] to [die]\n        end\n    end\nend\n\nwhen I receive [play game v]\nhide\nset [enemies: x v] to [0]\nset [enemies: y v] to [0]\nif <not <(CHECKPOINT) > [0]>> then\n    Clone at x: [840] y: [-94] MAX [130]\n    Clone at x: [3100] y: [490] MAX [200]\n    Clone at x: [3200] y: [490] MAX [200]\n    Clone at x: [3300] y: [490] MAX [200]\n    set [enemies: x v] to [-999999999999999]\n    set [enemies: x v] to [-999999999999999]\nelse\n    if <(CHECKPOINT) = [1]> then\n        set [enemies: x v] to [-999999999999999]\n    else\n        set [enemies: x v] to [-999999999999999]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nswitch costume to (red1 v)\n\nwhen I start as a clone\nforever\n    repeat until <(costume [number v]) = [8]>\n        next costume\n        wait (0.019) seconds\n    end\n    switch costume to (red1 v)\n    wait (0.019) seconds\nend\n\nwhen I receive [begin v]\nforever\n    if <touching (player v)?> then\n        if <<([y position v] of [player v]) > (y position)> and <(sy) < [-1]>> then\n            broadcast (JUMP v)\n            broadcast (Enemy Killed v)\n            delete this clone\n        else\n            set [exit v] to [die]\n            broadcast (Reset v)\n        end\n    end\nend\n\n@Star\n\nwhen I receive [tick v]\nset size to (75) %\nposition ((Star: x) - (SCROLL X)) (((Star: y) - (SCROLL Y)) + (([cos v] of ((tim) * (300)) ) * (5)))\nif <touching (player v)?> then\n    broadcast (END v)\nend\n\nwhen I receive [green flag 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: [3551] y: [550]\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\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\n