Big Platformer

Instructions: You are the blue square.\nArrow keys to Move.\nSwim: Left and right arrow keys to go left and right, up arrow to swim up, down arrow to swim down.\nGo to lightgreen to next level\nR to Restart the Level\n\nBlack - Ground with Wall Jump\nRed - Lava (Do not Touch)\nLightblue - Water (In Water you can swim)\nYellow - ground WITHOUT Wall Jump\nDarkblue - Super Jump\nPurple - Trampoline\nDarkgreen and Brown - When you are in a level and you touch darkgreen, you can go trough\n

@Stage\n\n@Sprite3\n\nwhen flag clicked\nreset timer\nswitch backdrop to (bühnenbild1 v)\ngo to x: (-224) y: (163)\nset [level v] to [1]\nset [levels v] to [1]\nset [x v] to [0]\nset [y v] to [0]\nforever\n    if <key (y v) pressed?> then\n        if <<[1] < (level)> or <(username) = [Kangalioo]>> then\n            change [level v] by (-1)\n            switch backdrop to (previous backdrop v)\n        end\n    end\n    if <key (x v) pressed?> then\n        if <<(levels) > (level)> or <(username) = [Kangalioo]>> then\n            change [level v] by (1)\n            switch backdrop to (next backdrop v)\n        end\n    end\n    if <(level) > (levels)> then\n        set [levels v] to (level)\n    end\n    if <key (r v) pressed?> then\n        wait until <not <key (r v) pressed?>>\n        go to x: (-224) y: (104)\n        set [can going? v] to [0]\n        set [x v] to [0]\n        set [y v] to [0]\n    end\n    if <touching color (#00ffff)?> then\n        if <(y) > [-1]> then\n            change [y v] by (-1)\n        end\n        if <(y) < [-1]> then\n            set [y v] to [-1]\n        end\n    else\n        change [y v] by (-0.5)\n    end\n    if <<key (down arrow v) pressed?> and <touching color (#00ffff)?>> then\n        set [y v] to [-3]\n    end\n    if <key (left arrow v) pressed?> then\n        if <touching color (#00ffff)?> then\n            set [x v] to [-2]\n        else\n            change [x v] by (-1)\n        end\n    end\n    if <key (right arrow v) pressed?> then\n        if <touching color (#00ffff)?> then\n            set [x v] to [2]\n        else\n            change [x v] by (1)\n        end\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching color (#ffff7f)?> then\n        change y by (1)\n        if <touching color (#ffff00)?> then\n            change y by (1)\n            if <touching color (#ffff00)?> then\n                change y by (1)\n                if <touching color (#ffff00)?> then\n                    change y by (1)\n                    if <touching color (#ffff00)?> then\n                        change y by (1)\n                        if <touching color (#ffff00)?> then\n                            change y by (1)\n                            if <touching color (#ffff00)?> then\n                                change y by (-6)\n                                change x by ((x) * (-1))\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <<touching color (#000000)?> and <touching color (#00ffff)?>> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (1)\n                        if <touching color (#000008)?> then\n                            change y by (1)\n                            if <touching color (#000008)?> then\n                                change y by (-6)\n                                change x by ((x) * (-1))\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <<touching color (#000008)?> and <not <touching color (#00ffff)?>>> then\n        change y by (1)\n        if <touching color (#000008)?> then\n            change y by (1)\n            if <touching color (#000008)?> then\n                change y by (1)\n                if <touching color (#000008)?> then\n                    change y by (1)\n                    if <touching color (#000008)?> then\n                        change y by (1)\n                        if <touching color (#000008)?> then\n                            change y by (1)\n                            if <touching color (#000008)?> then\n                                change y by (-6)\n                                if <key (up arrow v) pressed?> then\n                                    set [y v] to [10]\n                                    if <(x) > [0]> then\n                                        set [x v] to [-10]\n                                    else\n                                        set [x v] to [10]\n                                    end\n                                else\n                                    change x by ((x) * (-1))\n                                    set [x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    if <(y) < [3]> then\n        if <touching color (#ff00bf)?> then\n            change y by (1)\n            if <touching color (#ff00bf)?> then\n                change y by (1)\n                if <touching color (#ff00bf)?> then\n                    change y by (1)\n                    if <touching color (#ff00bf)?> then\n                        change y by (-3)\n                        change x by ((x) * (-1))\n                        set [x v] to [0]\n                    end\n                end\n            end\n        end\n    end\n    if <touching color (#00cc44)?> then\n        set [can going? v] to [1]\n        change y by (1)\n        if <touching color (#00cc44)?> then\n            change y by (1)\n            if <touching color (#00cc44)?> then\n                change y by (1)\n                if <touching color (#00cc44)?> then\n                    change y by (-3)\n                    change x by ((x) * (-1))\n                    set [x v] to [0]\n                end\n            end\n        end\n    end\n    if <(can going?) = [0]> then\n        if <touching color (#660000)?> then\n            change y by (1)\n            if <touching color (#660000)?> then\n                change y by (1)\n                if <touching color (#660000)?> then\n                    change y by (1)\n                    if <touching color (#660000)?> then\n                        change y by (-3)\n                        change x by ((x) * (-1))\n                        set [x v] to [0]\n                    end\n                end\n            end\n        end\n    end\n    change y by (y)\n    if <touching color (#ffff00)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    if <touching color (#000008)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    if <touching color (#00cc44)?> then\n        change y by ((y) * (-1))\n        set [can going? v] to [1]\n        set [y v] to [0]\n    end\n    if <(can going?) = [0]> then\n        if <touching color (#660000)?> then\n            change y by ((y) * (-1))\n            set [y v] to [0]\n        end\n    end\n    change y by (-0.5)\n    if <<<touching color (#ffff00)?> or <touching color (#000008)?>> and <key (up arrow v) pressed?>> then\n        set [y v] to [10]\n    end\n    if <<touching color (#00ffff)?> and <key (up arrow v) pressed?>> then\n        set [y v] to [3]\n    end\n    change y by (0.5)\n    if <not <<touching color (#ff00bf)?> and <touching color (#003fff)?>>> then\n        if <touching color (#ff00bf)?> then\n            set [y v] to ((y) * (-1))\n        end\n        if <touching color (#003fff)?> then\n            if <(y) < [0]> then\n                set [y v] to [16]\n            else\n                change y by ((y) * (-1))\n                set [y v] to [0]\n            end\n        end\n    else\n        set [y v] to ((y) * (-1))\n    end\n    if <touching color (#ff0000)?> then\n        go to x: (-224) y: (104)\n        set [can going? v] to [0]\n        set [x v] to [0]\n        set [y v] to [0]\n    end\n    if <<touching color (#00ff55)?> or <touching color (#ff9999)?>> then\n        switch backdrop to (next backdrop v)\n        go to x: (-224) y: (104)\n        set [can going? v] to [0]\n        set [x v] to [0]\n        set [y v] to [0]\n        change [level v] by (1)\n    end\nend\n\nwait until <not >\n\nwait until <not >\n\n