《TNT RUN》Platformer  Minecraft

Instructions: みんな大好きTNT RUNを作りました。\n最後が結構難しいです。\n頑張ってください。\n\n作者記録…24秒\n❤️100人目@j-hikari-s様\n⭐️100人目@NEKOsuzuki様

@Stage\n\nwhen flag clicked\nset [ステージ v] to [1]\nset [タイム仮 v] to [0]\nset [タイム v] to [0]\nshow variable [タイム仮 v]\nhide variable [☁ 世界記録 v]\nhide variable [タイム v]\nswitch backdrop to (背景1 v)\nrepeat until <(ステージ) = [7]>\n    wait (1) seconds\n    change [タイム仮 v] by (1)\nend\n\nwhen I receive [メッセージ1 v]\nchange [ステージ v] by (1)\n\nwhen I receive [最後 v]\nswitch backdrop to (背景2 v)\nshow variable [タイム v]\nshow variable [☁ 世界記録 v]\nhide variable [タイム仮 v]\nset [タイム v] to (タイム仮)\nif <(☁ 世界記録) > (タイム)> then\n    set [☁ 世界記録 v] to (タイム)\nend\n\nwhen flag clicked\nforever\n    play sound [魔王魂  村10 v] until done\nend\n\n@プレイヤー\n\nwhen flag clicked\ngo to x: (-200) y: (0)\nset [x v] to [0]\nset [y v] to [0]\nset rotation style [left-right v]\nforever\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (90)\n        change [x v] by (0.95)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        point in direction (-90)\n        change [x v] by (-0.95)\n    end\n    set [x v] to ((x) * (0.9))\n    change x by (x)\n    if <touching (地面 v)?> then\n        change y by (1)\n        if <touching (地面 v)?> then\n            change y by (1)\n            if <touching (地面 v)?> then\n                change y by (1)\n                if <touching (地面 v)?> then\n                    change y by (1)\n                    if <touching (地面 v)?> then\n                        change y by (1)\n                        if <touching (地面 v)?> then\n                            change x by ((x) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>> then\n                                if <(x) > [0]> then\n                                    set [x v] to [-10]\n                                else\n                                    set [x v] to [10]\n                                end\n                                set [y v] to [12.4]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<touching (地面 v)?> and <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [0]>>>> then\n        set [y v] to [13]\n    end\n    change [y v] by (-1)\n    change y by (y)\n    change y by (1)\n    if <touching (地面 v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    if <(x position) > [230]> then\n        set [x v] to [0]\n        set [y v] to [0]\n        broadcast (メッセージ1 v)\n        broadcast (リセット v)\n        wait (0) seconds\n        go to x: (-200) y: (-50)\n        wait (1) seconds\n    end\n    if <<(y position) < [-170]> or <touching (あたっちゃだめなやつ v)?>> then\n        broadcast (リセット v)\n        wait (0) seconds\n        go to x: (-200) y: (-50)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [埋まってる v]\nchange y by (10)\n\n@地面\n\ndefine (x) (y) (番)\nset [0x v] to (x)\nset [0y v] to (y)\nset [banngou v] to (番)\nswitch costume to (木材 v)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\nbroadcast (リセット v)\n\nwhen I start as a clone\ngo to x: (0X) y: (0Y)\nswitch costume to (banngou)\nshow\nforever\n    if <not <(costume [number v]) = [1]>> then\n        if <(distance to [プレイヤー v]) < [50]> then\n            repeat (2)\n                switch costume to (tnt_side v)\n                wait (0.1) seconds\n                switch costume to (tnt_side2 v)\n                wait (0.1) seconds\n            end\n            switch costume to (tnt_side v)\n            repeat until <[-184] > (y position)>\n                change y by (-5)\n                switch costume to (tnt_side v)\n                change y by (-5)\n                wait (0.1) seconds\n                change y by (-5)\n                switch costume to (tnt_side2 v)\n                change y by (-5)\n                wait (0.1) seconds\n                change y by (-5)\n            end\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [リセット v]\ndelete this clone\n\nwhen I receive [リセット v]\nwait (0.1) seconds\nset [x v] to [-220]\nset [y v] to [-150]\nrepeat (2)\n    (X) (Y) [1]\n    change [x v] by (40)\nend\nif <(ステージ) = [1]> then\n    repeat (10)\n        (X) (Y) [2]\n        change [x v] by (40)\n    end\nelse\n    if <(ステージ) = [2]> then\n        repeat (5)\n            set [x v] to [-140]\n            repeat (10)\n                (X) (Y) [2]\n                change [x v] by (40)\n            end\n            change [y v] by (40)\n        end\n    else\n        if <(ステージ) = [3]> then\n            set [y v] to [-150]\n            set [x v] to [-140]\n            repeat (9)\n                (X) (Y) [2]\n                change [x v] by (40)\n            end\n            repeat (8)\n                (X) (Y) [1]\n                change [y v] by (40)\n            end\n            set [y v] to [-150]\n            set [x v] to [-140]\n            repeat (9)\n                set [x v] to [-140]\n                repeat (9)\n                    (X) (Y) [2]\n                    change [x v] by (40)\n                end\n                change [y v] by (40)\n            end\n        else\n            if <(ステージ) = [4]> then\n                set [y v] to [-150]\n                set [x v] to [-140]\n                repeat (2)\n                    change [x v] by (120)\n                    (X) (Y) [2]\n                end\n            else\n                if <(ステージ) = [5]> then\n                    set [y v] to [-150]\n                    set [x v] to [-140]\n                    repeat (2)\n                        change [x v] by (150)\n                        (X) (Y) [2]\n                        change [y v] by (120)\n                    end\n                else\n                    if <(ステージ) = [6]> then\n                        set [y v] to [-10]\n                        set [x v] to [0]\n                        (X) (Y) [2]\n                        wait (0) seconds\n                        repeat (3)\n                            change [x v] by (40)\n                            (X) (Y) [2]\n                        end\n                    else\n                        if <(ステージ) = [7]> then\n                            broadcast (最後 v)\n                            repeat (9)\n                                (X) (Y) [2]\n                                change [x v] by (40)\n                            end\n                            repeat (9)\n                                (X) (Y) [1]\n                                change [y v] by (40)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (チェック v)?> then\n        broadcast (埋まってる v)\n    end\nend\n\n@チェック\n\nwhen flag clicked\nset [ghost v] effect to (100)\nforever\n    go to (プレイヤー v)\nend\n\n@スプライト1\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\ngo to [front v] layer\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\ngo to [front v] layer\nhide variable [タイム v]\nhide variable [タイム仮 v]\nhide variable [☁ 世界記録 v]\nshow\n\n