platformer 2

Instructions: use arrows to control the cat and avoid red\nAll rude comments will be reported.\na little bit laggy if there are multiple people playing it.\nlove to limit lag (hee hee)

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Scratch Cat\n\nwhen flag clicked\nswitch backdrop to (rays v)\nswitch costume to (stand v)\nforever\n    point in direction (90)\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [xv v] by (1)\n        next costume\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        change [xv v] by (-1)\n        next costume\n    end\n    if <[225] < (x position)> then\n        switch backdrop to (next backdrop v)\n        go to x: (-198) y: (-21)\n    end\nend\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\ngo to x: (-205) y: (-56)\nset [level: v] to [1]\nset [xv v] to [0]\nset [yv v] to [0]\nforever\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                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\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 <touching color (#000000)?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <touching color (#ff0000)?> then\n        go to x: (-205) y: (-56)\n    end\n    if <touching color (#cc99ff)?> then\n        go to x: (-205) y: (-56)\n        broadcast (changebd v)\n    end\n    if <touching color (#99ffff)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [5]\n        else\n            set [yv v] to [-5]\n        end\n    end\n    if <touching color (#ff9400)?> then\n        set [yv v] to [23]\n    end\n    if <key (r v) pressed?> then\n        go to x: (-205) y: (-56)\n    end\nend\n\nstart sound [boing v]\n\nwhen I receive [struvk v]\ngo to x: (-198) y: (21)\n\nwhen [space v] key pressed\ngo to x: (up) y: (-192)\nhide variable [up v]\n\nwhen [space v] key pressed\ngo to x: (-174) y: (48)\n\nwhen flag clicked\nplay sound [Josh A - No Chill \(Ft. MrTLexify\).mp3 v] until done\n\n@thumbnail\n\nwhen flag clicked\nforever\n    show\n    go to [front v] layer\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\nend\n\n