Pizza Quest~A Platformer

Instructions: woah  3000+ views\n\npart2 ~   https://scratch.mit.edu/projects/941527294/\narrow keys \nget 10 secret pizzas to complete a mission\ntouch spike -10\nbeat world record\nSCORE 100 TO COMPLETE A MISSION\nSCORE 200 COMPLETE A MISSION\nSCORE 300 COMPLETE A MISSION\nSCORE 400 COMPLETE A MISSION\nSCORE 500 COMPLETE A MISSION\n50 likes for a part2\nin part2 \ni will add more missions and more score awards\nand enemies...........\n

@Stage\n\nwhen I receive [start v]\nforever\n    if <key (right arrow v) pressed?> then\n        wait (1) seconds\n        change [score v] by (1)\n    end\nend\n\n@Sprite1\n\nwhen I start as a clone\ngo to [back v] layer\ngo to x: (pick random (-200) to (200)) y: (180)\npoint in direction (pick random (360) to (-360))\nshow\nset size to (pick random (20) to (26)) %\nset [ghost v] effect to (pick random (70) to (60))\nforever\n    change y by (-10)\n    if <(y position) < [-180]> then\n        go to x: (pick random (-200) to (200)) y: (180)\n    end\nend\n\nwhen I receive [start v]\nforever\n    create clone of (_myself_ v)\nend\n\nwhen I receive [change scene v]\nforever\n    create clone of (_myself_ v)\nend\n\n@player\n\nwhen flag clicked\n\ndefine move-in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speedx) / (steps))\n    check touching solid\n    if <(touching) > [0]> then\n        set x to (last value)\n        set [speedx v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((pseedy) / (steps))\n    check touching solid\n    if <(touching) > [0]> then\n        set y to (last value)\n        if <(pseedy) < [0]> then\n            set [falling v] to [0]\n        end\n        set [pseedy v] to [0]\n    end\nend\n\ndefine check touching solid\nif <touching (level v)?> then\n    set [touching v] to [1]\nelse\n    set [touching v] to [0]\nend\n\nwhen I receive [tick-player v]\ncontrols-up and down\ncontrols #left#right\nmove-in steps (([abs v] of (speedx) ) + ([abs v] of (pseedy) ))\nSet Costume\n\ndefine controls-up and down\nif <<key (up arrow v) pressed?> or <mouse down?>> then\n    if <(falling) < [3]> then\n        set [pseedy v] to (jump force)\n    end\nend\nchange [pseedy v] by (gravity)\n\ndefine controls #left#right\nset [keyx v] to ((<key (right arrow v) pressed?> - <key (left arrow v) pressed?>) + <mouse down?>)\nif <(KeyX) = [0]> then\n    if <([abs v] of (speedx) ) < [1]> then\n        set [frame v] to [0]\n        set [speedx v] to [0]\n    else\n        change [frame v] by (0.5)\n    end\nelse\n    change [speedx v] by ((KeyX) * (acceleration))\n    point in direction ((KeyX) * (90))\n    change [frame v] by (1)\nend\nset [speedx v] to ((speedx) * (resistence))\n\ndefine #reset#begin#level\ngo to x: (-147) y: (-9)\nset [scene# v] to [1]\nset [pseedy v] to [0]\nset [speedx v] to [0]\nset [falling v] to [99]\nbroadcast (game loop v)\nbroadcast (change scene v)\n\nwhen I receive [game loop v]\nforever\n    broadcast (tick first v)\n    broadcast (tick-player v)\n    broadcast (tick last v)\nend\n\nwhen I receive [tick last v]\nif <(x position) > [235]> then\n    begin scene# ((scene#) + (1)) go to x: [-235]\nend\nif <(x position) < [-235]> then\n    begin scene# ((scene#) + (-1)) go to x: [235]\nend\n\ndefine begin scene# (scene#) go to x: (x)\nset [scene# v] to (scene#)\nset x to (x)\nbroadcast (change scene v)\nstop [other scripts in sprite v]\nwait (0) seconds\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\nfix collision in direction [0]\nSet Costume\nbroadcast (game loop v)\n\ndefine fix collision in direction (dir)\nset [tempo v] to (direction)\npoint in direction (dir)\nset [distance v] to [1]\nrepeat (200)\n    check touching solid\n    if <(touching) < [1]> then\n        point in direction (tempo)\n        stop [this script v]\n    end\n    move (distance) steps\n    turn right (180) degrees\n    change [distance v] by (1)\nend\n\nwhen I receive [tick first v]\nswitch costume to (hitbox v)\nset rotation style [don't rotate v]\n\ndefine Set Costume\nset rotation style [left-right v]\nif <(falling) > [1]> then\n    if <(pseedy) > [0]> then\n        switch costume to (jump01 v)\n    else\n        switch costume to (run_j2 v)\n    end\n    stop [this script v]\nend\nif <(FRAME) > [0]> then\n    switch costume to ((1) + ([floor v] of ((FRAME) mod (16)) ))\nelse\n    switch costume to (stand v)\nend\n\nwhen I receive [lose v]\ngo to x: ( -175) y: (114)\n\nwhen I receive [start v]\ngo to x: (-175) y: (114)\npoint in direction (90)\nset [gravity v] to [-1.5]\nset [jump force v] to [12]\nset [acceleration v] to [1.5]\nset [resistence v] to [0.8]\n#reset#begin#level\n\n@level\n\nwhen flag clicked\nswitch costume to (scene1 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    if <(costume [name v]) = [scene11]> then\n        broadcast (mc\ v)\n        change [score v] by (0)\n        set [score v] to (score)\n    end\nend\n\nwhen I receive [change scene v]\nswitch costume to (join [scene] (scene#))\n\n@f83b4e37fcecaad2d94ae182c7cca62f\n\nwhen flag clicked\nhide\nset [☁ secret  pizzas v] to [0]\nforever\n    play sound [Freddy's Music box v] until done\nend\n\n@DJLENZ\n\nwhen flag clicked\nset size to (100) %\npoint in direction (90)\ngo to [front v] layer\ngo to x: (-124) y: (0)\nglide (1) secs to x: (30) y: (0)\nglide (1) secs to x: (-100) y: (0)\nglide (1) secs to x: (0) y: (100)\nglide (1) secs to x: (0) y: (0)\nwait (0) seconds\nrepeat (2)\n    turn right (15) degrees\n    wait (0) seconds\n    change size by (-20)\n    wait (0) seconds\n    turn left (30) degrees\n    wait (0) seconds\n    change size by (-20)\n    point in direction (90)\nend\nhide\nbroadcast (START v)\n\nwhen flag clicked\nshow\n\ndelete this clone\n\nhide\n\n@spike\n\nwhen flag clicked\nswitch costume to (scene1 v)\nset [score v] to [0]\ngo to x: (0) y: (0)\ngo to [back v] layer\nhide variable [score v]\nhide variable [☁ world record v]\nforever\n    if <touching (player v)?> then\n        broadcast (LOSE v)\n        change [score v] by (-1)\n        if <(score) > (☁ world record)> then\n            set [☁ world record v] to (score)\n        end\n    end\n    if <(score) = [100]> then\n        broadcast (SCORE1 v)\n    end\n    if <(score) = [200]> then\n        broadcast (SC2 v)\n    end\n    if <(score) = [300]> then\n        broadcast (SC3 v)\n    end\n    if <(score) = [400]> then\n        broadcast (SC4 v)\n    end\n    if <(score) = [500]> then\n        broadcast (SC5 v)\n    end\nend\n\nwhen I receive [change scene v]\nswitch costume to (join [scene] (scene#))\nif <(costume [number v]) = [10]> then\n    broadcast (mc\ v)\nend\n\nwhen I receive [start v]\nshow variable [☁ world record v]\nshow variable [score v]\n\nwhen I receive [start v]\nif <key (right arrow v) pressed?> then\n    wait (1) seconds\n    change [score v] by (1)\nend\n\n@pizza\n\nwhen flag clicked\nhide variable [☁ secret  pizzas v]\n\nwhen I receive [change scene v]\nshow\nclear graphic effects\nswitch costume to (join [scene] (scene#))\n\nglide (0.5) secs to x: (0) y: (3)\n\nwhen I receive [start v]\nshow\nshow variable [☁ secret  pizzas v]\nclear graphic effects\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    glide (0.5) secs to x: (0) y: (3)\n    glide (0.5) secs to x: (0) y: (-2)\n    if <touching (player v)?> then\n        glide (0.2) secs to x: (0) y: (78)\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        hide\n        set [☁ secret  pizzas v] to ((☁ Secret  Pizzas) + (1))\n        if <(☁ Secret  Pizzas) = [10]> then\n            broadcast (PIZZA COMPLERE v)\n        end\n    end\nend\n\n@secret pizza indicator\n\nwhen flag clicked\nset [☁ secret  pizzas v] to [0]\nhide\ngo to x: (36) y: (200)\n\nwhen I receive [pizza complere v]\nswitch costume to (costume1 v)\nshow\nglide (2) secs to x: (17) y: (60)\nwait (1) seconds\nglide (2) secs to x: (17) y: (200)\n\nwhen I receive [score1 v]\nswitch costume to (costume2 v)\nshow\nglide (2) secs to x: (17) y: (60)\nwait (1) seconds\nglide (2) secs to x: (17) y: (200)\n\nwhen I receive [sc2 v]\nswitch costume to (costume3 v)\nshow\nglide (2) secs to x: (17) y: (60)\nwait (1) seconds\nglide (2) secs to x: (17) y: (200)\n\nwhen I receive [sc3 v]\nswitch costume to (costume4 v)\nshow\nglide (2) secs to x: (17) y: (60)\nwait (1) seconds\nglide (2) secs to x: (17) y: (200)\n\nwhen I receive [sc4 v]\nswitch costume to (costume5 v)\nshow\nglide (2) secs to x: (17) y: (60)\nwait (1) seconds\nglide (2) secs to x: (17) y: (200)\n\nwhen I receive [sc5 v]\nswitch costume to (costume6 v)\nshow\nglide (2) secs to x: (17) y: (60)\nwait (1) seconds\nglide (2) secs to x: (17) y: (200)\n\nwhen I receive [mc\ v]\ngo to [front v] layer\nswitch costume to (costume7 v)\nshow\nglide (2) secs to x: (17) y: (60)\nwait (1) seconds\nglide (2) secs to x: (17) y: (200)\n\n