Flipped, a Platformer

Instructions: The competition is over! If you want to see the results you can check the studio below! \n\nThis is my example project for a competition that I have decided to host where you have to make a platformer in under an hour, so sorry if its not as high quality as normal. I only spent an hour on it.\n\nInstructions:\nWasd or arrows to move.\nPress and hold space to flip the world.\nGet to the portal to beat the level.

@Stage\n\nwhen flag clicked\nforever\n    if <(flip) = [1]> then\n        change [power v] by (-5)\n    else\n        if <not <key (space v) pressed?>> then\n            if <(power) < [200]> then\n                change [power v] by (5)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [psong v] to [0]\nforever\n    repeat until <not <(song) = (psong)>>\n        set [song v] to (pick random (1) to (5))\n    end\n    set [psong v] to (song)\n    play sound (song) until done\nend\n\n@player\n\nwhen flag clicked\nset rotation style [left-right v]\ngo to x: (-200) y: (-100)\nset [level v] to [1]\nset [yv v] to [0]\nset [xv v] to [0]\nset [flip v] to [0]\nset [power v] to [200]\nforever\n    if <<key (space v) pressed?> and <(power) > [0]>> then\n        set [flip v] to [1]\n        physics flipped\n    else\n        switch costume to (costume1 v)\n        set [flip v] to [0]\n        physics norm\n    end\n    if <touching (end v)?> then\n        go to x: (-200) y: (-100)\n        set [yv v] to [0]\n        set [xv v] to [0]\n        set [flip v] to [0]\n        set [power v] to [200]\n        change [level v] by (1)\n    end\nend\n\nchange [power v] by (-5)\nif <(power) < [200]> then\n    change [power v] by (5)\nend\n\ndefine physics norm\nchange [yv v] by (-0.5)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (0.5)\n    point in direction (90)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by (-0.5)\n    point in direction (-90)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\nif <touching (ground v)?> then\n    change y by (1)\n    if <touching (ground v)?> then\n        change y by (1)\n        if <touching (ground v)?> then\n            change y by (1)\n            if <touching (ground v)?> then\n                change y by (1)\n                if <touching (ground v)?> then\n                    change y by (1)\n                    if <touching (ground v)?> then\n                        change x by ((Xv) * (-1))\n                        change x by (-1)\n                        change y by (-5)\n                        if <touching (null v)?> then\n                            change x by (10)\n                        end\n                        change x by (1)\n                        if <<key (up arrow v) pressed?> or <key (w 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\nend\nchange y by (Yv)\nif <touching (ground v)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nif <<touching (bad v)?> or <(y position) < [-178]>> then\n    go to x: (-200) y: (-100)\n    set [yv v] to [0]\n    set [xv v] to [0]\n    set [flip v] to [0]\n    set [power v] to [200]\nend\nchange y by (-1)\nif <touching (ground v)?> then\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [yv v] to [7]\n    end\nend\nchange y by (1)\n\ndefine physics flipped\nchange [yv v] by (-0.5)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [xv v] by (0.5)\n    point in direction (90)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [xv v] by (-0.5)\n    point in direction (-90)\nend\nset [xv v] to ((Xv) * (0.9))\nchange x by (Xv)\nif <touching (bad v)?> then\n    change y by (1)\n    if <touching (bad v)?> then\n        change y by (1)\n        if <touching (bad v)?> then\n            change y by (1)\n            if <touching (bad v)?> then\n                change y by (1)\n                if <touching (bad v)?> then\n                    change y by (1)\n                    if <touching (bad v)?> then\n                        change x by ((Xv) * (-1))\n                        change x by (-1)\n                        change y by (-5)\n                        if <touching (null v)?> then\n                            change x by (10)\n                        end\n                        change x by (1)\n                        if <<key (up arrow v) pressed?> or <key (w 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\nend\nchange y by (Yv)\nif <touching (bad v)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nif <<touching (ground v)?> or <(y position) < [-178]>> then\n    go to x: (-200) y: (-100)\n    set [yv v] to [0]\n    set [xv v] to [0]\n    set [flip v] to [0]\n    set [power v] to [200]\nend\nchange y by (-1)\nif <touching (bad v)?> then\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [yv v] to [7]\n    end\nend\nchange y by (1)\n\n@ground\n\nwhen flag clicked\nforever\n    if <(flip) = [1]> then\n        switch costume to ((6) + (level))\n    else\n        switch costume to (level)\n    end\nend\n\n@bad\n\nwhen flag clicked\nforever\n    if <(flip) = [1]> then\n        switch costume to ((6) + (level))\n    else\n        switch costume to (level)\n    end\nend\n\n@power\n\nwhen flag clicked\npen up\nforever\n    erase all\n    if <(flip) = [1]> then\n        render\n    end\nend\n\ndefine render\npen up\ngo to x: (-100) y: (150)\nset pen color to (#000000)\nset pen size to (15)\npen down\nchange x by (200)\npen up\ngo to x: (-100) y: (150)\nif <(power) > [0]> then\n    pen down\nend\nset pen color to (#ffffff)\nchange x by (power)\n\n@end\n\nwhen flag clicked\nshow\nforever\n    turn right (5) degrees\n    go to x: (200) y: (-100)\n    if <(level) = [6]> then\n        hide\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\n\n