Explore | A scrolling platformer™

Instructions: Arrow keys to move.\n\nI am SO sorry that I couldn't get wall detection to work perfectly, I tried for over an hour to try to get it to work.\n\nAll levels are possible!

@Stage\n\nwhen flag clicked\nforever\n    play sound [bensound-adventure v] until done\nend\n\n@player_dude\n\nwhen flag clicked\ngo to [front v] layer\nset rotation style [left-right v]\npoint in direction (90)\nswitch backdrop to (backdrop1 v)\nset x to (0)\nset y to (100)\nset [xv v] to [0]\nset [yv v] to [0]\nset [scrollx v] to [660]\nset [scrollxv v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [scrollxv v] by (-1)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        change [scrollxv v] by (1)\n        point in direction (-90)\n    end\n    set [scrollxv v] to ((scrollxv) * (0.9))\n    change [scrollx v] by (scrollxv)\n    if <<touching color (#43bb25)?> or <touching color (#977923)?>> then\n        change y by (1)\n        if <<touching color (#43bb25)?> or <touching color (#977923)?>> then\n            change y by (1)\n            if <<touching color (#43bb25)?> or <touching color (#977923)?>> then\n                change y by (1)\n                if <<touching color (#43bb25)?> or <touching color (#977923)?>> then\n                    change y by (1)\n                    if <<touching color (#43bb25)?> or <touching color (#977923)?>> then\n                        change y by (1)\n                        if <<touching color (#43bb25)?> or <touching color (#977923)?>> then\n                            change [scrollx v] by ((scrollxv) * (-2))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <[0] > (scrollxv)> then\n                                    set [scrollxv v] to [7]\n                                else\n                                    set [scrollxv v] to [-7]\n                                end\n                                set [yv v] to [14]\n                            else\n                                set [scrollxv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <touching color (#664b00)?> then\n        set [yv v] to [20]\n    end\n    if <touching color (#ccfdec)?> then\n        set [scrollxv v] to [-25]\n    end\n    if <touching color (#b386ff)?> then\n        set [scrollxv v] to [12]\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<touching color (#46b925)?> or <touching color (#977923)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#43bb25)?> or <touching color (#977923)?>> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\n    if <<<touching color (#ff8686)?> or <touching color (#ff5555)?>> or <(y position) < [-150]>> then\n        set y to (100)\n        set [scrollx v] to [660]\n        set [scrollxv v] to [0]\n    end\n    if <touching color (#5c0000)?> then\n        broadcast (next level v)\n        set [scrollx v] to [660]\n        set [scrollxv v] to [0]\n        set y to (100)\n    end\nend\n\n@ground\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    set x to (scrollX)\nend\n\nwhen I receive [next level v]\nnext costume\n\n