Exotic Valleys || A Scrolling Platformer

Instructions: New https://scratch.mit.edu/projects/801597595/\nNot generic my new game is not Generic

@Stage\n\nwhen flag clicked\nforever\n    play sound [【Minecraft】【BGM】 マイクラBGM その2 【超高音質】 - from YouTube.mp3 v] until done\nend\n\n@スプライト3\n\ndefine Time (x) (y) (表示する桁)\nshow\nbroadcast (削除 v)\nset [time表示用 v] to [0]\nset size to (大きさ) %\ngo to x: ((x) + ((0.425) * (size))) y: ((y) - ((0.25) * (size)))\nswitch costume to (コスチューム1 v)\ncreate clone of (_myself_ v)\nchange x by ((((42.5) + (10)) * (size)) / (100))\nrepeat (length of ([floor v] of (timer) ))\n    change x by (((11.5) * (size)) / (100))\n    change [time表示用 v] by (1)\n    switch costume to ((letter (Time表示用) of (timer)) + (2))\n    create clone of (_myself_ v)\n    change x by (((11.5) * (size)) / (100))\nend\nif <not <((表示する桁) * (1)) = [0]>> then\n    change x by ((0.065) * (size))\n    change [time表示用 v] by (1)\n    switch costume to (コスチューム12 v)\n    create clone of (_myself_ v)\n    change x by ((0.065) * (size))\n    repeat ((表示する桁) - (letter (1) of ((表示する桁) - (3))))\n        change x by (((11.5) * (size)) / (100))\n        change [time表示用 v] by (1)\n        switch costume to ((letter (Time表示用) of (timer)) + (2))\n        create clone of (_myself_ v)\n        change x by (((11.5) * (size)) / (100))\n    end\nend\nhide\n\nwhen I receive [削除 v]\ndelete this clone\n\nwhen flag clicked\nreset timer\nswitch costume to (コスチューム13 v)\nbroadcast (表示 v)\n\nwhen I receive [表示 v]\nforever\n    Time [-220] [150] []\nend\n\nwhen I receive [3 v]\ngo to [front v] layer\nstop [other scripts in sprite v]\ngo to [front v] layer\n\nwhen flag clicked\nset [大きさ v] to [100]\n\nwhen I start as a clone\ngo to [front v] layer\n\n@スプライト2\n\nwhen flag clicked\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\nwhen I receive [ゲームクリアー v]\nstop [other scripts in sprite v]\n\n@ \n\nwhen I receive [リトライ v]\n全初期化\n\nwhen [r v] key pressed\nif <(ゴールに触れているか) = [0]> then\n    broadcast (リトライ v)\nend\n\ndefine 全初期化\nset rotation style [left-right v]\npoint in direction (90)\ngo to x: (0) y: (-20)\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [視点x v] to [-200]\nset [支店y v] to [-20]\nset [x v] to [-200]\nset [y v] to [-20]\nset [復活x v] to [-200]\nset [復活y v] to [-20]\nset [clearまでにかかった時間 v] to [0]\n\ndefine 位置補正y (向き) (回数)\nif <(yの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <<<touching (ステージ3 v)?> or <touching (ステージ2 v)?>> or >> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change y by (向き)\nend\nchange y by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <<<touching (ステージ3 v)?> or <touching (ステージ2 v)?>> or >>)))\nset [yの力 v] to [0]\n\nwhen flag clicked\ngo to x: (0) y: (-20)\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [視点x v] to [-200]\nset [支店y v] to [-20]\nset [x v] to [-200]\nset [y v] to [-20]\nshow\nrepeat (10)\n    set [ghost v] effect to (0)\n    go to [front v] layer\nend\n\nwhen I receive [プログラム v]\n動作\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    switch costume to (右 v)\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    switch costume to (左 v)\n    change [xの力 v] by (-1)\nend\nif <not <<key (down arrow v) pressed?> or <<<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>>> or <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>>>>>> then\n    switch costume to (止まる v)\nend\n\n    switch costume to (止まる2 v)\nend\nset [xの力 v] to ((xの力) * (0.88))\nchange x by (xの力)\nrepeat (6)\n    if <<<touching (ステージ2 v)?> or <touching (ステージ3 v)?>> or > then\n        change y by (1)\n    end\nend\nif <<<touching (ステージ2 v)?> or <touching (ステージ3 v)?>> or > then\n    change y by (-6)\n    位置補正x (() - ((xの力) / ([abs v] of (xの力) ))) ([ceiling v] of ([abs v] of (xの力) ) )\n    if <<<<touching (ステージ2 v)?> or <touching (ステージ3 v)?>> or > or <<<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 (ステージ2 v)?> or <touching (ステージ3 v)?>> or > then\n    位置補正y (() - ((yの力) / ([abs v] of (yの力) ))) ([ceiling v] of ([abs v] of (yの力) ) )\nend\nchange y by (-1.1)\nif <<<<touching (ステージ2 v)?> or <touching (ステージ3 v)?>> or > and <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>>>> then\n    start sound [ニュッ2 v]\n    set [yの力 v] to [15]\nend\nchange y by (1.1)\nif <<(Y) < [-400]> or <<touching (あたちゃダメなやつ4 v)?> or <<touching (ステージ2あたちゃダメなやつ v)?> or <<touching (あたちゃダメなやつ v)?> or <touching (あたちゃダメなやつ３ v)?>>>>> then\n    if <(チェックポイント) = [0]> then\n        start sound [Oops v]\n        初期位置\n    end\n    if <(チェックポイント) = [1]> then\n        start sound [Oops v]\n        中間地点\n    end\nend\n処理\nbroadcast (プログラム2 v)\nif <touching (1ゴール v)?> then\n    broadcast (2 v)\nend\n処理\nbroadcast (プログラム2 v)\nif <touching (２ゴール v)?> then\n    change [ステージ v] by (1)\n    broadcast (3 v)\nend\n処理\nbroadcast (プログラム2 v)\nif <touching (3ゴール v)?> then\n    change [ステージ v] by (1)\n    broadcast (4 v)\nend\n処理\nbroadcast (プログラム2 v)\nif <touching (4ゴール v)?> then\n    初期位置\n    change [ステージ v] by (1)\n    broadcast (ゲームクリアー v)\nend\n処理\nbroadcast (プログラム2 v)\n\n初期位置\n\n初期位置\nchange [ステージ v] by (1)\n\ndefine 処理\nchange [x v] by ((x position) - ((X) - (視点x)))\nchange [y v] by ((y position) - (((Y) - (支店y)) - (20)))\nchange [視点x v] by ([floor v] of (((X) - (視点x)) * (0.1)) )\nchange [支店y v] by ([floor v] of (((Y) - (支店y)) * (0.2)) )\nset x to ((X) - (視点x))\nset y to (((Y) - (支店y)) - (20))\n\ndefine 位置補正x (向き) (回数)\nif <(xの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <<<touching (ステージ2 v)?> or <touching (ステージ3 v)?>> or >> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change x by (向き)\nend\nchange x by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <<<touching (ステージ2 v)?> or <touching (ステージ3 v)?>> or >>)))\n\ndefine 位置補正y (向き) (回数)\nif <(yの力) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <<touching (ステージ3 v)?> or <<<touching (ステージ2 v)?> or <touching (ステージ3 v)?>> or >>> or <(i) = ((回数) + (1))>>\n    change [i v] by (1)\n    change y by (向き)\nend\nchange y by (() - ((向き) * (((回数) + (1)) * <<(i) = ((回数) + (1))> and <<<touching (ステージ2 v)?> or <touching (ステージ3 v)?>> or >>)))\nset [yの力 v] to [0]\n\ndefine 初期位置\ngo to x: (0) y: (-20)\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [視点x v] to [0]\nset [支店y v] to [0]\nset [x v] to [0]\nset [y v] to [0]\n\nwhen I receive [1 v]\n\nbroadcast (2 v)\n\nbroadcast (2 v)\nbroadcast (2 v)\n\nsay [こんにちは!] for (2) seconds\n\nwhen [space v] key pressed\n\nwhen I receive [ゲームクリアー v]\nstop [other scripts in sprite v]\n\nbroadcast (1 v)\n\nwait (0.1) seconds\n\ndefine 中間地点\nset [xの力 v] to [0]\nset [yの力 v] to [0]\nset [視点x v] to [2100]\nset [支店y v] to [0]\nset [x v] to [-200]\nset [y v] to [-20]\nset [復活x v] to [-200]\nset [復活y v] to [-20]\nset [clearまでにかかった時間 v] to [0]\n\nwhen flag clicked\nset [チェックポイント v] to [0]\nforever\n    if <touching (チェックポイント v)?> then\n        set [チェックポイント v] to [1]\n    end\nend\n\nwhen flag clicked\n\nwhen flag clicked\nbroadcast (プログラム v)\nbroadcast (3 v)\n\n@チェックポイント\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (視点x)) ((My_y) - (支店y))\nend\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 start as a clone\nshow\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\nwhen flag clicked\n\nstop [this script v]\n\nwhen I receive [2 v]\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen flag clicked\nset [ステージ v] to [1]\nhide\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [100] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2940] [0] [7]\nステージ配置 [3540] [0] [8]\nステージ配置 [4000] [0] [9]\nステージ配置 [4480] [0] [10]\nステージ配置 [5200] [0] [11]\nステージ配置 [5900] [0] [12]\n\nwhen I receive [消す v]\ndelete this clone\n\nwhen flag clicked\n\nset [ステージ v] to [1]\nhide\n\nwhen I receive [1 v]\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [100] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2940] [0] [7]\nステージ配置 [3540] [0] [8]\nステージ配置 [4000] [0] [9]\nステージ配置 [4480] [0] [10]\nswitch costume to (none v)\nbroadcast (プログラム v)\nforever\n    if <(ステージ) = [2]> then\n        delete this clone\n    end\nend\n\nswitch costume to (none v)\nbroadcast (プログラム v)\nforever\n    if <(ステージ) = [2]> then\n        delete this clone\n    end\nend\n\nwhen I start as a clone\n\nforever\n    delete this clone\nend\n\ndelete this clone\n\n@ステージ3\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (視点x)) ((My_y) - (支店y))\nend\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\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\nwhen flag clicked\nforever\n    hide\nend\n\nstop [this script v]\n\nwhen I receive [3 v]\nステージ配置 [0] [0] [1]\nステージ配置 [500] [0] [2]\nステージ配置 [1000] [0] [3]\nステージ配置 [1500] [0] [4]\nステージ配置 [2000] [0] [5]\nステージ配置 [2500] [0] [6]\nステージ配置 [3000] [0] [7]\nステージ配置 [3500] [0] [8]\nステージ配置 [4000] [0] [9]\nステージ配置 [4500] [0] [10]\nswitch costume to (none v)\nbroadcast (プログラム v)\nwait (0.01) seconds\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I receive [4 v]\n\ndelete this clone\n\nwhen I receive [3 v]\n\nwhen flag clicked\ndelete this clone\n\nwhen I receive [消す v]\ndelete this clone\n\n@3ゴール\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (視点x)) ((My_y) - (支店y))\nend\n\nwhen flag clicked\ndelete this clone\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 start as a clone\nshow\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\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I receive [4 v]\n\ndelete this clone\n\nwhen I receive [3 v]\nset [ステージ v] to [1]\nhide\nステージ配置 [0] [0] [1]\nステージ配置 [480] [0] [2]\nステージ配置 [960] [0] [3]\nステージ配置 [1440] [100] [4]\nステージ配置 [1920] [0] [5]\nステージ配置 [2400] [0] [6]\nステージ配置 [2940] [0] [7]\nステージ配置 [3540] [0] [8]\nステージ配置 [4000] [0] [9]\nステージ配置 [4480] [180] [10]\nswitch costume to (none v)\nbroadcast (プログラム v)\n\nwhen I receive [3 v]\n\nwhen I start as a clone\nforever\n    if <touching (  v)?> then\n    end\nend\n\nbroadcast (4 v)\n\nwhen I receive [消す v]\ndelete this clone\n\n@あたちゃダメなやつ３\n\nwhen I receive [プログラム2 v]\nif <(costume [number v]) = [1]> then\n    broadcast (プログラム v)\nelse\n    移動 ((My_x) - (視点x)) ((My_y) - (支店y))\nend\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\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\nwhen flag clicked\nhide\n\nforever\nend\n\nstop [this script v]\n\nwhen I receive [3 v]\nステージ配置 [0] [0] [1]\nステージ配置 [500] [0] [2]\nステージ配置 [1000] [0] [3]\nステージ配置 [1500] [0] [4]\nステージ配置 [2000] [0] [5]\nステージ配置 [2500] [0] [6]\nステージ配置 [3000] [0] [7]\nステージ配置 [3500] [0] [8]\nステージ配置 [4000] [0] [9]\nステージ配置 [4500] [0] [10]\nswitch costume to (none v)\nbroadcast (プログラム v)\nwait (0.01) seconds\n\nwhen I start as a clone\ngo to [front v] layer\n\nwhen I receive [4 v]\n\ndelete this clone\n\nwhen I receive [3 v]\n\nwhen flag clicked\ndelete this clone\n\nwhen I receive [消す v]\ndelete this clone\n\n@スプライト4\n\ndefine Time (x) (y) (表示する桁)\nshow\nbroadcast (削除 v)\nset [time表示用 v] to [0]\nset size to (大きさ) %\ngo to x: ((x) + ((0.425) * (size))) y: ((y) - ((0.25) * (size)))\nswitch costume to (コスチューム1 v)\ncreate clone of (_myself_ v)\nchange x by ((((42.5) + (10)) * (size)) / (100))\nrepeat (length of ([floor v] of (timer) ))\n    change x by (((11.5) * (size)) / (100))\n    change [time表示用 v] by (1)\n    switch costume to ((letter (Time表示用) of (timer)) + (2))\n    create clone of (_myself_ v)\n    change x by (((11.5) * (size)) / (100))\nend\nif <not <((表示する桁) * (1)) = [0]>> then\n    change x by ((0.065) * (size))\n    change [time表示用 v] by (1)\n    switch costume to (コスチューム12 v)\n    create clone of (_myself_ v)\n    change x by ((0.065) * (size))\n    repeat ((表示する桁) - (letter (1) of ((表示する桁) - (3))))\n        change x by (((11.5) * (size)) / (100))\n        change [time表示用 v] by (1)\n        switch costume to ((letter (Time表示用) of (timer)) + (2))\n        create clone of (_myself_ v)\n        change x by (((11.5) * (size)) / (100))\n    end\nend\nhide\n\nwhen I receive [削除 v]\ndelete this clone\n\nwhen flag clicked\nreset timer\nswitch costume to (コスチューム13 v)\nbroadcast (表示 v)\n\nwhen I receive [表示 v]\nforever\n    Time [-220] [150] []\nend\n\nwhen I receive [4 v]\ngo to [front v] layer\nstop [other scripts in sprite v]\ngo to [front v] layer\n\nwhen flag clicked\nset [大きさ v] to [100]\n\nwhen I start as a clone\ngo to [front v] layer\n\n