Rescue -Grassland- || A platformer || 

Instructions: ---------------------------------------------------------------------\nUse arrows to move (↑ to jump, ← & →)\n---------------------------------------------------------------------\nTouch the right wall to get to the next level\n---------------------------------------------------------------------

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Sprite3\n\nwhen I receive [go v]\nshow\nset [level v] to [1]\nforever\n    change [yv v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        if <(water) = [0]> then\n            change [xv v] by (0.7)\n        end\n    end\n    go to [front v] layer\n    if <key (left arrow v) pressed?> then\n        if <(water) = [0]> then\n            change [xv v] by (-0.7)\n        end\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (1)\n                    end\n                    if <touching color (#000000)?> then\n                        change x by ((Xv) * (-1))\n                        change x by (-1)\n                        change y by (-5)\n                        change x by (1)\n                        if <key (up arrow v) pressed?> then\n                            if <(Xv) < [0]> then\n                                set [yv v] to [10]\n                                set [xv v] to [10]\n                            else\n                                set [yv v] to [10]\n                                set [xv v] to [-10]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (Yv)\n    if <touching color (#000000)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <key (up arrow v) pressed?> then\n        if <touching color (#000000)?> then\n            if <(water) = [0]> then\n                set [yv v] to [8]\n            end\n        end\n    end\n    if <touching color (#ffff00)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [20]\n        end\n    end\n    change y by (1)\n    if <touching color (#003fff)?> then\n        broadcast (NextLevel v)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [nextlevel v]\ngo to x: (-200) y: (0)\ngo to [front v] layer\n\nwhen I receive [nextlevel v]\n\nwhen I receive [go v]\nforever\n    if <touching color (#00ffff)?> then\n        set [yv v] to [-1]\n        set [water v] to [1]\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [4]\n        end\n        if <key (right arrow v) pressed?> then\n            change [xv v] by (0.3)\n        end\n        if <key (left arrow v) pressed?> then\n            change [xv v] by (-0.3)\n        end\n    else\n        set [water v] to [0]\n    end\nend\n\nwhen I receive [go v]\nforever\n    if <(costume [number v]) = [2]> then\n        if <touching color (#ff0000)?> then\n            go to x: (-200) y: (0)\n        else\n        end\n    else\n        if <touching color (#002699)?> then\n            go to x: (-200) y: (0)\n        else\n        end\n    end\n    if <touching color (#006622)?> then\n        go to x: (-200) y: (0)\n    else\n    end\nend\n\nwhen [space v] key pressed\nnext costume\n\nif <(costume [number v]) = [2]> then\nelse\n    set [yv v] to [6]\n    set [xv v] to [8]\nend\n\nif <(costume [number v]) = [2]> then\nelse\n    set [yv v] to [6]\n    set [xv v] to [-8]\nend\n\nif <(costume [number v]) = [2]> then\nelse\n    set [yv v] to [7]\nend\n\nwhen flag clicked\nhide\nswitch costume to (cat1-a v)\ngo to x: (-200) y: (0)\n\nwhen I receive [new costume v]\nnext costume\n\n@Sprite2\n\n@Sprite4\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\nbroadcast (go v)\n\nwhen I receive [nextlevel v]\nnext costume\n\n@sound\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\ngo [backward v] (10) layers\nhide\nstart sound [Ashes Remain - On My Own \[HD Animated Lyrics!\].mp3 v]\n\n@Sprite1\n\nwhen flag clicked\nhide\n\n