ADVENTUROUS II a scrolling platformer #Games


@Stage\n\nwhen [m v] key pressed\nhide variable [mouse v]\n\nwhen flag clicked\n\nset volume to (50) %\n\nwhen flag clicked\nforever\n    set volume to ((volume) / (2)) %\nend\n\nwhen I receive [play game v]\nforever\n    play sound [softer v] until done\nend\n\nset [mouse v] to [0]\n\nchange [color v] effect by (1)\n\nwhen I receive [play game v]\nforever\n    switch backdrop to (1 v)\n    repeat (44)\n        next backdrop\n        wait (2) seconds\n    end\nend\n\nrepeat (10)\n\n\n\nif <not <(backdrop [name v]) = [intro]>> then\n\nwait (0.5) seconds\n\nset [mouse v] to (join (join [x: ] ((mouse x) + (SCROLL X))) (join [, ] (join [y: ] ((mouse y) + (SCROLL Y)))))\nshow variable [mouse v]\n\nclear graphic effects\n\n@Sprite1\n\n@Player\n\nwhen flag clicked\nset [lag prevention v] to [no]\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\nswitch backdrop to (1 v)\n\nwhen I receive [play game v]\nset [win? v] to [no]\nset size to (100) %\npoint in direction (90)\nset [level v] to [1]\nswitch costume to (right v)\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) and wait\n    end\n    if <(EXIT) = [WIN]> then\n        Game Win\n        broadcast (game win v) and wait\n    else\n        if <(EXIT) = [SKIP]> then\n            skip\n            broadcast (game skip v) and wait\n        else\n            if <(lag prevention) = [no]> then\n                clone particles [20]\n                Game Die\n            else\n                game die 2\n            end\n        end\n    end\nend\n\ndefine Game On\nclear graphic effects\nset size to (100) %\npoint in direction (90)\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nshow\nset [exit v] to []\nbroadcast (new score v)\n\ndefine Tick\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n    Change Player x by [-8]\n    if <(love fav) = [no]> then\n        switch costume to (left v)\n    else\n        switch costume to (monkey left v)\n    end\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    Change Player x by [8]\n    if <(love fav) = [no]> then\n        switch costume to (right v)\n    else\n        switch costume to (monkey right v)\n    end\nend\nif <<<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 [16]\n    end\nend\nif <touching (trampoline v)?> then\n    set volume to (volume) %\n    start sound [Jump v]\n    set [sy v] to [25]\nend\nchange [sy v] by (-1.5)\nChange Player y by (sy)\ntest die\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (10)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\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 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 (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game Die\nset volume to (volume) %\nstart sound [Crunch v]\nhide\nwait (1) seconds\nset [exit v] to [die]\nhide\nwait (0.5) seconds\n\ndefine test die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\nif <key (r v) pressed?> then\n    set [exit v] to [die]\nend\n\ndefine Game Win\nset volume to (volume) %\nstart sound [teleport v]\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\n\ndefine clone particles (num)\nrepeat (num)\n    create clone of (particles v)\nend\n\nwait (1) seconds\n\nwhen [l v] key pressed\nif <(lag prevention) = [no]> then\n    set [lag prevention v] to [yes]\nelse\n    set [lag prevention v] to [no]\nend\n\ndefine game die 2\nset volume to (volume) %\nstart sound [Crunch v]\nrepeat (5)\n    hide\n    wait (0.05) seconds\n    show\n    wait (0.05) seconds\nend\nhide\nwait (1) seconds\nset [exit v] to [die]\n\ndefine skip\nhide\nchange [level v] by (1)\n\nchange [level v] by (1)\n\nwhen I receive [skip v]\nset [exit v] to [SKIP]\n\nwhen I receive [alert v]\nswitch costume to (monkey right v)\n\nwhen flag clicked\nhide\n\nset [scroll x v] to [1000]\n\nwhen flag clicked\nbroadcast (Green Flag v) and wait\nbroadcast (Play Game v) and wait\n\nset volume to (volume) %\nstart sound [Jump v]\nset [sy v] to [25]\n\n@Platforms\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]\nhide\nset [x v] to [-360]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 1 v)\n    clone at x: [0] y: [0]\n    clone at x: [360] y: [0]\n    clone at x: [720] y: [0]\n    clone at x: [1080] y: [0]\n    clone at x: [1440] y: [0]\n    clone at x: [1800] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 1 v)\n        clone at x: [0] y: [0]\n        clone at x: [410] y: [0]\n        clone at x: [820] y: [0]\n        clone at x: [1230] y: [0]\n        clone at x: [1640] y: [0]\n        clone at x: [2050] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (3 1 v)\n            clone at x: [0] y: [0]\n            clone at x: [410] y: [0]\n            clone at x: [880] y: [0]\n            clone at x: [1290] y: [0]\n            clone at x: [1700] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (4 1 v)\n                clone at x: [0] y: [0]\n                clone at x: [410] y: [0]\n                clone at x: [880] y: [0]\n                clone at x: [1290] y: [0]\n                clone at x: [1700] y: [0]\n                clone at x: [2250] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (5 1 v)\n                    clone at x: [0] y: [0]\n                    clone at x: [410] y: [0]\n                    clone at x: [880] y: [0]\n                    clone at x: [1290] y: [0]\n                    clone at x: [1390] y: [380]\n                else\n                    switch costume to (end v)\n                    set [sda v] to [0]\n                    repeat (21)\n                        switch costume to (end v)\n                        clone at x: (sda) y: [0]\n                        change [sda v] by (450)\n                    end\n                    broadcast (win v) and wait\n                end\n            end\n        end\n    end\nend\nset [x v] to [9999999999999999999999999999999999999999]\n\ncreate clone of (_myself_ v)\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)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nhide\n\nswitch costume to (pick random (25) to (29))\n\nclone at x: [1700] y: [0]\nclone at x: [2250] y: [0]\n\n@danger\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 [x v] to [-360]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (level 1 1 v)\n    clone at x: [0] y: [0]\n    clone at x: [360] y: [0]\n    clone at x: [720] y: [0]\n    clone at x: [1080] y: [0]\n    clone at x: [1440] y: [0]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (2 1 v)\n        clone at x: [0] y: [0]\n        clone at x: [410] y: [0]\n        clone at x: [820] y: [0]\n        clone at x: [1230] y: [0]\n        clone at x: [1640] y: [0]\n        clone at x: [2050] y: [0]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (3 1 v)\n            clone at x: [0] y: [0]\n            clone at x: [410] y: [0]\n            clone at x: [880] y: [0]\n            clone at x: [1290] y: [0]\n            clone at x: [1700] y: [0]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (4 1 v)\n                clone at x: [0] y: [0]\n                clone at x: [410] y: [0]\n                clone at x: [880] y: [0]\n                clone at x: [1290] y: [0]\n                clone at x: [1700] y: [0]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (5 1 v)\n                    clone at x: [0] y: [0]\n                    clone at x: [410] y: [0]\n                    clone at x: [880] y: [0]\n                    clone at x: [1290] y: [0]\n                    clone at x: [1390] y: [380]\n                end\n            end\n        end\n    end\nend\n\nswitch costume to (5 all v)\n\nset [x v] to [1440]\nset [y v] to [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)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nhide\n\nclone at x: [1290] y: [0]\n\nswitch costume to (3 1 v)\nclone at x: [0] y: [0]\nclone at x: [410] y: [0]\nclone at x: [880] y: [0]\nclone at x: [1290] y: [0]\n\nclone at x: [0] y: [0]\nclone at x: [410] y: [0]\nclone at x: [880] y: [0]\nclone at x: [1290] y: [0]\n\nclone at x: [0] y: [0]\nclone at x: [410] y: [0]\n\n@exit\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(costume [name v]) = [open]> and <touching (player v)?>> then\n    set [exit v] to [WIN]\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [x v] to [-360]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (closed v)\n    show\n    clone at x: [1900] y: [120]\nelse\n    if <(LEVEL) = [2]> then\n        switch costume to (closed v)\n        show\n        clone at x: [2145] y: [30]\n    else\n        if <(LEVEL) = [3]> then\n            switch costume to (closed v)\n            show\n            clone at x: [1745] y: [10]\n        else\n            if <(LEVEL) = [4]> then\n                switch costume to (closed v)\n                show\n                clone at x: [2300] y: [10]\n            else\n                if <(LEVEL) = [5]> then\n                    switch costume to (closed v)\n                    show\n                    clone at x: [1225] y: [600]\n                end\n            end\n        end\n    end\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)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nswitch costume to (open v)\nshow\n\nwhen I receive [open portal v]\ndelete this clone\n\ncreate clone of (_myself_ v)\n\nturn right (5) degrees\n\nturn right (5) degrees\n\ncreate clone of (_myself_ v)\n\nclear graphic effects\n\nrepeat until <not <(WIN?) = [WIN]>>\n    change [color v] effect by (10)\nend\n\npoint in direction (90)\n\n@coin\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nset size to (120) %\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(lag prevention) = [no]> then\n    next costume\nelse\n    switch costume to (costume13 v)\nend\nif <touching (player v)?> then\n    set volume to (volume) %\n    start sound [Collect v]\n    change [collected v] by (1)\n    broadcast (new score v)\n    if <(COLLECTED) = (MAX COLLECTED)> then\n        broadcast (Open portal v)\n    end\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nset [collected v] to [0]\nset [max collected v] to [0]\nset [x v] to [-360]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    set [max collected v] to [0]\n    switch costume to (dot v)\n    clone at x: [360] y: [220]\n    clone at x: [635] y: [120]\n    clone at x: [1285] y: [180]\n    clone at x: [1370] y: [260]\n    clone at x: [1285] y: [180]\n    clone at x: [1370] y: [260]\n    clone at x: [1475] y: [180]\n    clone at x: [1570] y: [180]\n    clone at x: [1820] y: [100]\nelse\n    if <(LEVEL) = [2]> then\n        set [max collected v] to [0]\n        switch costume to (dot v)\n        clone at x: [135] y: [5]\n        clone at x: [550] y: [100]\n        clone at x: [825] y: [15]\n        clone at x: [1150] y: [30]\n        clone at x: [1820] y: [35]\n        clone at x: [2055] y: [-5]\n    else\n        if <(LEVEL) = [3]> then\n            set [max collected v] to [0]\n            switch costume to (dot v)\n            clone at x: [361] y: [60]\n            clone at x: [430] y: [60]\n            clone at x: [540] y: [105]\n            clone at x: [620] y: [105]\n            clone at x: [1220] y: [70]\n            clone at x: [1270] y: [190]\n            clone at x: [1680] y: [-10]\n        else\n            if <(LEVEL) = [4]> then\n                set [max collected v] to [0]\n                switch costume to (dot v)\n                clone at x: [1960] y: [0]\n                clone at x: [2220] y: [-3]\n            else\n                if <(LEVEL) = [5]> then\n                    set [max collected v] to [0]\n                    switch costume to (dot v)\n                    clone at x: [225] y: [100]\n                    clone at x: [435] y: [100]\n                    clone at x: [790] y: [0]\n                    clone at x: [960] y: [0]\n                    clone at x: [1420] y: [200]\n                    clone at x: [1415] y: [300]\n                    clone at x: [1575] y: [430]\n                    clone at x: [1280] y: [540]\n                end\n            end\n        end\n    end\nend\nset [x v] to [99999999999999]\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)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nchange [max collected v] by (1)\n\nset [max collected v] to [0]\n\nforever\n\ngo to x: (0) y: (0)\n\ndefine particle 2 (num)\nrepeat (num)\n    create clone of (particles2 v)\nend\n\ncreate clone of (collectables2 v)\n\nwait (0.05) seconds\nchange size by (100)\n\nwhen flag clicked\n\nforever\n    set volume to (volume) %\nend\n\nstop [this script v]\n\nbroadcast (Open portal v) and wait\n\n@trampoline\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 [x v] to [-360]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    clone at x: [185] y: [0]\nelse\n    if <(LEVEL) = [2]> then\nend\nset [x v] to [99999999999999999999999]\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)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nhide\n\ncreate clone of (_myself_ v)\nnext costume\n\nclone at x: [360] y: [0]\nclone at x: [720] y: [0]\nclone at x: [1080] y: [0]\nclone at x: [1440] y: [0]\n\nnext costume\n\nset [y v] to [0]\n\nwhen I start as a clone\nforever\n    if <<touching (player v)?> and <(lag prevention) = [no]>> then\n        switch costume to (1 v)\n        repeat (8)\n            next costume\n        end\n    end\n    wait until <not <touching (player v)?>>\nend\n\nswitch costume to (1 v)\n\nrepeat (4)\n    next costume\nend\n\n@Engine\n\ndefine render (text) at size (size) at x (x) y (y) bright (bright)\nset [size v] to (size)\nclear graphic effects\nswitch costume to (a v)\nset size to (size) %\nset [brightness v] effect to (bright)\ngo to x: (x) y: (y)\nset [count v] to [0]\nhide\nrepeat (length of (text))\n    if <(x position) > ((240) - ((size) * (0.2)))> then\n        set x to (x)\n        change y by ((size) * (-0.3))\n    end\n    change [count v] by (1)\n    if <<(letter (count) of (text)) = [ ]> and <not <(x) = (x position)>>> then\n        change x by ((size) * (0.07))\n    else\n        switch costume to (cs v)\n        switch costume to (letter (count) of (text))\n        if <(costume [number v]) = [90]> then\n            switch costume to (join (letter (count) of (text)) [2])\n        end\n        set [x v] to (x position)\n        set [y v] to (y position)\n        if <(length of (text)) > [300]> then\n            stamp\n        else\n            create clone of (_myself_ v)\n        end\n        change x by ((((item (costume [number v]) of [width v]) * (size)) / (100)) + ((size) * (0.017)))\n    end\nend\nhide\n\ndefine type (text) at size (size) at x (x) y (y) bright (bright)\nset [size v] to (size)\nclear graphic effects\nswitch costume to (a v)\nset size to (size) %\nset [brightness v] effect to (bright)\ngo to x: (x) y: (y)\nset [count v] to [0]\nhide\nrepeat (length of (text))\n    if <(x position) > ((240) - ((size) * (0.2)))> then\n        set x to (x)\n        change y by ((size) * (-0.3))\n    end\n    change [count v] by (1)\n    if <<(letter (count) of (text)) = [ ]> and <not <(x) = (x position)>>> then\n        change x by ((size) * (0.07))\n    else\n        switch costume to (cs v)\n        switch costume to (letter (count) of (text))\n        if <(costume [number v]) = [90]> then\n            switch costume to (join (letter (count) of (text)) [2])\n        end\n        set [x v] to (x position)\n        set [y v] to (y position)\n        if <(length of (text)) > [300]> then\n            stamp\n        else\n            create clone of (_myself_ v)\n        end\n        change x by ((((item (costume [number v]) of [width v]) * (size)) / (100)) + ((size) * (0.017)))\n    end\nend\nhide\n\nwhen I start as a clone\nshow\nset x to ((x) + (offset x))\nset y to ((y) + (offset y))\nset size to ((offset size) + (size)) %\n\nwhen I receive [del_clones v]\nerase all\ndelete this clone\n\nwhen flag clicked\nhide\nbroadcast (del_clones v) and wait\n\nwhen I receive [new score v]\nbroadcast (del_clones v)\nrender (join (COLLECTED) (join [/] (join (MAX COLLECTED) [ coins]))) at size (100) at x (100) y (150) bright (0)\n\nshow\n\nwhen I receive [play game v]\nbroadcast (del_clones v)\nrender (join (COLLECTED) (join [/] (join (MAX COLLECTED) [ coins]))) at size (100) at x (100) y (150) bright (0)\n\n@Particles\n\nwhen I start as a clone\ngo to (player v)\nif <(love fav) = [no]> then\n    switch costume to (regular v)\nelse\n    switch costume to (monkey v)\nend\nset [xv v] to (pick random (-10) to (10))\nclear graphic effects\nshow\nset size to (pick random (80) to (120)) %\nset [yv v] to (pick random (5) to (30))\nrepeat (50)\n    turn right (2) degrees\n    change [yv v] by (-2)\n    go to x: ((x position) + (Xv)) y: ((y position) + (Yv))\n    change [ghost v] effect by (2)\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\nset [color v] effect to (COLOR)\n\nwhen flag clicked\nhide\n\n@mute button\n\nwhen this sprite clicked\nif <(costume [number v]) = [1]> then\n    switch costume to (mute v)\n    set [volume v] to [0]\nelse\n    switch costume to (unmute v)\n    set [volume v] to [100]\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\n\nforever\nend\n\nwhen I receive [play game v]\nshow\nswitch costume to (unmute v)\nset [volume v] to [100]\ngo to x: (-190) y: (140)\n\nshow\n\nwhen I receive [tick v]\nset volume to (volume) %\n\n@skip\n\npoint in direction (90)\n\nwhen I receive [play game v]\nshow\n\nwhen this sprite clicked\nbroadcast (skip v)\n\nwhen flag clicked\nhide\n\nwhen I receive [win v]\nhide\nstop [other scripts in sprite v]\n\nforever\nend\n\nwhen I receive [tick v]\nif <touching (mouse-pointer v)?> then\n    point in direction (([sin v] of ((timer) * (1000)) ) + (90))\nend\n\n@Detector\n\nwhen flag clicked\nset [both??? v] to [0]\nset [star v] to [false]\nset [heart v] to [false]\nshow\nset [stared? v] to [0]\nset [loved? v] to [0]\n\nwhen flag clicked\nset [both??? v] to [0]\nset [stared? v] to [0]\nset [loved? v] to [0]\nforever\n    wait until <<(Stared?) = [1]> and <(Loved?) = [1]>>\n    wait (0.1) seconds\n    set [loved? v] to [0]\n    set [stared? v] to [0]\n    set [both??? v] to ((1) - (both???))\n    if <(both???) = [1]> then\n        change [coins v] by (10)\n        broadcast (alert v)\n        stop [this script v]\n    else\n    end\n    wait until <<(heart) = [false]> and <(star) = [false]>>\n    set [stared? v] to [0]\n    set [loved? v] to [0]\nend\n\nwhen flag clicked\nset [detector di v] to [1]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(detector DI) = [1]> then\n    switch costume to (fave v)\n    set [detector di v] to [2]\n    create clone of (_myself_ v)\n    go to x: (-15) y: (0)\n    forever\n        set [star v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [stared? v] to [1]\n        end\n    end\nelse\n    switch costume to (love v)\n    go to x: (-15) y: (0)\n    show\n    forever\n        set [heart v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            set [loved? v] to [1]\n        end\n    end\nend\n\n@Sprite4\n\nwhen I receive [alert v]\nset [love fav v] to [yes]\ngo to x: (0) y: (0)\nshow\nswitch costume to (lovefav v)\nset size to (150) %\nset [ghost v] effect to (100)\nrepeat until <(size) < [101]>\n    change [ghost v] effect by (-8)\n    change size by (((100) - (size)) / (5))\n    go to [front v] layer\nend\nwait (2) seconds\nrepeat until <(size) > [150]>\n    change [ghost v] effect by (10)\n    change size by (((size) - (90)) / (5))\n    go to [front v] layer\nend\n\nwhen flag clicked\nhide\nset [love fav v] to [no]\n\nwhen I receive [win v]\nset [win? v] to [yes]\ngo to x: (0) y: (0)\nshow\nswitch costume to (win v)\nset size to (150) %\nset [ghost v] effect to (100)\nrepeat until <(size) > [150]>\n    change [ghost v] effect by (10)\n    change size by (((size) - (90)) / (5))\n    go to [front v] layer\nend\ngo to x: (0) y: (0)\nshow\nswitch costume to (win 2 v)\nset size to (150) %\nset [ghost v] effect to (100)\nrepeat until <(size) < [101]>\n    change [ghost v] effect by (-8)\n    change size by (((100) - (size)) / (5))\n    go to [front v] layer\nend\nwait until <<key (space v) pressed?> or <mouse down?>>\nrepeat until <(size) > [150]>\n    change [ghost v] effect by (10)\n    change size by (((size) - (90)) / (5))\n    go to [front v] layer\nend\nbroadcast (end v) and wait\n\nrepeat until <(size) < [101]>\n    change [ghost v] effect by (-8)\n    change size by (((100) - (size)) / (5))\n    go to [front v] layer\nend\nwait until <key (space v) pressed?>\n\nset [win? v] to [yes]\n\nbroadcast (end v) and wait\n\n@Sprite6\n\nwhen flag clicked\nhide\n\nwhen I receive [game win v]\nswitch costume to (win v)\ngo [forward v] (1) layers\ngo to [front v] layer\nset x to (500)\nshow\nrepeat (6)\n    change x by (-80)\nend\nchange x by (-15)\nwait (0.6) seconds\nrepeat (5)\n    change x by (-80)\nend\nhide\n\nwhen I receive [game skip v]\nswitch costume to (skip v)\ngo [forward v] (1) layers\ngo to [front v] layer\nset x to (500)\nshow\nrepeat (6)\n    change x by (-80)\nend\nchange x by (-15)\nwait (0.6) seconds\nrepeat (5)\n    change x by (-80)\nend\nhide\n\n@thumbnail\n\ndefine Smooth Glide x: (x) y: (y) speed: (speed)\nrepeat until <<(round (x position)) = (round (x))> and <(round (y position)) = (round (y))>>\n    change x by (((round (x)) - (round (x position))) / (speed))\n    change y by (((round (y)) - (round (y position))) / (speed))\nend\ngo to x: (x) y: (y)\n\nwhen flag clicked\ngo to x: (0) y: (-20)\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    set [aaaaaa v] to (timer)\nend\n\nhide\nforever\n\nwhen [timer v] > (AAAAAA)\ngo to [front v] layer\ngo to x: (-300) y: (-20)\nswitch backdrop to (intro v)\nshow\nSmooth Glide x: (0) y: (-20) speed: (9)\n\nwhen I receive [tick v]\n\ngo to [front v] layer\n\n@clouds\n\nwhen flag clicked\n\nforever\n    create clone of (_myself_ v)\n    wait (5) seconds\nend\n\nwhen I start as a clone\n\nshow\nif <(pick random (1) to (2)) = [1]> then\n    set [ghost v] effect to (pick random (25) to (75))\n    go to x: (-300) y: (pick random (0) to (150))\n    switch costume to (pick random (1) to (5))\n    repeat until <[270] < (x position)>\n        go to [back v] layer\n        change x by (3)\n    end\nelse\n    set [ghost v] effect to (pick random (25) to (75))\n    go to x: (300) y: (pick random (0) to (100))\n    switch costume to (pick random (1) to (5))\n    repeat until <(x position) < [-290]>\n        go to [back v] layer\n        change x by (-3)\n    end\nend\ndelete this clone\n\nchange [ghost v] effect by (pick random (25) to (75))\n\nchange [ghost v] effect by (pick random (25) to (75))\n\n@Mountains\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\ngo to [back v] layer\nPosition (((x) - (SCROLL X)) / (10)) (((y) - (SCROLL Y)) / (10))\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\n\ncreate clone of (_myself_ v)\nswitch costume to (5 2 v)\nchange [sda v] by (450)\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)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nswitch costume to (pick random (25) to (29))\n\nclone at x: [1700] y: [0]\nclone at x: [2250] y: [0]\n\n@report\n\nwhen flag clicked\n\nset [ghost v] effect to (100)\nforever\n    set [report v] to <<touching (mouse-pointer v)?> or <<touching (mouse-pointer v)?> and <mouse down?>>>\nend\n\n@Sprite2\n\ngo to x: (0) y: (0)\n\nwhen I receive [tick v]\n\nif <(report) = [false]> then\n    hide\nelse\n    go to [front v] layer\n    show\n    wait (0.5) seconds\n    hide\n    wait (0.5) seconds\nend\nforever\nend\n\n