Guinea Pig Platformer
@Stage\n\n@Player\n\nwhen I receive [start 2 v]\nset volume to (30) %\nshow\ngo to x: (-175) y: (-91)\nswitch costume to (guinea pig 2 v)\nswitch backdrop to (backdrop1 v)\nset [x v] to [0]\nset [y v] to [0]\nforever\n    change [y v] by (-1)\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n        switch costume to (guinea pig 2 v)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n        switch costume to (guinea pig 1 v)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching color (#00ff5d)?> then\n        change y by (1)\n    end\n    if <touching color (#00ff5d)?> then\n        change y by (1)\n    end\n    if <touching color (#00ff5d)?> then\n        change y by (1)\n    end\n    if <touching color (#00ff5d)?> then\n        change y by (1)\n    end\n    if <touching color (#00ff5d)?> then\n        change y by (-4)\n        change x by ((X) * (-1))\n        if <<key (up arrow v) pressed?> or <key (space v) pressed?>> 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 color (#00ff5d)?> 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?> or <key (space v) pressed?>> and <touching color (#00ff5d)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    if <touching (carrot v)?> then\n        go to x: (-175) y: (-91)\n        next backdrop\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-175) y: (-91)\n    end\n    if <(backdrop [name v]) = [Won!]> then\n        hide\n    end\n    if on edge, bounce\n    point in direction (90)\nend\n\nwhen flag clicked\nhide\nswitch backdrop to (backdrop8 v)\nbroadcast (Start v)\n\nwhen I receive [start v]\nforever\n    play sound [The Guinea pig song \(128 kbps\) v] until done\nend\n\n@Carrot\n\nwhen I receive [start 2 v]\nforever\n    if <(backdrop [number v]) = [13]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen flag clicked\nhide\n\n@Sprite1\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    hide\n    reset timer\nend\n\nshow\ngo to [front v] layer\n\nwhen [timer v] > (0.01)\ngo to [front v] layer\nshow\n\n@Play 1\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\nswitch backdrop to (backdrop 12 v)\n\nwhen I receive [start 2 v]\nhide\n\n@Play 2\n\nwhen this sprite clicked\nbroadcast (Start 2 v)\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nshow\n\n
Use the arrow keys to move. Touch the carrot to be in the next level. Also don't touch the lava!