The Unknown Valleys || A Non Generic Multiplayer Scrolling Platformer #Games
@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 (backdrop2 v)\n\nwhen flag clicked\nforever\n    repeat until <(Music) = [0]>\n        play sound [MUSICA v] until done\n    end\nend\n\nwhen flag clicked\nset [_ v] to [0]\nforever\n    if <(Music) = [0]> then\n        set [_ v] to [1]\n        clear sound effects\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop3 v)\nforever\n    if <(Music) = [0]> then\n        start sound [MUSICA v]\n    end\nend\n\n\n\nwhen [timer v] > (.01)\nswitch backdrop to (1 v)\n\n@BLANK \n\n@Player\n\ndefine Reset\nif <(CHECKPOINT) = [0]> then\n    set [x v] to [0]\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 [1100]\n        set [y v] to [-90]\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 [2023]\n            set [y v] to [-50]\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 [2023]\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 [3684]\n                    set [y v] to [80]\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 [0]\nset [scroll x v] to [0]\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    set [exit v] to [die]\nend\nif <touching (saws v)?> then\n    set [exit v] to [die]\nend\nif <touching (lava v)?> then\n    set [exit v] to [die]\nend\n\ndefine Game - Die\nset [exit v] to []\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 <touching (ladder v)?> then\n    change [sx v] by ((2) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n    set [sx v] to ((sx) * (0.63))\nelse\n    if <<(LOVED__) = [1]> and <(FAVED___) = [1]>> then\n        change [sx v] by ((1.7) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n        set [sx v] to ((sx) * (0.85))\n    else\n        change [sx v] by ((1.5) * (<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> - <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<((mouse x) + (20)) < (x position)> and <mouse down?>>>))\n        set [sx v] to ((sx) * (0.79))\n    end\nend\nif <touching (ladder v)?> then\n    if <<<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>> or <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<((mouse x) - (20)) > (x position)> and <mouse down?>>> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<((mouse y) + (20)) > (y position)> and <mouse down?>>>>> then\n        change [y v] by (6)\n    end\n    if <<<key (down arrow v) pressed?> or <key (s v) pressed?>> or <<((mouse y) - (20)) > (y position)> and <mouse down?>>> then\n        change [y v] by (-6)\n    end\n    set [sy v] to [0]\nelse\n    if <(sy) > [-20]> then\n        change [sy v] by (-1.3)\n    end\nend\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 [18]\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 [35]\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 <(Players) > [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 # (Players) 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 I receive [play game v]\nhide\nset [max players v] to [8]\nset [players v] to [0]\nbroadcast (Connecting v)\nbroadcast (Setup Others v) and wait\nbroadcast (Join Game v) and wait\nif <(Players) > [0]> then\n    start sound [Connect v]\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\nwhen I receive [jump v]\nchange [sy v] by (50)\n\nwhen flag clicked\n\nwhen flag clicked\nforever\n    if <(SSFX) = [0]> then\n        if <<<touching (danger v)?> or <<touching (saws v)?> or <touching (lava v)?>>> or <<touching (moving enemy v)?> or <<touching (collectibles v)?> or >>> then\n            clear sound effects\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (8 v) pressed?> then\n        set [x v] to [4048]\n        set [y v] to [70]\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(SSFX) = [1]> then\n        if <touching (danger v)?> then\n            start sound [Punch v]\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(SSFX) = [1]> then\n        if <touching (saws v)?> then\n            start sound [Punch v]\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(SSFX) = [1]> then\n        if <touching (lava v)?> then\n            start sound [Punch v]\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(SSFX) = [1]> then\n        if <touching (moving enemy v)?> then\n            start sound [Punch v]\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(SSFX) = [1]> then\n        if <touching (bouncy v)?> then\n            start sound [Big Boing v]\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(SSFX) = [1]> then\n        if <touching (saws v)?> then\n            start sound [Punch v]\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(SSFX) = [1]> then\n        if <touching (lava v)?> then\n            start sound [Punch v]\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(SSFX) = [1]> then\n        if <touching (moving enemy v)?> then\n            start sound [Punch v]\n        end\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(SSFX) = [1]> then\n        if <touching (collectibles v)?> then\n            start sound [Coin v]\n            wait until <not <touching (collectibles v)?>>\n        end\n    end\nend\n\nwhen I receive [begin v]\n\nwhen [timer v] > (.01)\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 <(Players) = (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 (normal 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 [players 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\nwhen [timer v] > (.01)\nhide\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\nwhen [timer v] > (.01)\nhide\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@Platforms\n\nwhen I receive [green flag v]\nhide\nset [platforms: x v] to [0]\nset [platforms: y v] to [0]\nswitch costume to (costume1 v)\nClone at [500] [0]\nClone at [200] [-50]\nClone at [800] [0]\nClone at [200] [170]\nClone at [500] [0]\nClone at [700] [-50]\nClone at [0] [-100]\nClone at [590] [0]\nClone at [200] [0]\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 I start as a clone\nif <(costume [number v]) = [8]> then\n    broadcast (hi v)\n    forever\n        repeat (100)\n            change [platforms: x v] by (2)\n        end\n        repeat (100)\n            change [platforms: x v] by (-2)\n        end\n    end\nend\n\nwhen [timer v] > (.01)\nhide\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 [1000] [-140]\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\nClone at [0] [-280]\n\nwhen [timer v] > (.01)\nhide\n\n@Saws\n\nwhen I receive [tick v]\nposition ((Saws: x) - (SCROLL X)) ((Saws: y) - (SCROLL Y))\nturn right (15) 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 [300] [-115]\n    Clone at [2270] [-120]\n    Clone at [2315] [-120]\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\nwhen [timer v] > (.01)\nhide\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 (l v)\nClone at [420] [-100]\nClone at [2225] [-104]\nClone at [2643] [-104]\nset [bouncy: x v] to [-99999]\n\nwhen I receive [tick v]\ngo to [back v] layer\nposition ((Bouncy: x) - (SCROLL X)) ((Bouncy: y) - (SCROLL Y))\nif <touching (player v)?> then\n    switch costume to (2 v)\nelse\n    switch costume to (1 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\nwhen [timer v] > (.01)\nhide\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 (60) %\nhide\nClone at [1100] [-100]\nClone at [2023] [-100]\nClone at [3689] [90]\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 (20)\n        if <(SSFX) = [1]> then\n            start sound [Ding  v]\n        end\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\nwhen flag clicked\nforever\n    if <(SSFX) = [0]> then\n        clear sound effects\n    end\nend\n\nwhen [timer v] > (.01)\nhide\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 ( 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 ( 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\nset [ghost v] effect to (0)\nhide\n\nwhen I receive [end v]\nforever\n    set [names v] to [0]\nend\n\nwhen [timer v] > (.01)\nhide\n\nwhen I receive [end v]\nforever\n    stop all sounds\nend\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 (coin v)\nClone at [-220] [110]\nClone at [-220] [80]\nClone at [-190] [110]\nClone at [-190] [80]\nClone at [150] [0]\nClone at [715] [-30]\nClone at [715] [-60]\nClone at [715] [-90]\nClone at [420] [0]\nClone at [420] [-30]\nClone at [420] [30]\nClone at [420] [60]\nClone at [420] [-60]\nClone at [-125] [307]\nClone at [-125] [340]\nClone at [-95] [307]\nClone at [-95] [340]\nClone at [1169] [-20]\nClone at [1263] [20]\nClone at [1356] [60]\nClone at [-220] [-60]\nClone at [-220] [-25]\nClone at [-220] [-95]\nClone at [787] [-95]\nClone at [821] [-95]\nClone at [855] [-95]\nClone at [889] [-95]\nClone at [1486] [110]\nClone at [1520] [110]\nClone at [1590] [175]\nClone at [1624] [175]\nClone at [1739] [110]\nClone at [1773] [110]\nClone at [2000] [175]\nClone at [2000] [141]\nClone at [2000] [107]\nClone at [2000] [73]\nClone at [1903] [210]\nClone at [1937] [210]\nClone at [2446] [-50]\nClone at [2480] [-50]\nClone at [2514] [-50]\nClone at [2446] [-80]\nClone at [2480] [-80]\nClone at [2514] [-80]\nClone at [2275] [10]\nClone at [2305] [10]\nClone at [2275] [40]\nClone at [2305] [40]\nClone at [2800] [30]\nClone at [2834] [30]\nClone at [2868] [30]\nClone at [2902] [30]\nClone at [2936] [30]\nClone at [2970] [30]\nClone at [3268] [30]\nClone at [3302] [30]\nClone at [3336] [30]\nClone at [3370] [30]\nClone at [3404] [30]\nClone at [3438] [30]\nClone at [3725] [100]\nClone at [3759] [100]\nClone at [3810] [172]\nClone at [3844] [172]\nClone at [3950] [105]\nClone at [3985] [105]\nClone at [4132] [210]\nClone at [4132] [180]\nClone at [4132] [150]\nClone at [4264] [70]\nClone at [4264] [100]\nClone at [4264] [130]\nClone at [4345] [200]\nClone at [4360] [320]\nClone at [4330] [70]\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 (100) %\nend\n\nwhen flag clicked\nforever\n    set size to (100) %\nend\n\nwhen [timer v] > (1)\n\nwhen flag clicked\n\nwhen [timer v] > (.01)\nhide\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 (win v)\n    Clone at x: [4400] y: [400]\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\nwhen [timer v] > (.01)\nhide\n\n@Scenery\n\nwhen I receive [tick v]\nhide\nposition ((Saws: x) - (SCROLL X)) ((Saws: y) - (SCROLL Y))\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)\nClone at [135] [100]\nClone at [800] [0]\nClone at [1000] [-60]\n\ndefine Clone at (x) (y)\nset [saws: x v] to (x)\nset [saws: y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen [timer v] > (.01)\nhide\n\n@Ladder\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((Ladder: x) - (SCROLL X)) ((Ladder: y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [ladder: x v] to [0]\nset [ladder: y v] to [0]\nswitch costume to (1 v)\nClone at [-150] [0]\nClone at [-150] [0]\nClone at [2300] [120]\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) (y)\ncreate clone of (_myself_ v)\nchange [ladder: x v] by (x)\nchange [ladder: y v] by (y)\nnext costume\n\nwhen [timer v] > (.01)\nhide\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    point in direction (direction)\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    set [enemies: x v] to [0]\n    set [enemies: x v] to [0]\n    Clone at x: [555] y: [15] MAX [100]\n    Clone at x: [2072] y: [-100] MAX [100]\n    Clone at x: [99999] y: [99999] MAX [100]\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)\nforever\n    set [direction v] to (direction)\nend\n\nwhen I start as a clone\nforever\n    if <(Enemy) = [1]> then\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\n    end\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        else\n            set [exit v] to [die]\n            broadcast (Reset v)\n        end\n    end\nend\n\nClone at x: [1161] y: [-65] MAX [20]\nClone at x: [1252] y: [-34] MAX [20]\nClone at x: [1348] y: [5] MAX [20]\n\nwhen I receive [jump v]\nset [enemy v] to [0]\nrepeat (1)\n    switch costume to (red9 v)\n    wait (..05) seconds\n    switch costume to (red10 v)\n    wait (.05) seconds\n    switch costume to (red12 v)\n    wait (.05) seconds\n    switch costume to (red13 v)\n    wait (.05) seconds\n    switch costume to (red14 v)\n    wait (.05) seconds\n    switch costume to (red15 v)\n    wait (.05) seconds\n    switch costume to (red16 v)\n    wait (.05) seconds\n    switch costume to (red17 v)\n    wait (.05) seconds\nend\ndelete this clone\n\nwhen [timer v] > (.01)\nhide\n\n@Coin_counter\n\nwhen flag clicked\nrepeat (10)\n    hide\nend\n\nwhen I start as a clone\nforever\n    go to x: (((clone#) * (15)) - (170)) y: (152)\n    if <(length of (COINS)) < (clone#)> then\n        hide\n    else\n        show\n        switch costume to (letter (clone#) of (COINS))\n    end\nend\n\nwhen I receive [connected v]\ngo to [front v] layer\nshow\nset size to (140) %\nset [clone# v] to [1]\nrepeat (30)\n    create clone of (_myself_ v)\n    change [clone# v] by (1)\nend\nhide\n\nwhen [timer v] > (.01)\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [connected v]\nshow\n\nwhen [timer v] > (.01)\nhide\n\n@Sprite2\n\nwhen [timer v] > (.01)\nhide\n\nwhen flag clicked\nshow\n\n@Rain\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nswitch costume to (pick random (1) to (3))\ngo to x: (pick random (-240) to (240)) y: (184)\nglide (pick random (0.005) to (2)) secs to x: (x position) y: (-184)\ndelete this clone\n\nwhen I receive [connected v]\nshow\nrepeat until <(ZZZZ) = [1]>\n    repeat (100)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n        create clone of (_myself_ v)\n    end\n    go to [front v] layer\nend\n\nwhen I receive [connected v]\nshow\nforever\n    if <(ZZZZ) = [0]> then\n        repeat (100)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n            create clone of (_myself_ v)\n        end\n        go to [front v] layer\n    end\nend\n\nwhen I start as a clone\nforever\n    if <<touching (lava v)?> or <<touching (player v)?> or <<touching (others v)?> or <<touching (saws v)?> or <<<touching (danger v)?> or <<touching (bouncy v)?> or <<touching (checkpoint v)?> or <touching (ladder v)?>>>> or <touching (platforms v)?>>>>>> then\n        delete this clone\n    end\nend\n\nwhen [timer v] > (.01)\nhide\n\nwhen I receive [end v]\nforever\n    hide\nend\n\n@Lava\n\nwhen flag clicked\nreset timer\nforever\n    set [tim v] to (timer)\nend\n\nwhen I receive [green flag v]\nhide\nset [danger: x v] to [0]\nset [danger: y v] to [0]\nswitch costume to (costume1 v)\nClone at [2806] [-150]\nClone at [50] [-150]\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\nwhen flag clicked\ngo to [back v] layer\n\nwhen flag clicked\n\nforever\n    if <key (space v) pressed?> then\n        set [x v] to [3139]\n    end\nend\n\nwhen [timer v] > (.01)\nhide\n\n@Lag?\n\nwhen flag clicked\nset [zzzz v] to [0]\nswitch costume to (costume1 v)\nhide\n\nwhen this sprite clicked\nstart sound [Click v]\nnext costume\n\nwhen I receive [settings v]\nshow\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        set [zzzz v] to [1]\n    else\n        set [zzzz v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        hide\n    end\nend\n\nwhen [timer v] > (.01)\nhide\n\n@Settings\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\n\nwhen I receive [connected v]\nshow\n\nwhen this sprite clicked\nbroadcast (Settings v)\nstart sound [Click v]\n\nwhen I receive [settings v]\nswitch costume to (open v)\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        go to x: (-100) y: (100)\n        set size to (40) %\n    else\n        go to x: (-64) y: (50)\n        set size to (100) %\n    end\nend\n\nwhen [timer v] > (.01)\nhide\n\n@SFX\n\nwhen flag clicked\nhide\n\nwhen I receive [settings v]\nshow\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        set [ssfx v] to [1]\n    else\n        set [ssfx v] to [0]\n    end\nend\n\nwhen this sprite clicked\nstart sound [Click v]\nnext costume\n\nwhen flag clicked\nset [ssfx v] to [0]\nswitch costume to (costume2 v)\n\nwhen [timer v] > (.01)\nhide\n\n@Music\n\nwhen flag clicked\nswitch costume to (costume2 v)\nset [music v] to [1]\nhide\n\nwhen I receive [settings v]\nshow\n\nwhen flag clicked\nforever\n    if <key (space v) pressed?> then\n        hide\n    end\nend\n\nwhen this sprite clicked\nstart sound [Click v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [1]> then\n        set [music v] to [0]\n    else\n        set [music v] to [1]\n    end\nend\n\nwhen [timer v] > (.01)\nhide\n\n@Scenery2\n\nwhen I receive [tick v]\nhide\nposition ((X.) - (SCROLL X)) ((Y.) - (SCROLL Y))\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 [y. v] to [0]\nset [x. v] to [0]\nswitch costume to (1 v)\nClone at [2000] [0]\n\ndefine Clone at (x) (y)\nset [x. v] to (x)\nset [y. v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen [timer v] > (.01)\nhide\n\n@Thumbnail\n\nwhen [timer v] > (0.01)\nswitch costume to (thumbnail v)\nset size to (100) %\nset [ghost v] effect to (100)\npoint in direction (90)\ngo to x: (0) y: (400)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (2))\nend\n\nwhen flag clicked\nhide\nswitch costume to (thumbnail v)\nset size to (100) %\nset [ghost v] effect to (100)\ngo to x: (-400) y: (0)\npoint in direction (90)\ngo to [front v] layer\nforever\n    reset timer\nend\n\nchange x by (10)\n\n
There is a lag reducer that Works. \nPlease Love and Fave and Follow\nUse Arrow keys, WASD, or if you have a phone it is mobile friendly.\nSPAM FLAG FOR NO LAG!!!\n\nGOOD\n_____________________________________________\nland, character, clouds, coins, other people.\n\nBAD\n_____________________________________________\nspikes, saws, enemy, gaps.\n\nHave Fun!\n