|| Middle school a platformer ||

Instructions: new animation out https://scratch.mit.edu/projects/418353504/\n\nWIP I might add a couple more levels after camping \n\nyes a plattformer not an animation boy I spend all Day making this. This took forever and I had no idea I was this good at being a game-Maker XD a \n\nlove and fav would be nice! but of corse it is up to you XD this is only my second plattformer and my best plattformer infact this is one of my best projects!\n\n\n\n\nfor level 2 the mask will get you past if you are having trouble so press t\n\n\n

@Stage\n\n@Player\n\ndefine reset\nclear graphic effects\ngo to x: (-200) y: (-50)\npoint in direction (90)\nset [dead? v] to [0]\nset [x v v] to [0]\nset [y v v] to [0]\nset size to (100) %\nshow\n\nwhen I receive [next level v]\nset [change? v] to [1]\nreset\nset [change? v] to [0]\n\nwhen I receive [alright bros let's go v]\nset [level v] to [1]\nset [dead? v] to [0]\nset size to (100) %\nreset\nforever\n    go to [front v] layer\n    if <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <(dead?) = [0]>> then\n        change [x v v] by (.9)\n    end\n    if <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <(dead?) = [0]>> then\n        change [x v v] by (-.9)\n    end\n    set [x v v] to ((X v) * (0.9))\n    change x by (X v)\n    if <touching (ground v)?> then\n        change y by (2)\n        if <touching (ground v)?> then\n            change y by (2)\n            if <touching (ground v)?> then\n                change y by (2)\n                if <touching (ground v)?> then\n                    change y by (2)\n                    if <touching (ground v)?> then\n                        change y by (2)\n                        if <touching (ground v)?> then\n                            change x by ((X v) * (-2))\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n                                if <(X v) > [0]> then\n                                    set [x v v] to [-5]\n                                else\n                                    set [x v v] to [5]\n                                end\n                                set [y v v] to [13]\n                            else\n                                set [x v v] to [0]\n                            end\n                            change y by (-5)\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v v] by (-0.8)\n    change y by (Y v)\n    if <touching (ground v)?> then\n        change y by ((Y v) * (-1))\n        set [y v v] to [0]\n    end\n    change y by (-1)\n    if <touching (ground v)?> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (20))>>>> then\n            set [y v v] to [12]\n        end\n    end\n    change y by (1)\n    if <<<<<touching (killer wheel v)?> or <touching (spikes v)?>> or <touching (big killer wheel v)?>> or <touching (lightning v)?>> and <(dead?) = [0]>> then\n        Spin off screen\n    end\n    if <touching (jump pad v)?> then\n        set [y v v] to [20]\n    end\nend\n\nwhen I receive [alright bros let's go v]\nforever\n    set [direction v] to (direction)\nend\n\nwhen I receive [alright bros let's go v]\nset [change? v] to [0]\nforever\n    if <<(x position) = [239]> and <(dead?) = [0]>> then\n        broadcast (NEXT LEVEL v)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [alright bros let's go v]\nforever\n    if <(y position) = [-179]> then\n        Spin off screen\n    end\nend\n\nwhen [r v] key pressed\nif <(dead?) = [0]> then\n    reset\nend\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [alright bros let's go v]\nshow\n\ndefine Spin off screen\nset [dead? v] to [1]\nchange [player death v] by (1)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nreset\n\nwhen I receive [alright bros let's go v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nswitch costume to (center2 v)\nrepeat (10)\n    change [ghost v] effect by (5)\n    change size by (-5)\nend\ndelete this clone\n\nwhen flag clicked\ngo [forward v] (2) layers\n\nwhen I receive [coustume number is 2 v]\nif <key (t v) pressed?> then\n    switch costume to (costume1 v)\nend\n\nwhen flag clicked\nswitch costume to (center v)\n\nwhen I receive [coustume number is not 2 don't make mask avaible v]\nif <key (t v) pressed?> then\n    switch costume to (center v)\nend\n\nwhen I receive [alright bros let's go v]\nset [change? v] to [0]\nforever\n    if <<(x position) = [240]> and <(dead?) = [0]>> then\n        broadcast (NEXT LEVEL v)\n        change [level v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [name v]) = [Center]> then\n        if <touching (spikes v)?> then\n            reset\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (enemy v)?> then\n        reset\n    end\nend\n\nwhen I receive [alright bros let's go v]\nset [change? v] to [0]\nforever\n    if <<(x position) = [160]> and <(dead?) = [0]>> then\n        broadcast (NEXT LEVEL v)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [alright bros let's go v]\nset [change? v] to [0]\nforever\n    if <<(x position) = [162]> and <(dead?) = [0]>> then\n        broadcast (NEXT LEVEL v)\n        change [level v] by (1)\n    end\nend\n\nwhen I receive [alright bros let's go v]\nset [change? v] to [0]\nforever\n    if <<(x position) = [161]> and <(dead?) = [0]>> then\n        broadcast (NEXT LEVEL v)\n        change [level v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [TobyMac - Speak life v] until done\nend\n\nwhen flag clicked\nhide\ngo to [back v] layer\n\nwhen I receive [alright bros let's go v]\nshow\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    if <touching (spikes2 v)?> then\n        reset\n    end\nend\n\nwhen flag clicked\nchange [☁ viewers v] by (1)\n\nwhen flag clicked\nshow\n\n@Ground\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nhide\nswitch costume to (costume1 v)\nbroadcast (alright bros let's go v)\nshow\n\nwhen flag clicked\ngo [forward v] (1) layers\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [2]> then\n        broadcast (Coustume number is 2 v)\n    end\nend\n\nwhen flag clicked\nif <not <(costume [number v]) = [2]>> then\n    broadcast (coustume number is not 2 don't make mask avaible v)\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [3]> then\n        broadcast (coustume neumber is 3 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [4]> then\n        broadcast (coustume number is 4 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [5]> then\n        broadcast (hid men show enemy's v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [5]> then\n        broadcast (Coustume number is 5 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [6]> then\n        broadcast (The end v)\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nhide\nwait (1) seconds\nbroadcast (alright bros let's go v)\n\n@backround\n\nwhen flag clicked\nswitch costume to (level 1  v)\n\nwhen I receive [next level v]\nnext costume\n\n@spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [coustume number is 2 v]\nshow\n\nwhen I receive [coustume neumber is 3 v]\nhide\n\n@enemy\n\nwhen flag clicked\nhide\n\nwhen I receive [coustume neumber is 3 v]\nshow\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    go to x: (138) y: (25)\n    switch costume to (costume1 v)\n    glide (3) secs to x: (-114) y: (21)\n    wait (0.1) seconds\n    switch costume to (costume2 v)\n    glide (3) secs to x: (137) y: (25)\nend\n\nwhen I receive [coustume number is 4 v]\nhide\n\n@rule breakers\n\nwhen flag clicked\nhide\n\nwhen I receive [coustume number is 4 v]\nshow\n\nwhen I receive [cough v]\nplay sound [Cough2 v] until done\n\nwhen I receive [hid men show enemy's v]\nhide\n\n@Sprite1\n\nwhen flag clicked\nhide\n\nwhen I receive [cough v]\nshow\ngo to [front v] layer\nglide (2) secs to x: (94) y: (-162)\nswitch costume to (cfd7a4f3a8146e815867f3781299561c_middle-east-respiratory-syndrome-coronavirus-indoor-mold-png-_820-2 v)\n\nwhen flag clicked\ngo to x: (77) y: (20)\n\n@spikes2\n\nwhen flag clicked\nhide\n\nwhen I receive [coustume number is 5 v]\nshow\n\nwhen I receive [the end v]\nhide\n\n