~Replay Platformer~


@Stage\n\ndefine 短縮 (mode) (code)\nset [モード v] to (mode)\nset [入力データ v] to (code)\nbroadcast (記号読み込み v) and wait\ndelete all of [list1 v]\nadd [] to [list1 v]\nif <(モード) = [1]> then\n    set [処理回数 v] to [0]\n    set [記憶 v] to []\n    repeat ((length of (入力データ)) mod (3))\n        change [処理回数 v] by (1)\n        判定\n        set [記憶 v] to (join (記憶) (letter (処理回数) of (入力データ)))\n    end\n    if <not <((length of (入力データ)) mod (3)) = [0]>> then\n        replace item (1) of [list1 v] with (join (item (1) of [list1 v]) (item ((記憶) + (1)) of [記号 v]))\n    end\n    repeat ([floor v] of ((length of (入力データ)) / (3)) )\n        set [記憶 v] to []\n        repeat (3)\n            change [処理回数 v] by (1)\n            判定\n            set [記憶 v] to (join (記憶) (letter (処理回数) of (入力データ)))\n        end\n        replace item (1) of [list1 v] with (join (item (1) of [list1 v]) (item ((記憶) + (1)) of [記号 v]))\n    end\nelse\n    set [処理回数 v] to [0]\n    repeat (length of (入力データ))\n        change [処理回数 v] by (1)\n        判定\n        set [記憶 v] to ((item # of (letter (処理回数) of (入力データ)) in [記号 v]) - (1))\n        repeat (((3) - (length of (記憶))) * <not <(処理回数) = [1]>>)\n            set [記憶 v] to (join [0] (記憶))\n        end\n        replace item (1) of [list1 v] with (join (item (1) of [list1 v]) (記憶))\n    end\nend\n\ndefine 判定\nif <not <<[記号 v] contains (letter (処理回数) of (入力データ))?> and <not <((1000) - ((モード) * (990))) < (item # of (letter (処理回数) of (入力データ)) in [記号 v])>>>> then\n    stop [all v]\nend\n\ndefine 記号読込\nif <(length of [記号 v]) = [0]> then\n    set [記号 v] to [0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'\(\)-=^~\|@`\[{;+:*\]},<.>/?_ ｱｲｳｴｵｶｷｸｹｺｻｼｽｾｿﾀﾁﾂﾃﾄﾅﾆﾇﾈﾉﾊﾋﾌﾍﾎﾏ]\n    set [記号 v] to (join (記号) [ﾐﾑﾒﾓﾔﾕﾖﾗﾘﾙﾚﾛﾜｦﾝｧｨｩｪｫｬｭｮ゛あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんぁぃぅぇぉゃゅょがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴ])\n    set [記号 v] to (join (記号) [ぷぺぽアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンァィゥェォャュョガギグゲゴザジズゼゾダヂヅデドバビブベボパピプペポθ○〇●◎①゜②③④⑤⑥⑦⑧⑨⑩⑪⑫])\n    set [記号 v] to (join (記号) [⑬⑭⑮⑯⑰⑱⑲⑳㊤㊥㊦㊧㊨⓫⓬⓭⓮⓯⓰⓱⓲⓳⓴◯⦿◉◌◍◐◒◑◓◔◕◖◗▽▼△▲∴∵▶∇‣▴▵▷▸◬◭◮×✖☒☓✕✗◇◆□■☑❖▥÷１２３４５６７８９０一二三四五六七八九十百千万億兆京亜阿唖吾亞蛙啞㋐])\n    set [記号 v] to (join (記号) [㋑ゐ尹㋼㋒ゑ㋓㋽㋔㊋㋕㊭㋖㋗¹₁㊀²ⅡⅠ₂㊁㋥Ⅲ³₃㊂Ⅳ⁴₄㊃Ⅴ⁵₅㊄Ⅵ⁶₆㊅Ⅶ⁷₇㊆Ⅷ⁸₈㊇₉㊈Ⅸ⁹Ⅹ㊉√㉑㉒㉓㉔㉕㉖㉗㉘㉙㉚㉛㉜㉝㉞㉟㊱㊲㊳㊴㊵㊶㊷㊸㊹㊺㊻㊼㊽㊾㊿ζ乙人入力刀丁又了下口山子女少上])\n    set [記号 v] to (join (記号) [夕川大土丸弓工才士久干己寸亡及丈凡与刃巾乞∀∈⊂⊃∋∩∪円王火月犬手水中天日木文引牛今元戸午公止少心切太内父分方毛友区化反予欠氏不夫支比仏尺収仁介刈凶互井丹匹斤幻孔冗双斗乏升弔屯厄牙勾爪匂片玉左出正生])\n    set [記号 v] to (join (記号) [石田白本目右立外兄古広矢市台冬半母北用央去号皿仕写主申世他打代皮氷平由礼以加功札史司失必付辺包末未民令圧永可刊旧句示犯布弁穴冊処庁幼甘丘巨玄込召占奴払矛甲巧斥凹且囚汁仙凸尼丙瓦叱尻旦丼氾休気糸字耳先早])\n    set [記号 v] to (join (記号) [竹虫年名羽会回交光考行合寺自色西多池地当同肉米毎安曲血向死次式守州全有羊両列衣印各共好成争仲典伝灯老因仮件再在舌団任宇灰危机吸后至存宅扱芋汚汗朽叫仰旨芝朱舟巡旬尽吐弐忙劣企吉刑如匠伐帆伏吏缶江充迅壮肌])\n    set [記号 v] to (join (記号) [妃朴妄伎臼汎花貝見車赤足村男町何角汽近形言谷作社図声走体弟売麦来里医究局君決住助身対投豆坂返役位囲改完希求芸告材児初臣折束低努兵別利良冷労応快技均災志似序状条判防余我系孝困私否批忘卵乱壱戒含却狂迎更抗])\n    set [記号 v] to (join (記号) [攻伺秀床吹即沢沖沈抜尾坊妙肝忌岐坑克寿伸辛択尿伴芳邦妨没抑励吟呉佐肖抄杉妥但呈廷忍妊把伯扶戻串沙芯汰那阪肘冶妖沃呂弄雨学空金青林画岩京国姉知長直店東歩妹明門夜委育泳岸苦具幸始使事実者昔取受所注定波板表])\n    delete all of [記号 v]\nend\nset [リスト入力 v] to (length of [記号 v])\nrepeat ((length of (記号)) - (length of [記号 v]))\n    change [リスト入力 v] by (1)\n    add (letter (リスト入力) of (記号)) to [記号 v]\nend\n\nwhen flag clicked\nshow list [savecode v]\nhide variable [time v]\nforever\n    play sound [Goodbye v] until done\nend\n\nwhen I receive [start v]\nhide variable [time v]\nset [time v] to [0]\nwait (1) seconds\nrepeat until <(stage) = [7]>\n    change [time v] by (1)\n    wait (1) seconds\nend\nshow variable [time v]\n\nwhen I receive [start v]\ndelete all of [savecode\(仮\) v]\nrepeat until <(stage) = [7]>\n    add (join (join ((round ([x position v] of [player v])) + (500)) ((round ([y position v] of [player v])) + (500))) (stage)) to [savecode\(仮\) v]\n    wait (0.1) seconds\nend\nrepeat (10)\n    add (join (join ((round ([x position v] of [player v])) + (500)) ((round ([y position v] of [player v])) + (500))) (stage)) to [savecode\(仮\) v]\n    wait (0.1) seconds\nend\n1列化\n短縮 [1] (item (1) of [savecode v])\nreplace item (1) of [savecode v] with (item (1) of [list1 v])\nadd [↑トリプルクリックでコピーしてね/Triple click and copy!] to [savecode v]\nadd [どこかをクリックすると消えます/Click anywhere to close it.] to [savecode v]\nhide list [savecode v]\nwait until <mouse down?>\nshow list [savecode v]\n\nwhen I receive [▶start v]\nhide variable [time v]\nset [time v] to [0]\nwait (1) seconds\nrepeat until <(stage) = [7]>\n    change [time v] by (1)\n    wait (1) seconds\nend\nshow variable [time v]\n\ndefine 1列化\ndelete all of [savecode v]\nset [counter2 v] to [1]\nadd [] to [savecode v]\nrepeat (length of [savecode\(仮\) v])\n    replace item (1) of [savecode v] with (join (savecode) (item (counter2) of [savecode\(仮\) v]))\n    change [counter2 v] by (1)\nend\n\nwhen I receive [読込開始 v]\n短縮 [0] (answer)\nset [ok? v] to [1]\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\nhide variable [time v]\nshow list [savecode v]\n\n@Player\n\nwhen I receive [start v]\ngo to x: (-210) y: (-90)\nset size to (100) %\ngo to [front v] layer\nshow\nset [x v] to [0]\nset [y v] to [0]\nset [stage v] to [1]\npoint in direction (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 [x v] by (-0.8)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        point in direction (90)\n        change [x v] by (0.8)\n    end\n    set [x v] to ((X) * (0.9))\n    change x by (X)\n    if <touching (stage v)?> then\n        change y by (1)\n        if <touching (stage v)?> then\n            change y by (1)\n            if <touching (stage v)?> then\n                change y by (1)\n                if <touching (stage v)?> then\n                    change y by (1)\n                    if <touching (stage v)?> then\n                        change y by (1)\n                        if <touching (stage v)?> then\n                            change x by ((X) * (-1))\n                            change y by (-5)\n                            if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                                start sound [Jump v]\n                                if <(X) > [0]> then\n                                    set [x v] to [-7]\n                                else\n                                    set [x v] to [7]\n                                end\n                                set [y v] to [15]\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 (stage v)?> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            start sound [Jump v]\n            set [y v] to [15]\n        end\n    end\n    change y by (-1)\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching (stage v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    if <<(x position) > [230]> and <not <(stage) = [7]>>> then\n        go to x: (-216) y: (-58)\n        set [x v] to [0]\n        set [y v] to [0]\n        change [stage v] by (1)\n    end\n    if <<touching (▲ v)?> or <[-170] > (y position)>> then\n        go to x: (-216) y: (-58)\n        set [x v] to [0]\n        set [y v] to [0]\n        start sound [Rip v]\n    end\n    if <touching (jumper v)?> then\n        set [y v] to [20]\n        start sound [Jump2 v]\n    end\nend\n\nwhen I receive [▶start v]\nset [counter v] to [1]\nshow\nset [ok? v] to [0]\nbroadcast (読込開始 v)\nwait until <(OK?) = [1]>\nrepeat ((length of (item (1) of [list1 v])) / (7))\n    go to x: ((join (join (letter (counter) of (item (1) of [list1 v])) (letter ((counter) + (1)) of (item (1) of [list1 v]))) (letter ((counter) + (2)) of (item (1) of [list1 v]))) - (500)) y: ((join (join (letter ((counter) + (3)) of (item (1) of [list1 v])) (letter ((counter) + (4)) of (item (1) of [list1 v]))) (letter ((counter) + (5)) of (item (1) of [list1 v]))) - (500))\n    set [stage v] to (letter ((counter) + (6)) of (item (1) of [list1 v]))\n    change [counter v] by (7)\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen [timer v] > (0)\nhide\n\n@stage\n\nif <(x position) > [230]> then\n    go to x: (-216) y: (-58)\n    set [x v] to [0]\n    set [y v] to [0]\n    change [stage v] by (1)\nend\n\nwhen I receive [▶start v]\nwait (0.01) seconds\nshow\n\nwhen I receive [start v]\nwait (0.01) seconds\nshow\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    switch costume to (stage)\nend\n\nwhen [timer v] > (0)\nhide\n\n@▲\n\nif <(x position) > [230]> then\n    go to x: (-216) y: (-58)\n    set [x v] to [0]\n    set [y v] to [0]\n    change [stage v] by (1)\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    switch costume to (stage)\nend\n\nwhen I receive [▶start v]\nwait (0.01) seconds\nshow\n\nwhen I receive [start v]\nwait (0.01) seconds\nshow\n\nwhen [timer v] > (0)\nhide\n\n@stage2\n\nif <(x position) > [230]> then\n    go to x: (-216) y: (-58)\n    set [x v] to [0]\n    set [y v] to [0]\n    change [stage v] by (1)\nend\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    switch costume to (stage)\nend\n\nwhen I receive [start v]\nshow\nset [ghost v] effect to (0)\nwait (1) seconds\nwait until <(stage) = [2]>\nwait until <touching (player v)?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [▶start v]\nshow\nset [ghost v] effect to (0)\nwait (1) seconds\nwait until <(stage) = [2]>\nwait until <touching (player v)?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen [timer v] > (0)\nhide\n\n@jumper\n\nwhen flag clicked\nhide\nforever\n    switch costume to (stage)\nend\n\nwhen I receive [▶start v]\nshow\n\nwhen I receive [start v]\nshow\n\nwhen [timer v] > (0)\nhide\n\n@Button\n\nwhen flag clicked\nset [進行度 v] to [0]\ngo to x: (0) y: (0)\nhide\nCLONE\n\ndefine CLONE\nswitch costume to (1 v)\ngo to x: (0) y: (100)\ncreate clone of (_myself_ v)\nswitch costume to (2 v)\ngo to x: (0) y: (-100)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nwait until <(進行度) = [1]>\ndelete this clone\n\nwhen this sprite clicked\nstart sound [decision7 v]\nif <(costume [number v]) = [1]> then\n    broadcast (START v)\n    set [進行度 v] to [1]\nelse\n    ask [SAVECODE/セーブコードを入力してください] and wait\n    broadcast (▶START v)\n    set [進行度 v] to [1]\nend\n\n@サムネ\n\nwhen [timer v] > (0)\nshow\n\nwhen flag clicked\nhide\n\n