◈ Sky ◈ - Multiplayer Scrolling Platformer
@Stage\n\nwhen [m v] key pressed\nset [mouse v] to (join (mouse x) (join [ , ] ((SCROLL Y) + (mouse y))))\n\nwhen flag clicked\nset [scroll y v] to [0]\n\nwhen flag clicked\nclear graphic effects\n\nwhen I receive [begin v]\nforever\n    set [brightness v] effect to (() - ((SCROLL Y) / (80)))\n    set [color v] effect to ((SCROLL Y) / (250))\nend\n\n@Player\n\ndefine Game On\nset size to (100) %\nclear graphic effects\ngo to [front v] layer\ngo [backward v] (3) layers\nshow\nif <(Checkpoint) = [1]> then\n    set [x v] to [0]\n    set [y v] to [0]\n    set [scroll x v] to [0]\n    set [scroll y v] to [0]\nelse\n    if <(Checkpoint) = [2]> then\n        set [x v] to [153]\n        set [y v] to [777]\n        set [scroll x v] to [0]\n        set [scroll y v] to [730]\n    else\n        if <(Checkpoint) = [3]> then\n            set [x v] to [-223]\n            set [y v] to [1455]\n            set [scroll x v] to [0]\n            set [scroll y v] to [1415]\n        else\n            set [x v] to [-211]\n            set [y v] to [2150]\n            set [scroll x v] to [0]\n            set [scroll y v] to [2110]\n        end\n    end\nend\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\npoint in direction (90)\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Test - Die\nif <<touching (danger v)?> or <touching (enemy v)?>> then\n    set [exit v] to [die]\nend\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 - Win\nset rotation style [left-right v]\nhide\nset [hide/show v] to [hide]\n\ndefine Change Player X By (sx)\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 <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> 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\ndefine Game - Die\nset rotation style [left-right v]\nset [exit v] to []\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nwait (0.3) seconds\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (3) layers\n\ndefine Tick\nif <(move?) = [yes]> then\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [sx v] by (-2)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [sx v] by (2)\n    end\n    set [sx v] to ((sx) * (0.8))\n    if <([abs v] of (sx) ) > [0.9]> then\n        Change Player X By (round (sx))\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(in air) < [4]> then\n            set [sy v] to [15]\n        end\n    end\n    change [sy v] by (-2)\n    Change Player Y By (sy)\n    Test - Die\n    set [scroll x v] to (x)\n    if <(SCROLL X) < [0]> then\n        set [scroll x v] to [0]\n    end\n    if <(SCROLL X) > [0]> then\n        set [scroll x v] to [0]\n    end\n    change [scroll y v] by (round (((y) - (SCROLL Y)) / (2)))\n    if <(SCROLL Y) < [0]> then\n        set [scroll y v] to [0]\n    end\n    Position\n    if <(y) < [-180]> then\n        set [exit v] to [die]\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> and <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>>>> then\n        switch costume to (player eye up right v)\n    else\n        if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> and <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>>>> then\n            switch costume to (player eye up left v)\n        else\n            if <<<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<<mouse down?> and <((mouse x) + (15)) > (x position)>> and <<mouse down?> and <((mouse x) - (15)) < (x position)>>>>> and <not <<(in air) > [10]> or <key (down arrow v) pressed?>>>> then\n                switch costume to (player eye right v)\n            else\n                if <<<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<<mouse down?> and <((mouse x) + (15)) > (x position)>> and <<mouse down?> and <((mouse x) - (15)) < (x position)>>>>> and <not <<(in air) > [10]> or <key (down arrow v) pressed?>>>> then\n                    switch costume to (player eye left v)\n                else\n                    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > (y position)> and <mouse down?>>>> then\n                        switch costume to (player eye up v)\n                    else\n                        if <<(in air) > [10]> or <<key (down arrow v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>>> then\n                            switch costume to (player eye down v)\n                            if <<<(in air) > [10]> or <<key (down arrow v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>>> and <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<(mouse x) > (x position)> and <mouse down?>>>>> then\n                                switch costume to (player eye down right v)\n                            else\n                                if <<<(in air) > [10]> or <<key (down arrow v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>>> and <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<(mouse x) < (x position)> and <mouse down?>>>>> then\n                                    switch costume to (player eye down left v)\n                                end\n                            end\n                        else\n                            switch costume to (player eye center v)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (water v)?> then\n        repeat (10)\n            change [sy v] by ((((0) - (sy)) / (3)) - (0.3))\n        end\n        repeat (10)\n            change [sy v] by ((((15.5) - (sy)) / (3.5)) - (0.3))\n        end\n    else\n        set rotation style [left-right v]\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nset [max players v] to [8]\nset [my player # v] to [0]\nhide\nbroadcast (setup - opponents v) and wait\nswitch backdrop to (joining v)\nbroadcast (connecting v)\nbroadcast (join game v) and wait\nif <(MY PLAYER #) > [0]> then\n    switch backdrop to (joined v)\n    broadcast (connected v)\n    wait (1) seconds\n    switch backdrop to (blank v)\n    broadcast (begin v)\n    show\nelse\n    switch backdrop to (full v)\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 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                            set [☁ p8 v] to (value)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine send cloud data\nset [encoded v] to []\nwrite (join (username) (join [ ] (item (say) of [chat v]))) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite ((SCROLL X) + (x position)) to encoded\nwrite ((SCROLL Y) + (y position)) to encoded\nwrite (costume [number v]) to encoded\nset cloud # (MY PLAYER #) to (encoded)\n\nwhen I receive [begin v]\nset [level v] to [1]\nforever\n    broadcast (reset v) and wait\n    broadcast (setup v) and wait\n    Game On\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\nend\n\nwhen I receive [stopclicked v]\nhide\n\nwhen I receive [touch player v]\nset [exit v] to [die]\n\nwhen flag clicked\nforever\n    set [player: in air v] to (in air)\nend\n\nwhen flag clicked\nshow list [chat v]\nset [say v] to []\n\nwhen I receive [begin v]\nforever\n    if <key (t v) pressed?> then\n        hide list [chat v]\n        ask [] and wait\n        set [say v] to (answer)\n        show list [chat v]\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(say) > []> then\n        wait (5) seconds\n        set [say v] to []\n    end\nend\n\nwhen I receive [begin v]\nforever\n    if <(say) > []> then\n        think (join (join (MY PLAYER #) (join [ : ] (username))) (join [- ] (item (say) of [chat v])))\n    else\n        think (join (MY PLAYER #) (join [ - ] (username)))\n    end\nend\n\nwhen flag clicked\nset [move? v] to [yes]\n\nwhen I receive [begin v]\nforever\n    if <<key (p v) pressed?> and <(move?) = [yes]>> then\n        set [move? v] to [no]\n        wait (0.3) seconds\n    else\n        if <<key (p v) pressed?> and <(move?) = [no]>> then\n            set [move? v] to [yes]\n            wait (0.3) seconds\n        end\n    end\nend\n\nwhen I receive [begin v]\nset [hide/show v] to [show]\n\nwhen [1 v] key pressed\nif <(username) = [Rabbit507]> then\n    set [checkpoint v] to [1]\nend\n\nwhen [2 v] key pressed\nif <(username) = [Rabbit507]> then\n    set [checkpoint v] to [2]\nend\n\nwhen [3 v] key pressed\nif <(username) = [Rabbit507]> then\n    set [checkpoint v] to [3]\nend\n\nwhen [4 v] key pressed\nif <(username) = [Rabbit507]> then\n    set [checkpoint v] to [4]\nend\n\nwhen [r v] key pressed\nbroadcast (restart v)\n\nwhen I receive [restart v]\nset [checkpoint v] to [1]\nset [x v] to [0]\nset [y 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)\n\nwhen flag clicked\nset [hide/show v] to [show]\n\n@Opponents\n\ndefine begin decode of (encoded)\nset [encoded v] to (encoded)\nset [letter # v] to [1]\n\ndefine value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idx) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idx) of [code v]))\nend\n\ndefine setup players\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        tick\n    end\nend\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\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                            set [value v] to (☁ P8)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [setup - opponents v]\nsetup players\n\ndefine tick\nvalue = cloud # (player #)\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\nthink (join (player #) (join [ - ] (value)))\nvalue = read from encoded\nvalue = read from encoded\nx: ((value) - (SCROLL X))\nvalue = read from encoded\ny: ((value) - (SCROLL Y))\nvalue = read from encoded\nswitch costume to (value)\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 y: (y)\nset y to (y)\nif <(y) = (y position)> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (100)\nend\n\ndefine x: (x)\nset x to (x)\nif <(x) = (x position)> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (100)\nend\n\nwhen flag clicked\nset [value v] to []\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    set [timer v] to ((timer) + (0.1))\nend\n\nwhen [timer v] > (timer)\nbroadcast (stopclicked v)\nset [ghost v] effect to (100)\nswitch backdrop to (blank v)\ngo to [front v] layer\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nreset timer\nforever\n    set [timer v] to ((timer) + (0.1))\nend\n\nwhen [timer v] > (timer)\nforever\n    go to [front v] layer\n    go [backward v] (3) layers\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Platforms\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\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nshow\n\ndefine clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nset [platforms: x v] to (x)\nset [platforms: y v] to (y)\nnext costume\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 (1 1 v)\n    clone at x: [360] y: [0]\n    clone at x: [280] y: [360]\n    clone at x: [200] y: [460]\n    clone at x: [0] y: [560]\n    clone at x: [0] y: [560]\n    clone at x: [0] y: [1200]\n    clone at x: [0] y: [1750]\n    clone at x: [0] y: [2350]\n    clone at x: [0] y: [2500]\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [stopclicked v]\nhide variable [seconds v]\nhide\ndelete this clone\n\n@clouds\n\nwhen I receive [begin v]\nforever\n    set [cloud x change v] to (pick random (5) to (10))\n    set [way v] to (pick random (1) to (2))\n    create clone of (_myself_ v)\n    wait (pick random (0.5) to (1.2)) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset y to (pick random (0) to (200))\nswitch costume to (pick random (1) to (3))\nset [ghost v] effect to (pick random (30) to (50))\nset size to (pick random (30) to (40)) %\ngo to [back v] layer\nshow\nif <(way) = [1]> then\n    set x to (-300)\n    repeat until <(x position) > [239]>\n        change x by (cloud x change)\n    end\n    delete this clone\nelse\n    set x to (300)\n    repeat until <(x position) < [-239]>\n        change x by (() - (cloud x change))\n    end\n    delete this clone\nend\n\n@You Win!\n\nwhen I receive [begin v]\n\nwhen flag clicked\nclear graphic effects\nhide\nhide variable [seconds v]\nset [seconds v] to [0]\n\nwhen I receive [win v]\nif <not <(restart?) > []>> then\n    clear graphic effects\n    show\n    switch costume to (splash-screen v)\n    set [you win move v] to [10]\n    repeat ((you win move) * (2))\n        go to x: (pick random ((you win move) - ((you win move) * ((3) / (1.5)))) to (you win move)) y: (pick random ((you win move) - ((you win move) * ((3) / (1.5)))) to (you win move))\n        change [you win move v] by (-0.5)\n    end\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\nend\n\nwhen I receive [stopclicked v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [begin v]\nhide variable [ts v]\nset [ts v] to [0]\nwait (1) seconds\nreset timer\nrepeat until <(EXIT) = [win]>\n    if <(move?) = [yes]> then\n        set [ts v] to ((ts) + (1))\n        wait (1) seconds\n    end\nend\nbroadcast (win v)\n\nwhen I receive [win v]\nset [move? v] to [no]\n\nwhen I receive [restart v]\nwait (1) seconds\nreset timer\nset [ts v] to [0]\n\nwhen [r v] key pressed\nset [restart? v] to [restart]\nwait (2) seconds\nset [restart? v] to []\n\nwhen I receive [begin v]\nset [restart? v] to []\n\nwhen flag clicked\nset [restart? v] to []\n\nwhen I receive [restart v]\n\nwhen flag clicked\nforever\n    set [seconds v] to (round (ts))\nend\n\n@Exit\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [setup v]\nhide\ngo to [front v] layer\ngo [backward v] (1) layers\nset [collected v] to [0]\nset [exit: x v] to [-50]\nset [exit: y v] to [0]\nif <(LEVEL) = [1]> then\n    clone at x: [205] y: [2757]\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\nwhen I receive [tick v]\nposition ((Exit: x) - (SCROLL X)) ((Exit: y) - (SCROLL Y))\n\ndefine clone at x: (x) y: (y)\nset [exit: x v] to (x)\nset [exit: y v] to (y)\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nwait (0.001) seconds\nswitch costume to (off v)\nclear graphic effects\npoint in direction (90)\n\nwhen I receive [begin v]\nforever\n    if <(costume [number v]) = [2]> then\n        if <touching (player v)?> then\n            switch costume to (on v)\n            repeat (1)\n                point in direction (90)\n                change [checkpoint v] by (1)\n                go to x: (0) y: (0)\n                repeat (5)\n                    turn right ((((200) - (direction)) / (5)) - (0.3)) degrees\n                    change [brightness v] effect by (9)\n                    change [ghost v] effect by (3)\n                end\n                repeat (15)\n                    turn right ((((90) - (direction)) / (5)) - (0.3)) degrees\n                    change [brightness v] effect by (-3)\n                    change [ghost v] effect by (-1)\n                end\n                wait (0.8) seconds\n                point in direction (90)\n                set [exit v] to [win]\n                broadcast (win v)\n            end\n        end\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\n\nwhen I receive [stopclicked v]\nhide\n\nwhen I receive [restart v]\nswitch costume to (off v)\npoint in direction (90)\nclear graphic effects\n\n@Water\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [setup v]\nclear graphic effects\ngo to [back v] layer\ngo [forward v] (2) layers\nset [water: x v] to [-50]\nset [water: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at x: [360] y: [0]\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: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [water: x v] by (x)\nchange [water: y v] by (y)\nnext costume\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\nposition ((Water: x) - (SCROLL X)) (((Water: y) - (SCROLL Y)) + (Water Y))\n\nwhen flag clicked\nhide\n\nwhen I receive [stopclicked v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\nset [water y v] to [0]\nforever\n    repeat (10)\n        change [water y v] by ((((-10) - (Water Y)) / (6)) - (-0.3))\n    end\n    repeat (10)\n        change [water y v] by ((((5) - (Water Y)) / (6)) - (0.3))\n    end\nend\n\n@Danger\n\nwhen I receive [green flag v]\nshow\n\nwhen I receive [setup v]\nclear graphic effects\ngo to [back v] layer\nset [danger: x v] to [-50]\nset [danger: y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at x: [0] y: [360]\n    clone at x: [0] y: [560]\n    clone at x: [0] y: [1300]\n    clone at x: [0] y: [2150]\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: (x) y: (y)\ncreate clone of (_myself_ v)\nset [danger: x v] to (x)\nset [danger: y v] to (y)\nnext costume\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [tick v]\nposition ((Danger: x) - (SCROLL X)) ((Danger: y) - (SCROLL Y))\n\nwhen flag clicked\nhide\n\nwhen I receive [stopclicked v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Checkpoint \n\nwhen I receive [tick v]\ngo to [back v] layer\nPosition ((Checkpoint : x) - (SCROLL X)) ((Checkpoint : 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: (x) y: (y)\nset [checkpoint : x v] to (x)\nset [checkpoint : y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [begin v]\nset [checkpoint v] to [1]\nhide\nset [checkpoint : x v] to [0]\nset [checkpoint : y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (off v)\n    Clone at x: [153] y: [777]\n    Clone at x: [-220] y: [1445]\n    Clone at x: [-210] y: [2102]\nend\nset [checkpoint : x v] to [-99999]\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [2]> then\n        if <touching (player v)?> then\n            switch costume to (on v)\n            repeat (1)\n                point in direction (90)\n                change [checkpoint v] by (1)\n                go to x: (0) y: (0)\n                repeat (5)\n                    turn right ((((200) - (direction)) / (5)) - (0.3)) degrees\n                    change [brightness v] effect by (9)\n                    change [ghost v] effect by (3)\n                end\n                repeat (15)\n                    turn right ((((90) - (direction)) / (5)) - (0.3)) degrees\n                    change [brightness v] effect by (-3)\n                    change [ghost v] effect by (-1)\n                end\n                wait (0.1) seconds\n                point in direction (90)\n            end\n        end\n    end\nend\n\nwhen I receive [stopclicked v]\ngo to [back v] layer\ndelete this clone\n\nchange [ghost v] effect by (3)\n\nwhen I receive [restart v]\nset [checkpoint v] to [1]\nhide\nset [checkpoint : x v] to [0]\nset [checkpoint : y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (off v)\n    Clone at x: [153] y: [777]\n    Clone at x: [-220] y: [1445]\n    Clone at x: [-210] y: [2102]\nend\nset [checkpoint : x v] to [-99999]\n\n@You Win!2\n\nwhen I receive [win v]\nif <not <(restart?) > []>> then\n    go to x: (-130) y: (-162)\n    clear graphic effects\n    switch costume to (0 v)\n    set [you win move v] to [10]\n    set [say v] to []\n    set [letter v] to []\n    hide\n    time\nend\n\nwhen I receive [stopclicked v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\ndelete this clone\n\ndefine time\nset size to (120) %\nclear graphic effects\nset [brightness v] effect to (-100)\nrepeat (length of (seconds))\n    change [letter v] by (1)\n    set [say v] to (letter (letter) of (seconds))\n    switch costume to (say)\n    create clone of (_myself_ v)\n    change x by (16)\n    set [say v] to []\nend\n\nwhen I start as a clone\nshow\ngo to [front v] layer\ngo [backward v] (3) layers\nforever\n    go to [front v] layer\n    go [backward v] (3) layers\nend\n\n@Sprite1\n\nwhen I start as a clone\nswitch costume to (costume2 v)\nclear graphic effects\ngo to x: (0) y: (-20)\ngo to [front v] layer\ngo [backward v] (1) layers\nset [ghost v] effect to (100)\nshow\nforever\n    go to [front v] layer\n    go [backward v] (2) layers\n    if <(mouse y) < [-130]> then\n        repeat until <(y position) > [30]>\n            change y by (10)\n            change [ghost v] effect by (-30)\n        end\n    else\n        repeat until <(y position) < [1]>\n            change y by (-10)\n            change [ghost v] effect by (30)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set volume to ((x position) + (50)) %\nend\n\nwhen flag clicked\ngo to [front v] layer\nclear graphic effects\nset [ghost v] effect to (100)\nset y to (-30)\nforever\n    go to [front v] layer\n    if <(mouse y) < [-130]> then\n        show\n        repeat until <(y position) > [-16]>\n            change y by (10)\n            change [ghost v] effect by (-50)\n        end\n    else\n        repeat until <(y position) < [-39]>\n            change y by (-10)\n            change [ghost v] effect by (50)\n        end\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    set [ys v] to (y position)\nend\n\nwhen flag clicked\nforever\n    play sound [Vexento - Cloud Nine v] until done\nend\n\nwhen [timer v] > (timer)\nforever\n    play sound [Vexento - Cloud Nine v] until done\nend\n\nwhen I receive [stopclicked v]\ngo to [front v] layer\nclear graphic effects\nset [ghost v] effect to (100)\nset y to (-30)\nforever\n    go to [front v] layer\n    if <(mouse y) < [-130]> then\n        show\n        repeat until <(y position) > [-16]>\n            change y by (10)\n            change [ghost v] effect by (-50)\n        end\n    else\n        repeat until <(y position) < [-39]>\n            change y by (-10)\n            change [ghost v] effect by (50)\n        end\n        hide\n    end\nend\n\nwhen flag clicked\nset volume to (100) %\ngo to x: (59) y: (ys)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nforever\n    go to [front v] layer\n    go [forward v] (1) layers\n    switch costume to (costume1 v)\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <<(x position) > [-60]> and <(x position) < [60]>>> then\n        go to [front v] layer\n        set x to (mouse x)\n    else\n        if <not <(x position) > [-60]>> then\n            go to [front v] layer\n            set x to (-59)\n        else\n            if <not <(x position) < [60]>> then\n                go to [front v] layer\n                set x to (59)\n            else\n                go to [front v] layer\n            end\n        end\n    end\nend\n\nwhen I receive [stopclicked v]\nset volume to (100) %\ngo to x: (59) y: (ys)\nswitch costume to (costume2 v)\ncreate clone of (_myself_ v)\nforever\n    switch costume to (costume1 v)\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <<(x position) > [-60]> and <(x position) < [60]>>> then\n        set x to (mouse x)\n    else\n        if <not <(x position) > [-60]>> then\n            set x to (-59)\n        else\n            if <not <(x position) < [60]>> then\n                set x to (59)\n            end\n        end\n    end\nend\n\nwhen I receive [stopclicked v]\nforever\n    set [ys v] to (y position)\nend\n\nwhen I receive [stopclicked v]\nforever\n    set volume to ((x position) + (50)) %\nend\n\n@Loading\n\nwhen flag clicked\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
Iɴsᴛʀᴜᴄᴛɪᴏɴs:\n\nᴘʀᴇss ᴘ ᴛᴏ ᴘᴀᴜsᴇ ᴀɴᴅ ᴛʜᴇɴ ᴘʀᴇss ᴘ ᴀɢᴀɪɴ ᴛᴏ ᴜɴᴘᴀᴜsᴇ\nAʀʀᴏᴡ Kᴇʏs WASD Oʀ Mᴏʙɪʟᴇ Cᴏɴᴛʀᴏʟs Tᴏ Mᴏᴠᴇ Tʜᴇ Pʟᴀʏᴇʀ\nDᴏɴ'ᴛ Tᴏᴜᴄʜ Sᴘɪᴋᴇs\nGᴇᴛ Tᴏ Tʜᴇ Fɪɴᴀʟ Cʜᴇᴄᴋᴘᴏɪɴᴛ Tᴏ Wɪɴ\nPʀᴇss T Tᴏ Cʜᴀᴛ\n\n\nNᴏᴛᴇs:\nFᴜʟʟSᴄʀᴇᴇɴ Rᴇᴄᴏᴍᴍᴇɴᴅᴇᴅ\nCᴀɴ Yᴏᴜ Bᴇᴀᴛ Mʏ Rᴇᴄᴏʀᴅ Oғ 25.514 Sᴇᴄᴏɴᴅs?\n1,400+ ʙʟᴏᴄᴋs\n2ɴᴅ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ sᴄʀᴏʟʟɪɴɢ ᴘʟᴀᴛғᴏʀᴍᴇʀ!\n\nCʀᴇᴅɪᴛs:\nGʀɪғғᴘᴀᴛᴄʜ Fᴏʀ Aᴍᴀᴢɪɴɢ Mᴜʟᴛɪᴘʟᴀʏᴇʀ Aɴᴅ Sᴄʀᴏʟʟɪɴɢ Pʟᴀᴛғᴏʀᴍᴇʀ Tᴜᴛᴏʀɪᴀʟs\nTɪᴍMᴄCᴏᴏʟ Fᴏʀ Cʜᴇᴄᴋᴘᴏɪɴᴛ Aʀᴛ\nSᴛʀᴀᴛғᴏʀᴅᴊᴀᴍᴇs  Fᴏʀ Tʜᴇ Eɴᴅ Aʀᴛ\n\nMusic:\nVᴇxᴇɴᴛᴏ - Cʟᴏᴜᴅ Nɪɴᴇ\n\nAʟʟ Tʜᴇ Rᴇsᴛ Is Mᴀᴅᴇ Bʏ Mᴇ\n\nHᴀᴠᴇ Fᴜɴ!\n