Minecraft Platformer 4  - Mobile friendly!

Instructions: https://scratch.mit.edu/projects/723152878/\nケーキを作ろうも出したよ！\n\nボケて↓\nhttps://scratch.mit.edu/projects/722435321/\n\nマインクラフトプラットフォーマーの進化版！面白いよ！\n日本語は下\n\nEnglish\nArrow keys or tap or word keys to control\nLava or falling will cause damage.\nBets are checkpoints.\nWhen your life reaches 0, you will return to the checkpoint.\nIf you are in the water, you can float in the air.\n\n日本語\n\n前のマインクラフトプラットフォーマーの進化版です！クオリティーがとても上がっています！ハートと星を押してくれたらとても嬉しいです！\n\n操作方法\n矢印キーまたはタップまたはwordキーで操作\n溶岩または落ちるとダメージを食らいます\nスペースキーまたは剣をタップで攻撃\nベットはチェックポイントです\nライフが0になるとチェックポイントに戻ります気をつけましょう\n水の中にいると空中で浮けます

@Stage\n\nwhen I receive [tick v]\ndelete all of [items v]\nadd (join (join [Mouse: \(] ((SCROLL X) + (mouse x))) (join [, ] (join (mouse y) [\)]))) to [items v]\nadd (join (join [Player: \(] ([x v] of [platformer script v])) (join [, ] (join ([y v] of [platformer script v]) [\)]))) to [items v]\n\nwhen I receive [stop music v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nforever\n    play sound [c418-sweden-minecraft-volume-alpha v] until done\nend\n\n@Blank\n\n@Level\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X))\n\nwhen I receive [set up v]\nshow\nset [x v] to [-480]\nswitch costume to (1 v)\nClone\n\ndefine Position (x)\nset [costume v] to (costume [number v])\nswitch costume to (1 v)\nset size to ((1) / ()) %\ngo to x: (x) y: (0)\nswitch costume to (costume)\nset size to (100) %\nif <([abs v] of (x position) ) > [480]> then\n    hide\nelse\n    show\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\ndefine Clone\nrepeat (14)\n    Clone at x: [480] y: [0]\nend\n\n@Platformer Script\n\nwhen flag clicked\nhide\ngo to [front v] layer\nbroadcast (Play Game v) and wait\n\nwhen I receive [play game v]\nset [level v] to [1]\nif <(First) = [0]> then\n    Game On\n    broadcast (Reset v) and wait\n    broadcast (Set up v) and wait\n    broadcast (Setup 2 v)\n    broadcast (Tick v) and wait\n    set [first v] to [1]\nend\nforever\n    Game On\n    broadcast (Reset v) and wait\n    broadcast (Set up v) and wait\n    broadcast (Setup 2 v)\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [Win]> then\n        broadcast (Win Screen v)\n    else\n        Game - Die\n    end\nend\n\ndefine Game On\nset [scroll x v] to [0]\nset [x v] to [-150]\nset [y v] to [-76]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset [health v] to [20]\nset [player knockback v] to [0]\nset [invisibility v] to [0]\nset [start run? v] to [0]\nPosition\npoint in direction (90)\nset volume to (100) %\nset size to (40) %\nclear graphic effects\nshow\n\ndefine Tick\nswitch costume to (1 v)\nset rotation style [don't rotate v]\nif <(Start Run?) = [0]> then\n    reset timer\nend\nif <(Player Knockback) = [0]> then\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n        change [sx v] by (2)\n        set [start run? v] to [1]\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n        change [sx v] by (-2)\n        set [start run? v] to [1]\n    end\n    set [sx v] to ((sx) * (0.8))\nend\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <(Player Knockback) = [0]> then\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [start run? v] to [1]\n        if <(in air) < [4]> then\n            set [sy v] to [16]\n        end\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange player y by (sy)\nPosition\nif <(SCROLL X) < [6240]> then\n    set [scroll x v] to (x)\nend\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL X) > ((480) * (13))> then\n    set [scroll x v] to ((480) * (13))\nend\nif <(x) < [-240]> then\n    set [x v] to [-240]\nend\nif <(x) > [6480]> then\n    set [x v] to [6480]\nend\nset rotation style [left-right v]\nPosition\nif <<(y) < [-180]> or <(Health) < [1]>> then\n    set [exit v] to [Die]\nend\nif <<<touching (entities v)?> or <touching (arrow v)?>> and <(Player Knockback) = [0]>> then\n    set [player knockback v] to [1]\n    if <(Invisibility) = [0]> then\n        set [invisibility v] to [1]\n        set [sy v] to [10]\n        set [sx v] to ((Hit) / (15))\n    end\nend\nif <(Player Knockback) = [1]> then\n    if <(in air) = [0]> then\n        set [player knockback v] to [0]\n    end\nend\nif <(Invisibility) > [0]> then\n    set [ghost v] effect to (20)\n    if <(Invisibility) = [2]> then\n        broadcast (Hurt v)\n        start sound [Hurt v]\n        change [health v] by (-4)\n    end\n    change [invisibility v] by (1)\n    if <(Invisibility) > [50]> then\n        set [invisibility v] to [0]\n    end\nelse\n    set [ghost v] effect to (0)\nend\nif <(Player Knockback) = [0]> then\n    switch costume to (2 v)\nelse\n    switch costume to (3 v)\nend\nif <<(-Love Project) = [1]> and <(-Favorite Project) = [1]>> then\n    switch costume to ((costume [number v]) + (2))\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (level v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: (y)\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (level v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (level v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <touching (level v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - Die\nbroadcast (Dead v)\nset [exit v] to []\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\ndefine Game Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\nwhen I receive [win screen v]\nstop [other scripts in sprite v]\n\nset [first v] to [0]\n\n@Background\n\nwhen I receive [grenn flag v]\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X))\n\nwhen I receive [set up v]\nshow\nset [x v] to [-480]\nset [y v] to [0]\nswitch costume to (1 v)\nClone\n\ndefine Position (x)\nset [costume v] to (costume [number v])\nswitch costume to (1 v)\nset size to ((1) / ()) %\ngo to x: (x) y: (0)\nswitch costume to (costume)\nset size to (100) %\nset [brightness v] effect to (-12)\nif <([abs v] of (x position) ) > [480]> then\n    hide\nelse\n    show\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\ndefine Clone\nrepeat (15)\n    Clone at x: [480] y: [0]\nend\n\n@Sword\n\nwhen I receive [tick v]\nif <([direction v] of [platformer script v]) = [90]> then\n    go to x: (([x position v] of [platformer script v]) + (44)) y: (([y position v] of [platformer script v]) + ((7) + ((Direction) / (-3))))\n    point in direction ((Direction) + (90))\n    switch costume to (1 v)\nelse\n    go to x: (([x position v] of [platformer script v]) + (-44)) y: (([y position v] of [platformer script v]) + ((7) + ((Direction) / (-3))))\n    point in direction ((90) - (Direction))\n    switch costume to (2 v)\nend\nif <([invisibility v] of [platformer script v]) > [0]> then\n    set [ghost v] effect to (20)\nelse\n    set [ghost v] effect to (0)\nend\n\nwhen I receive [set up v]\nshow\n\nwhen flag clicked\nshow\nset size to (30) %\nset [direction v] to [0]\nforever\n    if <<key (space v) pressed?> or <<key (x v) pressed?> or <key (m v) pressed?>>> then\n        set [attack v] to [1]\n        repeat (5)\n            change [direction v] by (12)\n        end\n        repeat (2)\n            change [direction v] by (-24)\n        end\n        set [attack v] to [0]\n        set [direction v] to [0]\n        wait (0.4) seconds\n        wait until <not <<key (space v) pressed?> or <<key (x v) pressed?> or <key (m v) pressed?>>>>\n    end\nend\n\nwhen I receive [dead v]\nrepeat (5)\n    hide\n    wait (0.1) seconds\n    show\n    wait (0.1) seconds\nend\nhide\nwait (0.5) seconds\n\n@Entities\n\ndefine Clone (clone) X (x) Y (y) Bound 1 (bound 1) Bound 2 (bound 2)\nset [clone v] to (clone)\nset [x v] to (x)\nset [y v] to (y)\nset [bound 1 v] to (bound 1)\nset [bound 2 v] to (bound 2)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nReset\nwait until <(SCROLL X) > ((x) - (250))>\nset [can move v] to [1]\n\nwhen I receive [tick v]\nset [costume v] to (costume [number v])\nswitch costume to (bypass v)\nset size to ((1) / ()) %\ngo to x: ((x) - (SCROLL X)) y: (y)\nswitch costume to (costume)\nset size to (110) %\nif <([abs v] of (x position) ) > [480]> then\n    hide\nelse\n    show\nend\nif <([abs v] of (x position) ) < [250]> then\n    Clone AI\nend\nif <(x) > [6480]> then\n    set [x v] to [6480]\nend\n\nwhen I receive [delete clones v]\ndelete this clone\n\ndefine Clone AI\nset rotation style [left-right v]\nif <(clone) = [1]> then\n    switch costume to (3 v)\n    if <(Knockback) = [0]> then\n        if <(x position) > ([x position v] of [platformer script v])> then\n            if <(x) > (bound 1)> then\n                change [x velocity v] by (-0.7)\n                point in direction (-90)\n            end\n        else\n            if <(x) < (bound 2)> then\n                change [x velocity v] by (0.7)\n                point in direction (90)\n            end\n        end\n        set [x velocity v] to ((x velocity) * (0.8))\n        if <touching (hitbox v)?> then\n            if <(Health) > [0]> then\n                start sound (pick random (2) to (3))\n            end\n            set [knockback v] to [1]\n            set [y velocity v] to [6]\n            set [x velocity v] to (([direction v] of [platformer script v]) / (30))\n            change [health v] by (-4)\n        end\n    end\n    change [x v] by (x velocity)\n    if <touching (platformer script v)?> then\n        set [hit v] to (direction)\n    end\n    if <(Knockback) > [0]> then\n        change [knockback v] by (1)\n        if <<touching (level v)?> and <(Knockback) > [2]>> then\n            set [knockback v] to [0]\n        end\n    end\n    if <<(y) < [-250]> or <(Health) < [1]>> then\n        change [enemies defeated v] by (1)\n        change [progress v] by (1)\n        start sound [Death v]\n        delete this clone\n    end\n    Touching\n    change [y velocity v] by (-1)\n    change [y v] by (y velocity)\n    if <(Knockback) = [0]> then\n        switch costume to (1 v)\n    else\n        switch costume to (2 v)\n    end\nend\nif <(clone) = [2]> then\n    switch costume to (3 v)\n    point in direction (-90)\n    if <<touching (hitbox v)?> and <(Knockback) = [0]>> then\n        start sound [skeletonhurt2 v]\n        set [knockback v] to [1]\n        set [y velocity v] to [6]\n        set [x velocity v] to (([direction v] of [platformer script v]) / (30))\n        change [health v] by (-4)\n    end\n    if <(Health) < [1]> then\n        change [enemies defeated v] by (1)\n        change [progress v] by (1)\n        start sound [skeletondeath v]\n        delete this clone\n    end\n    if <(Knockback) > [0]> then\n        change [knockback v] by (1)\n        if <<touching (level v)?> and <(Knockback) > [2]>> then\n            set [knockback v] to [0]\n        end\n    end\n    Touching\n    change [y velocity v] by (-1)\n    change [y v] by (y velocity)\n    if <(Knockback) = [0]> then\n        switch costume to (4 v)\n    else\n        switch costume to (5 v)\n    end\n    change [arrow tick v] by (1)\n    if <(Arrow Tick) > [59]> then\n        start sound [Arrow v]\n        create clone of (arrow v)\n        set [arrow tick v] to [0]\n    end\nend\n\nwhen I receive [reset v]\nbroadcast (Delete Clones v)\nset [progress v] to [0]\nswitch costume to (1 v)\nReset\nset [enemies defeated v] to [0]\nClone [1] X [2595] Y [-15] Bound 1 [2055] Bound 2 [2595]\nClone [1] X [3430] Y [-12] Bound 1 [3140] Bound 2 [3430]\nClone [1] X [3900] Y [-12] Bound 1 [3636] Bound 2 [4058]\nset [x v] to [-6969]\nset [y v] to [-420]\n\ndefine Reset\nset [can move v] to [0]\nset [knockback v] to [0]\nset [y velocity v] to [0]\nset [health v] to [20]\n\ndefine Touching\nif <<touching (level v)?> and <(Knockback) = [0]>> then\n    change [y v] by (1)\n    set [y velocity v] to [0]\nend\n\nwhen I receive [setup 2 v]\nwait until <(SCROLL X) = [6240]>\nset [progress v] to [0]\nbroadcast (Delete Clones v)\nClone [1] X [6449] Y [-76] Bound 1 [5880] Bound 2 [6449]\nClone [2] X [6449] Y [-76] Bound 1 [6449] Bound 2 [6449]\nset [x v] to [-9999]\nset [y v] to [-999]\nwait until <(Progress) = [2]>\nwait (0.5) seconds\nset [exit v] to [Win]\n\nwhen I receive [dead v]\nstop [other scripts in sprite v]\n\n@Hitbox\n\nwhen I receive [tick v]\nset size to (25) %\nif <([direction v] of [platformer script v]) = [90]> then\n    go to x: (([x position v] of [platformer script v]) + (44)) y: (([y position v] of [platformer script v]) + (3))\nelse\n    go to x: (([x position v] of [platformer script v]) + (-44)) y: (([y position v] of [platformer script v]) + (3))\nend\nif <([attack v] of [sword v]) = [0]> then\n    hide\nelse\n    show\nend\nset [ghost v] effect to (100)\n\n@Health2\n\nwhen I receive [tick v]\nswitch costume to ((([health v] of [platformer script v]) / (2)) + (1))\n\nwhen I receive [hurt v]\nset [brightness v] effect to (100)\nwait (0.1) seconds\nset [brightness v] effect to (0)\n\nwhen I receive [dead v]\nif <([health v] of [platformer script v]) > [0]> then\n    start sound [hurt v]\nend\nset [brightness v] effect to (100)\nwait (0.1) seconds\nswitch costume to (health0 v)\nset [brightness v] effect to (0)\n\nwhen I receive [win screen v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Arrow\n\nwhen I start as a clone\ngo to x: (185) y: (-85)\nshow\nset size to (25) %\nset [extra time v] to [0]\n\nwhen I receive [delete clones v]\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [tick v]\nchange x by (-20)\nif <<(x position) < [-240]> or <touching (platformer script v)?>> then\n    change [extra time v] by (1)\n    if <(Extra Time) > [3]> then\n        delete this clone\n    end\nend\n\n@Win Screen\n\nwhen flag clicked\nhide\n\nwhen I receive [win screen v]\nshow\nswitch costume to (3 v)\nset [ghost v] effect to (100)\ngo to [front v] layer\ncreate clone of (_myself_ v)\nrepeat (10)\n    change [ghost v] effect by (-3)\nend\n\nwhen I start as a clone\nshow\nif <(Enemies Defeated) < [5]> then\n    switch costume to (1 v)\nelse\n    switch costume to (2 v)\nend\nset [ghost v] effect to (100)\ngo to [front v] layer\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\nwhen I receive [win screen v]\nchange [☁ completed platformer v] by (1)\nif <(Enemies Defeated) = [5]> then\n    change [☁ beat the game v] by (1)\nend\nplay sound [Win v] until done\nif <(Enemies Defeated) = [5]> then\n    broadcast (Stop Music v)\n    forever\n        play sound [Revenge v] until done\n    end\nend\n\n@Text:\n\ndefine Write Text (text)\ngo to x: (-150) y: (153)\nset [i v] to [1]\nrepeat (length of (text))\n    switch costume to (letter (i) of (text))\n    change [i v] by (1)\n    create clone of (_myself_ v)\n    change x by (20)\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [delete text v]\ndelete this clone\n\nwhen I receive [tick v]\nbroadcast (Delete Text v)\nWrite Text (timer)\ngo to x: (-197) y: (153)\nswitch costume to (time v)\n\n@Love and Favorite\n\nwhen flag clicked\nhide\nif <<(-Love Project) = [1]> and <(-Favorite Project) = [1]>> then\n    stop [this script v]\nend\nset [-favorite project v] to [0]\nset [-love project v] to [0]\nset [-detector clone v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [-detector clone v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(-Love Project) = [1]> and <(-Favorite Project) = [1]>>\nshow\nswitch costume to (1 v)\nstart sound [Collect v]\ngo to x: (-180) y: (124)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen I start as a clone\nif <(-Detector Clone) = [0]> then\n    go to x: (-15) y: (0)\n    switch costume to (love v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [-love project v] to [1]\n        end\n    end\nend\nif <(-Detector Clone) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [-favorite project v] to [1]\n        end\n    end\nend\n\nset [-love project v] to [0]\nset [-favorite project v] to [0]\n\n@Text\n\nwhen flag clicked\ngo to x: (129) y: (137)\nif <<(-Love Project) = [1]> and <(-Favorite Project) = [1]>> then\n    stop [this script v]\nend\nshow\nwait (2) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n