popsicle • platformer
@Stage\n\n@character\n\nwhen I receive [start v]\nswitch backdrop to (level1 v)\nhide variable [y v]\nhide variable [x v]\nset [x v] to [0]\nset [y v] to [0]\nshow\ngo to x: (-215) y: (-70)\nforever\n    if <key (right arrow v) pressed?> then\n        change [x v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-1)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\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 y by (1)\n                if <touching color (#000000)?> then\n                    change x by ((X) * (-1))\n                    if <key (up arrow v) pressed?> then\n                        if <(X) > [0]> then\n                            set [x v] to [-5]\n                        else\n                            set [x v] to [5]\n                        end\n                        set [y v] to [10]\n                    else\n                        change [y v] by (0)\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching color (#000000)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\n    if <(x position) > [238]> then\n        next backdrop\n        go to x: (-215) y: (-70)\n        change [level v] by (1)\n    end\n    if <(y position) < [-178]> then\n        go to x: (-215) y: (-70)\n    end\n    if <touching color (#c65f55)?> then\n        go to x: (-215) y: (-70)\n    end\nend\n\n@thumbnail\n\nwhen flag clicked\nshow\n\nwhen this sprite clicked\nbroadcast (start v)\nhide\n\nwhen flag clicked\nforever\n    play sound [Nekomimi Switch by Hatsune Miku v] until done\nend\n\n