Water - a Platformer
@Stage\n\n@Player\n\nwhen flag clicked\nshow\nset size to (55) %\nset [takeoffspeed v] to [15]\nset [runspeed v] to [6.5]\nset [gravity v] to [-1]\nset [fallspeed v] to [0]\nforever\n    Run Controls\n    Sim Gravity\n    Jump Control\nend\n\ndefine Run Controls\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change x by (RunSpeed)\n    if <touching (ground v)?> then\n        change x by ((0) - (RunSpeed))\n    end\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change x by ((0) - (RunSpeed))\n    if <touching (ground v)?> then\n        change x by (RunSpeed)\n    end\nend\n\ndefine Sim Gravity\nchange y by (FallSpeed)\nif <touching (ground v)?> then\n    if <(FallSpeed) < [0]> then\n        set [reversestep v] to [1]\n    else\n        set [reversestep v] to [-1]\n    end\n    repeat until <not <touching (ground v)?>>\n        change y by (ReverseStep)\n    end\n    set [fallspeed v] to [0]\nelse\n    change [fallspeed v] by (Gravity)\nend\n\ndefine Jump Control\nif <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n    change y by (-1)\n    if <touching (ground v)?> then\n        set [fallspeed v] to (TakeOffSpeed)\n    end\n    change y by (1)\nend\n\nwhen flag clicked\ngo to x: (-212) y: (76)\nforever\n    create clone of (_myself_ v)\n    wait (0.001) seconds\nend\n\nwhen I start as a clone\nrepeat (10)\n    change [ghost v] effect by (2)\n    change size by (-2)\nend\ndelete this clone\n\nwhen I receive [resetplayer  v]\ngo to x: (-212) y: (76)\n\nwhen I receive [levelchange v]\ngo to x: (-201) y: (-18)\n\nwhen I receive [leap v]\nset [fallspeed v] to [17]\n\nwhen I receive [game off! v]\nhide\n\nhide\n\n@Ground\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\n\nwhen I receive [levelchange v]\nif <(Level) = [2]> then\n    switch costume to (costume2 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [4]> then\n    switch costume to (costume4 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [3]> then\n    switch costume to (costume3 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [5]> then\n    switch costume to (costume5 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [6]> then\n    switch costume to (costume6 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [7]> then\n    switch costume to (costume7 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [9]> then\n    switch costume to (costume9 v)\nend\n\nhide\n\nwhen I receive [levelchange v]\nif <(Level) = [8]> then\n    switch costume to (costume8 v)\nend\n\n@ThumbNail\n\nwhen flag clicked\nhide\n\nwait (1) seconds\n\nshow\n\n@Spikes\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\nforever\n    if <touching (player v)?> then\n        broadcast (ResetPlayer  v)\n    end\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [2]> then\n    switch costume to (costume2 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [3]> then\n    switch costume to (costume3 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [4]> then\n    switch costume to (costume4 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [5]> then\n    switch costume to (costume5 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [6]> then\n    switch costume to (costume6 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [7]> then\n    switch costume to (costume7 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [8]> then\n    switch costume to (costume8 v)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [9]> then\n    switch costume to (costume9 v)\nend\n\n@Level Control\n\nwhen flag clicked\nset [level v] to [1]\ngo to x: (250) y: (27)\nforever\n    if <touching (player v)?> then\n        broadcast (LevelChange v)\n        change [level v] by (1)\n    end\nend\n\nwhen flag clicked\nshow\nforever\n    play sound [bensound-elevate v] until done\nend\n\nwhen flag clicked\nset [ghost v] effect to (25)\n\n@Background1\n\nwhen flag clicked\nwait (0.5) seconds\nforever\n    hide\n    clear graphic effects\nend\n\nwhen I start as a clone\nclear graphic effects\npoint in direction (90)\ngo [backward v] (100) layers\nswitch costume to (pick random (1) to (3))\ngo to x: (pick random (-200) to (300)) y: (180)\nset size to (pick random (150) to (320)) %\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-1)\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\nrepeat until <(x position) < [-240]>\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\nrepeat (20)\n    change [ghost v] effect by (2.5)\n    if <(costume [number v]) = [1]> then\n        move (-0.5) steps\n    end\n    if <(costume [number v]) = [2]> then\n        move (-1) steps\n    end\n    if <(costume [number v]) = [3]> then\n        move (-2) steps\n    end\nend\ndelete this clone\n\nwhen I receive [generate clones v]\ndelete this clone\n\nwhen I receive [delete these clones v]\ndelete this clone\n\nwhen I receive [game on! v]\nwait (0.5) seconds\nforever\n    hide\n    clear graphic effects\n    if <(Current Stage) = [Game]> then\n        create clone of (_myself_ v)\n        wait (pick random (3) to (6)) seconds\n    else\n        if <not <(Current Stage) = [Game]>> then\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [sprite refresh v]\ndelete this clone\n\nwhen flag clicked\nwait (0.8) seconds\nforever\n    hide\n    clear graphic effects\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nwait (pick random (7) to (7.5)) seconds\ndelete this clone\n\nwhen I start as a clone\nwait (pick random (1) to (7)) seconds\ndelete this clone\n\n@EndScreen\n\nwhen I receive [levelchange v]\nset [brightness v] effect to (0)\nhide\nif <(Level) = [10]> then\n    broadcast (Game Off! v)\n    go to x: (0) y: (0)\n    show\n    forever\n        change [pixelate v] effect by (0.1)\n    end\nend\n\nwhen flag clicked\nhide\n\n@JumpPad\n\nwhen flag clicked\nhide\nset size to (60) %\nforever\n    if <touching (player v)?> then\n        broadcast (Leap v)\n    end\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [3]> then\n    show\n    go to x: (-146) y: (-34)\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [4]> then\n    hide\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [7]> then\n    go to x: (-95) y: (-60)\n    show\nend\n\nwhen I receive [levelchange v]\nif <(Level) = [8]> then\n    hide\nend\n\nwhen I receive [game off! v]\nhide\n\n@water2\n\nwhen I start as a clone\nset size to (pick random (80) to (100)) %\nset [ghost v] effect to (90)\nswitch costume to (costume1 v)\nshow\nset [color v] effect to (pick random (-3) to (3))\nrepeat (5)\n    change y by (-1)\nend\nrepeat until <touching (_edge_ v)?>\n    change y by (pick random (-1) to (-3))\nend\nrepeat (1)\n    change y by (-2)\nend\ndelete this clone\n\ngo to x: (pick random (-10) to (10)) y: (180)\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        set [xv v] to (pick random (-10) to (10))\n    end\nend\n\nwhen I start as a clone\nforever\n    repeat (5)\n        set [xv v] to ((xv) * (0.9))\n        change x by (xv)\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        set [yv v] to (pick random (10) to (20))\n    end\n    if <touching (ground v)?> then\n        set [yv v] to (pick random (10) to (20))\n    end\n    if <touching (spikes v)?> then\n        set [yv v] to (pick random (10) to (20))\n    end\n    repeat (10)\n        change [yv v] by (-1)\n        change y by (yv)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nhide\nforever\n    go to (random position v)\n    create clone of (_myself_ v)\nend\n\n
This platformer was made by @Mapex1000. Love and Favorite or I will steal your chocolate.  >:D   \n\n      \n\nArrow Keys or WASD to move     \n                                              \nNew Platformer: https://scratch.mit.edu/projects/340943142\n\nShort  :P            \n\nOne sprite from @-Imagineer-      No Hate. Please post ideas on how to improve this project down below.\n\nThanks for playing!                 