進め！てくてくキャット #platformer

Instructions: モバイル対応です！\nキャットは”全自動”で動くプラットフォーマーです。\nアイテムを駆使してキャットを助けろ！\n説明はメニュー左下の「？」マークからどうぞ。\n\nmobile friendly!\nThis is a platformer, but the player move only himself!\nHelp him with items!\nYou can get outline from "?"mark!

@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [魔王魂  ピアノ25 v] until done\nend\n\nwhen I receive [音量 v]\nset volume to ((100) - (volume)) %\n\n@プレイヤー\n\ndefine 移動\nswitch costume to (当たり判定 v)\nchange x by ((速度) * (向き))\npoint in direction ((90) * (向き))\nchange y by (((y') * (size)) / (50))\nif <touching color (#00ff21)?> then\n    change y by ((0) - (((y') * (size)) / (50)))\n    set [y' v] to [0]\n    y補正\nelse\n    change [y' v] by (-1)\nend\nif <<touching color (#00ff21)?> or <(x position) < [-230]>> then\n    change x by ((-5) * (向き))\n    set [向き v] to ((0) - (向き))\nend\nif <touching color (#0020ff)?> then\n    set [y' v] to [10]\nend\nif <touching color (#0060ff)?> then\n    set [y' v] to [10]\n    if <not <touching color (#00ff21)?>> then\n        set [向き v] to ((0) - (向き))\n    end\n    broadcast (横ばね v)\nend\nif <touching color (#00ffff)?> then\n    if <(y') < [-1]> then\n        set [y' v] to [-1]\n        broadcast (水 v)\n    end\nend\nif <touching color (#cd7800)?> then\n    set [y' v] to [2]\n    broadcast (はしご v)\nend\nif <touching color (#fdff81)?> then\n    if <(向き) > [0]> then\n        change x by ((-5) * (向き))\n        set [向き v] to ((0) - (向き))\n    end\nend\nif <touching color (#00ca1b)?> then\n    broadcast (土縦 v)\nend\nif <<touching color (#ff0000)?> or <(y position) < [-180]>> then\n    set [プレイ v] to [2]\nend\nif <(x position) > [235]> then\n    set [プレイ v] to [3]\nend\nswitch costume to (cat v)\ngo to [front v] layer\n\ndefine y補正\nif <not <touching color (#00ff21)?>> then\n    repeat (10)\n        change y by (-1)\n        if <touching color (#00ff21)?> then\n            change y by (1)\n            stop [this script v]\n        end\n    end\n    change y by (10)\nelse\n    repeat (10)\n        change y by (1)\n        if <not <touching color (#00ff21)?>> then\n            stop [this script v]\n        end\n    end\n    change y by (-10)\nend\n\nwhen I receive [きのこ v]\nset [brightness v] effect to (0)\nset size to (30) %\nchange y by (-10)\nwait (4) seconds\nrepeat (3)\n    set [brightness v] effect to (50)\n    wait (0.15) seconds\n    set [brightness v] effect to (0)\n    wait (0.15) seconds\nend\nchange y by (10)\nset size to (50) %\n\nwhen I receive [はしご v]\nset [速度 v] to [2]\nwait until <not <touching color (#cd7800)?>>\nset [速度 v] to [5]\n\nwhen I receive [ロケット v]\nset [速度 v] to [0]\nset [y' v] to [30]\nwait until <(y') < [0]>\nset [速度 v] to [5]\n\nwhen I receive [横ばね v]\nset [速度 v] to [10]\nwait (1) seconds\nset [速度 v] to [5]\n\nwhen I receive [水 v]\nset [速度 v] to [2]\nwait (1) seconds\nset [速度 v] to [5]\n\nwhen flag clicked\nset rotation style [left-right v]\nhide\n\nwhen I receive [start v]\nif <(backdrop [name v]) = [end]> then\n    set [time v] to ((round ((time) * (100))) / (100))\n    if <<(time) < (自己記録)> or <(自己記録) = [-]>> then\n        set [自己記録 v] to (time)\n    end\n    broadcast (時間 v)\n    set [プレイ v] to [0]\n    go to x: (-200) y: (-100)\n    point in direction (90)\n    set size to (50) %\n    switch costume to (cat v)\n    clear graphic effects\n    set [ghost v] effect to (100)\n    repeat (10)\n        change [ghost v] effect by (-10)\n    end\nelse\n    reset timer\n    show\n    forever\n        set [プレイ v] to [0]\n        go to x: (-200) y: (-100)\n        point in direction (90)\n        set size to (50) %\n        switch costume to (cat v)\n        clear graphic effects\n        set [ghost v] effect to (100)\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        wait until <(プレイ) > [0]>\n        set [向き v] to [1]\n        set [速度 v] to [5]\n        set [y' v] to [0]\n        repeat until <(プレイ) > [1]>\n            移動\n        end\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n        stop [other scripts in sprite v]\n        if <(プレイ) = [3]> then\n            次\n            broadcast (start v)\n            stop [this script v]\n        else\n            broadcast (play v)\n        end\n    end\nend\n\nwhen I receive [menu2 v]\nstop [other scripts in sprite v]\nhide\nstop [this script v]\n\ndefine 次\nchange [time v] by (timer)\nif <(item (1) of [クリア済み v]) > (backdrop [name v])> then\n    add (backdrop [name v]) to [クリア済み v]\nelse\n    insert (backdrop [name v]) at (1) of [クリア済み v] \nend\nrepeat until <not <[クリア済み v] contains (backdrop [name v])?>>\n    next backdrop\n    if <<(backdrop [name v]) = [end]> and <(length of [クリア済み v]) < [15]>> then\n        switch backdrop to (1 v)\n    end\nend\n\nwhen I receive [土縦 v]\nset [速度 v] to [0]\nset [y' v] to [5]\nwait until <not <touching color (#00ca1b)?>>\nwait (0) seconds\nset [速度 v] to [5]\n\nwhen I receive [ロケット下 v]\nset [速度 v] to [0]\nset [y' v] to [-20]\nwait until <not <(y') < [0]>>\nset [速度 v] to [5]\n\n@アイテム\n\nwhen I start as a clone\nset [保存用 v] to [0]\nset [保存cos v] to (costume [name v])\nset [保存x v] to (x position)\n\ndefine クローン (内容)\ngo to x: (-200) y: (-155)\nset [作業1 v] to [1]\nrepeat until <(作業1) > (length of (内容))>\n    set [作業2 v] to []\n    repeat until <<(letter (作業1) of (内容)) = [、]> or <(作業1) > (length of (内容))>>\n        set [作業2 v] to (join (作業2) (letter (作業1) of (内容)))\n        change [作業1 v] by (1)\n    end\n    switch costume to (作業2)\n    create clone of (_myself_ v)\n    change [作業1 v] by (1)\n    change x by (50)\nend\nswitch costume to (再生 v)\n\nwhen flag clicked\nswitch costume to (none v)\nset size to (250) %\nhide\n\ndefine y補正\nrepeat (10)\n    change y by (1)\n    if <not <touching color (#00ff21)?>> then\n        stop [this script v]\n    end\nend\nchange y by (10)\n\ndefine アイテム\nif <(backdrop [name v]) = [1]> then\n    クローン [ばね]\nelse\n    if <(backdrop [name v]) = [2]> then\n        クローン [ばね、ばね]\n    else\n        if <(backdrop [name v]) = [3]> then\n            クローン [ばね、ばね、爆弾]\n        else\n            if <(backdrop [name v]) = [4]> then\n                クローン [はしご、はしご]\n            else\n                if <(backdrop [name v]) = [5]> then\n                    クローン [きのこ、ばね、はしご]\n                else\n                    if <(backdrop [name v]) = [6]> then\n                        クローン [横ばね、横ばね、横ばね]\n                    else\n                        if <(backdrop [name v]) = [7]> then\n                            クローン [ばね、はしご、土、土]\n                        else\n                            if <(backdrop [name v]) = [8]> then\n                                クローン [爆弾、爆弾、爆弾、ばね、ばね]\n                            else\n                                if <(backdrop [name v]) = [9]> then\n                                    クローン [きのこ、きのこ、横ばね、はしご、ロケット]\n                                else\n                                    if <(backdrop [name v]) = [10]> then\n                                        クローン [ばね、横ばね、横ばね、爆弾]\n                                    else\n                                        if <(backdrop [name v]) = [11]> then\n                                            クローン [土、ロケット、ロケット、水、水、横ばね]\n                                        else\n                                            if <(backdrop [name v]) = [12]> then\n                                                クローン [土縦、土縦、ロケット下]\n                                            else\n                                                if <(backdrop [name v]) = [13]> then\n                                                    クローン [横ばね、ロケット、水]\n                                                else\n                                                    if <(backdrop [name v]) = [14]> then\n                                                        クローン [水、水、水、土縦、土縦、土縦]\n                                                    else\n                                                        if <(backdrop [name v]) = [15]> then\n                                                            クローン [ばね、ばね、はしご、ロケット]\n                                                        end\n                                                    end\n                                                end\n                                            end\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine 配置\nif <not < [はしご、土、水、土縦] contains (costume [name v])?>> then\n    change y by (-1)\n    if <touching color (#00ff21)?> then\n        change y by (1)\n    else\n        set [y' v] to [0]\n        repeat until <<touching color (#00ff21)?> or <(y position) < [-140]>>\n            change [y' v] by (-1)\n            change y by (y')\n        end\n        if <(y position) < [-140]> then\n            go to x: (保存x) y: (-155)\n        else\n            y補正\n        end\n    end\nend\n\ndefine 特殊\nif <(costume [name v]) = [ばね]> then\n    forever\n        wait until <touching (プレイヤー v)?>\n        switch costume to (ばね2 v)\n        wait (0) seconds\n        switch costume to (ばね3 v)\n        wait (0) seconds\n        switch costume to (ばね4 v)\n        wait (0) seconds\n        switch costume to (ばね3 v)\n        wait (0) seconds\n        switch costume to (ばね2 v)\n        wait (0) seconds\n        switch costume to (ばね v)\n    end\nelse\n    if <(costume [name v]) = [爆弾]> then\n        wait until <touching (プレイヤー v)?>\n        switch costume to (爆弾2 v)\n        repeat (3)\n            set [brightness v] effect to (50)\n            wait (0.5) seconds\n            set [brightness v] effect to (0)\n            wait (0.5) seconds\n        end\n        switch costume to (爆弾3 v)\n        set size to (50) %\n        repeat (5)\n            change size by (50)\n        end\n        repeat (5)\n            change size by (50)\n            change [brightness v] effect by (20)\n        end\n        go to [back v] layer\n    else\n        if <(costume [name v]) = [きのこ]> then\n            wait until <touching (プレイヤー v)?>\n            broadcast (きのこ v)\n            repeat (10)\n                change [ghost v] effect by (10)\n            end\n        else\n            if <(costume [name v]) = [ロケット]> then\n                set [保存用 v] to (y position)\n                wait until <(distance to [プレイヤー v]) < [20]>\n                broadcast (ロケット v)\n                switch costume to (ロケット2 v)\n                repeat until <(y position) > [180]>\n                    change y by (30)\n                end\n                hide\n            else\n                if <(costume [name v]) = [土縦]> then\n                    set [保存用 v] to (y position)\n                    forever\n                        repeat (10)\n                            change y by (5)\n                        end\n                        repeat (20)\n                            change y by (-5)\n                        end\n                        repeat (10)\n                            change y by (5)\n                        end\n                    end\n                else\n                    if <(costume [name v]) = [ロケット下]> then\n                        set [保存用 v] to (y position)\n                        wait until <(distance to [プレイヤー v]) < [20]>\n                        broadcast (ロケット下 v)\n                        switch costume to (ロケット下2 v)\n                        repeat until <(y position) < [-180]>\n                            change y by (-30)\n                        end\n                        hide\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine リセット\nswitch costume to (保存cos)\nset size to (250) %\nclear graphic effects\nshow\nif <not <(保存用) = [0]>> then\n    if < [ロケット、土縦、ロケット下] contains (costume [name v])?> then\n        set y to (保存用)\n    end\nend\n\nwhen I receive [start v]\nif <(costume [name v]) = [none]> then\n    set [マウス v] to [0]\n    アイテム\n    switch costume to (再挑戦 v)\n    create clone of (_myself_ v)\n    switch costume to (メニュー v)\n    create clone of (_myself_ v)\n    switch costume to (none v)\n    broadcast (play v)\nelse\n    delete this clone\nend\n\nwhen I receive [play v]\nif <not <(costume [name v]) = [none]>> then\n    if <(costume [name v]) = [再挑戦]> then\n        if <not <(backdrop [name v]) = [end]>> then\n            go to x: (200) y: (-155)\n            switch costume to (再生 v)\n            show\n            repeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n                if <<mouse down?> and <not <touching (mouse-pointer v)?>>> then\n                    wait until <not <mouse down?>>\n                end\n            end\n            set [プレイ v] to [1]\n            wait until <not <mouse down?>>\n            switch costume to (再挑戦 v)\n            repeat until <(プレイ) > [1]>\n                if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                    set [プレイ v] to [2]\n                end\n            end\n            hide\n        end\n    else\n        if <(costume [name v]) = [メニュー]> then\n            go to x: (215) y: (160)\n            show\n            repeat until <<mouse down?> and <touching (mouse-pointer v)?>>\n                if <<mouse down?> and <not <touching (mouse-pointer v)?>>> then\n                    wait until <not <mouse down?>>\n                end\n            end\n            wait until <not <mouse down?>>\n            change [time v] by (timer)\n            broadcast (menu2 v)\n        else\n            リセット\n            repeat until <(プレイ) = [1]>\n                if <mouse down?> then\n                    if <<(マウス) = [0]> and <(distance to [mouse-pointer v]) < [30]>> then\n                        set [マウス v] to [1]\n                        set [作業1 v] to ((x position) - (mouse x))\n                        set [作業2 v] to ((y position) - (mouse y))\n                        repeat until <not <mouse down?>>\n                            go to x: ((mouse x) + (作業1)) y: ((mouse y) + (作業2))\n                        end\n                        if <(y position) < [-140]> then\n                            go to x: (保存x) y: (-155)\n                        end\n                        set [マウス v] to [0]\n                    end\n                end\n                if <(y position) > [-140]> then\n                    配置\n                end\n            end\n            wait (0) seconds\n            if <(y position) < [-140]> then\n                hide\n            else\n                特殊\n            end\n        end\n    end\nend\n\nwhen I receive [menu2 v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@メニュー\n\nwhen flag clicked\ndelete all of [クリア済み v]\nset [time v] to [0]\nset [自己記録 v] to [-]\nbroadcast (menu v)\n\nwhen I start as a clone\nif <(costume [number v]) < [8]> then\n    set size to (400) %\n    show\n    set [作業1 v] to [0]\n    repeat until <(プレイ) = [1]>\n        if <touching (mouse-pointer v)?> then\n            if <(作業1) < [5]> then\n                change [作業1 v] by (1)\n                change [brightness v] effect by (10)\n            end\n            if <mouse down?> then\n                機能\n            end\n        else\n            if <(作業1) > [0]> then\n                change [作業1 v] by (-1)\n                change [brightness v] effect by (-10)\n            end\n        end\n        if <(プレイ) = [2]> then\n            wait until <(プレイ) = [0]>\n        end\n    end\n    delete this clone\nend\n\ndefine 機能\nif <(costume [number v]) = [1]> then\n    set [プレイ v] to [1]\nelse\n    set [プレイ v] to [2]\n    go to x: (0) y: (0)\n    set size to (190) %\n    clear graphic effects\n    set [作業1 v] to [0]\n    go to [front v] layer\n    if <(costume [number v]) = [2]> then\n        switch costume to (説明2 v)\n        wait until <not <mouse down?>>\n        repeat until <<not <touching (mouse-pointer v)?>> and <mouse down?>>\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                if <(costume [name v]) = [説明2]> then\n                    switch costume to (説明3 v)\n                else\n                    switch costume to (説明2 v)\n                end\n                wait until <not <mouse down?>>\n            end\n        end\n        wait until <not <mouse down?>>\n        go to x: (-50) y: (-120)\n        switch costume to (説明 v)\n        set size to (400) %\n    else\n        broadcast (記録表示 v)\n        if <([volume v] of [_stage_ v]) = [100]> then\n            switch costume to (設定2 v)\n        else\n            switch costume to (設定3 v)\n        end\n        wait until <not <mouse down?>>\n        repeat until <<not <touching (mouse-pointer v)?>> and <mouse down?>>\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                if <(costume [name v]) = [設定2]> then\n                    switch costume to (設定3 v)\n                else\n                    switch costume to (設定2 v)\n                end\n                broadcast (音量 v)\n                wait until <not <mouse down?>>\n            end\n        end\n        wait until <not <mouse down?>>\n        broadcast (消去 v)\n        go to x: (50) y: (-120)\n        switch costume to (設定 v)\n        set size to (400) %\n    end\n    set [プレイ v] to [0]\nend\n\nwhen I receive [menu v]\nhide\nswitch backdrop to (メニュー v)\nset volume to (100) %\nset [プレイ v] to [0]\ngo to x: (0) y: (-50)\nswitch costume to (プレイ v)\ncreate clone of (_myself_ v)\ngo to x: (-50) y: (-120)\nswitch costume to (説明 v)\ncreate clone of (_myself_ v)\ngo to x: (50) y: (-120)\nswitch costume to (設定 v)\ncreate clone of (_myself_ v)\nwait until <(プレイ) = [1]>\nbroadcast (menu2 v)\n\nwhen I receive [menu2 v]\nクローン\nwait until <not <(プレイ) = [0]>>\nif <(プレイ) = [戻る]> then\n    broadcast (menu v)\nelse\n    switch backdrop to (プレイ)\n    broadcast (start v)\nend\n\nwhen I start as a clone\nif <(costume [number v]) > [7]> then\n    if <<(costume [name v]) > ((item (1) of [クリア済み v]) + (2))> and <not <(costume [name v]) = [戻る]>>> then\n        switch costume to (rocked v)\n    end\n    set size to (300) %\n    show\n    if <(costume [name v]) = [rocked]> then\n        wait until <not <(プレイ) = [0]>>\n    else\n        if <[クリア済み v] contains (costume [name v])?> then\n            set [color v] effect to (-34)\n        end\n        repeat until <not <(プレイ) = [0]>>\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (15)\n                if <mouse down?> then\n                    set [プレイ v] to (costume [name v])\n                end\n            else\n                set [brightness v] effect to (0)\n            end\n        end\n    end\n    delete this clone\nend\n\ndefine クローン\nswitch backdrop to (メニュー2 v)\nset [プレイ v] to [0]\nset y to (130)\nswitch costume to (1 v)\nrepeat (3)\n    set x to (-180)\n    repeat (5)\n        create clone of (_myself_ v)\n        change x by (90)\n        next costume\n    end\n    change y by (-60)\nend\ngo to x: (180) y: (-140)\nswitch costume to (戻る v)\ncreate clone of (_myself_ v)\n\n@英数\n\nwhen flag clicked\nAdd to data\nswitch costume to (none v)\nhide\n\ndefine Add to data\ndelete all of [width v]\nrepeat (10)\n    add [0.6] to [width v]\nend\nadd [0.6] to [width v]\nadd [0.6] to [width v]\nadd [0.6] to [width v]\nadd [0.6] to [width v]\nadd [0.6] to [width v]\nadd [0.4] to [width v]\nadd [0.6] to [width v]\nadd [0.6] to [width v]\nadd [0.3] to [width v]\nadd [0.3] to [width v]\nadd [0.6] to [width v]\nadd [0.3] to [width v]\nadd [0.9] to [width v]\nadd [0.7] to [width v]\nadd [0.6] to [width v]\nadd [0.6] to [width v]\nadd [0.6] to [width v]\nadd [0.5] to [width v]\nadd [0.6] to [width v]\nadd [0.5] to [width v]\nadd [0.6] to [width v]\nadd [0.7] to [width v]\nadd [0.8] to [width v]\nadd [0.7] to [width v]\nadd [0.5] to [width v]\nadd [0.6] to [width v]\nadd [0.7] to [width v]\nadd [0.7] to [width v]\nadd [0.7] to [width v]\nadd [0.8] to [width v]\nadd [0.6] to [width v]\nadd [0.6] to [width v]\nadd [0.8] to [width v]\nadd [0.7] to [width v]\nadd [0.5] to [width v]\nadd [0.4] to [width v]\nadd [0.7] to [width v]\nadd [0.7] to [width v]\nadd [0.9] to [width v]\nadd [0.8] to [width v]\nadd [0.8] to [width v]\nadd [0.7] to [width v]\nadd [0.8] to [width v]\nadd [0.7] to [width v]\nadd [0.7] to [width v]\nadd [0.6] to [width v]\nadd [0.8] to [width v]\nadd [0.7] to [width v]\nadd [1.0] to [width v]\nadd [0.7] to [width v]\nadd [0.6] to [width v]\nadd [0.7] to [width v]\nadd [0.4] to [width v]\nadd [0.5] to [width v]\nadd [0.4] to [width v]\nadd [0.4] to [width v]\nadd [0.4] to [width v]\nadd [0.4] to [width v]\nadd [0.4] to [width v]\n\ndefine Text (text) xyoca (x) (y) (o) (c) (a)\nif <<(a) = [L]> or <(a) = []>> then\n    if <(x) = []> then\n        go to x: (-240) y: (y)\n    else\n        go to x: (x) y: (y)\n    end\nelse\n    set [表示1 v] to [0]\n    set [表示2 v] to [0]\n    repeat (length of (text))\n        change [表示1 v] by (1)\n        switch costume to (letter (表示1) of (text))\n        change [表示2 v] by (item (costume [number v]) of [width v])\n    end\n    if <(a) = [R]> then\n        if <(x) = []> then\n            go to x: ((240) - ((2) * ((表示2) * (o)))) y: (y)\n        else\n            go to x: ((x) - ((2) * ((表示2) * (o)))) y: (y)\n        end\n    else\n        go to x: ((x) - ((表示2) * (o))) y: (y)\n    end\nend\nset size to ((10) * (o)) %\nclear graphic effects\nif <(c) = []> then\n    set [brightness v] effect to (-100)\nelse\n    if <(c) = [w]> then\n        set [brightness v] effect to (100)\n    else\n        set [color v] effect to ((2) * (c))\n    end\nend\nset [表示1 v] to [0]\nrepeat (length of (text))\n    change [表示1 v] by (1)\n    switch costume to (letter (表示1) of (text))\n    change x by ((item (costume [number v]) of [width v]) * (o))\n    create clone of (_myself_ v)\n    change x by ((item (costume [number v]) of [width v]) * (o))\nend\nswitch costume to (none v)\n\nwhen I start as a clone\ngo to [front v] layer\nshow\n\nwhen I receive [消去 v]\ndelete this clone\n\nwhen I receive [記録表示 v]\nif <(costume [name v]) = [none]> then\n    Text (join [player:] (username)) xyoca [-220] [30] [10] [] []\n    時間表示 (自己記録)\n    Text (join [record:] (作業1)) xyoca [-220] [0] [10] [] []\nelse\n    delete this clone\nend\n\nwhen I receive [時間 v]\nif <(costume [name v]) = [none]> then\n    時間表示 (time)\n    Text (作業1) xyoca [30] [100] [20] [] []\n    if <(time) = (自己記録)> then\n        Text [best score!] xyoca [30] [60] [15] [0] []\n    end\nelse\n    delete this clone\nend\n\nwhen I receive [start v]\nif <not <(backdrop [name v]) = [end]>> then\n    wait until <(プレイ) = [0]>\n    repeat until <(プレイ) = [3]>\n        broadcast (消去 v)\n        時間表示 ((time) + (timer))\n        Text (作業1) xyoca [-240] [170] [8] [] []\n    end\nend\n\nwhen I receive [menu2 v]\nstop [other scripts in sprite v]\ndelete this clone\n\ndefine 時間表示 (a)\nif <(length of (([floor v] of ((a) / (60)) ) mod (60))) = [1]> then\n    set [作業1 v] to (join (join [0] (([floor v] of ((a) / (60)) ) mod (60))) [:])\nelse\n    set [作業1 v] to (join (([floor v] of ((a) / (60)) ) mod (60)) [:])\nend\nif <(length of (([floor v] of (a) ) mod (60))) = [1]> then\n    set [作業1 v] to (join (join (作業1) [0]) (([floor v] of (a) ) mod (60)))\nelse\n    set [作業1 v] to (join (作業1) (([floor v] of (a) ) mod (60)))\nend\n\n@ギミック\n\nwhen flag clicked\nswitch costume to (none v)\nset size to (250) %\nhide\n\nwhen I receive [start v]\nクローン\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nif <(costume [name v]) = [鍵]> then\n    set [作業1 v] to (y position)\n    repeat until <touching (プレイヤー v)?>\n        set y to ((作業1) + ((5) * ([sin v] of ((15552000) * (days since 2000)) )))\n    end\n    add [鍵] to [flag v]\n    delete all of [作業用 v]\n    repeat (10)\n        add ([x position v] of [プレイヤー v]) to [作業用 v]\n        add ([y position v] of [プレイヤー v]) to [作業用 v]\n    end\n    repeat until <[flag v] contains [解除]?>\n        go to x: (item (1) of [作業用 v]) y: (item (2) of [作業用 v])\n        delete (1) of [作業用 v]\n        delete (1) of [作業用 v]\n        add ([x position v] of [プレイヤー v]) to [作業用 v]\n        add ([y position v] of [プレイヤー v]) to [作業用 v]\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nelse\n    if <<(costume [name v]) = [錠]> or <(costume [name v]) = [錠2]>> then\n        wait until <[flag v] contains [鍵]?>\n        wait until <touching (プレイヤー v)?>\n        add [解除] to [flag v]\n        repeat (10)\n            change [ghost v] effect by (10)\n        end\n    end\nend\ndelete this clone\n\nwhen I receive [menu2 v]\nstop [other scripts in sprite v]\ndelete this clone\n\ndefine クローン\ndelete all of [flag v]\nif <(backdrop [name v]) = [13]> then\n    go to x: (40) y: (150)\n    switch costume to (鍵 v)\n    create clone of (_myself_ v)\n    go to x: (80) y: (-58)\n    switch costume to (錠 v)\n    create clone of (_myself_ v)\nelse\n    if <(backdrop [name v]) = [15]> then\n        go to x: (210) y: (100)\n        switch costume to (鍵 v)\n        create clone of (_myself_ v)\n        go to x: (210) y: (-58)\n        switch costume to (錠2 v)\n        create clone of (_myself_ v)\n    end\nend\nswitch costume to (none v)\n\nwhen I receive [play v]\nif <(costume [name v]) = [none]> then\n    クローン\nelse\n    delete this clone\nend\n\n