Mirage Platformer

Instructions: Use the arrow keys to move. Avoid Red,Get to the Oasis to unlock level 2. To win get to Cairo.\n\nIf this project hits 100 loves, 10 random scratchers who love this project will win a follow from me @okapi11.

@Stage\n\nwhen flag clicked\nset [leavel v] to [1]\nswitch backdrop to (backdrop1 v)\nwait until <(Leavel) = [2]>\nswitch backdrop to (backdrop2 v)\n\n@Sprite2\n\nwhen flag clicked\nset [level v] to [0]\nswitch backdrop to (backdrop1 v)\nset [deaths v] to [0]\nhide variable [time v]\ngo to x: (3) y: (0)\nshow\nswitch costume to (costume1 v)\nset size to (20) %\nset [yv v] to [0]\nset [xv v] to [0]\nrepeat until <touching (sphinx v)?>\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume1 v)\n        change [xv v] by (-0.5)\n    end\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume2 v)\n        change [xv v] by (0.5)\n    end\n    change x by (Xv)\n    set [xv v] to ((Xv) * (0.9))\n    if <touching color (#fff5b3)?> then\n        change y by (0.5)\n        if <touching color (#fff5b3)?> then\n            change y by (0.5)\n            if <touching color (#fff5b3)?> then\n                change y by (0.5)\n                if <touching color (#fff5b3)?> then\n                    change y by (0.5)\n                    if <touching color (#fff5b3)?> then\n                        change y by (0.5)\n                        if <touching color (#fff5b3)?> then\n                            change y by (0.5)\n                            if <touching color (#fff5b3)?> then\n                                change y by (0.5)\n                                if <touching color (#fff5b3)?> then\n                                    change y by (0.5)\n                                    if <touching color (#fff5b3)?> then\n                                        if <key (up arrow v) pressed?> then\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-7]\n                                            else\n                                                set [xv v] to [7]\n                                            end\n                                            set [yv v] to [10]\n                                        else\n                                            set [xv v] to ((Xv) * (-1.3))\n                                            change x by (Xv)\n                                            set [xv v] to [0]\n                                            change x by ((Xv) / (5))\n                                        end\n                                        change y by (-4)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-0.5)\n    change y by (Yv)\n    if <touching color (#fff5b3)?> then\n        set [yv v] to ((Yv) * (-0.25))\n        change y by (Yv)\n        if <touching color (#fff5b3)?> then\n            change y by (Yv)\n            if <touching color (#fff5b3)?> then\n                change y by (Yv)\n                if <touching color (#fff5b3)?> then\n                    change y by (Yv)\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<touching color (#fff5b3)?> and <key (up arrow v) pressed?>> then\n        set [yv v] to [10]\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <touching color (#ff0000)?> then\n        hide\n        broadcast (Death v)\n    end\nend\n\nwhen flag clicked\nforever\n    set [random v] to (pick random (1) to (20))\n    wait (1) seconds\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <touching color (#1e2112)?> then\n        set [leavel v] to [2]\n    end\nend\n\nwhen flag clicked\nset [leavel v] to [1]\nwait until <(Leavel) = [2]>\ngo to x: (-199) y: (109)\n\nwhen I receive [correct v]\nforever\n    if <key (left arrow v) pressed?> then\n        switch costume to (costume1 v)\n        change [xv v] by (-0.5)\n    end\n    if <key (right arrow v) pressed?> then\n        switch costume to (costume2 v)\n        change [xv v] by (0.5)\n    end\n    change x by (Xv)\n    set [xv v] to ((Xv) * (0.9))\n    if <touching color (#fff5b3)?> then\n        change y by (0.5)\n        if <touching color (#fff5b3)?> then\n            change y by (0.5)\n            if <touching color (#fff5b3)?> then\n                change y by (0.5)\n                if <touching color (#fff5b3)?> then\n                    change y by (0.5)\n                    if <touching color (#fff5b3)?> then\n                        change y by (0.5)\n                        if <touching color (#fff5b3)?> then\n                            change y by (0.5)\n                            if <touching color (#fff5b3)?> then\n                                change y by (0.5)\n                                if <touching color (#fff5b3)?> then\n                                    change y by (0.5)\n                                    if <touching color (#fff5b3)?> then\n                                        if <key (up arrow v) pressed?> then\n                                            if <(Xv) > [0]> then\n                                                set [xv v] to [-7]\n                                            else\n                                                set [xv v] to [7]\n                                            end\n                                            set [yv v] to [10]\n                                        else\n                                            set [xv v] to ((Xv) * (-1.3))\n                                            change x by (Xv)\n                                            set [xv v] to [0]\n                                            change x by ((Xv) / (5))\n                                        end\n                                        change y by (-4)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-0.5)\n    change y by (Yv)\n    if <touching color (#fff5b3)?> then\n        set [yv v] to ((Yv) * (-0.25))\n        change y by (Yv)\n        if <touching color (#fff5b3)?> then\n            change y by (Yv)\n            if <touching color (#fff5b3)?> then\n                change y by (Yv)\n                if <touching color (#fff5b3)?> then\n                    change y by (Yv)\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<touching color (#fff5b3)?> and <key (up arrow v) pressed?>> then\n        set [yv v] to [10]\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <touching color (#98accb)?> then\n        hide\n        broadcast (Win v)\n    end\nend\n\n@Sprite3\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nset [leavel v] to [1]\ngo [backward v] (100) layers\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <touching (sprite2 v)?> then\n        hide\n        wait (60) seconds\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite4\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <<(Random) = [1]> or <<(Random) = [2]> or <(Random) = [3]>>> then\n        hide\n        wait (5) seconds\n        show\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite5\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <<(Random) = [4]> or <(Random) = [5]>> then\n        hide\n        wait (5) seconds\n        show\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite6\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <<(Random) = [6]> or <(Random) = [7]>> then\n        hide\n        wait (5) seconds\n        show\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite7\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <<(Random) = [8]> or <(Random) = [9]>> then\n        hide\n        wait (5) seconds\n        show\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite8\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <<(Random) = [10]> or <(Random) = [11]>> then\n        hide\n        wait (5) seconds\n        show\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite9\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <<(Random) = [12]> or <(Random) = [13]>> then\n        hide\n        wait (5) seconds\n        show\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite10\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <<(Random) = [14]> or <(Random) = [15]>> then\n        hide\n        wait (5) seconds\n        show\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite11\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <<(Random) = [16]> or <(Random) = [17]>> then\n        hide\n        wait (5) seconds\n        show\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite12\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <(Random) = [18]> then\n        hide\n        wait (3) seconds\n        show\n        switch costume to (costume4 v)\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite13\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\ngo [backward v] (100) layers\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <touching (sprite2 v)?> then\n        hide\n        wait until <touching (sprite14 v)?>\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite14\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\ngo [backward v] (100) layers\nswitch costume to (costume2 v)\nrepeat until <(Leavel) = [2]>\n    if <touching (sprite2 v)?> then\n        hide\n        wait until <touching (sprite3 v)?>\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [death v]\nswitch costume to (costume1 v)\nshow\n\nwhen I receive [win v]\nswitch costume to (costume2 v)\nshow\n\n@Sprite15\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nset [leavel v] to [1]\nhide\nforever\n    if <(Leavel) = [2]> then\n        if <touching (sprite2 v)?> then\n            hide\n            wait (20) seconds\n        else\n            switch costume to (costume2 v)\n            show\n        end\n    end\nend\n\n@Sprite16\n\nwhen I receive [death v]\nhide\n\nwhen flag clicked\nhide\ngo [backward v] (100) layers\nwait until <(Leavel) = [2]>\nforever\n    if <touching (sprite2 v)?> then\n        hide\n        wait (20) seconds\n    else\n        switch costume to (costume2 v)\n        show\n    end\nend\n\n@Sphinx\n\nwhen flag clicked\nset [leavel v] to [1]\nhide\nwait until <(Leavel) = [2]>\nshow\nforever\n    if <touching (sprite2 v)?> then\n        ask [What walks on four legs then 2 legs then 3 legs?] and wait\n        if <<(answer) = [Humans]> or <<(answer) = [humans]> or <<(answer) = [People]> or <(answer) = [people]>>>> then\n            broadcast (Correct v)\n            hide\n            wait (10) seconds\n            show\n        else\n            broadcast (Death v)\n        end\n    end\nend\n\n