MINECRAFT 2.5D platformer
@Stage\n\nwhen I receive [play game v]\nswitch backdrop to (png v)\n\nwhen [e v] key pressed\n\nif <(position tool) = [1]> then\n    set [mouse v] to (join ((mouse x) + (scroll x)) (join [, ] ((mouse y) + (scroll y))))\n    show variable [mouse v]\n    set [position tool v] to [0]\nelse\n    hide variable [mouse v]\n    set [position tool v] to [1]\nend\n\nwhen flag clicked\nswitch backdrop to (png v)\nset [position tool v] to [1]\n\nwhen I receive [the eend v]\nplay sound [Flying-in-stuff v] until done\n\n@blank\n\n@player\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\nwhen I receive [play game v]\ngo to [front v] layer\nset [scroll x checkpoint v] to [0]\nset [scroll y checkpoint v] to [0]\nset [progress v] to [1]\nbroadcast (reset v) and wait\nbroadcast (setup v) and wait\nstart\nforever\n    tick\n    broadcast (tick v)\n    go to [front v] layer\n    set [p x v] to (x position)\n    set [p y v] to (y position)\n    set [p d v] to (direction)\n    if <(EXIT) = [DIE]> then\n        if <(endy) = [0]> then\n            game over\n        end\n    end\nend\n\ndefine game on\nbroadcast (reset v)\nbroadcast (setup v)\nset [x v] to (scroll x checkpoint)\nset [y v] to (scroll y checkpoint)\nset [scroll x v] to (scroll x checkpoint)\nset [scroll y v] to (scroll y checkpoint)\nset [sx v] to [0]\nswitch costume to (costume1 v)\nset size to (100) %\npoint in direction (90)\nshow\n\ndefine tick\nTest - die\nif <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <<(mouse x) < [0]> and <(mouse y) < [170]>>>> then\n    change [sx v] by (-2)\n    point in direction (-90)\nend\nif <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <<(mouse x) > [0]> and <(mouse y) < [170]>>>> then\n    change [sx v] by (2)\n    point in direction (90)\nend\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > [0]>>> then\n    if <(in air) < [5]> then\n        set [sy v] to [15]\n    end\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 <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nchange player y by (sy)\nTest - die\nchange [scroll x v] by (round (((x) - (scroll x)) / (8)))\nif <(scroll x) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(scroll x) > [8926]> then\n    set [scroll x v] to [8926]\nend\nif <(scroll y) < [0]> then\n    set [scroll y v] to [0]\nend\nchange [scroll y v] by (round ((((y) - (scroll y)) + (50)) / (14)))\nposition\nTest - die\n\ndefine change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nposition\nrepeat until <not <touching (platform 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 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 (platform v)?> then\n    repeat (12)\n        change [y v] by (1)\n        position\n        if <not <touching (platform v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (platform 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 over\nset [exit v] to []\nbroadcast (machete hide v)\nstart sound [Crunch v]\nstart sound [Basketball Bounce v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\nset [snake death v] to [0]\ngame on\n\ndefine Test - die\nif <<<(y position) < [-179]> or <<touching (spike v)?> or <touching (falling pieces v)?>>> or <(snake death) = [1]>> then\n    set [exit v] to [DIE]\nelse\n    clear graphic effects\nend\n\nwhen I receive [setup v]\nset size to (100) %\n\nwhen I receive [hide v]\nhide\n\nwhen flag clicked\nhide\n\ndefine start\nset [x v] to [0]\nset [y v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [sy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [progress v] to [0]\nswitch costume to (costume1 v)\nset size to (100) %\npoint in direction (90)\nshow\n\nwhen I receive [game on v]\ngame on\nbroadcast (reset v)\nbroadcast (setup v)\n\nbroadcast (green flag v)\nbroadcast (Play game v)\n\nwhen I receive [green flag v]\nforever\n    if <not <<(EXIT) = [win]> or <(EXIT) = [die]>>> then\n        if <key (r v) pressed?> then\n            wait until <not <key (r v) pressed?>>\n            game on\n            broadcast (reset v)\n            broadcast (setup v)\n        end\n    end\nend\n\n@platform\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\ngo to [front v] layer\nset size to (100) %\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\ngo to [front v] layer\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [120]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [120]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [174]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\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]\ngo to [front v] layer\n\ndefine clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [the eend v]\nstop [other scripts in sprite v]\nswitch costume to (level 1 1 v)\ngo to x: (0) y: (0)\n\nwhen flag clicked\nhide\n\n@spike\n\nwhen I receive [green flag v]\ngo to [back v] layer\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nset size to (100) %\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [120]\nclone at x: [470] y: [0]\nclone at x: [470] y: [120]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [174]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\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)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide v]\nhide\n\nwhen flag clicked\nhide\n\n@sign\n\nwhen I receive [green flag v]\ngo to [back v] layer\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\nif <(costume [number v]) = [1]> then\n    if <touching (player v)?> then\n        say [WASD, Arrow Keys or Mobile to move.Toggle the timer by pressing "T"] for (0) seconds\n    end\nelse\n    if <(costume [number v]) = [2]> then\n        if <touching (player v)?> then\n            say [Get to the helicopter before being exposed to too much radiation! And watch out for falling reactor pieces!] for (0) seconds\n        end\n    else\n        if <(costume [number v]) = [3]> then\n            if <touching (player v)?> then\n                say [And touching spikes is not a good idea...] for (0) seconds\n            end\n        end\n    end\nend\n\nwhen I receive [setup v]\nset size to (100) %\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nclone at x: [250] y: [0]\nclone at x: [100] y: [0]\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)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide v]\nhide\n\n@decoration\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nset size to (100) %\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nclone at x: [485] y: [0]\nclone at x: [445] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [120]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [120]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\nclone at x: [470] y: [174]\nclone at x: [470] y: [0]\nclone at x: [470] y: [0]\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\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide v]\nhide\n\nwhen flag clicked\nhide\n\n@background\n\nwhen I receive [green flag v]\ngo to [back v] layer\ngo to x: (0) y: (50)\nswitch costume to (costume2 v)\nshow\n\nwhen I receive [play game v]\ngo to [back v] layer\n\nwhen flag clicked\ngo to x: (0) y: (-70)\nhide\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 (round (((scroll x) - ((scroll x) * (2))) / (30))) (round (((scroll y) - ((scroll y) * (2))) / (40)))\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [the eend v]\nhide\n\n@menu\n\nwhen I receive [reset v]\npoint in direction (90)\ngo to x: (-220) y: (160)\nswitch costume to (menu button v)\ngo to [front v] layer\nset size to (70) %\nset [menu buttons v] to [0]\nshow\n\nwhen I receive [tick v]\nif <not <(EXIT) > []>> then\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n        wait until <mouse down?>\n        set [menu buttons v] to [1]\n        broadcast (menu buttons v)\n        wait until <not <mouse down?>>\n    else\n        set [brightness v] effect to (0)\n        if <(mouse y) < [145]> then\n            set [menu buttons v] to [0]\n        end\n    end\nend\ngo to [front v] layer\n\nwhen flag clicked\nhide\n\nwhen I receive [the eend v]\nhide\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (pick random (2) to (3))\ngo to (mouse-pointer v)\nset size to (1) %\npoint in direction (pick random (1) to (360))\nshow\nrepeat (33)\n    move (2) steps\n    change size by (2)\n    change [ghost v] effect by (3)\n    go to [front v] layer\nend\ndelete this clone\n\n@volum\n\nwhen I receive [menu buttons v]\nshow\nclear graphic effects\nglide (0.2) secs to x: (-190) y: (160)\ngo to [front v] layer\nrepeat until <<(mouse y) < [145]> or <(mouse x) > [-145]>>\n    if <(menu buttons) = [1]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            next costume\n            if <(costume [number v]) = [1]> then\n                set volume to (50) %\n            else\n                set volume to (0) %\n            end\n            wait until <not <mouse down?>>\n        end\n    end\nend\nglide (0.4) secs to x: (-220) y: (160)\nhide\n\nwhen I receive [green flag v]\ngo to [front v] layer\ngo to x: (-220) y: (160)\nset size to (70) %\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [play game v]\nset volume to (50) %\nswitch costume to (on v)\nwait (1) seconds\nforever\n    play sound [Droid Rage v] until done\n    wait (1) seconds\nend\n\nwhen I receive [reset v]\nif <(x position) > [-220]> then\n    glide (0.4) secs to x: (-220) y: (160)\n    hide\nend\n\nwhen I receive [reset v]\nif <(x position) > [-220]> then\n    glide (0.4) secs to x: (-220) y: (160)\n    hide\nend\n\n@skip\n\nwhen I receive [menu buttons v]\npoint in direction (90)\nswitch costume to (skip v)\nshow\nset size to (70) %\nclear graphic effects\nglide (0.2) secs to x: (-160) y: (160)\ngo to [front v] layer\nrepeat until <<(mouse y) < [145]> or <(mouse x) > [-145]>>\n    if <(menu buttons) = [1]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            broadcast (skip v) and wait\n            broadcast (Game on v) and wait\n            set [skipped? v] to [1]\n            wait until <not <mouse down?>>\n        end\n    end\nend\nglide (0.4) secs to x: (-220) y: (160)\nhide\n\nwhen I receive [green flag v]\ngo to [front v] layer\ngo to x: (-220) y: (160)\nset size to (70) %\nhide\nforever\n    if <touching (mouse-pointer v)?> then\n        set [brightness v] effect to (5)\n    else\n        set [brightness v] effect to (0)\n    end\nend\n\nwhen I receive [reset v]\nif <(x position) > [-220]> then\n    glide (0.4) secs to x: (-220) y: (160)\n    hide\nend\n\nwhen flag clicked\nset [skipped? v] to [0]\n\n@Checkpoint 1\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\ngo to [back v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [scroll x checkpoint v] to [284]\n        set [scroll y checkpoint v] to [-8]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nset size to (100) %\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [284] y: [-68]\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)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nchange [progress v] by (1)\n\nwhen I receive [skip v]\nif <(PROGRESS) = [0]> then\n    set [scroll x checkpoint v] to [284]\n    set [scroll y checkpoint v] to [-8]\nend\n\n@Checkpoint 2\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\ngo to [back v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [scroll x checkpoint v] to [991]\n        set [scroll y checkpoint v] to [-8]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nset size to (100) %\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [991] y: [-68]\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)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nchange [progress v] by (1)\n\nwhen I receive [skip v]\nif <(PROGRESS) = [1]> then\n    set [scroll x checkpoint v] to [991]\n    set [scroll y checkpoint v] to [-8]\nend\n\n@Checkpoint 3\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\ngo to [back v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [scroll x checkpoint v] to [1884]\n        set [scroll y checkpoint v] to [-8]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nset size to (100) %\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [1884] y: [-68]\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)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nchange [progress v] by (1)\n\nwhen I receive [skip v]\nif <(PROGRESS) = [2]> then\n    set [scroll x checkpoint v] to [1884]\n    set [scroll y checkpoint v] to [-8]\nend\n\n@Checkpoint 4\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\ngo to [back v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [scroll x checkpoint v] to [3030]\n        set [scroll y checkpoint v] to [-8]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nset size to (100) %\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [3030] y: [-68]\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)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nchange [progress v] by (1)\n\nwhen I receive [skip v]\nif <(PROGRESS) = [3]> then\n    set [scroll x checkpoint v] to [3030]\n    set [scroll y checkpoint v] to [-8]\nend\n\n@Checkpoint 5\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\ngo to [back v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [scroll x checkpoint v] to [4486]\n        set [scroll y checkpoint v] to [-8]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nset size to (100) %\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [4486] y: [-68]\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)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nchange [progress v] by (1)\n\nwhen I receive [skip v]\nif <(PROGRESS) = [4]> then\n    set [scroll x checkpoint v] to [4486]\n    set [scroll y checkpoint v] to [-8]\nend\n\n@Checkpoint 6\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\ngo to [back v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [scroll x checkpoint v] to [5132]\n        set [scroll y checkpoint v] to [103]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nset size to (100) %\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [5132] y: [43]\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)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [5]> then\n    set [scroll x checkpoint v] to [5132]\n    set [scroll y checkpoint v] to [103]\nend\n\n@Checkpoint 7\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\ngo to [back v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [scroll x checkpoint v] to [6646]\n        set [scroll y checkpoint v] to [219]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nset size to (100) %\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [6646] y: [159]\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)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [6]> then\n    set [scroll x checkpoint v] to [6646]\n    set [scroll y checkpoint v] to [219]\nend\n\n@Checkpoint 8\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\ngo to [back v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [scroll x checkpoint v] to [7375]\n        set [scroll y checkpoint v] to [390]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nset size to (100) %\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [7375] y: [330]\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)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [7]> then\n    set [scroll x checkpoint v] to [7375]\n    set [scroll y checkpoint v] to [390]\nend\n\n@Checkpoint 9\n\nwhen I receive [green flag v]\nswitch costume to (checkpoint 1 v)\ngo to [back v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [scroll x checkpoint v] to [7985]\n        set [scroll y checkpoint v] to [390]\n        change [progress v] by (1)\n        switch costume to (animation f1 v)\n        start sound [Connect v]\n        repeat (10)\n            next costume\n        end\n        switch costume to (checkpoint achieved v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [7985] y: [330]\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)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [8]> then\n    set [scroll x checkpoint v] to [7985]\n    set [scroll y checkpoint v] to [390]\nend\n\n@detector\n\nwhen flag clicked\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\n    go to [front v] layer\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\n    go to [front v] layer\n    show\nend\nhide\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        go to [front v] layer\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved__ v] to [1]\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        go to [front v] layer\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [faved___ v] to [1]\n        end\n    end\nend\n\nwhen I receive [the eend v]\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (1) seconds\nshow\ngo to x: (0) y: (50)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\n    go to [front v] layer\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\n    go to [front v] layer\n    show\nend\nhide\n\n@flash\n\nwhen flag clicked\nhide\n\nwhen I receive [play game v]\nset rotation style [left-right v]\n\nwhen I receive [tick v]\nswitch costume to (flash v)\ngo to x: (p x) y: (p y)\npoint in direction (p d)\nif <(EXIT) = [DIE]> then\n    hide\nelse\n    show\nend\n\nwhen I receive [the eend v]\nhide\n\nwhen I receive [hide v]\nhide\n\n@final\n\nwhen I receive [green flag v]\nset [endy v] to [0]\nswitch costume to (end v)\nset size to (100) %\ngo to [front v] layer\nhide\nforever\n    if <touching (player v)?> then\n        set [endy v] to [1]\n        stop [all v]\n    end\nend\n\nwhen I receive [tick v]\nposition ((x) - (scroll x)) ((y) - (scroll y))\n\nwhen I receive [setup v]\nset [endy v] to [0]\npoint in direction (90)\nclear graphic effects\nset size to (100) %\nhide\nset [on/off v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [9091] y: [366]\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\n    set [ghost v] effect to (100)\nelse\n    hide\nend\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [skip v]\nif <(PROGRESS) = [9]> then\n    set [scroll x checkpoint v] to [8900]\n    set [scroll y checkpoint v] to [426]\nend\n\n@particle\n\nwhen I receive [play game v]\nforever\n    create clone of (_myself_ v)\n    wait ((scroll x) / (40000)) seconds\nend\n\nwhen flag clicked\nhide\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 [hide v]\nhide\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I start as a clone\nset size to (1) %\nswitch costume to (costume3 v)\nshow\nset [x v] to ((scroll x) - (pick random (-300) to (300)))\nset [y v] to ((scroll y) - (pick random (-120) to (180)))\nset [ghost v] effect to (100)\nrepeat (25)\n    change size by (2)\n    position ((x) - (scroll x)) ((y) - (scroll y))\n    change [x v] by (pick random (-1) to (1))\n    change [y v] by (pick random (-0.5) to (-1.5))\n    change [ghost v] effect by (-4)\nend\nrepeat (25)\n    change size by (-2)\n    position ((x) - (scroll x)) ((y) - (scroll y))\n    change [x v] by (pick random (-1) to (1))\n    change [y v] by (pick random (-0.5) to (-1.5))\n    change [ghost v] effect by (4)\nend\ndelete this clone\n\n@Falling pieces\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)\nset [y v] to (y)\n\nwhen I receive [setup v]\npoint in direction (90)\nclear graphic effects\nset size to (80) %\nhide\n\nwhen I receive [play game v]\nforever\n    wait (pick random (4) to (7)) seconds\n    create clone of (_myself_ v)\nend\n\nwhen I receive [hide v]\nhide\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset size to (100) %\nswitch costume to (pick random (1) to (4))\nshow\nset [x v] to ((scroll x) - (pick random (-220) to (220)))\nset [y v] to ((scroll y) + (200))\nrepeat until <touching (platform v)?>\n    position ((x) - (scroll x)) ((y) - (scroll y))\n    change [y v] by (-17)\n    if <not <(costume [number v]) = [3]>> then\n        turn right (5) degrees\n    end\nend\nif <(costume [number v]) = [4]> then\n    start sound [Small explosion v]\nelse\n    start sound [Big explosion v]\nend\nrepeat (5)\n    change [ghost v] effect by (20)\n    position ((x) - (scroll x)) ((y) - (scroll y))\nend\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\nreset timer\nset [timer v] to (timer)\nset [endy v] to [0]\nswitch costume to (thumbnail v)\npoint in direction (90)\ngo to x: (0) y: (0)\nset size to (100) %\nhide\nforever\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (timer)\nif <(endy) = [0]> then\n    switch costume to (thumbnail l&f v)\n    show\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    hide variable [your time: v]\n    start sound [Manea_2 v]\n    repeat (20)\n        change [ghost v] effect by (-5)\n        go to [front v] layer\n    end\nelse\n    broadcast (hide v)\n    broadcast (the eend v)\n    switch costume to (won v)\n    go to [back v] layer\n    show\n    set [ghost v] effect to (100)\n    repeat (20)\n        change [ghost v] effect by (-5)\n    end\n    broadcast (timer v)\n    switch costume to (credits v)\n    create clone of (_myself_ v)\n    switch costume to (won v)\nend\n\nclear graphic effects\ngo to [front v] layer\nswitch costume to (thumbnail v)\ngo to x: (0) y: (0)\n\nwhen I start as a clone\nclear graphic effects\nswitch costume to (credits v)\nset size to (100) %\ngo to x: (0) y: (-400)\nshow\nrepeat (500)\n    change y by (1)\n    go to [front v] layer\n    switch costume to (credits v)\nend\nrepeat (100)\n    change y by (1)\n    go to [front v] layer\n    switch costume to (credits v)\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\n@Your time\n\nwhen flag clicked\nset [timer to cloud v] to [0]\nset [skipped? v] to [0]\nhide variable [your time: v]\nset [minute? v] to [0]\nset [second timer v] to [0]\nset [your time: v] to [0]\nset [on/off v] to [1]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [the eend v]\nclear graphic effects\ngo to [front v] layer\nhide variable [your time: v]\ngo to x: (0) y: (0)\nshow\nif <(skipped?) = [1]> then\n    switch costume to (nonono v)\n    show\n    forever\n        go to [front v] layer\n    end\nelse\n    switch costume to (your time: v)\n    set [costume v] to (letter (1) of (Your time:))\n    switch costume to (costume)\n    create clone of (_myself_ v)\n    change x by (20)\n    set [costume v] to (letter (2) of (Your time:))\n    switch costume to (costume)\n    create clone of (_myself_ v)\n    change x by (15)\n    set [costume v] to (letter (3) of (Your time:))\n    switch costume to (costume)\n    create clone of (_myself_ v)\n    change x by (20)\n    if <(length of (Your time:)) = [4]> then\n        set [costume v] to (letter (4) of (Your time:))\n        switch costume to (costume)\n        create clone of (_myself_ v)\n        change x by (20)\n    end\n    if <(length of (Your time:)) = [5]> then\n        set [costume v] to (letter (5) of (Your time:))\n        switch costume to (costume)\n        create clone of (_myself_ v)\n        change x by (20)\n    end\n    if <(length of (Your time:)) = [6]> then\n        set [costume v] to (letter (6) of (Your time:))\n        switch costume to (costume)\n        create clone of (_myself_ v)\n        change x by (20)\n    end\nend\ngo to x: (0) y: (0)\nswitch costume to (your time: v)\nshow\ngo to [front v] layer\n\nwhen I receive [play game v]\nshow variable [your time: v]\nwait until <key (any v) pressed?>\nforever\n    if <(Second timer) < [60]> then\n        wait (1) seconds\n        change [second timer v] by (1)\n        if <(Second timer) < [10]> then\n            set [your time: v] to (join (join (minute?) [:]) (join [0] (Second timer)))\n        else\n            set [your time: v] to (join (join (minute?) [:]) (Second timer))\n        end\n    else\n        change [minute? v] by (1)\n        set [second timer v] to [0]\n    end\n    change [timer to cloud v] by (1)\nend\n\nwhen I receive [play game v]\nforever\n    if <key (t v) pressed?> then\n        if <(On/off) = [1]> then\n            hide variable [your time: v]\n            set [on/off v] to [0]\n        else\n            show variable [your time: v]\n            set [on/off v] to [1]\n        end\n        wait until <not <key (t v) pressed?>>\n    end\nend\n\nwhen I start as a clone\nclear graphic effects\nrepeat (10)\n    go to [front v] layer\nend\n\ncreate clone of (_myself_ v)\nchange x by (10)\n\nset [costume v] to (letter (1) of (Your time:))\n\ndelete this clone\n\nwhen I receive [the eend v]\nhide variable [your time: v]\nif <(skipped?) = [0]> then\n    set [☁ score \(seconds\) v] to (timer to cloud)\nend\n\n@darkness effect\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [play game v]\nwait (1) seconds\nshow\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I receive [reset v]\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I receive [setup v]\nrepeat (10)\n    go to [front v] layer\nend\n\nwhen I receive [game on v]\nrepeat (10)\n    go to [front v] layer\nend\n\n@new intro\n\nwhen flag clicked\nbroadcast (green flag v)\nreset timer\nhide\nstart game\n\nset size to (100) %\nshow\nswitch costume to (bg v)\ngo to x: (0) y: (0)\nset [new intro: clone id v] to [1]\nrepeat (length of [kikoko])\n    create clone of (_myself_ v)\n    change [new intro: clone id v] by (1)\n    wait (0.2) seconds\nend\nwait until <(timer) > [4.1]>\ncreate clone of (_myself_ v)\nwait until <(timer) > [5.5]>\nstart game\nrepeat (10)\n    change [ghost v] effect by (10)\n    go to [front v] layer\nend\nhide\n\nwhen I start as a clone\nif <(new intro: clone id) = [1]> then\n    switch costume to (k v)\n    intro start [240] glide to x [-105] wait [3.5] when timer > [5.5] delete clone\nelse\n    if <(new intro: clone id) = [2]> then\n        switch costume to (i v)\n        intro start [240] glide to x [-74] wait [3.6] when timer > [5.5] delete clone\n    else\n        if <(new intro: clone id) = [3]> then\n            switch costume to (k v)\n            intro start [240] glide to x [-39] wait [3.7] when timer > [5.5] delete clone\n        else\n            if <(new intro: clone id) = [4]> then\n                switch costume to (o v)\n                intro start [240] glide to x [6] wait [3.8] when timer > [5.5] delete clone\n            else\n                if <(new intro: clone id) = [5]> then\n                    switch costume to (k v)\n                    intro start [240] glide to x [55] wait [3.9] when timer > [5.5] delete clone\n                else\n                    if <(new intro: clone id) = [6]> then\n                        switch costume to (o v)\n                        intro start [240] glide to x [100] wait [4] when timer > [5.5] delete clone\n                    else\n                        if <(new intro: clone id) = [7]> then\n                            show\n                            go to [front v] layer\n                            switch costume to (productions v)\n                            go to x: (0) y: (-40)\n                            set size to (170) %\n                            start sound [low end2 v]\n                            repeat until <(size) = [100]>\n                                change size by (((100) - (size)) / (2))\n                                set [ghost v] effect to ((size) - (100))\n                            end\n                            wait until <(timer) > [5.5]>\n                            repeat (5)\n                                change [ghost v] effect by (20)\n                                go to [front v] layer\n                                change size by (5)\n                            end\n                            delete this clone\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine intro start (x) glide to x (destination) wait (timer) when timer > (#) delete clone\nshow\ngo to [front v] layer\nset size to (100) %\ngo to x: (x) y: (0)\nrepeat until <(timer) > (timer)>\n    set x to (((x position) + ((destination) / (10))) / (1.1))\n    set [ghost v] effect to ((x position) - (destination))\nend\nset size to (150) %\nstart sound [low end v]\nrepeat until <(size) = [100]>\n    change size by (((100) - (size)) / (2))\nend\nwait until <(timer) > (#)>\nrepeat (5)\n    change [ghost v] effect by (20)\n    go to [front v] layer\n    change size by (5)\nend\ndelete this clone\n\ndefine start game\nbroadcast (green flag v)\nbroadcast (Play game v)\n\n