Penguin Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Chill v] until done\nend\n\n@Clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to x: (400) y: (pick random (60) to (160))\nswitch costume to (pick random (1) to (3))\nset size to (80) %\nchange [ghost v] effect by (pick random (25) to (75))\nrepeat until <(x position) < [-200]>\n    change x by (pick random (-1) to (-4))\nend\ndelete this clone\n\nwhen I receive [starty v]\nhide\ngo to [back v] layer\ngo [forward v] (3) layers\nwait (0.01) seconds\nforever\n    wait (1.5) seconds\n    create clone of (_myself_ v)\nend\n\n@Ground3\n\nwhen I receive [bad v]\nset [brightness v] effect to (100)\nwait (0.1) seconds\nset [brightness v] effect to (0)\n\nwhen I receive [bad v]\ngo to x: (1278) y: (511)\n\nwhen flag clicked\nhide\nforever\n    if <(y position) > [670]> then\n        broadcast (bad v)\n    end\nend\n\nwhen I receive [bad v]\ngo to x: (1362) y: (511)\n\nwhen I receive [starty v]\ngo to [front v] layer\nset [xv v] to [0]\nset [yv v] to [0]\nswitch costume to (costume2 v)\nset size to (600) %\nswitch costume to (costume1 v)\ngo to x: (1362) y: (510)\nshow\nbroadcast (levelStartSwitch v)\nforever\n    set [ghost v] effect to (0)\n    if <<<mouse down?> and <(mouse x) > [0]>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> then\n        if <not <<<mouse down?> and <(mouse x) < [0]>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n            set [xv v] to [8]\n            change x by ((-1) * (XV))\n        end\n    end\n    if <<<mouse down?> and <(mouse x) < [0]>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>> then\n        set [xv v] to [-8]\n        change x by ((-1) * (XV))\n    end\n    if <not <<<<mouse down?> and <(mouse x) > [0]>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> or <<<mouse down?> and <(mouse x) < [0]>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>>> then\n        set [xv v] to [0]\n    end\n    if <touching (player v)?> then\n        change y by (-1)\n        if <touching (player v)?> then\n            change y by (-1)\n            if <touching (player v)?> then\n                change y by (-1)\n                if <touching (player v)?> then\n                    change y by (-1)\n                    if <touching (player v)?> then\n                        change y by (-1)\n                        if <touching (player v)?> then\n                            change x by (XV)\n                            set [xv v] to [0]\n                            change y by (5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (1)\n    change y by (YV)\n    change [inair v] by (1)\n    if <touching (player v)?> then\n        set [inair v] to [0]\n        change y by ((YV) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (1)\n    if <<touching (player v)?> and <<key (up arrow v) pressed?> or <<<mouse down?> and <((mouse y) - (28)) > [50]>> or <key (w v) pressed?>>>> then\n        set [yv v] to [-20]\n    end\n    change y by (-1)\nend\n\nwhen flag clicked\nreset timer\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)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\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        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        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\n@Player\n\nwhen flag clicked\nhide\n\ndefine Typewriter Talk (speak this)\nset [talk v] to (username)\nset [count v] to [1]\nrepeat (length of (speak this))\n    set [talk v] to (join (talk) (letter (count) of (speak this)))\n    say (talk)\n    wait (0.01) seconds\n    change [count v] by (1)\nend\nwait (2) seconds\nsay []\n\nwhen I receive [starty v]\nset [ghost v] effect to (0)\nset [brightness v] effect to (0)\nset size to (100) %\npoint in direction (90)\nset [gravity v] to [0]\nswitch costume to (player v)\nset [velocity v] to [0]\nforever\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>>> then\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <<mouse down?> and <(mouse x) > [0]>>>>> then\n        point in direction (90)\n    end\n    if <touching color (#66ff77)?> then\n        set [gravity v] to [0]\n        if <<key (up arrow v) pressed?> or <<((mouse y) - (y position)) > [50]> or <key (w v) pressed?>>> then\n            switch costume to (player3 v)\n            change [gravity v] by (-13)\n        end\n    end\n    if <<key (down arrow v) pressed?> or <<<mouse down?> and <((mouse y) - (y position)) < [50]>> or <key (s v) pressed?>>> then\n        switch costume to (player2 v)\n    else\n        switch costume to (player v)\n    end\nend\n\nwhen I receive [starty v]\nshow\nTypewriter Talk [, Hi I am missing my parents can you help me?]\nwait (1) seconds\nTypewriter Talk [,  WASD, Arrow Keys, or  Mobile Controls to move.]\nwait (1) seconds\nTypewriter Talk [, I can crouch....]\nwait (3) seconds\nTypewriter Talk [, I am a baby penguin and I am missing my parents.]\nwait (3) seconds\nTypewriter Talk [, If I make it to the end I will find my parents.]\nwait (2) seconds\nTypewriter Talk [, Well, for now I am on my own.]\n\nwhen I receive [starty v]\nif <touching (player2 v)?> then\n    broadcast (bad v)\nend\n\n@Sprite1\n\nwhen flag clicked\nshow\n\nwhen I receive [starty v]\nhide\n\n@Sprite2\n\nwhen flag clicked\nshow\n\nwhen this sprite clicked\nbroadcast (STARTY v)\nhide\n\n@Sprite3\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen this sprite clicked\nnext costume\n\nwhen I receive [starty v]\nhide\n\n
Use the WASD keys or the arrow keys or mobile controls to move the player. \nYou are a baby penguin who lost her parents help her find her parents!\nCrouch is down arrow, s or click and hold down on player.