Ground Pound - A Platformer
@Stage\n\nwhen flag clicked\nswitch backdrop to (game v)\n\n@Player\n\nwhen flag clicked\ngo to x: (-220) y: (0)\nset [xv v] to [0]\nset [yv v] to [0]\nset rotation style [left-right v]\nshow\nforever\n    if <not <touching (ground v)?>> then\n        set [in air v] to [yes]\n    else\n        set [in air v] to [no]\n    end\n    if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n        change [yv v] by (-7)\n    else\n        change [yv v] by (-0.5)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        if <<not <key (s v) pressed?>> and <not <key (down arrow v) pressed?>>> then\n            point in direction (-90)\n            change [xv v] by (-0.75)\n        end\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        if <<not <key (s v) pressed?>> and <not <key (down arrow v) pressed?>>> then\n            point in direction (90)\n            change [xv v] by (0.75)\n        end\n    end\n    set [xv v] to ((XV) * (0.9))\n    change x by (XV)\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 y by (1)\n                        if <touching (ground v)?> then\n                            change y by (1)\n                            if <touching (ground v)?> then\n                                change y by (-6)\n                                if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n                                    set [yv v] to [5]\n                                    if <(XV) > [0]> then\n                                        set [xv v] to [-10]\n                                    else\n                                        set [xv v] to [10]\n                                    end\n                                else\n                                    change x by ((XV) * (-1))\n                                    set [xv v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (YV)\n    if <touching (ground v)?> then\n        change y by ((YV) * (-1))\n        set [yv v] to [0]\n        set [in air v] to [no]\n    end\n    change y by (-0.5)\n    if <<touching (ground v)?> and <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        set [yv v] to [9]\n    end\n    if <[235] < (x position)> then\n        broadcast (Next Level v)\n    end\n    if <touching (spikes v)?> then\n        set [yv v] to [0]\n        set [xv v] to [0]\n        go to x: (-220) y: (-20)\n    end\n    change y by (0.5)\nend\n\nwhen flag clicked\nforever\n    create clone of (fade of player v)\n    wait (0.05) seconds\nend\n\nwhen flag clicked\nforever\n    create clone of (backround v)\n    wait (0.2) seconds\nend\n\nwhen I receive [shake v]\nchange x by (-5)\nwait (0.07) seconds\nchange y by (-7)\nwait (0.03) seconds\nchange x by (5)\nwait (0.07) seconds\nchange y by (7)\nwait (0.03) seconds\n\nwhen I receive [shake2 v]\nchange x by (5)\nwait (0.07) seconds\nchange y by (-10)\nwait (0.03) seconds\nchange x by (-5)\nwait (0.07) seconds\nchange y by (10)\nwait (0.03) seconds\n\nwhen flag clicked\nforever\n    if <(In air) = [yes]> then\n        if <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n            wait until <<(YV) = [0]> and <(In air) = [no]>>\n            broadcast (Bam v)\n            wait until <<not <key (s v) pressed?>> and <not <key (down arrow v) pressed?>>>\n            set [yv v] to [11]\n            wait (0.5) seconds\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <<[100] < (y position)> and <(Level) = [9]>> then\n        broadcast (Easter EGG v)\n    end\nend\n\nwhen I receive [retry v]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-220) y: (-20)\n\nwhen I receive [next level v]\nchange [level v] by (1)\nset [xv v] to [0]\nset [yv v] to [0]\nset size to (100) %\ngo to x: (-220) y: (-20)\n\nwhen flag clicked\nforever\n    play sound [TheFatRat - Xenogenesis v] until done\nend\n\nhide\n\n@Fade of Player\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\ngo to (player v)\nshow\nset size to (100) %\nset [ghost v] effect to (0)\nrepeat (20)\n    change size by (-4)\n    change [ghost v] effect by (5)\n    change [brightness v] effect by (-3)\nend\ndelete this clone\n\nwhen I receive [shake v]\nchange x by (-5)\nwait (0.07) seconds\nchange y by (-7)\nwait (0.03) seconds\nchange x by (5)\nwait (0.07) seconds\nchange y by (7)\nwait (0.03) seconds\n\nwhen I receive [shake2 v]\nchange x by (5)\nwait (0.07) seconds\nchange y by (-10)\nwait (0.03) seconds\nchange x by (-5)\nwait (0.07) seconds\nchange y by (10)\nwait (0.03) seconds\n\nhide\n\n@Backround\n\nwhen I start as a clone\ngo to x: (pick random (-200) to (200)) y: (-200)\nswitch costume to (pick random (1) to (3))\ngo to [back v] layer\nshow\nrepeat (10)\n    change y by (4)\nend\nrepeat until <touching (_edge_ v)?>\n    change x by (pick random (-2) to (2))\n    change y by (4)\nend\nrepeat (10)\n    change y by (4)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [shake v]\nchange x by (-5)\nwait (0.07) seconds\nchange y by (-7)\nwait (0.03) seconds\nchange x by (5)\nwait (0.07) seconds\nchange y by (7)\nwait (0.03) seconds\n\nwhen I receive [shake2 v]\nchange x by (5)\nwait (0.07) seconds\nchange y by (-10)\nwait (0.03) seconds\nchange x by (-5)\nwait (0.07) seconds\nchange y by (10)\nwait (0.03) seconds\n\n@ground\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [shake v]\nchange x by (-5)\nwait (0.07) seconds\nchange y by (-7)\nwait (0.03) seconds\nchange x by (5)\nwait (0.07) seconds\nchange y by (7)\nwait (0.03) seconds\n\nwhen I receive [shake2 v]\nchange x by (5)\nwait (0.07) seconds\nchange y by (-10)\nwait (0.05) seconds\nchange x by (-5)\nwait (0.07) seconds\nchange y by (10)\nwait (0.03) seconds\n\n@Spikes\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [level v] to [1]\nshow\nforever\n    switch costume to (Level)\nend\n\nwhen I receive [shake v]\nchange x by (-5)\nwait (0.07) seconds\nchange y by (-7)\nwait (0.03) seconds\nchange x by (5)\nwait (0.07) seconds\nchange y by (7)\nwait (0.03) seconds\n\nwhen I receive [shake2 v]\nchange x by (5)\nwait (0.07) seconds\nchange y by (-10)\nwait (0.03) seconds\nchange x by (-5)\nwait (0.07) seconds\nchange y by (10)\nwait (0.03) seconds\n\n@Ground Pound Text\n\nwhen flag clicked\nhide\n\nwhen I receive [bam v]\nshow\ngo to (player v)\nchange y by (-20)\npoint in direction (90)\nswitch costume to (pick random (1) to (8))\nset [ghost v] effect to (0)\nset size to (30) %\nrepeat (5)\n    change size by (7)\nend\nrepeat (7)\n    change size by (7)\n    change [ghost v] effect by (10)\nend\nrepeat (10)\n    change [ghost v] effect by (2.5)\nend\nhide\n\nwhen I receive [shake v]\nchange x by (-5)\nwait (0.07) seconds\nchange y by (-7)\nwait (0.03) seconds\nchange x by (5)\nwait (0.07) seconds\nchange y by (7)\nwait (0.03) seconds\n\nwhen I receive [bam v]\nbroadcast (Shake2 v)\n\nwhen I receive [shake2 v]\nchange x by (5)\nwait (0.07) seconds\nchange y by (-10)\nwait (0.03) seconds\nchange x by (-5)\nwait (0.07) seconds\nchange y by (10)\nwait (0.03) seconds\n\n@Easter Egg\n\nwhen flag clicked\nhide\n\nwhen I receive [easter egg v]\ngo to x: (0) y: (0)\ngo to [back v] layer\nshow\nwait (1) seconds\nhide\n\n@Retry Button\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        point in direction ((([sin v] of ((timer) * (2000)) ) * (10)) + (90))\n    else\n        point in direction ((([sin v] of ((timer) * (200)) ) * (10)) + (90))\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Retry v)\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nwait until <(Level) = [21]>\nhide\n\n@Skip Button\n\nwhen this sprite clicked\nbroadcast (Next Level v)\n\nwhen flag clicked\nforever\n    if <touching (mouse-pointer v)?> then\n        point in direction ((([sin v] of ((timer) * (2000)) ) * (10)) + (90))\n    else\n        point in direction ((([sin v] of ((timer) * (200)) ) * (10)) + (90))\n    end\nend\n\nwhen flag clicked\nwait until <(Level) = [21]>\nhide\n\nwhen flag clicked\nshow\n\n@End Text\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\ngo to [back v] layer\n\nwhen flag clicked\nwait until <(Level) = [21]>\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nshow\nwait until <(Level) = [22]>\nswitch costume to (costume2 v)\n\n
          Welcome to, Ground pound - A platformer\nPart 2 - https://scratch.mit.edu/projects/402674966/ \n___________________________________________\n                                      Controls:\n- W-A-S-D or ARROW KEYS\n- S or DOWN ARROW KEY to ground pound\n___________________________________________\nWhen you ground pound it gives you A high thrust into the air, a little higher then your normal jump.\n\nNOTE: You do not need to ground pound until level 9\n___________________________________________\nThere are 20 levels in this platformer, can you finish them all? If you get stuck on a level you can either press the RETRY button or the SKIP button witch will take you to the next level.\n___________________________________________\n              Music:   TheFatRat - Xenogenesis\n___________________________________________