My First Platformer

Instructions:                                Platformer Design\n-------------------------------------------------------------------------\n                                      Updates\n-------------------------------------------------------------------------\n1.3 - Fixed another skin bug (sprite was not facing right when d was pressed)\n1.2 - Fixed Bug (Skin was reverting back to default skin when you pressed the play button)\n1.1 - New Skins (Transparent, Red, Orange and Blue)!!!\n1.0 - First Release. Contains Home Screen, my new logo and logo animation, game logo, approximately 10 levels, vector SVG graphics. 100% Scratch Sprite Editor (I love it so much!!!)\n-------------------------------------------------------------------------\n                                       Controls\n-------------------------------------------------------------------------\n> WASD or Arrow Keys to Move\n> Be aware of spikes and lava\n> Collect Coins along the way (in an upcoming update)\n> Q and E keys to change skin\n-------------------------------------------------------------------------\n                                     Overview\n-------------------------------------------------------------------------\nOK! Yeah Hi Everyone! Hope everyone is doing great! Welcome to my very first Platformer (and probably the worst one on Scratch). This is a concept. I might build a better, more solid software for a new platformer. Please provide feedback, as this is literally the first time I have EVER made a platformer on Scratch. The reason is because, I used to make platformers, but they always wouldn't be up to the standards which I wanted them to be, like good graphics, modern-looking gaming interface, etc. and moreover, the platformers which I did like like The Ninja Series by @Will_Wam and many other platformers had so much code that I couldn't understand it back then. But since everyone is making it, I decided to give it a shot and here is my shot at creating a simple platformer game, with a simple interface. Please like and love, would really appreciate those and also try and make your own platformer using this template!\n------------------------------------------------------------------------- 

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nforever\n    play sound [\[Trap\] - Going Quantum - Raw \[Monstercat Release\] v] until done\nend\n\n@Sprite4\n\nwhen I receive [showhomescreen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nshow\n\n@Sprite1\n\ndefine Platform Gravity (gravity) Jump Height (jump height) Side Movement Speed (sms) Friction (friction) Slope (slope)\nchange [y velocity v] by (gravity)\nchange y by (Y Velocity)\nif <touching color (#00c31e)?> then\n    repeat until <not <touching color (#00c31e)?>>\n        change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n    end\n    set [y velocity v] to (<<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]>> * (jump height))\nend\nset [x velocity v] to (((X Velocity) + ((<<key (a v) pressed?> or <key (left arrow v) pressed?>> * ((sms) * (-1))) + (<<key (d v) pressed?> or <key (right arrow v) pressed?>> * (sms)))) * (friction))\nchange x by (X Velocity)\nset [slope v] to [0]\nrepeat until <<(Slope) = ((slope) * (-1))> or <not <touching color (#00c31e)?>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <touching color (#00c31e)?> then\n    change y by (Slope)\n    repeat until <not <touching color (#00c31e)?>>\n        change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n    end\nend\n\nwhen I receive [showhomescreen v]\nwait (2) seconds\nforever\n    switch costume to ((1) + ((5) * (costumeClass)))\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <key (space v) pressed?>> then\n        switch costume to ((4) + ((5) * (costumeClass)))\n        wait (0.5) seconds\n        switch costume to ((5) + ((5) * (costumeClass)))\n        wait (0.5) seconds\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        switch costume to ((3) + ((5) * (costumeClass)))\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to ((2) + ((5) * (costumeClass)))\n    end\n    if <key (q v) pressed?> then\n        change [costumeclass v] by (-1)\n        if <(costumeClass) = [-1]> then\n            set [costumeclass v] to [3]\n        end\n        wait (0.5) seconds\n    end\n    if <key (e v) pressed?> then\n        change [costumeclass v] by (1)\n        if <(costumeClass) = [4]> then\n            set [costumeclass v] to [0]\n        end\n        wait (0.5) seconds\n    end\nend\n\nwhen I receive [showhomescreen v]\nwait (2) seconds\nset [y velocity v] to [0]\nset [x velocity v] to [0]\ngo to x: (0) y: (0)\nshow\nforever\n    Platform Gravity [-1.3] Jump Height [15] Side Movement Speed [3] Friction [0.7] Slope [8]\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [costumechanging v]\nforever\n    switch costume to ((1) + ((5) * (costumeClass)))\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        switch costume to ((4) + ((5) * (costumeClass)))\n        wait (0.5) seconds\n        switch costume to ((5) + ((5) * (costumeClass)))\n        wait (0.5) seconds\n    end\n    if <<key (right arrow v) pressed?> or <key (down arrow v) pressed?>> then\n        switch costume to ((3) + ((5) * (costumeClass)))\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        switch costume to ((2) + ((5) * (costumeClass)))\n    end\n    if <key (q v) pressed?> then\n        change [costumeclass v] by (-1)\n        if <(costumeClass) = [-1]> then\n            set [costumeclass v] to [3]\n        end\n        wait (0.5) seconds\n    end\n    if <key (e v) pressed?> then\n        change [costumeclass v] by (1)\n        if <(costumeClass) = [4]> then\n            set [costumeclass v] to [0]\n        end\n        wait (0.5) seconds\n    end\nend\n\nwhen I receive [startplaying v]\nstop [other scripts in sprite v]\nwait (1) seconds\nbroadcast (costumeChanging v)\nset [y velocity v] to [0]\nset [x velocity v] to [0]\ngo to x: (-200) y: (0)\nshow\nforever\n    Platform Gravity [-1.3] Jump Height [15] Side Movement Speed [3] Friction [0.7] Slope [8]\nend\n\nwhen I receive [costumechanging v]\nforever\n    if <<touching (_edge_ v)?> and <<(x position) = [230]> or <(x position) > [230]>>> then\n        if <not <(backdrop [number v]) = [9]>> then\n            next backdrop\n            set x to (-230)\n        end\n    end\nend\n\nwhen I receive [costumechanging v]\nforever\n    if <<touching color (#6e6e6e)?> or <touching color (#ff0000)?>> then\n        set [y velocity v] to [0]\n        if <(backdrop [number v]) = [6]> then\n            go to x: (-230) y: (180)\n        else\n            if <(backdrop [number v]) = [3]> then\n                go to x: (-230) y: (-20)\n            else\n                go to x: (-230) y: (-35)\n            end\n        end\n    end\nend\n\nwhen I receive [costumechanging v]\nforever\n    if <<touching (_edge_ v)?> and <<(y position) = [-170]> or <(y position) < [-170]>>> then\n        set [y velocity v] to [0]\n        if <(backdrop [number v]) = [6]> then\n            go to x: (-230) y: (180)\n        else\n            if <(backdrop [number v]) = [3]> then\n                go to x: (-230) y: (-20)\n            else\n                go to x: (-230) y: (-35)\n            end\n        end\n    end\nend\n\nwhen flag clicked\nset [costumeclass v] to [0]\n\nchange [y velocity v] by (gravity)\nchange y by (Y Velocity)\nif <touching color (#00c31e)?> then\n    repeat until <not <touching color (#00c31e)?>>\n        change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n    end\n    set [y velocity v] to (<<<key (space v) pressed?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> and <(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]>> * (jump height))\nend\nset [x velocity v] to (((X Velocity) + ((<<key (a v) pressed?> or <key (left arrow v) pressed?>> * ((sms) * (-1))) + (<<key (d v) pressed?> or <key (right arrow v) pressed?>> * (sms)))) * (friction))\nchange x by (X Velocity)\nset [slope v] to [0]\nrepeat until <<(Slope) = ((slope) * (-1))> or <not <touching color (#00c31e)?>>>\n    change y by (1)\n    change [slope v] by (-1)\nend\nif <touching color (#00c31e)?> then\n    change y by (Slope)\n    repeat until <not <touching color (#00c31e)?>>\n        change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (10) y: (70)\nhide\n\nwhen I receive [showhomescreen v]\nwait (1) seconds\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [startplaying v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [startplaying v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite3\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\n\n@Sprite5\n\nwhen flag clicked\ngo to x: (70) y: (0)\nshow\n\nwhen I receive [showhomescreen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite6\n\nwhen flag clicked\nhide\ngo to x: (0) y: (-100)\nset [costumenumber v] to [0]\n\nwhen I receive [name v]\nshow\nrepeat (13)\n    switch costume to ((13) - (costumeNumber))\n    wait (pick random (0.1) to (0.2)) seconds\n    change [costumenumber v] by (1)\nend\nwait (1) seconds\nbroadcast (showHomeScreen v)\n\nwhen I receive [showhomescreen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I receive [showhomescreen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@part1\n\nwhen flag clicked\ngo to x: (240) y: (7)\nhide\n\nwhen I receive [part4 v]\nshow\nrepeat until <(round (x position)) = [-15]>\n    change x by (((-15) - (x position)) / (20))\nend\nbroadcast (name v)\n\nwhen I receive [showhomescreen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@part2\n\nwhen flag clicked\ngo to x: (-240) y: (17)\nhide\nwait (0.5) seconds\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change x by (((16) - (x position)) / (10))\n    change [ghost v] effect by (-10)\nend\nbroadcast (part2 v)\nrepeat until <(round (x position)) = [16]>\n    change x by (((16) - (x position)) / (10))\nend\n\nwhen I receive [showhomescreen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@part3\n\nwhen I receive [part2 v]\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change y by (((-18) - (y position)) / (10))\n    change [ghost v] effect by (-10)\nend\nrepeat until <(round (y position)) = [-18]>\n    change y by (((-18) - (y position)) / (10))\nend\nbroadcast (part4 v)\n\nwhen flag clicked\ngo to x: (-29) y: (-180)\nhide\n\nwhen I receive [showhomescreen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite7\n\nwhen flag clicked\ngo to x: (75) y: (-15)\nhide\n\nwhen I receive [showhomescreen v]\nwait (1) seconds\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen this sprite clicked\nbroadcast (startPlaying v)\n\nwhen I receive [startplaying v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite8\n\nwhen I receive [showhomescreen v]\nwait (1) seconds\nset [ghost v] effect to (100)\nshow\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen flag clicked\ngo to x: (-130) y: (-40)\nhide\n\nwhen I receive [startplaying v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@Sprite9\n\nwhen flag clicked\nhide\n\nwhen I receive [startplaying v]\nforever\n    if <(backdrop [number v]) = [9]> then\n        show\n    end\nend\n\n