Penguin: A Platformer

Instructions: *******************ʀᴇᴀᴅ ɪɴꜱᴛʀᴜᴄᴛɪᴏɴꜱ*************************\nʙᴀᴄᴋꜱᴛᴏʀʏ:\nᴀ ᴘᴇɴɢᴜɪɴ ᴀɴᴅ ʜᴇʀ/ʜɪꜱ ꜱɪꜱᴛᴇʀꜱ ᴡᴇʀᴇ ᴘʟᴀʏɪɴɢ ʜɪᴅᴇ ᴀɴᴅ ꜱᴇᴇᴋ!! ꜱᴏᴜɴᴅꜱ ꜰᴜɴ, ʀɪɢʜᴛ? ɴᴏᴛ ᴇxᴀᴄᴛʟʏ. ᴛʜɪꜱ ᴘᴇɴɢᴜɪɴ ɢᴏᴛ ʟᴏꜱᴛ (ᴛʜᴀɴᴋꜱ ᴛᴏ ʜɪꜱ/ʜᴇʀ ɢʀᴇᴀᴛ ꜱᴇɴꜱᴇ ᴏꜰ ᴅɪʀᴇᴄᴛɪᴏɴ xᴅ) ᴀɴᴅ ʜᴀꜱ ᴛᴏ ꜰɪɴᴅ ʜᴇʀ/ʜɪꜱ ᴡᴀʏ ʜᴏᴍᴇ. ᴄᴀɴ ʏᴏᴜ ʜᴇʟᴘ ʜɪᴍ/ʜᴇʀ ɢᴇᴛ ʜᴏᴍᴇ?\n*************************************************************\nʜᴏᴘᴇ ʏᴏᴜ ʟɪᴋᴇ ɪᴛ!! ᴀʟʟ ʟᴇᴠᴇʟꜱ ᴀʀᴇ ᴘᴏꜱꜱɪʙʟᴇ.  ᴛʜᴇ ꜱᴇqᴜᴇʟ ᴛᴏ ᴛʜɪꜱ ᴘʀᴏᴊᴇᴄᴛ ɪs ʜᴇʀᴇ: https://scratch.mit.edu/projects/413551531/

@Stage\n\nwhen I receive [game over v]\nswitch backdrop to (backdrop2 v)\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nwait (2) seconds\nswitch backdrop to (backdrop3 v)\nwait (4.7) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nclear graphic effects\nswitch backdrop to (backdrop2 v)\n\n@ground\n\nwhen flag clicked\nset [timer v] to [0]\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (level1 v)\n\nwhen backdrop switches to [backdrop3 v]\ngo to [back v] layer\nhide\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [12]> then\n        broadcast (house v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [12]> then\n        broadcast (Hide v)\n    end\nend\n\nwhen backdrop switches to [backdrop1 v]\nhide variable [timer v]\n\nwhen backdrop switches to [backdrop2 v]\nshow variable [timer v]\n\nwhen backdrop switches to [backdrop3 v]\nhide variable [timer v]\n\nwhen backdrop switches to [backdrop2 v]\nrepeat until <(costume [number v]) = [12]>\n    change [timer v] by (1)\n    wait (1) seconds\nend\n\n@Player\n\nwhen flag clicked\ngo to x: (-31) y: (-24)\n\nwhen backdrop switches to [backdrop1 v]\nhide variable [deaths v]\nhide variable [level v]\nhide\ngo to x: (-31) y: (-24)\n\nwhen backdrop switches to [backdrop2 v]\nshow variable [deaths v]\nshow variable [level v]\ngo to x: (-31) y: (-24)\nshow\n\nwhen flag clicked\nset [level v] to [1]\nforever\n    go to [front v] layer\nend\n\nwhen I receive [sm v]\nsay [Yay!! I got back home!!] for (2) seconds\nsay [Wait...but why does the ground feel wet?? Oh no...the ice caps are melting!!!] for (4) seconds\nbroadcast (sequel v)\n\nwhen flag clicked\nforever\n    play sound [ piano music v] until done\nend\n\nwhen I receive [skip v]\nwait (0.2) seconds\nbroadcast (NEXT LEVEL v)\ngo to x: (-18) y: (-13)\nchange [level v] by (1)\n\nwhen backdrop switches to [backdrop2 v]\nset [deaths v] to [0]\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (-1)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [x v] by (1)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (1)\n    end\n    if <touching (ground v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            set [y v] to [17]\n            if <(x) > [0]> then\n                set [x v] to [-10]\n            else\n                set [x v] to [10]\n            end\n        else\n            set [x v] to [0]\n        end\n    end\n    change y by (y)\n    if <touching (ground v)?> then\n        change y by ((y) - ((y) * (2)))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> and <touching (ground v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <(x position) > [400]> then\n        broadcast (NEXT LEVEL v)\n        start sound [Magic Spell v]\n        go to x: (-18) y: (-13)\n        change [level v] by (1)\n    end\n    if <touching color (#7bbae3)?> then\n        set [y v] to [22]\n    end\n    if <touching (dangers v)?> then\n        go to x: (-26) y: (-12)\n        change [deaths v] by (1)\n    end\n    if <touching (sprite1 v)?> then\n        set [y v] to [22]\n    end\nend\n\n@Dangers\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen flag clicked\nforever\n    if <[] = []> then\nend\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen flag clicked\nforever\n    if <(backdrop [number v]) = [12]> then\n        broadcast (house v)\n    end\nend\n\nwhen I receive [game done v]\nforever\n    if <key (a v) pressed?> then\n        forever\n            switch costume to (costume10 v)\n        end\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [restart v]\nshow\nswitch costume to (costume1 v)\n\n@Directions!!\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen backdrop switches to [backdrop3 v]\nhide\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [12]> then\n        forever\n            switch costume to (costume12 v)\n        end\n    end\nend\n\nwhen I receive [restart v]\nshow\nswitch costume to (costume1 v)\n\n@Sprite1\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\n@Snowflake4\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (120)\nforever\n    change y by (-4)\n    if <(y position) < [-120]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@Snowflake2\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (160)\nforever\n    change y by (-7)\n    if <(y position) < [-170]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (135)\nforever\n    change y by (-4)\n    if <(y position) < [-140]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake5\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-50]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake6\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (180)\nforever\n    change y by (-5)\n    if <(y position) < [-170]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake7\n\nwhen flag clicked\ngo to (random position v)\nset y to (-146)\nforever\n    change y by (-5)\n    if <(y position) < [-170]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\n@Snowflake8\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (168)\nforever\n    change y by (-5)\n    if <(y position) < [-146]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake9\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\n@Snowflake10\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake11\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake12\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\n@Snowflake13\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake14\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake15\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake3\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Sprite2\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen I receive [house v]\nshow\n\nsay [Yay!! I got back home!!] for (2) seconds\nsay [Wait..But the ice caps are melting...] for (2) seconds\nbroadcast (sequel v)\n\nsay [Yay!! I got back home!!] for (2) seconds\nsay [Wait..But the ice caps are melting...] for (2) seconds\nbroadcast (sequel v)\n\nsay [Yay!! I got back home!!] for (2) seconds\nsay [Wait..But the ice caps are melting...] for (2) seconds\nbroadcast (sequel v)\n\nsay [Yay!! I got back home!!] for (2) seconds\nsay [Wait..But the ice caps are melting...] for (2) seconds\nbroadcast (sequel v)\n\nsay [Yay!! I got back home!!] for (2) seconds\nsay [Wait..But the ice caps are melting...] for (2) seconds\nbroadcast (sequel v)\n\nwhen I receive [restart v]\nhide\n\nwhen flag clicked\nforever\n    if <touching (player v)?> then\n        broadcast (sm v)\n        stop [this script v]\n    end\nend\n\n@Sprite3\n\nwhen I receive [sequel v]\nshow\nset [username v] to (username)\nshow variable [username v]\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen flag clicked\nhide variable [username v]\n\n@Sprite4\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen I receive [m888 v]\nhide\n\nwhen I receive [message1 v]\nshow\nwait (1) seconds\nbroadcast (m2 v)\nrepeat (4)\n    change [ghost v] effect by (25)\nend\n\n@Sprite5\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen backdrop switches to [backdrop3 v]\nbroadcast (m888 v)\nshow\nswitch costume to (costume1 v)\npoint in direction (90)\nrepeat (2)\n    switch costume to (costume2 v)\n    play sound [Boing v] until done\n    wait (0.5) seconds\n    switch costume to (costume3 v)\n    play sound [Boing v] until done\n    wait (0.5) seconds\nend\nswitch costume to (costume1 v)\nbroadcast (message1 v)\nplay sound [Boing v] until done\n\nwhen backdrop switches to [backdrop2 v]\nhide\n\nwhen I receive [m2 v]\nshow\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Snowflake16\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake17\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake18\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake19\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake20\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@Snowflake21\n\nwhen backdrop switches to [backdrop3 v]\nshow\n\nwhen flag clicked\ngo to (random position v)\nset y to (100)\nforever\n    change y by (-5)\n    if <(y position) < [-100]> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (ground v)?> then\n        go to (random position v)\n        set y to (180)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop1 v]\nshow\n\n@SB\n\nwhen backdrop switches to [backdrop2 v]\nshow\n\nwhen backdrop switches to [backdrop3 v]\nhide\n\nwhen backdrop switches to [backdrop1 v]\nhide\n\nwhen flag clicked\nshow\n\nwhen this sprite clicked\nbroadcast (Skip v)\n\nwhen I receive [hide v]\nhide\n\nwhen flag clicked\nswitch costume to (skip button v)\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (skip button2 v)\n    else\n        switch costume to (skip button v)\n    end\nend\n\n@Like+Fave\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (50)\nhide\nset [ghost v] effect to (100)\nwait (pick random (11) to (16)) seconds\nforever\n    if <<(Stared?) = [1]> and <(Loved?) = [1]>> then\n        stop [this script v]\n    end\n    show\n    repeat until <(y position) < [0.2]>\n        change [ghost v] effect by (-10)\n        change y by (((0) - (y position)) / (7))\n    end\n    wait (4) seconds\n    repeat until <(y position) > [50]>\n        change [ghost v] effect by (10)\n        change y by (((y position) + (5)) / (5))\n    end\n    hide\n    wait (pick random (20) to (40)) seconds\nend\n\nwhen I receive [alert v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nshow\nswitch costume to (costume2 v)\ngo to x: (0) y: (50)\nrepeat until <(y position) < [0.2]>\n    change [ghost v] effect by (-10)\n    change y by (((0) - (y position)) / (7))\nend\nwait (4) seconds\nrepeat until <(y position) > [50]>\n    change [ghost v] effect by (10)\n    change y by (((y position) + (5)) / (5))\nend\nhide\n\n