platformer!!　/　プラットフォーマー!!

Instructions: 傾向5P、ゲーム.アート3P、ありがとう！\n⚠重いので2回旗押し推奨\n宣伝の作品\nhttps://scratch.mit.edu/projects/781848018/\n日本語は下\n＜operation method＞\n・Arrow keys　/　w a d　\nMobile operation compatible!\n＜Comments from the author＞\nIf you find it interesting, ♥★ please!\n　\n<操作方法>\n・矢印キー　w a d　\nモバイル操作対応!\n<作者コメント>\n過去最高傑作です！この作品で初傾向に乗りたいので、♥★をお願いします!\n\n\n-nekoL- ❤︎☆！？\nKamakiri1023 ❤︎☆！？\neitan-w❤︎☆！？

@Stage\n\nwhen flag clicked\nswitch backdrop to (コスチューム1 v)\nforever\n    wait (60) seconds\n    next backdrop\nend\n\nwhen I receive [game　start v]\nif <(BGM) = [1]> then\n    forever\n        play sound [Nebula v] until done\n    end\nend\nif <(BGM) = [2]> then\n    forever\n        play sound [Radiant v] until done\n    end\nend\nif <(BGM) = [3]> then\n    play sound [13002 v] until done\nend\n\n@Player\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\nhide\n\ndefine 動作\nchange [yの力 v] by (-1)\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>> then\n    point in direction (90)\n    change [xの力 v] by (1)\nend\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>>> then\n    point in direction (-90)\n    change [xの力 v] by (-1)\nend\nset [xの力 v] to ((xの力) * (0.88))\nchange x by (xの力)\nrepeat (6)\n    if <touching (stage v)?> then\n        change y by (1)\n    end\nend\nif <touching (stage v)?> then\n    change y by (-6)\n    位置補正x (() - ((xの力) / ([abs v] of (xの力) ))) ([ceiling v] of ([abs v] of (xの力) ) )\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>> then\n        set [yの力 v] to [12]\n        set [xの力 v] to ((7) - (<(xの力) > [0]> * (14)))\n        point in direction (90)\n    else\n        set [xの力 v] to [0]\n        point in direction (-90)\n    end\nend\nchange y by (yの力)\nif <touching (stage v)?> then\n    位置補正y (() - ((yの力) / ([abs v] of (yの力) ))) ([ceiling v] of ([abs v] of (yの力) ) )\nend\nchange y by (-1.1)\nif <<touching (stage v)?> and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>>> then\n    set [yの力 v] to [15]\nend\nchange y by (1.1)\nif <(Y) < [-400]> then\n    初期位置\nend\nif <touching (障害物 v)?> then\n    初期位置\nend\n処理\nbroadcast (プログラム2 v)\n\nwhen I receive [プログラム v]\n動作\n\ndefine 処理\nchange [x v] by ((x position) - ((X) - (Camera_x)))\nchange [y v] by ((y position) - (((Y) - (Camera _y)) - (20)))\nchange [camera_x v] by ([floor v] of (((X) - (Camera_x)) * (0.1)) )\nchange [camera _y v] by ([floor v] of (((Y) - (Camera _y)) * (0.2)) )\nset x to ((X) - (Camera_x))\nset y to (((Y) - (Camera _y)) - (20))\n\ndefine 位置補正x (向き) (回数)\nif <(xの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (stage v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change x by (向き)\nend\nchange x by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (stage v)?>>)))\n\ndefine 位置補正y (向き) (回数)\nif <(yの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (stage v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change y by (向き)\nend\nchange y by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (stage v)?>>)))\nset [yの力 v] to [0]\n\ndefine 初期位置\ngo to x: (0) y: (-20)\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [camera_x v] to [0]\nset [camera _y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\n\nwhen flag clicked\n\nwhen I receive [初期化 v]\n初期位置\n\nwhen I receive [game　start v]\ngo to x: (0) y: (-20)\npoint in direction (90)\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [camera_x v] to [-200]\nset [camera _y v] to [-20]\nset [x v] to [-200]\nset [y v] to [-20]\n\nwhen I receive [game　start v]\nshow\npoint in direction (90)\nset rotation style [left-right v]\n\nwhen I receive [costume change v]\nnext costume\n\nforever\n    switch costume to (コスチューム1 v)\nend\n\n@矢印\n\nwhen flag clicked\ngo to x: (166) y: (-92)\nshow\n\nwhen this sprite clicked\nbroadcast (costume change v)\n\nwhen I receive [home sprite no v]\nhide\n\n@障害物\n\nwhen flag clicked\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\nset [コスチューム番号 v] to ((コスチューム番号) + (1))\nset [棘の配置 v] to (x座標)\nset [my_x v] to (x座標)\nset [my_y v] to (y座標)\nswitch costume to ((ステージ番号) + (1))\nset [my_n v] to ((ステージ番号) + (1))\ncreate clone of (_myself_ v)\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    set [ghost v] effect to (100)\n    hide\nelse\n    clear graphic effects\n    show\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <not <(costume [number v]) = [1]>> then\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\nclear graphic effects\nshow\n\nwhen I receive [game　start v]\nset [棘のスプライト v] to [7]\nset [棘の配置 v] to [0]\nset [コスチューム番号 v] to [1]\nhide\nset [ghost v] effect to (100)\nhide\nrepeat ((棘のスプライト) - (1))\n    ステージ配置 ((棘の配置) + (480)) [0] (コスチューム番号)\nend\nswitch costume to (none v)\n\n@loading\n\nwhen flag clicked\nhide\n\nwhen I receive [home sprite no v]\ngo to x: (2) y: (8)\nshow\nwait (0.25) seconds\nhide\n\n@STAGE\n\nwhen flag clicked\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nset [配置 v] to (x座標)\nswitch costume to (none v)\nset [番号 v] to ((ステージ番号) + (1))\nset [my_x v] to (x座標)\nset [my_y v] to (y座標)\nswitch costume to ((ステージ番号) + (1))\nset [my_n v] to ((ステージ番号) + (1))\ncreate clone of (_myself_ v)\n\ndefine 移動 (x) (y)\nswitch costume to (none v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x) ) > ([abs v] of (x position) )> or <([abs v] of (y) ) > ([abs v] of (y position) )>> then\n    hide\nelse\n    show\nend\nswitch costume to (My_n)\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (Camera_x)) ((My_y) - (Camera _y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [game　start v]\nset [ステージの数 v] to [11]\nset [配置 v] to [0]\nset [番号 v] to [1]\nhide\nステージ配置 [0] [0] (番号)\nrepeat ((ステージの数) - (1))\n    ステージ配置 ((配置) + (480)) [] (番号)\nend\nswitch costume to (none v)\nbroadcast (プログラム v)\nbroadcast (プログラム3 v)\n\n@cloud\n\nwhen I start as a clone\nshow\ngo to x: (311) y: (pick random (139) to (-150))\nrepeat (80)\n    change x by (-7.5)\nend\nhide\n\nif <touching (_edge_ v)?> then\n    delete this clone\nend\n\nwhen I receive [game　start v]\ngo to [back v] layer\nhide\nforever\n    create clone of (_myself_ v)\n    wait (pick random (1.0) to (2.0)) seconds\nend\n\n@player色設定\n\nwhen flag clicked\ngo to x: (92) y: (-86)\nswitch costume to (コスチューム1 v)\nshow\n\nwhen I receive [costume change v]\nnext costume\n\nwhen I receive [home sprite no v]\nhide\n\n@START　スプライト\n\nwhen flag clicked\ngo to x: (-170) y: (-120)\nshow\n\nwhen this sprite clicked\nbroadcast (Home sprite no v)\nbroadcast (GAME　START v)\n\nwhen I receive [home sprite no v]\nhide\n\n@設定　スプライト\n\nwhen flag clicked\ngo to x: (-170) y: (-43)\nshow\n\nwhen this sprite clicked\nbroadcast (設定 v)\n\nwhen I receive [home sprite no v]\nhide\n\n@サムネ\n\nwhen flag clicked\ngo to [front v] layer\nshow\nset [ghost v] effect to (100)\n\n@設定画面\n\nwhen flag clicked\nhide variable [音量 v]\nhide variable [bgm v]\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [設定 v]\nshow variable [音量 v]\nshow variable [bgm v]\nshow\n\nwhen this sprite clicked\nhide variable [音量 v]\nhide variable [bgm v]\nhide\n\nwhen flag clicked\nset [音量 v] to [100]\nforever\n    set [音量 v] to (volume)\nend\n\n@クレジット\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen this sprite clicked\nhide\n\nwhen I receive [クレジット v]\nshow\n\n@credit\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (-170) y: (32)\nshow\n\nwhen this sprite clicked\nbroadcast (クレジット v)\n\nwhen I receive [home sprite no v]\nhide\n\n@宣伝欄\n\nwhen flag clicked\ngo to [back v] layer\ngo to x: (69) y: (65)\nswitch costume to (コスチューム1 v)\nshow\nwait (0.25) seconds\nforever\n    repeat (20)\n        switch costume to (コスチューム2 v)\n        wait (0.1) seconds\n        switch costume to (コスチューム3 v)\n    end\n    switch costume to (コスチューム4 v)\n    wait (1) seconds\n    switch costume to (コスチューム5 v)\n    wait (2) seconds\nend\n\nwhen I receive [home sprite no v]\nhide\n\n