Minecraft Scrolling Platformer || (Mobile) #games #platformer

Instructions: Привет!\nДавненько не было платформеров!\nИ сегодня я решил, что сегодня выйдет платформер!\n13.11.2023 - попадание в исследуй!\nhttps://scratch.mit.edu/projects/931549226

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen I receive [endddd v]\nstop [other scripts in sprite v]\n\nwhen I receive [music v]\nwait (1) seconds\nforever\n    play sound [Orange Justice v] until done\nend\n\nwhen I receive [hpis=0 v]\n\nwhen I receive [vr v]\nstop [other scripts in sprite v]\n\n@Player\n\nwhen flag clicked\ngo to [front v] layer\nswitch costume to (default v)\nhide\n\ndefine Death\nbroadcast (Death v)\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ngo to x: (-203) y: (-92)\npoint in direction (90)\nset [ghost v] effect to (0)\n\ndefine Next Level\nset [xv v] to [0]\nset [yv v] to [0]\nbroadcast (nextlevel v)\ngo to x: (-203) y: (-92)\n\ndefine Bouncy\nset [yv v] to [17]\n\nwhen I receive [d v]\nswitch costume to (default v)\n\nwhen I receive [mm v]\nswitch costume to (marauder v)\n\nwhen I receive [r v]\nswitch costume to (reaper v)\n\nwhen I receive [h v]\nswitch costume to (havoc v)\n\nwhen I receive [play v]\nclear graphic effects\nset volume to (50) %\nset size to (30) %\nset rotation style [left-right v]\ngo to x: (-197) y: (200)\npoint in direction (90)\nset [xv v] to [0]\nset [yv v] to [0]\nhide\nwait (1) seconds\nstart sound [Fall v]\nwait (1.5) seconds\nshow\nglide (0.5) secs to x: (-197) y: (-120)\nstart sound [Punch v]\nforever\n    set drag mode [not draggable v]\n    go to [front v] layer\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        change [xv v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change x by (Xv)\n    if <<touching color (#b5b5b5)?> or <touching color (#40ae3e)?>> then\n        change y by (1)\n        if <<touching color (#b5b5b5)?> or <touching color (#40ae3e)?>> then\n            change y by (1)\n            if <<touching color (#b5b5b5)?> or <touching color (#40ae3e)?>> then\n                change y by (1)\n                if <<touching color (#b5b5b5)?> or <touching color (#40ae3e)?>> then\n                    change y by (1)\n                    if <<touching color (#b5b5b5)?> or <touching color (#40ae3e)?>> then\n                        change y by (1)\n                        if <<touching color (#b5b5b5)?> or <touching color (#40ae3e)?>> then\n                            change x by ((Xv) * (-1))\n                            change y by (-5)\n                            if <key (up arrow v) pressed?> then\n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [yv v] by (-1)\n    change y by (Yv)\n    if <<touching color (#b5b5b5)?> or <touching color (#40ae3e)?>> then\n        change y by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    change y by (-1)\n    if <<touching color (#b5b5b5)?> or <touching color (#40ae3e)?>> then\n        if <key (up arrow v) pressed?> then\n            set [yv v] to [13]\n        end\n    end\n    if <touching color (#585858)?> then\n        start sound [Health Hit 1 v]\n        Death\n    end\n    if <touching color (#e524d2)?> then\n        start sound [Tire Bounce 3 v]\n        Bouncy\n    end\n    if <(x position) > [220]> then\n        Next Level\n    end\n    change y by (1)\nend\n\nwhen I receive [pix v]\nrepeat (50)\n    change [pixelate v] effect by (2)\nend\nbroadcast (done v)\nhide\nwait (1) seconds\n\nwhen I receive [hpis=0 v]\npoint in direction (90)\ngo to x: (-197) y: (-121)\nstop [other scripts in sprite v]\n\nwhen I receive [hpis=0 v]\nhide\n\nwhen flag clicked\nadd (username) to [usernames v]\n\n@HP Bar\n\nwhen flag clicked\ngo to [front v] layer\nset [hp v] to [100]\nswitch costume to (100 v)\nhide\nforever\n    if <(HP) = [0]> then\n        broadcast (HPis=0 v)\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [death v]\nif <not <(costume [number v]) = [6]>> then\n    change [hp v] by (-20)\n    next costume\nelse\n    broadcast (HPis=0 v)\n    stop [this script v]\nend\n\nwhen I receive [play v]\ngo to x: (0) y: (150)\nshow\n\nwhen I receive [heal v]\nset [hp v] to [100]\nswitch costume to (100 v)\n\n@Platforms\n\nwhen flag clicked\nswitch costume to (level-1 v)\nhide\n\nwhen I receive [play v]\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [nextlevel v]\nnext costume\n\nwhen I receive [endddd v]\nhide\n\n@Play\n\nwhen flag clicked\npoint in direction (90)\nshow\nforever\n    repeat (10)\n        turn right (1) degrees\n    end\n    forever\n        repeat (20)\n            turn left (1) degrees\n        end\n        repeat (20)\n            turn right (1) degrees\n        end\n    end\nend\n\nwhen flag clicked\nset size to (130) %\ngo to x: (-76) y: (-45)\nforever\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(y position) < [-100]>> then\n        broadcast (Play v)\n        hide\n    end\nend\n\nwhen I receive [locker v]\ngo to x: (-185) y: (-131)\n\nwhen I receive [play v]\ngo to x: (-400) y: (-300)\nhide\n\nwhen flag clicked\nforever\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(y position) > [-100]>> then\n        broadcast (Locker v)\n        set size to (100) %\n    end\nend\n\n@Background\n\nwhen I receive [locker v]\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nshow\nset volume to (60) %\nstart sound [Fortnite v]\n\nwhen I receive [play v]\nstop all sounds\nhide\n\n@Locker BG\n\nwhen I receive [play v]\nhide\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\ngo to [back v] layer\n\nwhen I receive [locker v]\nshow\n\n@Button-2\n\nwhen flag clicked\nswitch costume to (marauder v)\ngo to x: (-1000) y: (-1000)\nset size to (40) %\nhide\n\nwhen I receive [play v]\ngo to x: (-1000) y: (-1000)\nset size to (40) %\nhide\n\nwhen I receive [locker v]\ngo to x: (-50) y: (0)\nshow\n\nwhen flag clicked\nforever\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(costume [number v]) = [1]>> then\n        broadcast (MM v)\n        switch costume to (marauder2 v)\n    end\nend\n\nwhen I receive [d v]\nswitch costume to (marauder v)\n\nwhen I receive [r v]\nswitch costume to (marauder v)\n\nwhen I receive [h v]\nswitch costume to (marauder v)\n\n@Button-3\n\nwhen flag clicked\ngo to x: (-1000) y: (-1000)\nset size to (40) %\nhide\n\nwhen I receive [play v]\ngo to x: (-1000) y: (-1000)\nset size to (40) %\nhide\n\nwhen flag clicked\nswitch costume to (reaper v)\ngo to x: (-1000) y: (-1000)\nset size to (40) %\nhide\n\nwhen I receive [locker v]\ngo to x: (50) y: (0)\nshow\n\nwhen flag clicked\nforever\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(costume [number v]) = [1]>> then\n        broadcast (R v)\n        switch costume to (reaper2 v)\n    end\nend\n\nwhen I receive [d v]\nswitch costume to (reaper v)\n\nwhen I receive [mm v]\nswitch costume to (reaper v)\n\nwhen I receive [h v]\nswitch costume to (reaper v)\n\n@Button-4\n\nwhen flag clicked\nswitch costume to (havoc v)\ngo to x: (-1000) y: (-1000)\nset size to (40) %\nhide\n\nwhen I receive [play v]\ngo to x: (-1000) y: (-1000)\nset size to (40) %\nhide\n\nwhen I receive [locker v]\ngo to x: (150) y: (0)\nshow\n\nwhen flag clicked\nforever\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(costume [number v]) = [1]>> then\n        broadcast (H v)\n        switch costume to (havoc2 v)\n    end\nend\n\nwhen I receive [d v]\nswitch costume to (havoc v)\n\nwhen I receive [mm v]\nswitch costume to (havoc v)\n\nwhen I receive [r v]\nswitch costume to (havoc v)\n\n@Medkit\n\nwhen flag clicked\nset size to (75) %\nswitch costume to (medkit v)\nhide\n\nwhen I receive [play v]\nforever\n    if <([costume # v] of [platforms v]) = [2]> then\n        go to x: (180) y: (-110)\n        show\n        forever\n            repeat (30)\n                change y by (0.2)\n            end\n            repeat (30)\n                change y by (-0.2)\n            end\n        end\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <touching (player v)?> then\n        if <(HP) < [100]> then\n            start sound [Heal v]\n            wait (1) seconds\n            broadcast (Heal v)\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n            hide\n            clear graphic effects\n        end\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <([costume # v] of [platforms v]) = [9]> then\n        go to x: (150) y: (-110)\n        show\n        forever\n            repeat (30)\n                change y by (0.2)\n            end\n            repeat (30)\n                change y by (-0.2)\n            end\n        end\n    end\nend\n\nwhen I receive [play v]\nforever\n    if <([costume # v] of [platforms v]) = [11]> then\n        go to x: (60) y: (80)\n        show\n        forever\n            repeat (30)\n                change y by (0.2)\n            end\n            repeat (30)\n                change y by (-0.2)\n            end\n        end\n    end\nend\n\nwhen I receive [nextlevel v]\nhide\n\nwhen I receive [endddd v]\nhide\n\n@Bot\n\nwhen flag clicked\ngo to x: (-18) y: (133)\nhide\n\nwhen I receive [hpis=0 v]\nshow\nglide (1) secs to (player v)\nstart sound [Elimination 1 v]\nbroadcast (Pix v)\n\nwhen I receive [done v]\nwait (1) seconds\nglide (1) secs to x: (-18) y: (133)\nhide\nbroadcast (ENdddd v)\n\n@VR\n\nwhen flag clicked\nhide\n\nwhen I receive [play v]\nforever\n    if <([costume # v] of [platforms v]) = [15]> then\n        broadcast (Vr v)\n        start sound [Victory Royale \(New\) v]\n        set size to (70) %\n        show\n        go to x: (51) y: (13)\n        stop [this script v]\n    end\nend\n\n@End\n\nwhen flag clicked\npoint in direction (90)\nhide\nforever\n    repeat (10)\n        turn right (0.5) degrees\n    end\n    forever\n        repeat (20)\n            turn left (0.5) degrees\n        end\n        repeat (20)\n            turn right (0.5) degrees\n        end\n    end\nend\n\nwhen I receive [play v]\nswitch costume to (costume1 v)\nforever\n    if <([costume # v] of [platforms v]) = [15]> then\n        set size to (70) %\n        show\n        go to x: (-152) y: (46)\n        forever\n            play sound [Eagle v] until done\n        end\n    end\nend\n\nwhen I receive [endddd v]\nset size to (100) %\ngo to x: (0) y: (0)\nnext backdrop\nshow\nnext costume\n\nwhen I receive [endddd v]\nforever\n    play sound [Infinite Dab v] until done\nend\n\n