City of the Clouds || Platformer

Instructions: Arrow keys or mobile. If this gets 1000 loves/faves, I will make part 2.\n \nThis game is set in the year 2100.\n

@Stage\n\nwhen flag clicked\nforever\n    play sound [platformer_;\) v] until done\nend\n\n@HitBox\n\nwhen flag clicked\nforever\n    if <(x position) > [238]> then\n        go to x: (-220) y: (-70)\n        set [xv v] to [0]\n        set [yv v] to [0]\n        broadcast (next level v)\n    end\nend\n\nwhen flag clicked\ngo to x: (-220) y: (-70)\nset [ghost v] effect to (0)\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <touching color (#e4e4e4)?> then\n        change y by (1)\n        if <touching color (#e4e4e4)?> then\n            change y by (1)\n            if <touching color (#e4e4e4)?> then\n                change y by (1)\n                if <touching color (#e4e4e4)?> then\n                    change y by (1)\n                    if <touching color (#e4e4e4)?> then\n                        change y by (1)\n                        if <touching color (#e4e4e4)?> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> 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 (#e4e4e4)?> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <touching color (#e4e4e4)?> then\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            set [yv v] to [15]\n        end\n    end\n    change y by (1)\nend\n\nif <key (up arrow 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]\nelse\n    set [xv v] to [0]\nend\n\nif <touching (level v)?> then\n    change y by (1)\n    if <touching (level v)?> then\n        change y by (1)\n        if <touching (level v)?> then\n            change y by (1)\n            if <touching (level v)?> then\n                change y by (1)\n                if <touching (level v)?> then\n                    change y by (1)\n                    if <touching (level v)?> then\n                        change x by ((Xv) * (-1))\n                        change y by (-5)\n                    end\n                end\n            end\n        end\n    end\nend\n\nif <key (right arrow v) pressed?> then\n    change [xv v] by (1)\nend\nif <key (left arrow v) pressed?> then\n    change [xv v] by (-1)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\n\nif <touching (level v)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <touching (level v)?> then\n    if <key (up arrow v) pressed?> then\n        set [yv v] to [15]\n    end\nend\nchange y by (1)\n\nwhen flag clicked\nset size to (75) %\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (0)\nrepeat (8)\n    change [ghost v] effect by (12.5)\nend\ndelete this clone\n\nwhen flag clicked\nset [xv v] to [0]\nset [yv v] to [0]\nforever\n    if <<(y position) < [-180]> or <<touching color (#ff0000)?> or <touching color (#e60000)?>>> then\n        go to x: (-220) y: (-70)\n        broadcast (delete v)\n        set [xv v] to [0]\n        set [yv v] to [0]\n    end\nend\n\nwhen I receive [delete v]\ndelete this clone\n\n@Level\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen I receive [next level v]\nnext costume\n\n@TN\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\n\n