cold platformer

Instructions: Use A,D keys or ←,→ keys to move\nUse W key or ↑key to jump\n@ta_ta040さんの作品\nhttps://scratch.mit.edu/projects/463473593/\n時間がたつと段々と震えます!\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n今年最後の投稿…

@Stage\n\nwhen flag clicked\n\nwhen flag clicked\nswitch backdrop to (背景1 v)\nforever\n    play sound [Treenan v] until done\nend\n\nswitch backdrop to (背景2 v)\nwait (1) seconds\n\n@Player\n\nwhen flag clicked\nswitch costume to (コスチューム2 v)\nshow\ngo to x: (0) y: (-20)\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\ndefine 動作\npoint in direction (90)\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    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    change [xの力 v] by (-1)\nend\nset [xの力 v] to ((xの力) * (0.88))\nchange x by (xの力)\nrepeat (6)\n    if <touching (ステージ v)?> then\n        change y by (1)\n    end\nend\nif <touching (ステージ 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    else\n        set [xの力 v] to [0]\n    end\nend\nchange y by (yの力)\nif <touching (ステージ v)?> then\n    位置補正y (() - ((yの力) / ([abs v] of (yの力) ))) ([ceiling v] of ([abs v] of (yの力) ) )\nend\nchange y by (-1.1)\nif <<touching (ステージ 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]> or <touching (氷 v)?>> then\n    start sound [お亡くなり v]\n    初期位置\nend\n処理\nbroadcast (プログラム2 v)\nif <touching (goal v)?> then\n    broadcast (goal v)\nend\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 (ステージ v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change x by (向き)\nend\nchange x by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (ステージ v)?>>)))\n\ndefine 位置補正y (向き) (回数)\nif <(yの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (ステージ v)?>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change y by (向き)\nend\nchange y by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <touching (ステージ 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\nforever\n    if <(レベル) = [1]> then\n        repeat (1)\n            change x by (1)\n        end\n        repeat (1)\n            change x by (-1)\n        end\n    end\n    if <(レベル) = [2]> then\n        repeat (1)\n            change x by (2)\n        end\n        repeat (1)\n            change x by (-2)\n        end\n    end\n    if <(レベル) = [3]> then\n        repeat (1)\n            change x by (3)\n        end\n        repeat (1)\n            change x by (-3)\n        end\n    end\n    if <(レベル) = [4]> then\n        repeat (1)\n            change x by (4)\n        end\n        repeat (1)\n            change x by (-4)\n        end\n    end\n    if <(レベル) = [5]> then\n        repeat (1)\n            change x by (5)\n        end\n        repeat (1)\n            change x by (-5)\n        end\n    end\n    if <(レベル) = [6]> then\n        repeat (1)\n            change x by (6)\n        end\n        repeat (1)\n            change x by (-6)\n        end\n    end\n    if <(レベル) = [7]> then\n        repeat (1)\n            change x by (7)\n        end\n        repeat (1)\n            change x by (-7)\n        end\n    end\n    if <(レベル) = [8]> then\n        repeat (1)\n            change x by (8)\n        end\n        repeat (1)\n            change x by (-8)\n        end\n    end\nend\n\nwhen flag clicked\nset [レベル v] to [1]\nset [時間 v] to [0]\nforever\n    change [時間 v] by (1)\n    wait (1) seconds\nend\n\nwhen flag clicked\nforever\n    if <(時間) = [10]> then\n        set [レベル v] to [1]\n    end\n    if <(時間) = [25]> then\n        set [レベル v] to [2]\n    end\n    if <(時間) = [40]> then\n        set [レベル v] to [3]\n    end\n    if <(時間) = [50]> then\n        set [レベル v] to [4]\n    end\n    if <(時間) = [60]> then\n        set [レベル v] to [5]\n    end\n    if <(時間) = [80]> then\n        set [レベル v] to [6]\n    end\n    if <(時間) = [100]> then\n        set [レベル v] to [7]\n    end\n    if <(時間) = [150]> then\n        set [レベル v] to [8]\n    end\nend\n\nwait (1) seconds\n\nwhen I receive [goal v]\n\nhide\n\nstop [this script v]\n\n@ステージ\n\nwhen flag clicked\nhide\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [0] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2880] [0] [7]\nステージ配置 [3360] [0] [8]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\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 [goal v]\nhide\nstop [this script v]\n\nhide\n\n@氷\n\nwhen flag clicked\nhide\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [0] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2880] [0] [7]\nステージ配置 [3360] [0] [8]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\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\n@Sprite2\n\nwhen flag clicked\nhide\nforever\n    create clone of (_myself_ v)\n    wait (0.2) seconds\nend\n\nwhen I start as a clone\nshow\npoint in direction (90)\nset [go muuuuuuuuuuuufffffffiiiiinnnnnn! v] to (pick random (12) to (27))\nset [ghost v] effect to (50)\ngo to x: (pick random (-240) to (240)) y: (-10000)\nchange y by (go muuuuuuuuuuuufffffffiiiiinnnnnn!)\nrepeat until <(y position) < [-179]>\n    go to [back v] layer\n    change [go muuuuuuuuuuuufffffffiiiiinnnnnn! v] by (-1)\n    change y by (go muuuuuuuuuuuufffffffiiiiinnnnnn!)\nend\ndelete this clone\n\nwhen I receive [goal v]\nhide\n\n@goal\n\nwhen flag clicked\nhide\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [0] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2880] [0] [7]\nステージ配置 [3360] [0] [8]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\ndefine ステージ配置 (x座標) (y座標) (ステージ番号)\nswitch costume to (none v)\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\n@win\n\nwhen flag clicked\nhide\n\nwhen I receive [goal v]\nshow\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\nshow\nswitch costume to (blank v)\nset size to (150) %\nswitch costume to (win screen v)\nrepeat (60)\n    go to [front v] layer\n    switch costume to (blank v)\n    switch costume to (win screen v)\n    change [ghost v] effect by (-5)\n    change size by (((100) - (size)) / (40))\n    set x to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\n    set y to (((((pick random (0) to (1)) * (2)) - (1)) * ((size) - (100))) * (0.75))\nend\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\ngo to [front v] layer\n\nwhen I receive [隠す v]\nhide\n\n@スプライト1\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\n\ngo to [front v] layer\n\nswitch costume to (背景2 v)\n\nwhen [timer v] > (0)\n\n