The Impossible Platformer

Instructions: ATTENTION: NOT IMPOSSIBLE.\n There are lots of glitches. DX

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\nforever\n    play sound [UnderTale Demo  Flowey's Theme.mp3 v] until done\nend\n\nswitch backdrop to (backdrop25 v)\n\nwhen I receive [message v]\nwait until <([x position v] of [sprite1 v]) > [260]>\nbroadcast (message6 v)\nrepeat (10)\n    switch backdrop to (backdrop1 v)\nend\nwait (0.1) seconds\nbroadcast (message8 v) and wait\nforever\n    if <(timer) = [115]> then\n        broadcast (message2 v)\n        reset timer\n        switch backdrop to (backdrop1 v)\n    end\nend\n\nwhen I receive [message6 v]\nrepeat (10)\n    reset timer\nend\n\nwhen backdrop switches to [backdrop25 v]\nbroadcast (message v)\n\nwhen I receive [message8 v]\nforever\n    if <(backdrop [number v]) = [23]> then\n        switch backdrop to (backdrop24 v)\n        stop [other scripts in sprite v]\n        broadcast (message5 v)\n    end\nend\n\nwhen I receive [message5 v]\nforever\n    play sound [UnderTale Demo  Flowey's Theme.mp3 v] until done\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to x: (-180) y: (0)\nshow\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    change [yv v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (0.7)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-0.7)\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                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            if <touching (none v)?> then\n                                change x by (Change)\n                            end\n                            change x by (1)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-8]\n                                else\n                                    set [xv v] to [8]\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 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 (none v)?> then\n        change x by (Change)\n    end\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [10]\n        end\n    end\n    change y by (1)\n    switch costume to (costume4 v)\nend\n\nwhen flag clicked\nforever\n    if <(x position) > [264]> then\n        go to x: (-100) y: (-71)\n        switch backdrop to (next backdrop v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-100) y: (-71)\n    end\nend\n\nwhen backdrop switches to [backdrop15 v]\ngo to x: (-130) y: (0)\nstop [other scripts in sprite v]\nbroadcast (message1 v)\n\nwhen I receive [message1 v]\nforever\n    if <(x position) > [264]> then\n        go to x: (-100) y: (-71)\n        switch backdrop to (next backdrop v)\n    end\nend\n\nwhen I receive [message1 v]\nforever\n    if <key (up arrow v) pressed?> then\n        change y by (7)\n    end\n    if <key (down arrow v) pressed?> then\n        change y by (-7)\n    end\n    if <key (left arrow v) pressed?> then\n        change x by (-7)\n    end\n    if <key (right arrow v) pressed?> then\n        change x by (7)\n    end\nend\n\nwhen I receive [message1 v]\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-100) y: (-71)\n        switch backdrop to (backdrop1 v)\n        broadcast (message6 v)\n    end\nend\n\nwhen I receive [message2 v]\ngo to x: (-180) y: (0)\nshow\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    change [yv v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (0.7)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-0.7)\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                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            if <touching (none v)?> then\n                                change x by (Change)\n                            end\n                            change x by (1)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-8]\n                                else\n                                    set [xv v] to [8]\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 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 (none v)?> then\n        change x by (Change)\n    end\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [10]\n        end\n    end\n    change y by (1)\n    switch costume to (costume4 v)\nend\n\nwhen I receive [message2 v]\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-100) y: (-71)\n    end\nend\n\nwhen I receive [message2 v]\nforever\n    if <(x position) > [264]> then\n        go to x: (-100) y: (-71)\n        switch backdrop to (next backdrop v)\n    end\nend\n\nwhen backdrop switches to [backdrop23 v]\nstop [other scripts in sprite v]\nbroadcast (message3 v)\n\nwhen I receive [message3 v]\ngo to x: (-180) y: (0)\nshow\nset [yv v] to [0]\nset [xv v] to [0]\nforever\n    change [yv v] by (-0.5)\n    if <key (right arrow v) pressed?> then\n        change [xv v] by (0.7)\n    end\n    if <key (left arrow v) pressed?> then\n        change [xv v] by (-0.7)\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                        if <touching color (#000000)?> then\n                            change x by ((Xv) * (-1))\n                            change x by (-1)\n                            change y by (-5)\n                            if <touching (none v)?> then\n                                change x by (Change)\n                            end\n                            change x by (1)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-8]\n                                else\n                                    set [xv v] to [8]\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 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 (none v)?> then\n        change x by (Change)\n    end\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [10]\n        end\n    end\n    change y by (1)\n    switch costume to (costume4 v)\nend\n\nwhen I receive [message3 v]\nforever\n    if <touching color (#ff0000)?> then\n        go to x: (-100) y: (-71)\n        switch backdrop to (backdrop1 v)\n        broadcast (message2 v)\n        broadcast (message4 v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [message3 v]\nforever\n    if <(x position) > [264]> then\n        go to x: (-100) y: (-71)\n        switch backdrop to (next backdrop v)\n    end\nend\n\nwhen I receive [message2 v]\nforever\n    if <[-200] > (x position)> then\n        go to x: (-100) y: (-71)\n        switch backdrop to (next backdrop v)\n    end\nend\n\nwhen I receive [message3 v]\nforever\n    if <(backdrop [name v]) = [backdrop25]> then\n        if <(x position) > [264]> then\n            go to x: (-100) y: (-71)\n            switch backdrop to (backdrop1 v)\n            stop [other scripts in sprite v]\n            broadcast (message2 v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [message5 v]\nbroadcast (message2 v)\n\nwhen I receive [message6 v]\ngo to x: (0) y: (0)\n\nwhen I receive [message6 v]\nstop [other scripts in sprite v]\nbroadcast (message2 v)\n\nwhen I receive [message7 v]\nstop [other scripts in sprite v]\nstop [this script v]\n\nwhen flag clicked\nforever\n    if <[-200] > (x position)> then\n        go to x: (-100) y: (-71)\n        switch backdrop to (next backdrop v)\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (133) y: (133)\nhide\n\nwhen I receive [message4 v]\nshow\nwait (7) seconds\nhide\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nshow\n\n