Night Adventure (Mobile Frendly Scrolling Platformer)

Instructions: ~WASD or cursor keys to move\nMobile\n~Click left / right / above the player to move\n       (you can climb up walls)\n---------------------------------------------------------------------\nTürkçe\n-Yön tuşları ya da WASD ile hareket ediliyor\n~Telefondan oynuyorsanız oyuncunun sağına / soluna / yukarısına tıklarsanız ilerler\n       (Duvarlara tırmanabilirsin)

@Stage\n\nwhen I receive [game on v]\nswitch backdrop to (1 v)\n\nwhen I receive [+ v]\nset volume to (100) %\n\nwhen I receive [- v]\nset volume to (0) %\n\nwhen I receive [end intro v]\nset volume to (100) %\nswitch backdrop to (2 v)\nhide variable [error v]\nhide variable [timer v]\nwait (0.9) seconds\nforever\n    play sound [climate-change-pt-1-soundtrack-2020-\[AudioTrimmer v] until done\n    wait (1) seconds\nend\n\n@1\n\n@player\n\ndefine move\nshow\nif <<key (d v) pressed?> or <<<(mouse x) > (x position)> and <mouse down?>> or <key (right arrow v) pressed?>>> then\n    point in direction (90)\n    if <(x) > [7771]> then\n        change [sx v] by (0.7)\n    else\n        change [sx v] by (2)\n    end\nend\nif <<key (a v) pressed?> or <<<(x position) > (mouse x)> and <mouse down?>> or <key (left arrow v) pressed?>>> then\n    point in direction (-90)\n    if <(x) > [7771]> then\n        change [sx v] by (-0.7)\n    else\n        change [sx v] by (-2)\n    end\nend\nif <(x) > [7771]> then\n    set [sx v] to ((sx) - ((sx) / (15)))\n    x (sx) change\nelse\n    set [sx v] to ((sx) * (0.8))\n    if <[0] < (sx)> then\n        if <(sx) > [0.9]> then\n            x (round (sx)) change\n        end\n    else\n        if <[-0.9] > (sx)> then\n            x (round (sx)) change\n        end\n    end\nend\nif <<not <touching (jump v)?>> and <<key (w v) pressed?> or <<<(mouse y) > (y position)> and <mouse down?>> or <key (up arrow v) pressed?>>>> then\n    if <[4] > (in air)> then\n        set [sy v] to [16]\n    end\nend\nchange [in air v] by (1)\nif <(sy) > [-17]> then\n    change [sy v] by (-2)\nend\ny (sy) change\ndie pateto die\nif <(y position) < [-175]> then\n    set [die v] to [die]\nend\nif <(die) > []> then\n    set [x v] to (pozisyon xx)\n    set [y v] to (pozisyon yy)\n    set [scrolly v] to (y)\n    set [scrollx v] to (x)\nelse\n    change [scrollx v] by (round (((x) - (scrollx)) / (10)))\n    if <[0] > (scrollx)> then\n        set [scrollx v] to [0]\n    end\n    change [scrolly v] by (round (((y) - (scrolly)) / (10)))\n    if <[0] > (scrolly)> then\n        set [scrolly v] to [0]\n    end\nend\npozisyon\nif <touching (jump v)?> then\n    if <(sound effects) = [1]> then\n        start sound [Jump v]\n    end\n    set [sy v] to [27]\n    set [in air v] to [5]\nend\n\ndefine x (sx) change\nchange [x v] by (sx)\npozisyon\nif <<<touching (platform v)?> or <touching (pink v)?>> or <touching (move v)?>> then\n    repeat (14)\n        change [y v] by (1)\n        pozisyon\n        if <not <<<touching (platform v)?> or <touching (pink v)?>> or <touching (move v)?>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-14)\n    if <<key (w v) pressed?> or <<<(mouse y) > (y position)> and <mouse down?>> or <key (up arrow v) pressed?>>> then\n        if <(sx) > [0]> then\n            change [sx v] by (-16)\n        else\n            change [sx v] by (16)\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <<<touching (platform v)?> or <touching (pink v)?>> or <touching (move v)?>>>\n        if <(sx) < [0]> then\n            change [x v] by (1)\n        else\n            change [x v] by (-1)\n        end\n        pozisyon\n    end\nend\n\nwhen I receive [flag v]\nset [number v] to [0]\nset [pozisyon xx v] to [0]\nset [pozisyon yy v] to [0]\nhide\ngo to [front v] layer\n\nwhen I receive [play v]\nforever\n    broadcast (reset v) and wait\n    broadcast (setup v) and wait\n    play\n    point in direction (90)\n    repeat until <(die) > []>\n        move\n        broadcast (move v) and wait\n    end\nend\n\ndefine play\nset [sx v] to [0]\nset [die v] to []\nset [sy v] to [0]\nset [x v] to (pozisyon xx)\nset [y v] to (pozisyon yy)\nshow\n\ndefine pozisyon\ngo to x: ((x) - (scrollx)) y: ((y) - (scrolly))\n\ndefine y (sy) change\nchange [y v] by (sy)\npozisyon\nrepeat until <not <<<touching (platform v)?> or <touching (move v)?>> or <touching (pink v)?>>>\n    if <(sy) < [0]> then\n        change [y v] by (1)\n        set [in air v] to [0]\n    else\n        change [y v] by (-1)\n    end\n    pozisyon\n    set [sy v] to [0]\nend\n\nwhen flag clicked\nhide\n\ndefine die pateto die\nif <<touching (enemy v)?> or <touching (danger v)?>> then\n    set [die v] to [die]\nend\n\nwhen I receive [play v]\nwait (1) seconds\nforever\n    wait until <(die) > []>\n    broadcast (rip v)\nend\n\nwhen I receive [rip v]\nif <(sound effects) = [1]> then\n    wait (0.1) seconds\n    play sound [Rip v] until done\nend\n\nwhen I receive [game on v]\nset [die v] to [die]\n\nwhen I receive [game on v]\nbroadcast (flag v) and wait\nbroadcast (play v) and wait\n\nwhen I receive [game on v]\nset [timer v] to [0]\nhide variable [timer v]\nwait until <<key (any v) pressed?> or <mouse down?>>\nshow variable [timer v]\nrepeat until <(number) = [9]>\n    wait (1) seconds\n    change [timer v] by (1)\nend\nchange [timer v] by (-1)\nbroadcast (the end v)\n\nwhen I receive [up v]\nif <touching (pink v)?> then\n    change [x v] by (1)\nend\n\nwhen I receive [down v]\nif <[90] > (distance to [pink v])> then\n    change [x v] by (-1)\nend\n\n@platform\n\nwhen I receive [move v]\npozisyon ((x) - (scrollx)) ((y) - (scrolly))\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nlevel\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\nif <<(y position) = (y)> and <(x position) = (x)>> 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\ndefine level\nswitch costume to ( 1 v)\nclone at x: [400] y: [0]\nclone at x: [500] y: [300]\nclone at x: [750] y: [40]\nclone at x: [600] y: [40]\nclone at x: [750] y: [400]\nclone at x: [1300] y: [600]\nclone at x: [700] y: [100]\nclone at x: [300] y: [200]\nrepeat (2)\n    clone at x: [0] y: [320]\n    switch costume to ((costume [number v]) - (1))\nend\nclone at x: [0] y: [320]\nclone at x: [200] y: [150]\nrepeat (3)\n    clone at x: [300] y: [0]\n    switch costume to ((costume [number v]) - (1))\nend\nclone at x: [-800] y: [-150]\nrepeat (2)\n    clone at x: [320] y: [0]\n    switch costume to ((costume [number v]) - (1))\nend\nclone at x: [600] y: [150]\nclone at x: [350] y: [210]\nclone at x: [-100] y: [210]\nclone at x: [320] y: [210]\nclone at x: [500] y: [600]\nclone at x: [380] y: [100]\nclone at x: [850] y: [830]\nclone at x: [455] y: [-20]\nclone at x: [600] y: [50]\nclone at x: [600] y: [60]\nclone at x: [600] y: [60]\nclone at x: [600] y: [60]\n\nwhen flag clicked\nhide\n\n@danger\n\nwhen I receive [move v]\npozisyon ((x) - (scrollx)) ((y) - (scrolly))\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nlevel\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\nif <<(y position) = (y)> and <(x position) = (x)>> 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\ndefine level\nswitch costume to ( 1 v)\nclone at x: [400] y: [0]\nclone at x: [500] y: [300]\nclone at x: [750] y: [40]\nclone at x: [600] y: [40]\nclone at x: [750] y: [400]\nclone at x: [1300] y: [600]\nclone at x: [700] y: [100]\nclone at x: [300] y: [200]\nrepeat (2)\n    clone at x: [0] y: [320]\n    switch costume to ((costume [number v]) - (1))\nend\nclone at x: [0] y: [320]\nswitch costume to ((costume [number v]) - (1))\nclone at x: [200] y: [150]\nrepeat (3)\n    clone at x: [300] y: [0]\n    switch costume to ((costume [number v]) - (1))\nend\nclone at x: [-800] y: [-150]\nclone at x: [320] y: [0]\nswitch costume to (0 v)\nclone at x: [320] y: [0]\nswitch costume to ( 9 v)\nclone at x: [600] y: [150]\nswitch costume to (spike v)\nclone at x: [350] y: [210]\nclone at x: [-100] y: [210]\nclone at x: [320] y: [210]\nclone at x: [500] y: [600]\nclone at x: [380] y: [100]\nclone at x: [850] y: [830]\nclone at x: [455] y: [-20]\nclone at x: [600] y: [50]\nclone at x: [600] y: [60]\nclone at x: [600] y: [60]\n\nwhen I receive [game on v]\ngo to [back v] layer\n\nwhen flag clicked\nhide\n\n@flag\n\nwhen I receive [move v]\npozisyon ((x) - (scrollx)) ((y) - (scrolly))\nif <touching (player v)?> then\n    if <(sound effects) = [1]> then\n        start sound [Connect v]\n    end\n    change [number v] by (1)\n    set [pozisyon xx v] to (x)\n    set [pozisyon yy v] to ((16) + (y))\n    delete this clone\nend\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (flag 1 v)\nif <(number) = [0]> then\n    clone at x: [1160] y: [395]\nend\nif <[2] > (number)> then\n    clone at x: [2362] y: [416]\nend\nif <[3] > (number)> then\n    clone at x: [4023] y: [1425]\nend\nif <[4] > (number)> then\n    clone at x: [5153] y: [1526]\nend\nif <[5] > (number)> then\n    clone at x: [5300] y: [2761]\nend\nif <[6] > (number)> then\n    clone at x: [7004] y: [2837]\nend\nif <[7] > (number)> then\n    clone at x: [8379] y: [4197]\nend\nif <[8] > (number)> then\n    clone at x: [9424] y: [5040]\nend\nif <[9] > (number)> then\n    clone at x: [12000] y: [5279]\nend\nset [x v] to [-99999]\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\nif <<(y position) = (y)> and <(x position) = (x)>> 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\nwhen flag clicked\nhide\n\n@jump\n\nwhen I receive [move v]\npozisyon ((x) - (scrollx)) ((y) - (scrolly))\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (flag 1 v)\nclone at x: [533] y: [96]\nclone at x: [1699] y: [327]\nclone at x: [1872] y: [327]\nswitch costume to (1 v)\nclone at x: [4300] y: [1429]\nswitch costume to (flag 1 v)\nclone at x: [7100] y: [2845]\nclone at x: [7192] y: [3026]\nclone at x: [7092] y: [3236]\nset [x v] to [-99999]\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\nif <<(y position) = (y)> and <(x position) = (x)>> 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\nwhen flag clicked\nhide\n\n@enemy\n\nwhen I receive [move v]\npozisyon ((x) - (scrollx)) ((y) - (scrolly))\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nset [number 2 v] to [0]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (lkl v)\nclone at x: [2195] y: [410] costume number: [1]\nclone at x: [2303] y: [410] costume number: [2]\nclone at x: [390] y: [220] costume number: [3]\nclone at x: [3115] y: [845] costume number: [4]\nclone at x: [4301] y: [1450] costume number: [5]\nclone at x: [5649] y: [2643] costume number: [6]\nclone at x: [5949] y: [2643] costume number: [7]\nclone at x: [6249] y: [2643] costume number: [6]\nclone at x: [6835] y: [2838] costume number: [2]\nclone at x: [6945] y: [2838] costume number: [1]\nclone at x: [6725] y: [2838] costume number: [1]\nclone at x: [7225] y: [3497] costume number: [8]\nclone at x: [8292] y: [4211] costume number: [13]\nclone at x: [8777] y: [4300] costume number: [14]\nclone at x: [8630] y: [4450] costume number: [14]\nclone at x: [8777] y: [4600] costume number: [14]\nclone at x: [8630] y: [4750] costume number: [14]\nclone at x: [8777] y: [4900] costume number: [14]\nclone at x: [9200] y: [5019] costume number: [15]\nclone at x: [9486] y: [5189] costume number: [16]\nclone at x: [9596] y: [5189] costume number: [17]\nclone at x: [9706] y: [5189] costume number: [18]\nclone at x: [9816] y: [5189] costume number: [19]\nclone at x: [11391] y: [5197] costume number: [20]\nset [x v] to [-99999]\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\nif <<(y position) = (y)> and <(x position) = (x)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine clone at x: (x) y: (y) costume number: (number)\nswitch costume to (number)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\npoint in direction (90)\nif <(costume [number v]) = [17]> then\n    wait (0.3) seconds\nend\nif <(costume [number v]) = [18]> then\n    wait (0.6) seconds\nend\nif <(costume [number v]) = [19]> then\n    wait (0.9) seconds\nend\nif <(costume [number v]) = [4]> then\n    wait (2) seconds\nend\nif <(costume [number v]) = [5]> then\n    set rotation style [all around v]\nend\ngo to [back v] layer\ngo [forward v] (2) layers\nforever\n    if <(costume [number v]) = [1]> then\n        repeat (31)\n            change [y v] by (-2)\n        end\n        repeat (31)\n            change [y v] by (2)\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        repeat (31)\n            change [y v] by (2)\n        end\n        repeat (31)\n            change [y v] by (-2)\n        end\n    end\n    if <(costume [number v]) = [3]> then\n        repeat (72)\n            change [y v] by (-1)\n        end\n        repeat (72)\n            change [y v] by (1)\n        end\n    end\n    if <<(costume [number v]) = [4]> or <(costume [number v]) = [8]>> then\n        set rotation style [left-right v]\n        point in direction (90)\n        repeat (250)\n            change [x v] by (-1)\n        end\n        point in direction (-90)\n        repeat (250)\n            change [x v] by (1)\n        end\n    end\n    if <(costume [number v]) = [5]> then\n        repeat (31)\n            change [y v] by (-3)\n        end\n        repeat (31)\n            change [y v] by (3)\n        end\n    end\n    if <<(costume [number v]) = [7]> or <(costume [number v]) = [6]>> then\n        set [fall 1 v] to [13]\n        point in direction (-90)\n        repeat (10)\n            turn right (18) degrees\n        end\n        repeat (52)\n            change [y v] by (fall 1)\n            change [fall 1 v] by (-0.25)\n        end\n        repeat (10)\n            turn right (18) degrees\n        end\n        repeat (52)\n            change [y v] by (fall 1)\n            change [fall 1 v] by (-0.25)\n        end\n        change [y v] by (fall 1)\n    end\n    if <(costume [number v]) = [13]> then\n        repeat (5)\n            change [y v] by (-24)\n        end\n        wait (1.3) seconds\n        repeat (5)\n            change [y v] by (24)\n        end\n        wait (1.3) seconds\n    end\n    if <(costume [number v]) = [14]> then\n        wait (0.8) seconds\n        turn right (70) degrees\n    end\n    if <(costume [number v]) = [15]> then\n        repeat (55)\n            change [x v] by (3)\n        end\n        repeat (55)\n            change [x v] by (-3)\n        end\n    end\n    if <<<(costume [number v]) = [16]> or <(costume [number v]) = [17]>> or <<(costume [number v]) = [18]> or <(costume [number v]) = [19]>>> then\n        repeat (55)\n            change [y v] by (-2)\n        end\n        repeat (55)\n            change [y v] by (2)\n        end\n    end\n    if <(costume [number v]) = [20]> then\n        repeat (5)\n            change [y v] by (23)\n        end\n        wait (2) seconds\n        repeat (5)\n            change [y v] by (-23)\n        end\n        wait (2) seconds\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [8]> then\n        repeat (4)\n            next costume\n            wait (0.1) seconds\n        end\n        repeat (4)\n            switch costume to ((costume [number v]) - (1))\n            wait (0.1) seconds\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@pink\n\nwhen I receive [move v]\npozisyon ((x) - (scrollx)) ((y) - (scrolly))\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nclone at x: [2472] y: [415]\nbroadcast (pinky thingy v)\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\nif <<(y position) = (y)> and <(x position) = (x)>> 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 flag clicked\nhide\n\nwhen I receive [reset v]\nstop [other scripts in sprite v]\n\nwhen I receive [pinky thingy v]\ngo to [back v] layer\nforever\n    point in direction (45)\n    repeat (250)\n        broadcast (up v)\n        change [x v] by (1)\n        change [y v] by (1)\n    end\n    repeat (250)\n        broadcast (down v)\n        change [x v] by (-1)\n        change [y v] by (-1)\n    end\nend\n\n@move\n\nwhen I receive [move v]\npozisyon ((x) - (scrollx)) ((y) - (scrolly))\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to ( 1 v)\nclone at x: [3260] y: [818]\nclone at x: [3470] y: [818]\nclone at x: [3680] y: [818]\nclone at x: [3832] y: [916]\nswitch costume to ( 4 v)\nclone at x: [7702] y: [3465]\nclone at x: [8700] y: [4216]\nset [x v] to [-99999]\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\nif <<(y position) = (y)> and <(x position) = (x)>> 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\nwhen I start as a clone\ngo to [back v] layer\nif <(costume [number v]) = [4]> then\n    wait until <(distance to [player v]) < [80]>\n    wait (0.2) seconds\nend\nif <(costume [number v]) = [5]> then\n    wait until <(distance to [player v]) < [115]>\n    wait (0.2) seconds\nend\nforever\n    if <<(costume [number v]) = [1]> or <(costume [number v]) = [3]>> then\n        repeat (90)\n            change [y v] by (-2)\n        end\n        repeat (90)\n            change [y v] by (2)\n        end\n    end\n    if <(costume [number v]) = [2]> then\n        repeat (90)\n            change [y v] by (2)\n        end\n        repeat (90)\n            change [y v] by (-2)\n        end\n    end\n    if <(costume [number v]) = [4]> then\n        repeat (250)\n            change [y v] by (2)\n        end\n        wait (1) seconds\n        repeat (250)\n            change [y v] by (-2)\n        end\n        wait (1) seconds\n    end\n    if <(costume [number v]) = [5]> then\n        repeat (370)\n            change [y v] by (2)\n        end\n        wait (2) seconds\n        repeat (370)\n            change [y v] by (-2)\n        end\n        wait (2) seconds\n    end\nend\n\nwhen flag clicked\nhide\n\n@platform2\n\nwhen I receive [move v]\npozisyon ((x) - (scrollx)) ((y) - (scrolly))\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nlevel\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\nif <<(y position) = (y)> and <(x position) = (x)>> 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\ndefine level\nswitch costume to (1 v)\ngo to [back v] layer\nclone at x: [400] y: [0]\nclone at x: [500] y: [300]\nclone at x: [750] y: [40]\nclone at x: [600] y: [40]\nclone at x: [750] y: [400]\nclone at x: [1300] y: [600]\nclone at x: [700] y: [100]\nclone at x: [300] y: [200]\nrepeat (2)\n    clone at x: [0] y: [320]\n    switch costume to ((costume [number v]) - (1))\nend\nclone at x: [0] y: [320]\nswitch costume to ((costume [number v]) - (1))\nclone at x: [200] y: [150]\nrepeat (3)\n    clone at x: [300] y: [0]\n    switch costume to ((costume [number v]) - (1))\nend\nclone at x: [-800] y: [-150]\nclone at x: [320] y: [0]\nswitch costume to (11 v)\nclone at x: [320] y: [0]\nswitch costume to (10 v)\nclone at x: [600] y: [150]\nswitch costume to (12 v)\nclone at x: [350] y: [210]\nclone at x: [-100] y: [210]\nclone at x: [320] y: [210]\nclone at x: [500] y: [600]\nclone at x: [380] y: [100]\nclone at x: [850] y: [830]\nclone at x: [455] y: [-20]\nclone at x: [600] y: [50]\nclone at x: [600] y: [60]\nclone at x: [600] y: [60]\nclone at x: [600] y: [60]\n\nwhen flag clicked\nhide\n\n@scroll\n\nwhen I receive [move v]\ngo to [back v] layer\ngo [forward v] (1) layers\npozisyon (round (((x) - (scrollx)) / (3))) (round (((y) - (scrolly)) / (3)))\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\n\nwhen I receive [game on v]\nswitch costume to (dot v)\nset size to (6353) %\nswitch costume to (scroll v)\n\nwhen flag clicked\nhide\n\n@moon\n\nwhen I receive [move v]\ngo to [back v] layer\npozisyon (round (((x) - (scrollx)) / (40))) (round (((y) - (scrolly)) / (600)))\n\nwhen I receive [flag v]\nshow\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\n\ndefine pozisyon (x) (y)\ngo to x: (x) y: (y)\n\nwhen flag clicked\nhide\n\n@the end\n\nwhen I receive [the end v]\nshow\nset y to (44)\nswitch costume to (done v)\nrepeat (4)\n    change y by (-11)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [game on v]\nhide\n\n@story\n\nwhen I receive [game on v]\nhide\n\nwhen I receive [next v]\nif <(costume [number v]) = [3]> then\n    broadcast (end of story v)\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\n    stop [other scripts in sprite v]\n    hide\nelse\n    next costume\nend\n\nwhen I receive [end intro v]\nset [ghost v] effect to (0)\nshow\nswitch costume to (1 v)\n\n@next\n\nwhen I receive [next v]\nset size to (100) %\nshow\nset [ghost v] effect to (0)\nwait (0.5) seconds\nforever\n    repeat (20)\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (0)\n            repeat (5)\n                change size by (8)\n            end\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (5)\n                change size by (-8)\n            end\n        end\n        change [ghost v] effect by (5)\n    end\n    repeat (20)\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (0)\n            repeat (5)\n                change size by (8)\n            end\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (5)\n                change size by (-8)\n            end\n        end\n        change [ghost v] effect by (-5)\n    end\nend\n\nwhen I receive [end of story v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [end intro v]\nforever\n    wait until <<mouse down?> and <touching (mouse-pointer v)?>>\n    wait until <not <mouse down?>>\n    stop [other scripts in sprite v]\n    broadcast (next v)\nend\n\nwhen I receive [end intro v]\ngo to [front v] layer\nset size to (100) %\nshow\nset [ghost v] effect to (0)\nwait (0.5) seconds\nforever\n    repeat (20)\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (0)\n            repeat (5)\n                change size by (8)\n            end\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (5)\n                change size by (-8)\n            end\n        end\n        change [ghost v] effect by (5)\n    end\n    repeat (20)\n        if <touching (mouse-pointer v)?> then\n            set [ghost v] effect to (0)\n            repeat (5)\n                change size by (8)\n            end\n            wait until <not <touching (mouse-pointer v)?>>\n            repeat (5)\n                change size by (-8)\n            end\n        end\n        change [ghost v] effect by (-5)\n    end\nend\n\n@button\n\nwhen I receive [end of story v]\nshow\ncreate clones\nhide\n\nwhen flag clicked\nhide\n\ndefine create clones\ngo to x: (0) y: (0)\nswitch costume to (3 v)\ncreate clone of (_myself_ v)\ngo to x: (0) y: (-40)\nswitch costume to (5 v)\ncreate clone of (_myself_ v)\ngo to x: (0) y: (-130)\nswitch costume to (2 v)\ncreate clone of (_myself_ v)\n\nwhen I receive [game on v]\ndelete this clone\n\nwhen I receive [game on v]\nhide\nstop [other scripts in sprite v]\nif <(effects) = [1]> then\n    wait (0.2) seconds\n    set [sound effects v] to [0]\nend\n\nwhen I start as a clone\nset [effects v] to [0]\nset [sound effects v] to [1]\nforever\n    if <(costume [number v]) = [2]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait until <not <mouse down?>>\n            set [effects v] to [1]\n            set [sound effects v] to [0]\n            switch costume to (4 v)\n        end\n    end\n    if <(costume [number v]) = [4]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait until <not <mouse down?>>\n            broadcast (- v)\n            switch costume to (6 v)\n        end\n    end\n    if <(costume [number v]) = [1]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait until <not <mouse down?>>\n            broadcast (game on v)\n        end\n    end\n    if <(costume [number v]) = [3]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait until <not <mouse down?>>\n            set [sound effects v] to [1]\n            switch costume to (3 v)\n        end\n    end\n    if <(costume [number v]) = [5]> then\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            wait until <not <mouse down?>>\n            broadcast (+ v)\n            switch costume to (5 v)\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [1]> then\n        repeat until <not <touching (mouse-pointer v)?>>\n            repeat (15)\n                change size by (3)\n            end\n            repeat (15)\n                change size by (-3)\n            end\n        end\n    end\nend\n\n@Button3\n\nwhen flag clicked\nhide\n\nwhen I receive [game on v]\nshow\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        wait until <not <mouse down?>>\n        set [sound effects v] to [0]\n        broadcast (game on v)\n    end\nend\n\nwhen I receive [game on v]\nset size to (100) %\nset [ghost v] effect to (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (140) %\n        wait until <not <touching (mouse-pointer v)?>>\n        set size to (100) %\n    end\nend\n\nwhen I receive [game on v]\nwait (0.1) seconds\nset [sound effects v] to [1]\n\n@thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    set [timer-2 v] to (timer)\n    go to [front v] layer\nend\n\nwhen [timer v] > (timer-2)\nhide variable [error v]\nhide variable [timer v]\n\n@intro\n\nwhen flag clicked\nhide variable [error v]\nhide variable [☁ high score v]\nhide variable [timer v]\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nswitch costume to (1 v)\nset size to (100) %\ncreate clone of (_myself_ v)\nswitch costume to (3 v)\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    start sound [Low Whoosh v]\n    go to [front v] layer\n    set size to (6) %\n    set [figure v] to [23]\n    repeat (19)\n        change size by (figure)\n        change [figure v] by (-2)\n    end\n    wait (0.01) seconds\n    switch costume to (2 v)\n    create clone of (_myself_ v)\n    switch costume to (1 v)\n    wait (1.55) seconds\n    set [figure v] to [16]\n    repeat (16)\n        change size by (figure)\n        change [figure v] by (-2)\n    end\n    change size by (figure)\n    wait (1.5) seconds\n    broadcast (end intro v)\nend\nif <(costume [number v]) = [2]> then\n    set size to (400) %\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    start sound [Low Whoosh v]\n    repeat (10)\n        change size by (-30)\n        change [ghost v] effect by (-10)\n    end\n    start sound [intro v]\n    create clones\n    wait (1.3) seconds\n    set [effects v] to [16]\n    repeat (16)\n        change size by (effects)\n        change [effects v] by (-2)\n    end\n    change size by (effects)\nend\nif <<[3] < (costume [number v])> and <not <(costume [number v]) = [11]>>> then\n    set size to (40) %\n    go to [front v] layer\n    go [backward v] (2) layers\n    point in direction (pick random (180) to (-180))\n    repeat (10)\n        change [ghost v] effect by (10)\n        move (13) steps\n    end\n    delete this clone\nend\n\ndefine create clones\nrepeat (30)\n    switch costume to (pick random (4) to (10))\n    create clone of (_myself_ v)\nend\nswitch costume to (2 v)\n\nwhen I receive [end intro v]\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\n\nwhen I receive [end intro v]\nrepeat (20)\n    change [ghost v] effect by (5)\n    stop [other scripts in sprite v]\nend\ndelete this clone\n\n