【Platformer】RTA

Instructions: 矢印キー、タップ、WASDキーで移動。\nしゃがめるよ！\n行きづまった時は地面に仕掛けがないか確認しよう！\n(すり抜けれる地面がある。)\n昼と夜で背景が変わるらしい...\n★と♡よろしく!!

@Stage\n\nwhen flag clicked\nforever\n    if <<[6] < (current [hour v])> and <[18] > (current [hour v])>> then\n        switch backdrop to (背景1 v)\n    else\n        if <<<[17] < (current [hour v])> and <[25] > (current [hour v])>> or <<[0] < (current [hour v])> and <[7] > (current [hour v])>>> then\n            switch backdrop to (背景2 v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Vexento - Tevo \(Original Mix\) v] until done\nend\n\n@プレイヤー\n\nwhen flag clicked\nswitch backdrop to (背景1 v)\ngo to x: (-210) y: (-90)\nshow\nswitch costume to (1 v)\nset size to (100) %\ngo to [front v] layer\nshow\nset [x v] to [0]\nset [y v] to [0]\npoint in direction (90)\ngo to x: (-210) y: (-90)\nforever\n    set rotation style [left-right v]\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n        point in direction (-90)\n        change [x2 v] by (-0.8)\n    end\n    if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>>> then\n        point in direction (90)\n        change [x2 v] by (0.8)\n    end\n    set [x2 v] to ((X2) * (0.9))\n    change x by (X2)\n    if <<touching (地形1 v)?> or <touching (地形2 v)?>> then\n        change y by (1)\n        if <<touching (地形1 v)?> or <touching (地形2 v)?>> then\n            change y by (1)\n            if <<touching (地形1 v)?> or <touching (地形2 v)?>> then\n                change y by (1)\n                if <<touching (地形1 v)?> or <touching (地形2 v)?>> then\n                    change y by (1)\n                    if <<touching (地形1 v)?> or <touching (地形2 v)?>> then\n                        change y by (1.0)\n                        if <<touching (地形1 v)?> or <touching (地形2 v)?>> then\n                            change x by ((X2) * (-1))\n                            change y by (-5)\n                            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>>> then\n                                if <(X2) > [0]> then\n                                    set [x2 v] to [-7]\n                                else\n                                    set [x2 v] to [7]\n                                end\n                                set [y2 v] to [15]\n                            else\n                                set [x2 v] to [0.0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <<touching (地形1 v)?> or <touching (地形2 v)?>> then\n        if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>>> then\n            set [y2 v] to [15]\n        end\n    end\n    change y by (1)\n    change [y2 v] by (-1)\n    change y by (Y2)\n    if <<touching (地形1 v)?> or <touching (地形2 v)?>> then\n        change y by ((Y2) * (-1))\n        set [y2 v] to [0]\n    end\n    if <(x position) > [230]> then\n        broadcast (あ v)\n        go to x: (-216) y: (-90)\n    end\n    if <[-165] > (y position)> then\n        go to x: (-216) y: (-90)\n    end\n    if <touching (障害物 v)?> then\n        go to x: (-216) y: (-90)\n    end\nend\n\nwhen flag clicked\nforever\n    計算する (pick random (-100) to (100))\nend\n\ndefine 計算する ()\nset [変数 v] to ()\nset [変数 v] to (pick random () to ((((() * ()) + ()) / ()) * ()))\n\nwhen flag clicked\nforever\n    if <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>>> then\n        switch costume to (2 v)\n    else\n        switch costume to (1 v)\n    end\nend\n\n@障害物\n\nwhen I receive [あ v]\nnext costume\n\nwhen flag clicked\nswitch costume to (1 v)\n\n@偽地形1\n\nwhen I receive [あ v]\nnext costume\n\nwhen flag clicked\nswitch costume to (1 v)\nset [ghost v] effect to (0)\nforever\n    if <touching (プレイヤー v)?> then\n        repeat (10)\n            change [ghost v] effect by (5)\n        end\n        wait until <not <touching (プレイヤー v)?>>\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<[6] < (current [hour v])> and <[18] > (current [hour v])>> then\n        show\n    else\n        hide\n    end\nend\n\n@スプライト1\n\nwhen I start as a clone\nswitch costume to (pick random (1) to (5))\nset [ghost v] effect to (pick random (0) to (60))\nset size to (pick random (30) to (70)) %\ngo to x: (310) y: (pick random (150) to (180))\nshow\nglide (pick random (3) to (10)) secs to x: (-300) y: (y position)\ndelete this clone\n\nwhen flag clicked\nforever\n    wait (pick random (0.1) to (7)) seconds\n    create clone of (_myself_ v)\nend\n\n@太陽\n\nwhen flag clicked\nset size to (100) %\ngo to [back v] layer\nforever\n    repeat (20)\n        change size by (1)\n    end\n    wait (0.01) seconds\n    repeat (20)\n        change size by (-1)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<[6] < (current [hour v])> and <[18] > (current [hour v])>> then\n        switch costume to (コスチューム1 v)\n    else\n        if <<<[17] < (current [hour v])> and <[25] > (current [hour v])>> or <<[0] < (current [hour v])> and <[7] > (current [hour v])>>> then\n            switch costume to (コスチューム2 v)\n        end\n    end\nend\n\n@地形1\n\nwhen I receive [あ v]\nnext costume\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen flag clicked\nforever\n    if <<[6] < (current [hour v])> and <[18] > (current [hour v])>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nrepeat until <<key (any v) pressed?> or <mouse down?>>\n    reset timer\nend\nrepeat until <(costume [number v]) = [13]>\n    set [時間 v] to (timer)\nend\nbroadcast (クリア v)\nwait until <(costume [number v]) = [14]>\nbroadcast (うら v)\n\nwhen flag clicked\nset [時間 v] to [0]\n\n@地形2\n\nwhen I receive [あ v]\nnext costume\n\nwhen flag clicked\nswitch costume to (1 v)\n\nwhen flag clicked\nforever\n    if <<<[17] < (current [hour v])> and <[25] > (current [hour v])>> or <<[0] < (current [hour v])> and <[7] > (current [hour v])>>> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nset [時間 v] to [0]\n\nwhen flag clicked\nrepeat until <<key (any v) pressed?> or <mouse down?>>\n    reset timer\nend\nrepeat until <(costume [number v]) = [13]>\n    set [時間 v] to (timer)\nend\nbroadcast (クリア v)\nwait until <(costume [number v]) = [14]>\nbroadcast (うら v)\n\n@偽地形2\n\nwhen I receive [あ v]\nnext costume\n\nwhen flag clicked\nswitch costume to (1 v)\nset [ghost v] effect to (0)\nforever\n    if <touching (プレイヤー v)?> then\n        repeat (10)\n            change [ghost v] effect by (5)\n        end\n        wait until <not <touching (プレイヤー v)?>>\n    else\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen flag clicked\nforever\n    if <<<[17] < (current [hour v])> and <[25] > (current [hour v])>> or <<[0] < (current [hour v])> and <[7] > (current [hour v])>>> then\n        show\n    else\n        hide\n    end\nend\n\n@サムネイル\n\nwhen flag clicked\nhide\n\ngo to [front v] layer\nshow\n\n@スプライト2\n\nwhen I receive [クリア v]\nshow variable [☁ 世界記録 v]\nshow\nif <<(☁ 世界記録) > (時間)> or <(時間) = (☁ 世界記録)>> then\n    set [☁ 世界記録 v] to (時間)\nend\n\nwhen flag clicked\nhide variable [☁ 世界記録 v]\nhide\n\nwhen I receive [うら v]\nhide variable [☁ 世界記録 v]\nhide\n\n