DESOLATE - a scrolling platformer

Instructions: ==============\nIf you ever get stuck on thumbnail, immediately click green flag again\n==============\nThe world is destroyed, nothing is left.\nThe Earth is DESOLATE.\nThere are 5 humans left, and they depend on you, Dot, to save the world. Your mission: Find a suitable place for the humans to live.\n\nGo save humanity, Dot. You're our only hope.\n\n==============\nWAD or ←↑→ for moving\nS or ↓ for crouching\n==============\n\nThanks to @-Shadowlight- for the engine\n100% textures by me.\nFollow @xX4SuperCat4Xx pls! Good fren!\nSfx from yt

@Stage\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [play game v]\nforever\n    play sound [Desert v] until done\nend\n\nwhen I receive [tick v]\nif <(Is in end?) = [1]> then\n    set volume to (0) %\nelse\n    if <not <(volume) = ((100) - ((Ghost Percent) * (1)))>> then\n        set volume to ((100) - ((Ghost Percent) * (1))) %\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (scene2 v)\nreset timer\n\n@Delag1\n\n@PlatformsHB\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Change xy\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nswitch costume to (lx0y0 v)\nClone at x: [0] y: [0]\nClone at x: [1] y: [0]\nClone at x: [1] y: [1]\nClone at x: [0] y: [1]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nset [ghost v] effect to (100)\n\nset [ghost v] effect to (100)\n\ndefine Change xy\nrepeat until <((x) - (SCROLL X)) > [-481]>\n    change [x v] by (960)\nend\nrepeat until <[481] > ((x) - (SCROLL X))>\n    change [x v] by (-960)\nend\nrepeat until <((y) - (SCROLL Y)) > [-360]>\n    change [y v] by (720)\nend\nrepeat until <[360] > ((y) - (SCROLL Y))>\n    change [y v] by (-720)\nend\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\nif <not <(costume [name v]) = (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))>> then\n    switch costume to (blank v)\nend\n\nClone at x: [-1] y: [0]\nClone at x: [-1] y: [-1]\nClone at x: [0] y: [-1]\nClone at x: [-1] y: [1]\nClone at x: [1] y: [-1]\n\n@PlatformsD1\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Change xy\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nset [total clones d1 v] to [0]\nswitch costume to (lx0y0 v)\nClone at x: [0] y: [0]\nClone at x: [1] y: [0]\nClone at x: [1] y: [1]\nClone at x: [0] y: [1]\nClone at x: [-1] y: [0]\nClone at x: [-1] y: [-1]\nClone at x: [0] y: [-1]\nClone at x: [-1] y: [1]\nClone at x: [1] y: [-1]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nchange [total clones d1 v] by (1)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\ndefine Change xy\nrepeat until <((x) - (SCROLL X)) > ((480) * (-1))>\n    change [x v] by ((480) * (3))\nend\nrepeat until <((480) * (1)) > ((x) - (SCROLL X))>\n    change [x v] by ((480) * (-3))\nend\nrepeat until <((y) - (SCROLL Y)) > ((360) * (-1))>\n    change [y v] by ((360) * (3))\nend\nrepeat until <((360) * (1)) > ((y) - (SCROLL Y))>\n    change [y v] by ((360) * (-3))\nend\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\nif <not <(costume [name v]) = (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))>> then\n    switch costume to (blank v)\nend\n\n@PlatformsD2\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Change xy\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nset [total clones d2 v] to [0]\nswitch costume to (lx0y0 v)\nClone at x: [0] y: [0]\nClone at x: [1] y: [0]\nClone at x: [1] y: [1]\nClone at x: [0] y: [1]\nClone at x: [-1] y: [0]\nClone at x: [-1] y: [-1]\nClone at x: [0] y: [-1]\nClone at x: [-1] y: [1]\nClone at x: [1] y: [-1]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nchange [total clones d2 v] by (1)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\ngo to [front v] layer\ngo [backward v] ((Lag Monitor Clones) + (5)) layers\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\ndefine Change xy\nrepeat until <((x) - (SCROLL X)) > ((480) * (-1))>\n    change [x v] by ((480) * (3))\nend\nrepeat until <((480) * (1)) > ((x) - (SCROLL X))>\n    change [x v] by ((480) * (-3))\nend\nrepeat until <((y) - (SCROLL Y)) > ((360) * (-1))>\n    change [y v] by ((360) * (3))\nend\nrepeat until <((360) * (1)) > ((y) - (SCROLL Y))>\n    change [y v] by ((360) * (-3))\nend\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\nif <not <(costume [name v]) = (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))>> then\n    switch costume to (blank v)\nend\n\n@PlatformsD3\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Change xy\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nset [total clones d3 v] to [0]\nswitch costume to (lx2y0 v)\nClone at x: [0] y: [0]\nClone at x: [1] y: [0]\nClone at x: [1] y: [1]\nClone at x: [0] y: [1]\n\nClone at x: [-1] y: [0]\nClone at x: [-1] y: [-1]\nClone at x: [0] y: [-1]\nClone at x: [-1] y: [1]\nClone at x: [1] y: [-1]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nchange [total clones d3 v] by (1)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\ngo to [front v] layer\ngo [backward v] ((Total Clones D2) + ((Lag Monitor Clones) + (5))) layers\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\ndefine Change xy\nrepeat until <((x) - (SCROLL X)) > [-481]>\n    change [x v] by (960)\nend\nrepeat until <[481] > ((x) - (SCROLL X))>\n    change [x v] by (-960)\nend\nrepeat until <((y) - (SCROLL Y)) > [-360]>\n    change [y v] by (720)\nend\nrepeat until <[360] > ((y) - (SCROLL Y))>\n    change [y v] by (-720)\nend\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\nif <not <(costume [name v]) = (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))>> then\n    switch costume to (blank v)\nend\n\n@PlatformsD4\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nset [total clones d4 v] to [0]\nswitch costume to (checkpoint v)\nClone at x: [1726] y: [69] dir: [105] id: [1]\nClone at x: [5485] y: [232] dir: [75] id: [2]\nClone at x: [9177] y: [938] dir: [90] id: [3]\nClone at x: [12121] y: [2195.5] dir: [85] id: [4]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\npoint in direction (dir)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    if <<touching (player v)?> and <not <<(x) = (Checkpoint X)> and <(y) = (Checkpoint Y)>>>> then\n        set [checkpoint x v] to (x)\n        set [checkpoint y v] to (y)\n        set [player brightness v] to [100]\n    end\nelse\n    hide\nend\nif <(username) = [jfan-deanza]> then\n    if <key ((Checkpoint id) v) pressed?> then\n        set [checkpoint x v] to (x)\n        set [checkpoint y v] to (y)\n        set [player brightness v] to [100]\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y) dir: (dir) id: (id)\nchange [total clones d4 v] by (1)\nset [checkpoint id v] to (id)\nset [x v] to (x)\nset [y v] to (y)\nset [dir v] to (dir)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (checkpoint v)\nset size to (75) %\ngo to [front v] layer\ngo [backward v] ((Total Clones D3) + ((Total Clones D2) + ((Lag Monitor Clones) + (5)))) layers\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\n@PlatformsD5\n\nwhen I receive [green flag v]\nAdd to Sounds\nhide\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nset [clone sound p/w v] to [0]\nswitch costume to (sound v)\nClone at x: [2020] y: [135] id: [rustle] vol: [50] rad: [960]\nClone at x: [2705] y: [15] id: [rustle] vol: [50] rad: [960]\nClone at x: [2535] y: [525] id: [rustle] vol: [50] rad: [960]\nClone at x: [360] y: [95] id: [wind] vol: [50] rad: [240]\nClone at x: [530] y: [205] id: [wind] vol: [50] rad: [240]\nClone at x: [605] y: [170] id: [wind] vol: [50] rad: [240]\nClone at x: [4315] y: [-25] id: [monster] vol: [30] rad: [480]\nClone at x: [4615] y: [-90] id: [monster] vol: [30] rad: [480]\nClone at x: [4765] y: [-75] id: [monster] vol: [30] rad: [480]\nClone at x: [6415] y: [820] id: [monster] vol: [30] rad: [480]\nClone at x: [7845] y: [1305] id: [cave] vol: [30] rad: [960]\nClone at x: [7720] y: [940] id: [cave] vol: [30] rad: [960]\nClone at x: [8185] y: [940] id: [cave] vol: [30] rad: [960]\nClone at x: [8800] y: [1030] id: [cave] vol: [30] rad: [960]\n\ndefine Sound\nDistance from (x) (y) to (SCROLL X) (SCROLL Y)\nif <(VALUE) < (sound radius)> then\n    if <not <(volume) = (((1) - ((VALUE) / (sound radius))) * (sound volume))>> then\n        set volume to (((1) - ((VALUE) / (sound radius))) * (sound volume)) %\n    end\nelse\n    if <(volume) > [0]> then\n        set volume to (0) %\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y) id: (id) vol: (vol) rad: (rad)\nset [x v] to (x)\nset [y v] to (y)\nset [id v] to (id)\nset [sound volume v] to (vol)\nset [sound radius v] to (rad)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nset [clone sound p/w v] to [0]\n\ndefine Distance from (fromx) (fromy) to (tox) (toy)\nset [value v] to ([sqrt v] of ((((fromx) - (tox)) * ((fromx) - (tox))) + (((fromy) - (toy)) * ((fromy) - (toy)))) )\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Create Sound\n    Sound\nend\n\ndefine Create Sound with (time) (name)\nadd (time) to [sound times v]\nadd (name) to [sound names v]\n\ndefine Add to Sounds\ndelete all of [sound times v]\ndelete all of [sound names v]\nCreate triplet sound [7.27] [10.57] [14.23] with name [rustle]\nCreate triplet sound [6.14] [7.92] [9.29] with name [wind]\nCreate triplet sound [3.66] [4.67] [3.61] with name [monster]\nCreate triplet sound [2.32] [2.32] [0.69] with name [cave]\n\ndefine Create triplet sound (t1) (t2) (t3) with name (name)\nCreate Sound with (t1) (join (name) [1])\nCreate Sound with (t2) (join (name) [2])\nCreate Sound with (t3) (join (name) [3])\n\ndefine Create Sound\nif <(clone sound p/w) = [0]> then\n    set [sound goal timer v] to (pick random (0.5) to (1.0))\n    set [sound wait timer v] to [0]\n    set [clone sound p/w v] to [1]\nelse\n    if <(clone sound p/w) = [1]> then\n        change [sound wait timer v] by (0.03)\n        if <(sound wait timer) > (sound goal timer)> then\n            set [clone sound p/w v] to [2]\n        end\n    else\n        if <(clone sound p/w) = [2]> then\n            set [clone sound p/w v] to [3]\n            set [sound playing v] to (join (id) (pick random (1) to (3)))\n            start sound (sound playing)\n            set [sound goal timer v] to (item (item # of (sound playing) in [sound names v]) of [sound times v])\n            set [sound wait timer v] to [0]\n            set [clone sound p/w v] to [3]\n        else\n            if <(clone sound p/w) = [3]> then\n                change [sound wait timer v] by (0.03)\n                if <(sound wait timer) > (sound goal timer)> then\n                    set [clone sound p/w v] to [0]\n                end\n            end\n        end\n    end\nend\n\n@PlatformsD6\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Change xy\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nswitch costume to (lx12y1 v)\nClone at x: [0] y: [0]\nClone at x: [1] y: [0]\nClone at x: [1] y: [1]\nClone at x: [0] y: [1]\n\nClone at x: [-1] y: [0]\nClone at x: [-1] y: [-1]\nClone at x: [0] y: [-1]\nClone at x: [-1] y: [1]\nClone at x: [1] y: [-1]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\nset [ghost v] effect to (100)\n\ndefine Change xy\nrepeat until <((x) - (SCROLL X)) > [-481]>\n    change [x v] by (960)\nend\nrepeat until <[481] > ((x) - (SCROLL X))>\n    change [x v] by (-960)\nend\nrepeat until <((y) - (SCROLL Y)) > [-360]>\n    change [y v] by (720)\nend\nrepeat until <[360] > ((y) - (SCROLL Y))>\n    change [y v] by (-720)\nend\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\nif <not <(costume [name v]) = (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))>> then\n    switch costume to (blank v)\nend\n\n@PlatformsD7\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nset [gate counter v] to [0]\nswitch costume to (lx15y4g1 v)\nClone at x: [15] y: [4] keyid: [1]\nClone at x: [17] y: [3] keyid: [2]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(hidden?) = [1]> then\n        hide\n    else\n        show\n    end\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y) keyid: (keyid)\nchange [gate counter v] by (1)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\nset [keyid v] to (keyid)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join (join [lx] (join ((x) / (480)) (join [y] ((y) / (360))))) (join [g] (gate counter)))\ngo to [front v] layer\ngo [backward v] ((Total Clones D3) + ((Total Clones D2) + ((Total Clones D4) + ((Lag Monitor Clones) + (5))))) layers\nforever\n    wait until <(item (keyid) of [keys v]) = [1]>\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    set [hidden? v] to [1]\n    wait until <(item (keyid) of [keys v]) = [0]>\n    set [hidden? v] to [0]\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nend\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\n@PlatformsD8\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\nwhen I receive [setip v]\ndelete all of [keys v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nset [key counter v] to [0]\nswitch costume to (lx15y4k1t1 v)\nClone at x: [15] y: [4] keyid: [1]\nClone at x: [17] y: [3] keyid: [2]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y) keyid: (keyid)\nadd [0] to [keys v]\nchange [key counter v] by (1)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\nset [keyid v] to (keyid)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nset [key costume v] to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\nswitch costume to (join (key costume) (join (join [k] (key counter)) [t1]))\ngo to [front v] layer\ngo [backward v] ((Total Clones D3) + ((Total Clones D2) + ((Total Clones D4) + ((Lag Monitor Clones) + (5))))) layers\nforever\n    wait until <touching (player v)?>\n    switch costume to (join (key costume) (join (join [k] (key counter)) [t2]))\n    replace item (keyid) of [keys v] with [1]\n    start sound [pss v]\n    start sound [click v]\n    wait until <not <touching (player v)?>>\n    wait until <touching (player v)?>\n    switch costume to (join (key costume) (join (join [k] (key counter)) [t1]))\n    replace item (keyid) of [keys v] with [0]\n    start sound [pss v]\n    start sound [click v]\n    wait until <not <touching (player v)?>>\nend\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\n@PlatformsD9\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nend\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nswitch costume to (lx22y5 v)\nClone at x: [22] y: [5]\nClone at x: [23] y: [5]\nClone at x: [24] y: [5]\nClone at x: [25] y: [5]\nClone at x: [27] y: [6]\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\nset [type v] to [-1]\ncreate clone of (_myself_ v)\nset [type v] to [1]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join [lx] (join ((x) / (480)) (join [y] ((y) / (360)))))\ngo to [front v] layer\ngo [backward v] ((Total Clones D3) + ((Total Clones D2) + ((Total Clones D4) + ((Lag Monitor Clones) + (5))))) layers\nset [ghost v] effect to (75)\nrepeat (10)\n    change [y v] by ((0.5) * (type))\n    change [x v] by ((0.25) * (type))\nend\nforever\n    repeat (20)\n        change [y v] by ((-0.5) * (type))\n    end\n    repeat (20)\n        change [y v] by ((0.5) * (type))\n    end\nend\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\n@PlatformsE\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nset [clone sound p/w v] to [0]\nswitch costume to (end v)\nClone at x: [13001] y: [2039.75]\n\ndefine Pos\nDistance from (x) (y) to (SCROLL X) (SCROLL Y)\nif <(VALUE) < [100]> then\n    set [exit v] to [Win]\nend\nif <(VALUE) < [240]> then\n    set [is in end? v] to [1]\nelse\n    set [is in end? v] to [0]\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\nset [id v] to (id)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nset [clone sound p/w v] to [0]\n\ndefine Distance from (fromx) (fromy) to (tox) (toy)\nset [value v] to ([sqrt v] of ((((fromx) - (tox)) * ((fromx) - (tox))) + (((fromy) - (toy)) * ((fromy) - (toy)))) )\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Pos\nend\n\n@Back1\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nswitch costume to (bx0y0 v)\nClone at x: [0] y: [0]\nClone at x: [1] y: [0]\nClone at x: [2] y: [0]\nClone at x: [3] y: [0]\nClone at x: [4] y: [0]\nClone at x: [5] y: [0]\nClone at x: [6] y: [0]\nClone at x: [7] y: [0]\nClone at x: [8] y: [2]\nClone at x: [9] y: [3]\nClone at x: [10] y: [3]\nClone at x: [11] y: [3]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Position ((x) - ((SCROLL X) * (0.5))) ((y) - ((SCROLL Y) * (0.5)))\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)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join [bx] (join ((x) / (480)) (join [y] ((y) / (360)))))\ngo to [back v] layer\ngo [forward v] (2) layers\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\n@Back2\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nswitch costume to (bx0y0 v)\nClone at x: [0] y: [0]\nClone at x: [1] y: [0]\nClone at x: [2] y: [0]\nClone at x: [3] y: [0]\nClone at x: [4] y: [0]\nClone at x: [5] y: [1]\nClone at x: [6] y: [1]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Position ((x) - ((SCROLL X) * (0.25))) ((y) - ((SCROLL Y) * (0.25)))\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)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join [bx] (join ((x) / (480)) (join [y] ((y) / (360)))))\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\n@Back3\n\nwhen I receive [setip v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nset [is clone? v] to [0]\nswitch costume to (bx0y0 v)\nClone at x: [0] y: [0]\nClone at x: [1] y: [0]\nClone at x: [2] y: [0]\nClone at x: [3] y: [0]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nif <(is clone?) = [1]> then\n    Position ((x) - ((SCROLL X) * (0.125))) ((y) - ((SCROLL Y) * (0.125)))\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)\nset [x v] to ((x) * (480))\nset [y v] to ((y) * (360))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join [bx] (join ((x) / (480)) (join [y] ((y) / (360)))))\ngo to [back v] layer\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\n@Player\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\nif  then\nelse\n    broadcast (Intro v) and wait\nend\nbroadcast (Play Game v) and wait\nstop [all v]\n\nwhen I receive [green flag v]\nbroadcast (Hide v)\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\nbroadcast (Reset v) and wait\nbroadcast (Setip v) and wait\nforever\n    broadcast (Game on v)\n    Game on\n    repeat until <(EXIT) > []>\n        set [fps v] to (round ((1) / (timer)))\n        change [timer v] by (timer)\n        reset timer\n        Tick\n        set [in cave v] to [0]\n        Tick & Ash\n    end\n    if <(EXIT) = [Win]> then\n        Game - Win\n        broadcast (Reset v) and wait\n        broadcast (Outro v) and wait\n        stop [this script v]\n    else\n        Game - Die\n    end\n    set [timer v] to [0]\nend\n\ndefine Game on\nRespawn\nset [speed y v] to [0]\nset [speed x v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [player brightness v] to [100]\nswitch costume to (player1 v)\nset size to (100) %\nclear graphic effects\nset [ghost v] effect to (100)\nbroadcast (Show v)\nshow\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching (platformshb v)?> or <touching (platformsd7 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 [speed y v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change player x by (sx)\nchange [x v] by (sx)\nPosition\nif <<touching (platformshb v)?> or <touching (platformsd7 v)?>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <<touching (platformshb v)?> or <touching (platformsd7 v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <<touching (platformshb v)?> or <touching (platformsd7 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\nstart sound [Break v]\nset [exit v] to []\nbroadcast (Dead v)\nrepeat (15)\n    reset timer\n    broadcast (Ash v)\nend\nbroadcast (Hide v)\nset [darken/lighten speed v] to [10]\nrepeat (10)\n    Respawn\n    reset timer\n    Set SCROLL X\n    Set SCROLL Y\n    Tick & Ash\n    broadcast (darken v)\nend\nrepeat (20)\n    Respawn\n    reset timer\n    Set SCROLL X\n    Set SCROLL Y\n    Tick & Ash\nend\nrepeat (10)\n    Respawn\n    reset timer\n    Set SCROLL X\n    Set SCROLL Y\n    Tick & Ash\n    broadcast (lighten v)\nend\n\ndefine Game - Win\nrepeat (20)\n    reset timer\n    False Tick\n    Tick & Ash\nend\nset [darken/lighten speed v] to [2]\nset [player brightness v] to [0]\nrepeat (50)\n    reset timer\n    change [player brightness v] by (darken/lighten speed)\n    broadcast (lighten v)\n    broadcast (Tick v)\nend\nshow\ngo to [front v] layer\nswitch costume to (black v)\ngo to x: (0) y: (0)\nrepeat (50)\n    reset timer\n    change [ghost v] effect by ((darken/lighten speed) * (-1))\nend\n\ndefine Set SCROLL X\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (8)))\nif <(SCROLL X) < ((480) * (min world x))> then\n    set [scroll x v] to ((480) * (min world x))\nend\nif <(SCROLL X) > ((480) * (max world x))> then\n    set [scroll x v] to ((480) * (max world x))\nend\n\ndefine Set SCROLL Y\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (8)))\nif <(SCROLL Y) < ((360) * (min world y))> then\n    set [scroll y v] to ((360) * (min world y))\nend\nif <(SCROLL Y) > ((360) * (max world y))> then\n    set [scroll y v] to ((360) * (max world y))\nend\n\nwhen I receive [green flag v]\nSet SCROLL and Checkpoint [-50] [-60]\nset [max world x v] to [30]\nset [max world y v] to [100]\nset [min world x v] to [0]\nset [min world y v] to [0]\n\ndefine Respawn\nset [x v] to (Checkpoint X)\nset [y v] to (Checkpoint Y)\n\nChange player y by [480]\n\ndefine Set SCROLL and Checkpoint (x) (y)\nset [scroll x v] to (x)\nset [scroll y v] to (y)\nset [checkpoint x v] to (x)\nset [checkpoint y v] to (y)\n\nwait (0) seconds\n\ndefine Tick & Ash\nbroadcast (Tick v)\nbroadcast (Ash v)\n\ndefine Tick\nif <(Dead?) = [0]> then\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        if <touching (platformsd9 v)?> then\n            change [speed x v] by (-1)\n        else\n            change [speed x v] by (-2)\n        end\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        if <touching (platformsd9 v)?> then\n            change [speed x v] by (1)\n        else\n            change [speed x v] by (2)\n        end\n    end\n    set [speed x v] to ((Speed x) * (0.8))\n    if <([abs v] of (Speed x) ) > [0.9]> then\n        Change player x by (round (Speed x))\n    end\n    if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <touching (platformsd9 v)?> then\n            set [speed y v] to [5]\n            set [speed y h v] to [5]\n        else\n            if <(in air) < [4]> then\n                set [speed y v] to [16]\n                set [speed y h v] to [10]\n            end\n        end\n    end\n    if <<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> then\n        if <(costume [number v]) = [1]> then\n            switch costume to (player2 v)\n        end\n    else\n        if <(costume [number v]) = [2]> then\n            switch costume to (player1 v)\n        end\n    end\n    if <(Speed y) > [-20]> then\n        if <touching (platformsd9 v)?> then\n            change [speed y v] by (-0.25)\n        else\n            change [speed y v] by (-2)\n        end\n    end\n    Change player y by (Speed y)\n    Set SCROLL X\n    Set SCROLL Y\n    Position\n    if <(y) < [-178]> then\n        set [exit v] to [Die]\n    end\n    if <touching (platformsd3 v)?> then\n        set [exit v] to [Die]\n    end\n    if <not <(Player Brightness) = [0]>> then\n        change [player brightness v] by (-10)\n    end\n    if <touching (platformsd6 v)?> then\n        if <not <(Ghost Percent) = [100]>> then\n            change [ghost percent v] by (5)\n        end\n    else\n        if <not <(Ghost Percent) = [0]>> then\n            change [ghost percent v] by (-5)\n        end\n    end\nend\n\nrepeat until <<([abs v] of ((y) - (Checkpoint Y)) ) < [10]> and <([abs v] of ((x) - (Checkpoint X)) ) < [10]>>\n\nset [scroll x v] to (Checkpoint X)\nset [scroll y v] to (Checkpoint Y)\nSet SCROLL X\nSet SCROLL Y\n\ndefine False Tick\nif <(Dead?) = [0]> then\n    set [speed x v] to ((Speed x) * (0.8))\n    if <([abs v] of (Speed x) ) > [0.9]> then\n        Change player x by (round (Speed x))\n    end\n    if <(costume [number v]) = [2]> then\n        switch costume to (player1 v)\n    end\n    if <(Speed y) > [-20]> then\n        if <touching (platformsd9 v)?> then\n            change [speed y v] by (-0.25)\n        else\n            change [speed y v] by (-2)\n        end\n    end\n    Change player y by (Speed y)\n    Set SCROLL X\n    Set SCROLL Y\n    Position\n    if <not <(Player Brightness) = [0]>> then\n        change [player brightness v] by (-10)\n    end\nend\n\nset [exit v] to [Win]\n\n@PlayerB\n\nwhen I receive [show v]\nclear graphic effects\nshow\n\nwhen I receive [tick v]\ngo to (player v)\nset [brightness v] effect to (Player Brightness)\nPosition\n\nwhen I receive [hide v]\nclear graphic effects\nhide\n\nwhen I receive [dead v]\nset rotation style [don't rotate v]\npoint in direction (pick random (-45) to (0))\nrepeat (10)\n    move (5) steps\n    turn left (7) degrees\n    change [ghost v] effect by (10)\nend\nset rotation style [all around v]\n\ndefine Position\npoint in direction (round ((([speed x v] of [player v]) * (2)) + (90)))\nturn right (90) degrees\nif <<(costume [number v]) = [1]> and <([costume # v] of [player v]) = [2]>> then\n    move (2.5) steps\nelse\n    if <<(costume [number v]) = [2]> and <([costume # v] of [player v]) = [1]>> then\n        move (2.5) steps\n    end\nend\nturn right (-90) degrees\nif <not <(costume [number v]) = ([costume # v] of [player v])>> then\n    switch costume to (join [Body] ([costume # v] of [player v]))\nend\n\n@PlayerA\n\nwhen I receive [tick v]\ngo to (player v)\nset [brightness v] effect to (Player Brightness)\nPosition\n\nwhen I receive [hide v]\nclear graphic effects\nhide\n\nwhen I receive [show v]\nclear graphic effects\nshow\n\ndefine Position\npoint in direction ([direction v] of [playerb v])\nturn left (90) degrees\nif <<(costume [number v]) = [2]> and <([costume # v] of [player v]) = [1]>> then\n    move (17.5) steps\nelse\n    if <<(costume [number v]) = [1]> and <([costume # v] of [player v]) = [2]>> then\n        move (17.5) steps\n    else\n        if <(costume [number v]) = [2]> then\n            move (15) steps\n        else\n            move (20) steps\n        end\n    end\nend\nswitch costume to (join [Antenna] ([costume # v] of [player v]))\nturn left (90) degrees\nmove (10) steps\npoint in direction (round ((([speed x v] of [player v]) * (-2)) + (0)))\n\nwhen I receive [dead v]\nset rotation style [don't rotate v]\npoint in direction (pick random (-45) to (0))\nrepeat (10)\n    move (5) steps\n    turn left (7) degrees\n    change [ghost v] effect by (10)\nend\nset rotation style [all around v]\n\n@PlayerW\n\nwhen I receive [tick v]\ngo to (player v)\nset [brightness v] effect to (Player Brightness)\nPosition\nif <(Speed Y H) > [0]> then\n    change [speed y h v] by ((-10) / (15))\nend\n\nwhen I receive [hide v]\nclear graphic effects\nhide\n\nwhen I receive [show v]\nclear graphic effects\nshow\n\ndefine Position\nchange [direction v] by (round (([speed x v] of [player v]) * (2)))\nif <(Direction) > [359]> then\n    set [direction v] to ((Direction) mod (360))\nend\npoint in direction ([direction v] of [playerb v])\nturn right (90) degrees\nmove (Speed Y H) steps\npoint in direction (Direction)\n\nwhen I receive [dead v]\nset rotation style [don't rotate v]\npoint in direction (pick random (45) to (0))\nrepeat (10)\n    move (5) steps\n    turn left (-7) degrees\n    change [ghost v] effect by (10)\nend\nset rotation style [all around v]\n\n@Ash\n\nwhen flag clicked\nset [is clone? v] to [0]\nhide\n\nwhen I start as a clone\nset [is clone? v] to [1]\nswitch costume to (join [Ash] (pick random (1) to (5)))\ngo to x: (pick random (-240) to (240)) y: (180)\nshow\nset [brightness v] effect to (pick random (-10) to (10))\nset [ghost v] effect to (pick random (25) to (75))\nset size to (pick random (25) to (75)) %\npoint in direction (pick random (200) to (180))\nset [speed v] to ((size) * (0.07))\nset [l/r ? v] to [0]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [ash v]\nif <(is clone?) = [0]> then\n    set [allow? v] to (pick random (0) to (4))\n    if <(allow?) = [0]> then\n        create clone of (_myself_ v)\n    end\nelse\n    if <<(y position) < [-180]> or <(y position) = [-180]>> then\n        delete this clone\n    else\n        if <touching (platformshb v)?> then\n            delete this clone\n        else\n            if <(speed) = [0]> then\n                delete this clone\n            else\n                if <(Ghost Percent) > [0]> then\n                    delete this clone\n                else\n                    move (speed) steps\n                    change [l/r ? v] by (1)\n                    if <(L/R ?) < [10]> then\n                        turn right (1) degrees\n                    else\n                        if <(L/R ?) < [20]> then\n                            turn right (-1) degrees\n                        else\n                            set [l/r ? v] to [0]\n                        end\n                    end\n                    change [l/r ? v] by (1)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\n@Dark\n\nwhen I receive [tick v]\ngo to [front v] layer\ngo [backward v] ((id) + ((1) + (Lag Monitor Clones))) layers\nset [ghost v] effect to (10)\nif <(id) > [0]> then\n    if <(Ghost Percent) > [0]> then\n        show\n        go to (player v)\n        set [ghost v] effect to ((50) + ((60) * (((100) - (Ghost Percent)) / (100))))\n        set [brightness v] effect to ((id) * (-33))\n        switch costume to (sizer v)\n        if <(clone counter) < [10]> then\n            set size to (((75) + (((id) - (1)) * (Diff))) + ((clone counter) * ((Diff) / (10)))) %\n        else\n            if <(clone counter) < [20]> then\n                set size to (((75) + (((id) - (0)) * (Diff))) - (((clone counter) - (10)) * ((Diff) / (10)))) %\n            else\n                set [clone counter v] to [0]\n            end\n        end\n        switch costume to (darkcirc2 v)\n        change [clone counter v] by (0.25)\n    else\n        hide\n    end\nend\n\nif <(id) = [1]> then\nif <(id) = [2]> then\n    switch costume to (sizer v)\n    if <(clone counter) < [10]> then\n        set size to ((150) + ((clone counter) * (5))) %\n    else\n        if <(clone counter) < [20]> then\n            set size to ((200) - (((clone counter) - (10)) * (5))) %\n        else\n            set [clone counter v] to [0]\n        end\n    end\nend\nif <(id) = [3]> then\n    switch costume to (sizer v)\n    if <(clone counter) < [10]> then\n        set size to ((200) + ((clone counter) * (5))) %\n    else\n        if <(clone counter) < [20]> then\n            set size to ((250) - (((clone counter) - (10)) * (5))) %\n        else\n            set [clone counter v] to [0]\n        end\n    end\nend\n\nwhen I receive [green flag v]\nhide\nswitch costume to (sizer v)\nset size to (100) %\nswitch costume to (dark1 v)\n\nwhen I receive [play game v]\nshow\nset [diff v] to [25]\nset [clone counter v] to [0]\nset [id v] to [1]\ncreate clone of (_myself_ v)\nset [clone counter v] to [10]\nset [id v] to [2]\ncreate clone of (_myself_ v)\nset [clone counter v] to [0]\nset [id v] to [3]\ncreate clone of (_myself_ v)\nset [id v] to [0]\n\nwhen I receive [darken v]\nchange [brightness v] effect by ((0) - (darken/lighten speed))\n\nwhen I receive [lighten v]\nchange [brightness v] effect by (darken/lighten speed)\n\n@Splash\n\nwhen flag clicked\nset [ended? v] to [0]\nhide\n\nif <(Ended?) = [0]> then\n    set [ended? v] to [1]\n    broadcast (End Scene v)\nend\n\nwhen I receive [end scene v]\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\nrepeat (10)\n    go to [front v] layer\n    change [ghost v] effect by (-10)\nend\nclear graphic effects\n\n@Intro\n\nwhen I start as a clone\nif <(clone id) = [message]> then\n    go to [front v] layer\n    switch costume to (txt0 v)\n    repeat (3)\n        wait until <not <key (space v) pressed?>>\n        repeat (4)\n            next costume\n            start sound [beep v]\n        end\n        wait until <key (space v) pressed?>\n    end\n    set [intro done? v] to [1]\n    delete this clone\nelse\n    if <(clone id) = [code]> then\n        go to x: (0) y: (0)\n        switch costume to (code1 v)\n        go to [front v] layer\n        repeat (5)\n            next costume\n            start sound [beep v]\n        end\n        repeat (32)\n            change y by (24)\n            start sound [beep v]\n        end\n        delete this clone\n    else\n        if <(clone id) = [flicker]> then\n            switch costume to (dark v)\n            repeat until <(Intro Done?) = [1]>\n                set [ghost v] effect to (pick random (90) to (70))\n                go to [front v] layer\n            end\n            delete this clone\n        else\n            if <(clone id) = [ring]> then\n                switch costume to (ring v)\n                repeat until <(Intro Done?) = [1]>\n                    set [ghost v] effect to (50)\n                    go to [front v] layer\n                end\n                delete this clone\n            end\n        end\n    end\nend\n\nwhen I start as a clone\n\ndefine Slow (pos/neg)\nrepeat (10)\n    change y by ((0.5) * (pos/neg))\nend\n\ndefine Fast (pos/neg)\nrepeat (10)\n    change y by ((1) * (pos/neg))\nend\n\ndefine Check\ngo to x: (0) y: (0)\nSlow [1]\nFast [1]\nSlow [1]\ngo to x: (0) y: ((y position) * (0.5))\n\nwhen I receive [intro v]\nshow\nclear graphic effects\nswitch costume to (background v)\ngo to [front v] layer\nset [intro done? v] to [0]\nset [clone id v] to [flicker]\ncreate clone of (_myself_ v)\nset [clone id v] to [ring]\ncreate clone of (_myself_ v)\nrepeat (3)\n    Next [0.05]\nend\nNext [0.1]\nNext [0.5]\nrepeat (3)\n    load [0.3] [load]\nend\nswitch costume to (load4 v)\nNext [0.5]\nrepeat (5)\n    Next [0.05]\nend\nrepeat (2)\n    Next [0.1]\nend\nrepeat (7)\n    Next [0.05]\nend\nNext [0.5]\nrepeat (7)\n    Next [0.2]\nend\nNext [1]\nrepeat (8)\n    Next [0.05]\nend\nNext [0.5]\nNext [0.1]\nrepeat (3)\n    Next [0.05]\nend\nNext [0.1]\nNext [0.5]\nNext [0.1]\nNext [0.05]\nNext [0.5]\nNext [0.2]\nNext [0.5]\nNext [0.1]\nrepeat (4)\n    Next [0.05]\nend\nNext [0.5]\nrepeat (3)\n    load [0.3] [cons]\nend\nswitch costume to (cons4 v)\nNext [1]\nset [clone id v] to [code]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nswitch costume to (dark v)\nwait (3) seconds\nNext [0.1]\nrepeat (2)\n    Next [0.05]\nend\nNext [0.1]\nNext [0.5]\nNext [0.1]\nNext [0.05]\nNext [0.5]\nNext [0.1]\nrepeat (2)\n    Next [0.05]\nend\nNext [0.1]\nNext [0.5]\nNext [0.1]\nNext [0.05]\nNext [0.5]\nNext [1]\nNext [0.1]\nrepeat (3)\n    Next [0.05]\nend\nNext [0.5]\nNext [1]\nrepeat (3)\n    load [0.3] [mess]\nend\nstart sound [static v]\nswitch costume to (mess4 v)\nrepeat (10)\n    switch costume to (join [b] (pick random (1) to (5)))\n    set [brightness v] effect to (pick random (-75) to (-25))\nend\nswitch costume to (mess4 v)\nrepeat (2)\n    switch costume to (join [b] (pick random (1) to (5)))\n    change [brightness v] effect by (pick random (-50) to (-25))\nend\nswitch costume to (dark v)\nclear graphic effects\nwait (2) seconds\nset [clone id v] to [message]\ncreate clone of (_myself_ v)\nswitch costume to (txt v)\nwait until <(Intro Done?) > [0]>\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [play game v]\nrepeat (20)\n    change [ghost v] effect by (5)\n    go to [front v] layer\nend\nhide\n\ndefine Next (wait)\nstart sound [beep v]\nnext costume\nwait (wait) seconds\n\ndefine load (speed) (type)\nswitch costume to (join (type) [2])\nwait (speed) seconds\nswitch costume to (join (type) [3])\nwait (speed) seconds\nswitch costume to (join (type) [4])\nwait (speed) seconds\nswitch costume to (join (type) [3])\nwait (speed) seconds\nswitch costume to (join (type) [2])\nwait (speed) seconds\nswitch costume to (join (type) [1])\nwait (speed) seconds\n\nforever\n\nCheck\nforever\n    Slow [-1]\n    Fast [-1]\n    Slow [-1]\n    wait (0.1) seconds\n    Slow [1]\n    Fast [1]\n    Slow [1]\n    wait (0.1) seconds\nend\n\nwhen I receive [intro v]\nrepeat until <(Intro Done?) = [1]>\n    reset timer\nend\n\n@Outro\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [outro v]\nset [outro done? v] to [0]\nrepeat until <(Outro Done?) = [1]>\n    reset timer\n    broadcast (down v)\nend\nset [ended? v] to [1]\nbroadcast (end outro v)\n(un)fade [-1]\nswitch costume to (sizer v)\n\nwhen I receive [outro v]\nshow\ngo to x: (0) y: (0)\nset volume to (100) %\nstart sound [end v]\nswitch costume to (back1 v)\ngo to [front v] layer\nset [y v] to [200]\nCreate Backs\nNew Txt [1]\nNew Txt [2]\nNew Txt [3]\nNew Txt [4]\nNew Txt [5]\nrepeat (150)\n    change volume by ((-100) / (150))\nend\nset [outro done? v] to [1]\n\nwhen I start as a clone\ngo to [front v] layer\nclear graphic effects\nif < (clone id) contains [txt]?> then\n    set size to (75) %\n    go to x: (0) y: (230)\n    switch costume to (clone id)\n    set [ghost v] effect to (100)\n    repeat (30)\n        change y by (((135) - (y position)) / (10))\n        change [ghost v] effect by ((-100) / (30))\n    end\n    wait (3) seconds\n    repeat (30)\n        change y by (((230) - (y position)) / (10))\n        change [ghost v] effect by ((100) / (30))\n    end\n    delete this clone\nelse\n    switch costume to (clone id)\n    set [costume v] to (costume [name v])\n    if <(costume) = [back7]> then\n        set [x v] to [480]\n        change [y v] by (-20)\n        wait (1) seconds\n        repeat (10)\n            change [x v] by (((-1) - (240)) / (10))\n            change [y v] by (0.5)\n        end\n        repeat (30)\n            change [x v] by (((-1) - (x)) / (10))\n            change [y v] by (0.5)\n        end\n        wait (1) seconds\n        switch costume to (back7j1 v)\n        repeat (24)\n            next costume\n        end\n        switch costume to (back7 v)\n        wait (5) seconds\n        set [clone id v] to [0]\n        repeat (30)\n            change [x v] by (clone id)\n            change [y v] by (0.5)\n            change [clone id v] by (-0.5)\n        end\n        repeat (30)\n            change [x v] by (clone id)\n            change [y v] by (0.5)\n        end\n    end\nend\n\ndefine (un)fade (pos/neg)\nset [brightness v] effect to (((((pos/neg) * (-1)) - (1)) / (2)) * (100))\nrepeat (30)\n    change [brightness v] effect by ((pos/neg) * ((100) / (30)))\n    reset timer\nend\n\ndefine New Txt (id)\nset [clone id v] to (join [txt] (id))\ncreate clone of (_myself_ v)\nwait (5) seconds\n\nwhen I receive [down v]\nset [costume v] to (costume [name v])\nswitch costume to (sizer v)\nset size to (150) %\nif <(costume) = [back1]> then\n    go to x: (0) y: ((0) + ((y) * (0)))\nelse\n    if <(costume) = [back2]> then\n        go to x: (0) y: ((0) + ((y) * (0.0625)))\n    else\n        if <(costume) = [back3]> then\n            go to x: (0) y: ((0) + ((y) * (0.125)))\n        else\n            if <(costume) = [back4]> then\n                go to x: (0) y: ((0) + ((y) * (0.25)))\n            else\n                if <(costume) = [back5]> then\n                    go to x: (0) y: ((0) + ((y) * (0.5)))\n                else\n                    if <(costume) = [back6]> then\n                        go to x: (0) y: ((0) + ((y) * (1)))\n                    else\n                        if < (costume) contains [back7]?> then\n                            go to x: (x) y: ((0) + ((y) * (0.5)))\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange [y v] by (-1)\nset size to (100) %\nswitch costume to (costume)\n\nwhen I receive [outro v]\n(un)fade [1]\n\nbroadcast (Outro v)\n\nwhen I receive [end outro v]\n(un)fade [-1]\ndelete this clone\n\ndefine Create Backs\nCreate Back [2]\nCreate Back [3]\nCreate Back [4]\nCreate Back [7]\nCreate Back [5]\nCreate Back [6]\n\ndefine Create Back (id)\nset [clone id v] to (join [back] (id))\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif < (clone id) contains [back]?> then\n    (un)fade [1]\nend\n\n