Blue Square - A Platformer
@Stage\n\nwhen flag clicked\nset [level v] to [1]\n\n@Player\n\nwhen flag clicked\ngo to x: (-210) y: (-115)\nset [y velocity v] to [0]\nset [x velocity v] to [0]\nforever\n    Platform [12] [-1] [0.7] [3]\n    if <touching (spikes v)?> then\n        repeat (2)\n            hide\n            wait (0.2) seconds\n            show\n        end\n        go to x: (-210) y: (-115)\n        set [y velocity v] to [0]\n        set [x velocity v] to [0]\n    end\n    if <touching (finish v)?> then\n        change [level v] by (1)\n        go to x: (-210) y: (-115)\n        set [y velocity v] to [0]\n        set [x velocity v] to [0]\n    end\n    if <touching (bounce v)?> then\n        set [y velocity v] to [17.7]\n    end\nend\n\ndefine Platform (jump height) (gravity) (friction) (running speed)\nif <<key (right arrow v) pressed?> or <<<key (d v) pressed?> or <mouse down?>> and <(x position) < (mouse x)>>> then\n    change [x velocity v] by (running speed)\nend\nif <<key (left arrow v) pressed?> or <<<key (a v) pressed?> or <mouse down?>> and <(mouse x) < (x position)>>> then\n    change [x velocity v] by ((running speed) * (-1))\nend\nset [x velocity v] to ((X Velocity) * (friction))\nchange x by (X Velocity)\nif <touching (level v)?> then\n    set [slope v] to [0]\n    repeat until <<(Slope) = [8]> or <not <touching (level v)?>>>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by ((Slope) * (-1))\n        repeat ([ceiling v] of ([abs v] of (X Velocity) ) )\n            if <touching (level v)?> then\n                change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n            end\n        end\n        set [x velocity v] to [0]\n    end\nend\nchange y by (Y Velocity)\nif <touching (level v)?> then\n    repeat ([ceiling v] of ([abs v] of (Y Velocity) ) )\n        if <touching (level v)?> then\n            change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n        end\n    end\n    if <<(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]> and <<key (up arrow v) pressed?> or <<<key (w v) pressed?> or <mouse down?>> and <(mouse y) > (y position)>>>> then\n        set [y velocity v] to (jump height)\n    else\n        set [y velocity v] to [0]\n    end\nelse\n    change [y velocity v] by (-1)\nend\n\nwhen flag clicked\nset [oldx v] to (x position)\nset [oldy v] to (y position)\nforever\n    if <touching (level v)?> then\n        go to x: (oldX) y: (oldY)\n    end\n    set [oldx v] to (x position)\n    set [oldy v] to (y position)\nend\n\nif <key (up arrow v) pressed?> then\n    set [y velocity v] to [10]\n    if <(X Velocity) > [0]> then\n        set [x velocity v] to [-15]\n    else\n        set [x velocity v] to [15]\n    end\nelse\n    set [y velocity v] to [0]\nend\n\nwhen flag clicked\nif <(Level) = [3]> then\n    go to x: (203) y: (162)\nend\n\nwhen flag clicked\n\nchange [y velocity v] by (17.7)\n\nwhen flag clicked\nset [level v] to [1]\n\n@Level\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nhide\nwait (3) seconds\nshow\n\n@Spikes\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\n@Finish\n\nwhen flag clicked\nforever\n    wait (0.07) seconds\n    next costume\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        go to x: (196) y: (82)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        go to x: (196) y: (82)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [2]> then\n        go to x: (196) y: (82)\n    end\nend\n\nwhen backdrop switches to [backdrop2 v]\nshow\nswitch costume to (flag 1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nshow\n\n@Bounce\n\nwhen backdrop switches to [backdrop2 v]\nshow\nswitch costume to (costume1 v)\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (Level)\nend\n\nwhen I receive [next level v]\nnext costume\n\n@Thumbnail\n\nwhen flag clicked\nshow\nwait (3) seconds\nhide\n\n
*READ ALL INSTRUCTIONS*\n\nThe sequel is out!: https://scratch.mit.edu/projects/438381265/\n\nHello There! Please make sure to love and fav this platformer because it took me some time\n\n(Please Try To Share with friends!)\n\nGoal: 20 Loves and Favs\nIf this goal is achieved then I will add 5 levels\n\nGuys we are so close to the goal :D\n\n*Nice job guys we passed 40 views*\n\n*ALL LEVELS ARE POSSIBLE*\n\nI might add 2-3 levels a day it depends if people like it or not and I might make a sequel or part 2\n\nControls: WASD Or Arrow Keys To Move and Navigate\n\nSpikes with Red outline will kill you and you will have to respawn \n\nYellow is bouncy \n\n\n...\n\n\n\n\n\n\nThat's all\n\n\n\n\n\nFor real\n\n\n\n\n\nOk why are you still reading?!\n\n\n\n\n\n\n\nOk now I give up\n\n\n\n\n\n\n\nSeriously!?\n\n\n\n\n\n\n\nOk now I really am done\n\n\n\n\n\n\n\nYep...\n\n\n\n\n\n\n\ntotally \n\n\n\n\n\n\n\nI'm done\n\n\n\n\n\n\n\nIf you read to this point\n\n\n\n\n\n\n\nThen you are extremely hard headed\n\n\n\n\n\n\n\nand have listening problems\n\n\n\n\n\n\n\nNow love and fav this\n\n\n\n\n\n\n\nBecause it took time \n\n\n\n\n\n\n\nSo Please do!\n