UNDERTALE　platformer

Instructions: 日本語は⇓\nOperate with arrow keys\nIf you fall or touch a bone or gaster blaster knife, you will be killed.\n❤⭐\n\n矢印キーで操作\n落ちたり骨やガスターブラスターナイフとかに触れるとやられてしまいます。\n❤⭐

@Stage\n\nwhen flag clicked\nforever\n    play sound [Undertale - Megalovania v] until done\nend\n\n@サンズ風\n\nwhen flag clicked\nswitch backdrop to (背景7 v)\ngo to x: (-210) y: (-90)\nshow\nstart sound [音3 v]\nswitch costume to (pick random (1) to (8))\nset size to (100) %\ngo to [front v] layer\nshow\nset [x v] to [0]\nset [y v] to [0]\nset [待ち時間 v] to [0]\npoint in direction (90)\ngo to x: (-210) y: (-90)\nforever\n    if <(待ち時間) = [0]> then\n        set rotation style [left-right v]\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            change [x2 v] by (-0.8)\n        end\n        if <key (right arrow v) pressed?> 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)?> then\n            change y by (1)\n            if <touching (スプライト1 v)?> then\n                change y by (1)\n                if <touching (スプライト1 v)?> then\n                    change y by (1)\n                    if <touching (スプライト1 v)?> then\n                        change y by (1)\n                        if <touching (スプライト1 v)?> then\n                            change y by (1.0)\n                            if <touching (スプライト1 v)?> then\n                                change x by ((X2) * (-1))\n                                change y by (-5)\n                                if  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)?> then\n            if <key (up arrow v) pressed?> then\n                start sound [click v]\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)?> 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: (-58)\n            next backdrop\n        end\n        if <(y position) = [-186]> then\n            broadcast (ああああああああああ v)\n        end\n    end\n    if <touching (スプライト2 v)?> then\n        broadcast (ああああああああああ v)\n    end\n    if <touching (ガスターブラスター v)?> then\n        broadcast (ああああああああああ v)\n    end\n    if <touching (ガスブラ v)?> then\n        broadcast (ああああああああああ v)\n    end\n    if <([costume # v] of [スプライト1 v]) = [7]> then\n        if <touching color (#ffffff)?> then\n            broadcast (ああああああああああ v)\n        end\n    end\n    if <touching (スプライト19 v)?> then\n        broadcast (ああああああああああ v)\n    end\n    if <touching (スプライト3 v)?> then\n        broadcast (ああああああああああ v)\n    end\nend\n\nmove (10) steps\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 I receive [ああああああああああ v]\nif <(待ち時間) = [0]> then\n    start sound [hurtsound \(1\) v]\n    go to x: (-216) y: (-58)\nend\n\nwhen flag clicked\ngo to [back v] layer\n\n\n\n\n\nif <touching color (#ffffff)?> then\nend\n\n@スプライト1\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [あ v]\nwait (3) seconds\nnext costume\n\n@NEXT\n\nwhen flag clicked\ngo to x: (-567) y: (-5)\nhide\nswitch costume to (gb_n v)\n\nwhen I receive [ああああああああああ v]\n\nwhen flag clicked\nset [がっっっっっっっっっっっｓ v] to [0]\nforever\n    set [がっっっっっっっっっっっｓ v] to ((がっっっっっっっっっっっｓ) * (0.8))\n    change x by (がっっっっっっっっっっっｓ)\nend\n\nwhen I receive [あ v]\nset [待ち時間 v] to [1]\nshow\nstart sound [GBチャージ v]\nrepeat (10)\n    change [がっっっっっっっっっっっｓ v] by (10)\nend\nwait (1) seconds\nbroadcast (へｙ v)\nrepeat (7)\n    next costume\nend\n\nwhen I receive [あ v]\nshow\n\nchange [がっっっっっっっっっっっｓ v] by (10)\n\nwhen I receive [へｙ v]\nstart sound [GB発射 v]\nrepeat (15)\n    change [がっっっっっっっっっっっｓ v] by (-12)\nend\nwait (1) seconds\nrepeat (15)\n    change [がっっっっっっっっっっっｓ v] by (-12)\nend\nhide\nswitch costume to (gb_n v)\ngo to x: (-567) y: (-5)\nset [待ち時間 v] to [0]\n\nwait (1) seconds\nrepeat (7)\n    next costume\nend\n\nhide\nswitch costume to (gb_n v)\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@スプライト2\n\nwhen flag clicked\ngo to x: (36) y: (28)\nforever\n    if <([costume # v] of [スプライト1 v]) = [4]> then\n        show\n    else\n        hide\n    end\nend\n\n@ガスターブラスター\n\nwhen I start as a clone\nshow\nset size to (125) %\nstart sound [現れた v]\nswitch costume to (spr_gasterblaster_0_w v)\nset [ghost v] effect to (100)\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (0.7) seconds\nstart sound [バキューン v]\nrepeat (12)\n    next costume\nend\nrepeat (2)\n    change [ghost v] effect by (50)\nend\ndelete this clone\n\nwhen I receive [ローリングガスターブラスター v]\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nbroadcast (ローリングガスターブラスター v)\n\nbroadcast (ランダムブラスター v)\n\nwhen flag clicked\nforever\n    if <([costume # v] of [スプライト1 v]) = [5]> then\n        go to x: (173) y: (0)\n        point in direction (90)\n        repeat (100)\n            create clone of (_myself_ v)\n            turn right (-4) degrees\n        end\n        wait (2) seconds\n        if <([costume # v] of [スプライト1 v]) = [5]> then\n            stop [this script v]\n        end\n    else\n        hide\n    end\nend\n\nrepeat (50)\n    create clone of (_myself_ v)\n    turn left (8) degrees\nend\n\nrepeat (10)\n\nrepeat until <([costume # v] of [スプライト1 v]) = [5]>\n\nshow\n\nstop all sounds\n\nwhen flag clicked\nforever\n    if <([costume # v] of [スプライト1 v]) = [5]> then\n        delete this clone\n    end\nend\n\nhide\nforever\nend\n\nwhen flag clicked\n\ndelete this clone\n\n@ガスブラ\n\nwhen I start as a clone\nif <(役目) = [1]> then\n    wait (item (4) of [ガスブラ v]) seconds\n    if <(item (6) of [ガスブラ v]) = [m]> then\n        set [color v] effect to (100)\n    else\n        if <(item (6) of [ガスブラ v]) = [o]> then\n            set [color v] effect to (20)\n        else\n            set [brightness v] effect to (100)\n        end\n    end\n    repeat until <(item (11) of [ガスブラ v]) = [1]>\n        if <(item (6) of [ガスブラ v]) = [m]> then\n            set [color v] effect to (100)\n            if <touching (ソウル v)?> then\n                if <key (up arrow v) pressed?> then\n                    broadcast (痛い v)\n                else\n                    if <key (down arrow v) pressed?> then\n                        broadcast (痛い v)\n                    else\n                        if <key (right arrow v) pressed?> then\n                            broadcast (痛い v)\n                        else\n                            if <key (left arrow v) pressed?> then\n                                broadcast (痛い v)\n                            end\n                        end\n                    end\n                end\n            end\n        else\n            if <(item (6) of [ガスブラ v]) = [o]> then\n                set [color v] effect to (20)\n                if <touching (ソウル v)?> then\n                    if <key (up arrow v) pressed?> then\n                end\n            else\n                set [brightness v] effect to (100)\n                if <touching (ソウル v)?> then\n                    broadcast (痛い v)\n                end\n            end\n        end\n    end\nend\n\ndefine ガスブラ x (x) y (y) 向き(180度以上は-で) (向き) 待ち時間 (待ち時間) 発射時間 (発射時間) 色 (色) 大きさ (大きさ) 召喚の方角 (召喚の方角) タイプ (タイプ)\nadd (x) to [ガスブラ v]\nadd (y) to [ガスブラ v]\nadd (向き) to [ガスブラ v]\nadd (待ち時間) to [ガスブラ v]\nadd ((発射時間) + (0.7)) to [ガスブラ v]\nadd (色) to [ガスブラ v]\nadd (召喚の方角) to [ガスブラ v]\nadd [なにか] to [ガスブラ v]\nadd (大きさ) to [ガスブラ v]\nadd (タイプ) to [ガスブラ v]\nadd [なにか] to [ガスブラ v]\nset size to (大きさ) %\nset [役目 v] to [2]\nswitch costume to (gb1 v)\ncreate clone of (_myself_ v)\nchange [役目 v] by (-1)\nswitch costume to (beam0 v)\nset size to ((大きさ) * (2)) %\ncreate clone of (_myself_ v)\ndelete all of [ガスブラ v]\nswitch costume to (gb1 v)\n\nwhen I start as a clone\nstart sound [ガスブラ用意 v]\nshow\nif <(役目) = [2]> then\n    go [forward v] (1) layers\n    if <(item (10) of [ガスブラ v]) = [s]> then\n        set size to ((大きさ) * (2)) %\n        switch costume to (gbs1 v)\n    end\n    set size to (item (9) of [ガスブラ v]) %\n    set [ghost v] effect to (0)\n    show\n    go to x: (0) y: (0)\n    point in direction (item (7) of [ガスブラ v])\n    move (270) steps\n    repeat until <<(round (x position)) = (round (item (1) of [ガスブラ v]))> and <<(round (y position)) = (round (item (2) of [ガスブラ v]))> and <(round (direction)) = (round (item (3) of [ガスブラ v]))>>>\n        change x by (((round (item (1) of [ガスブラ v])) - (round (x position))) / (3))\n        change y by (((round (item (2) of [ガスブラ v])) - (round (y position))) / (3))\n        turn right (((round (item (3) of [ガスブラ v])) - (round (direction))) / (3)) degrees\n    end\n    go to x: (round (item (1) of [ガスブラ v])) y: (round (item (2) of [ガスブラ v]))\n    point in direction (round (item (3) of [ガスブラ v]))\n    wait (item (4) of [ガスブラ v]) seconds\n    repeat (5)\n        next costume\n    end\n    set [加速 v] to [-5]\n    repeat until <<(x position) > [225]> or <<(x position) < [-225]> or <<(y position) > [175]> or <(y position) < [-175]>>>>\n        move (加速) steps\n        change [加速 v] by (-1)\n    end\n    repeat (5)\n        move (加速) steps\n    end\n    delete this clone\nend\nif <(役目) = [1]> then\n    hide\n    switch costume to (beam1 v)\n    wait (item (4) of [ガスブラ v]) seconds\n    point in direction (item (3) of [ガスブラ v])\n    go to x: (item (1) of [ガスブラ v]) y: (item (2) of [ガスブラ v])\n    move ((item (9) of [ガスブラ v]) * (5.5)) steps\n    wait (0.5) seconds\n    show\n    repeat (5)\n        next costume\n        wait (0) seconds\n    end\n    switch costume to (beam7 v)\n    if <not <(item (5) of [ガスブラ v]) < [0.8]>> then\n        repeat until <(item (11) of [ガスブラ v]) = [1]>\n            repeat (6)\n                next costume\n            end\n            repeat (6)\n                前のコスチュームにする\n            end\n        end\n    else\n        repeat (6)\n            change [ghost v] effect by (20)\n            前のコスチュームにする\n        end\n        delete this clone\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(役目) = [1]> then\n    wait (item (4) of [ガスブラ v]) seconds\n    wait (item (5) of [ガスブラ v]) seconds\n    replace item (11) of [ガスブラ v] with [1]\n    if <not <(item (5) of [ガスブラ v]) < [0.8]>> then\n        if <not <(costume [number v]) = [14]>> then\n            repeat until <(costume [number v]) = [14]>\n                change [ghost v] effect by (20)\n                前のコスチュームにする\n                wait (0) seconds\n            end\n        end\n        delete this clone\n    end\nend\n\ndefine 前のコスチュームにする\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\nnext costume\n\nwhen I start as a clone\nif <(役目) = [1]> then\n    set [加速 v] to [-5]\n    wait (item (4) of [ガスブラ v]) seconds\n    wait (0.6) seconds\n    repeat until <(item (11) of [ガスブラ v]) = [2]>\n        replace item (8) of [ガスブラ v] with (costume [name v])\n        switch costume to (beam0 v)\n        if <touching (_edge_ v)?> then\n            replace item (11) of [ガスブラ v] with [2]\n        end\n        switch costume to (item (8) of [ガスブラ v])\n        move (加速) steps\n        change [加速 v] by (-1)\n    end\n    repeat (2)\n        move (加速) steps\n    end\nend\n\nwhen flag clicked\nforever\n    if <([costume # v] of [スプライト1 v]) = [6]> then\n        ガスブラ x [0] y [0] 向き(180度以上は-で) [180] 待ち時間 [0.2] 発射時間 [0.7] 色 [m] 大きさ [75] 召喚の方角 [0] タイプ []\n        wait (2) seconds\n    end\nend\n\nwhen I start as a clone\nif <(役目) = [1]> then\n    wait (item (4) of [ガスブラ v]) seconds\n    wait (0.5) seconds\n    start sound [ブラスター発射 v]\nend\n\nforever\n\n@飛び出し骨\n\ndefine 飛び出し骨 (でる) (消える) (コス) (x) (y) (向き) (サイズ)\nset [骨出る v] to (でる)\nset [骨消える v] to (消える)\nset [骨コス v] to (コス)\nset size to (サイズ) %\npoint in direction (向き)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nset size to (100) %\nhide\n\nwhen I start as a clone\nif <(骨コス) = [1]> then\n    show\n    switch costume to (warning2 v)\n    start sound [! 重力 v]\n    wait (骨出る) seconds\n    start sound [でる v]\n    switch costume to (boneslam1 v)\n    repeat (5)\n        next costume\n    end\n    wait (骨消える) seconds\n    repeat (4)\n        switch costume to ((costume [number v]) - (1))\n    end\n    delete this clone\nend\n\nwhen I receive [サンズのターン６ v]\nwait (0.5) seconds\nbroadcast (下にドン v)\n飛び出し骨 [0.4] [0.25] [2] [0] [-92] [90] [100]\nwait (1) seconds\nbroadcast (ソウルを赤に戻す v)\nbroadcast (サンズを元のコスに戻す v)\nbroadcast (サンズのターン６−２ v)\n\nwhen flag clicked\nwait (0.5) seconds\nforever\n    if <([costume # v] of [スプライト1 v]) = [7]> then\n        broadcast (下にドン v)\n        飛び出し骨 [0.4] [0.25] [1] [1] [-121] [90] [100]\n        wait (2) seconds\n    end\nend\n\nbroadcast (上にドン v)\n飛び出し骨 [0.4] [0.25] [1] [0] [22] [-90] [100]\nwait (0.5) seconds\nbroadcast (右にドン v)\n飛び出し骨 [0.4] [0.25] [1] [78] [-38] [0] [80]\nwait (0.5) seconds\nbroadcast (左にドン v)\n飛び出し骨 [0.4] [0.25] [1] [-76] [-38] [180] [80]\nwait (0.5) seconds\n\n@スプライト19\n\nwhen flag clicked\nhide\nforever\n    if <([costume # v] of [スプライト1 v]) = [8]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    if <([costume # v] of [スプライト1 v]) = [8]> then\n        switch costume to (slash1 v)\n        hide\n        wait (0.5) seconds\n        go to (76005 v)\n        wait (0.1) seconds\n        show\n        repeat (6)\n            next costume\n            wait (0.1) seconds\n        end\n    end\nend\n\nrepeat (10)\n\n@スプライト3\n\nwhen flag clicked\nhide\nforever\n    if <([costume # v] of [スプライト1 v]) = [9]> then\n        show\n    else\n        hide\n    end\nend\n\nrepeat (10)\n\n@スプライト4\n\nwhen flag clicked\nhide\n\n