A scrolling Platformer〜plus〜　2

Instructions: part1\nhttps://scratch.mit.edu/projects/501299295\n(日本語)\n矢印キーかタップで操作\nトゲに触れたり落ちたりしないようにすすもう\n水色は大ジャンプ、黄緑色はチェックポイント\n頑張って！！\nチェックポイントがバグることがありますのでご了承下さい\n(English)\nMove with arrow keys or tap\nSoot soot not to touch or drop the red thorns\nLight blue is a big jump, yellow-green is a checkpoint\nGood luck! !! 

@Stage\n\nwhen I receive [intro終わり v]\nforever\n    play sound [Fly Away  v] until done\nend\n\nwhen I receive [intro終わり v]\nforever\n    switch backdrop to (方眼用紙 v)\nend\n\nswitch backdrop to (背景2 v)\n\n@プレイヤーと地面\n\ndefine ステージ作成\nerase all\npoint in direction (90)\nswitch costume to (00 v)\nrepeat until <(costume [number v]) = [1]>\n    set [地面コスチューム v] to (costume [name v])\n    switch costume to (バック v)\n    set size to (150) %\n    go to x: ((s x) + ((join (letter (1) of (地面コスチューム)) (letter (2) of (地面コスチューム))) * (480))) y: (s y)\n    switch costume to (地面コスチューム)\n    set size to (100) %\n    clear graphic effects\n    stamp\n    next costume\nend\n\ndefine プレイヤー操作\nif <[3000] < (s y)> then\n    start sound [噛む音 v]\n    リスポーン\nend\ngo to x: (0) y: (0)\nswitch costume to (プレイヤー v)\nchange [player y v] by (-1)\nif <<key (right arrow v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>> then\n    change [player x v] by (1)\nend\nif <<key (left arrow v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>> then\n    change [player x v] by (-1)\nend\nchange x by (player x)\nset [player x v] to ((.88) * (player x))\nif <touching color (#000000)?> then\n    change y by (1)\n    if <touching color (#000000)?> then\n        change y by (1)\n        if <touching color (#000000)?> then\n            change y by (1)\n            if <touching color (#000000)?> then\n                change y by (1)\n                if <touching color (#000000)?> then\n                    change y by (1)\n                    if <touching color (#000000)?> then\n                        change y by (-5)\n                        change x by ((player x) * (-1))\n                        if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n                            set [player y v] to [14]\n                            start sound [ジャンプ v]\n                            if <(player x) < [0]> then\n                                set [player x v] to [9]\n                            else\n                                set [player x v] to [-9]\n                            end\n                        else\n                            set [player x v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (player y)\nif <touching color (#000000)?> then\n    change y by ((-1) * (player y))\n    set [player y v] to [0]\nend\nchange y by (-2)\nif <touching color (#000000)?> then\n    if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n        set [player y v] to [14]\n        start sound [ジャンプ v]\n    end\nend\nchange y by (2)\nchange [s x v] by ((x position) * (-1))\nchange [s y v] by ((y position) * (-1))\ngo to x: (0) y: (0)\nif <[1] = (チェックポイント)> then\n    set [brightness v] effect to (80)\nend\nif <[2] = (チェックポイント)> then\n    set [brightness v] effect to (60)\nend\nif <[3] = (チェックポイント)> then\n    set [brightness v] effect to (40)\nend\nif <[4] = (チェックポイント)> then\n    set [brightness v] effect to (20)\nend\nif <[5] = (チェックポイント)> then\n    set [brightness v] effect to (0)\nend\nif <[6] = (チェックポイント)> then\n    set [brightness v] effect to (-100)\nend\n\ndefine リスポーン\nif <[0] = (チェックポイント)> then\n    set [player x v] to [0]\n    set [player y v] to [0]\n    set [s x v] to [0]\n    set [s y v] to [-200]\nend\nif <[1] = (チェックポイント)> then\n    set [player x v] to [0]\n    set [player y v] to [0]\n    set [s x v] to [-660]\n    set [s y v] to [-200]\nend\nif <[2] = (チェックポイント)> then\n    set [player x v] to [0]\n    set [player y v] to [0]\n    set [s x v] to [-1600]\n    set [s y v] to [-200]\nend\nif <[3] = (チェックポイント)> then\n    set [player x v] to [0]\n    set [player y v] to [0]\n    set [s x v] to [-2130]\n    set [s y v] to [-200]\nend\nif <[4] = (チェックポイント)> then\n    set [player x v] to [0]\n    set [player y v] to [0]\n    set [s x v] to [-2635]\n    set [s y v] to [-200]\nend\nif <[5] = (チェックポイント)> then\n    set [player x v] to [0]\n    set [player y v] to [0]\n    set [s x v] to [-3570]\n    set [s y v] to [-200]\nend\nif <[6] = (チェックポイント)> then\n    set [player x v] to [0]\n    set [player y v] to [0]\n    set [s x v] to [-4600]\n    set [s y v] to [15]\nend\nif <[7] = (チェックポイント)> then\n    set [player x v] to [0]\n    set [player y v] to [0]\n    set [s x v] to [-5060]\n    set [s y v] to [-10]\nend\n\nwhen flag clicked\nswitch costume to (プレイヤー v)\nhide\n\nwhen I receive [intro終わり v]\nshow\n\nwhen I receive [intro終わり v]\nset [player x v] to []\nset [player y v] to [0]\nset [s x v] to [0]\nset [s y v] to [0]\nforever\n    ステージ作成\n    プレイヤー操作\nend\n\nwhen I receive [intro終わり v]\nforever\n    if <touching color (#ff0000)?> then\n        start sound [噛む音 v]\n        リスポーン\n    end\n    if <touching color (#00ceff)?> then\n        start sound [ジャンプ v]\n        set [player y v] to [28]\n    end\nend\n\nwhen flag clicked\nrepeat (10)\n    repeat (10)\n        repeat (10)\n            switch costume to (プレイヤー v)\n            repeat (10)\n                repeat (10)\n                    switch costume to (プレイヤー v)\n                    repeat (10)\n                        repeat (10)\n                            switch costume to (プレイヤー v)\n                            repeat (10)\n                                repeat (10)\n                                    switch costume to (プレイヤー v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [intro終わり v]\nforever\n    go to [front v] layer\n    show\nend\n\nwhen I receive [intro終わり v]\nswitch costume to (プレイヤー v)\n\nwhen I receive [intro終わり v]\nset [チェックポイント v] to [0]\nforever\n    if <<[-700] < (s x)> and <[-640] > (s x)>> then\n        if <[0] = (チェックポイント)> then\n            if <touching color (#3cfea0)?> then\n                start sound [チェックポイント音 v]\n                set [チェックポイント v] to [1]\n            end\n        end\n    end\n    if <<[-1630] < (s x)> and <[-1570] > (s x)>> then\n        if <<[0] = (チェックポイント)> or <[1] = (チェックポイント)>> then\n            if <touching color (#3cfea0)?> then\n                start sound [チェックポイント音 v]\n                set [チェックポイント v] to [2]\n            end\n        end\n    end\n    if <<[-2160] < (s x)> and <[-2120] > (s x)>> then\n        if <<[2] = (チェックポイント)> or <<[0] = (チェックポイント)> or <[1] = (チェックポイント)>>> then\n            if <touching color (#07fd85)?> then\n                start sound [チェックポイント音 v]\n                set [チェックポイント v] to [3]\n            end\n        end\n    end\n    if <<[-2700] < (s x)> and <[-2630] > (s x)>> then\n        if <(チェックポイント) < [4]> then\n            if <touching color (#18fd8f)?> then\n                start sound [チェックポイント音 v]\n                set [チェックポイント v] to [4]\n            end\n        end\n    end\n    if <<[-3620] < (s x)> and <[-3550] > (s x)>> then\n        if <(チェックポイント) < [5]> then\n            if <touching color (#3cfea0)?> then\n                start sound [チェックポイント音 v]\n                set [チェックポイント v] to [5]\n            end\n        end\n    end\n    if <<[-4630] < (s x)> and <[-4564] > (s x)>> then\n        if <(チェックポイント) < [6]> then\n            if <touching color (#3cfea0)?> then\n                start sound [チェックポイント音 v]\n                set [チェックポイント v] to [6]\n            end\n        end\n    end\n    if <[-5045] > (s x)> then\n        if <(チェックポイント) < [7]> then\n            if <touching color (#3cfea0)?> then\n                start sound [チェックポイント音 v]\n                set [チェックポイント v] to [7]\n            end\n        end\n    end\nend\n\nwhen flag clicked\nrepeat until <[10] < (timer)>\n    erase all\n    switch costume to (プレイヤー v)\nend\n\nwhen flag clicked\nclear graphic effects\n\n@INTRO\n\ndefine circle (x) (y) (角度) (勢い) (勢い消耗率) (回数)\nset [α v] to [0]\nswitch costume to (circle v)\nshow\ngo to x: (x) y: (y)\nset [α v] to (勢い)\nset [γ v] to (角度)\nrepeat (回数)\n    change [γ v] by (-2)\n    set [α v] to ((α) * (勢い消耗率))\n    change [β v] by (α)\n    change [ghost v] effect by ((100) / (回数))\n    go to x: (([cos v] of (γ) ) * (β)) y: (([sin v] of (γ) ) * (β))\nend\nhide\nclear graphic effects\nset [β v] to [0]\n\ndefine 高速クローン (costume) (number)\nset [γ v] to [-1]\nset [α v] to (costume)\nrepeat (number)\n    change [γ v] by (1)\n    create clone of (_myself_ v)\nend\n\ndefine line (startx) (starty) (向き) (勢い) (勢いの消耗率) (幽霊の効果の変わり方)\nshow\nswitch costume to (line-2 v)\npoint in direction (向き)\ngo to x: (startx) y: (starty)\nset [β v] to (勢い)\nrepeat (8)\n    repeat (3)\n        change [β v] by (勢いの消耗率)\n        move (β) steps\n    end\n    change [ghost v] effect by (幽霊の効果の変わり方)\n    next costume\nend\nwait (0.01) seconds\nhide\nclear graphic effects\n\nwhen flag clicked\nswitch costume to (logo v)\nreset timer\nhide\nclear graphic effects\nset size to (100) %\npoint in direction (90)\ngo to x: (0) y: (0)\nstart sound [Foxsky - Kirby Smash v]\nset [α v] to [0]\nset [α v] to [pokosuke]\ncreate clone of (_myself_ v)\nset [α v] to [background]\ncreate clone of (_myself_ v)\nset [α v] to [Pinwheel]\ncreate clone of (_myself_ v)\nset [α v] to [Logo]\ncreate clone of (_myself_ v)\nset [α v] to [frash]\ncreate clone of (_myself_ v)\nset [α v] to [bar1]\ncreate clone of (_myself_ v)\nset [α v] to [bar2]\ncreate clone of (_myself_ v)\nFast clones 1\nset [α v] to [bar3]\ncreate clone of (_myself_ v)\nset [α v] to [Instructions]\ncreate clone of (_myself_ v)\nset [α v] to [Rough]\ncreate clone of (_myself_ v)\nset [α v] to [Instructions2]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(α) = [background]> then\n    show\n    switch costume to (background v)\n    go to x: (0) y: (0)\n    wait until <(timer) > [8.2]>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\nif <(α) = [bar1]> then\n    show\n    switch costume to (bar v)\n    go to x: (0) y: (0)\n    wait until <(timer) > [2.7]>\n    repeat (10)\n        wait (0.55) seconds\n        set y to (-40)\n    end\n    wait until <(timer) > [8.2]>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\nif <(α) = [bar2]> then\n    show\n    point in direction (-90)\n    switch costume to (bar v)\n    go to x: (0) y: (0)\n    wait until <(timer) > [2.7]>\n    repeat (10)\n        wait (0.55) seconds\n        set y to (40)\n    end\n    wait until <(timer) > [8.2]>\n    repeat (20)\n        change [ghost v] effect by (5)\n    end\n    delete this clone\nend\nif < (α) contains [NAME]?> then\n    set size to (120) %\n    show\n    switch costume to (join [NAME] (β))\n    go to x: (0) y: (-240)\n    wait ((β) * (0.1)) seconds\n    repeat (20)\n        change y by (((0) - (y position)) / (4))\n    end\n    wait ((0.1) + (((7) - (β)) * (0.15))) seconds\n    set [γ v] to [-40]\n    repeat (50)\n        change size by (((220) - (size)) / (20))\n        turn right (((120) - (direction)) / (25)) degrees\n        change x by (γ)\n        change [γ v] by (5)\n    end\n    delete this clone\nend\nif <(α) = [bar3]> then\n    go to x: (-240) y: (0)\n    wait (0.6) seconds\n    show\n    switch costume to (bar2 v)\n    repeat (40)\n        change x by (15)\n    end\n    delete this clone\nend\n\ndefine Fast clones 1\nset [β v] to [0]\nrepeat (5)\n    change [β v] by (1)\n    set [α v] to (join [NAME] (β))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(α) = [bar2]> then\n    wait until <(timer) > [2.7]>\n    repeat until <(timer) > [9]>\n        repeat (20)\n            change y by (((120) - (y position)) / (3))\n            point in direction ((-90) + (([sin v] of ((timer) * (200)) ) * (5)))\n        end\n    end\nend\n\nwhen I start as a clone\nif <(α) = [bar1]> then\n    wait until <(timer) > [2.7]>\n    repeat until <(timer) > [9]>\n        repeat (20)\n            change y by (((-120) - (y position)) / (3))\n            point in direction ((90) + (([sin v] of ((timer) * (200)) ) * (5)))\n        end\n    end\nend\n\nwhen I start as a clone\nif <(α) = [frash]> then\n    show\n    switch costume to (frash v)\n    go to x: (0) y: (0)\n    set [ghost v] effect to (100)\n    wait until <(timer) > [2.7]>\n    repeat (9)\n        wait (0.4) seconds\n        set [ghost v] effect to (0)\n        repeat (5)\n            change [ghost v] effect by (20)\n        end\n    end\n    delete this clone\nend\nif <(α) = [Logo]> then\n    show\n    switch costume to (logo v)\n    go to x: (0) y: (0)\n    wait until <(timer) > [2.15]>\n    go to [front v] layer\n    go [backward v] (13) layers\n    repeat (4)\n        wait (0.55) seconds\n        set [brightness v] effect to (60)\n        set size to (200) %\n        broadcast (Logo v)\n    end\n    point in direction (91)\n    repeat (15)\n        turn right ([abs v] of (((90) - (direction)) / (3)) ) degrees\n    end\n    switch costume to (user v)\n    repeat until <(round (direction)) = [90]>\n        turn right ([abs v] of (((90) - (direction)) / (3)) ) degrees\n    end\n    set [brightness v] effect to (60)\n    set size to (200) %\n    broadcast (Logo v)\n    repeat (3)\n        wait (0.55) seconds\n        set [brightness v] effect to (60)\n        set size to (200) %\n        broadcast (Logo v)\n    end\n    point in direction (91)\n    repeat (18)\n        turn right ([abs v] of (((90) - (direction)) / (3)) ) degrees\n    end\n    switch costume to (logo v)\n    repeat until <(round (direction)) = [90]>\n        turn right ([abs v] of (((90) - (direction)) / (3)) ) degrees\n    end\n    wait (0.1) seconds\n    set [brightness v] effect to (100)\n    set size to (150) %\n    repeat (40)\n        change [γ v] by (((0) - (γ)) / (2))\n        set [brightness v] effect to (γ)\n        go to x: (([sin v] of ((timer) * (1000)) ) * (((40) - (size)) * (0.3))) y: (([cos v] of ((timer) * (1000)) ) * (((40) - (size)) * (0.3)))\n        change size by (((40) - (size)) / (10))\n        change [ghost v] effect by (2.5)\n    end\n    delete this clone\nend\n\nwhen I receive [logo v]\nif <(costume [name v]) = [Logo]> then\n    repeat (20)\n        go to x: (([sin v] of ((timer) * (200)) ) * (((100) - (size)) * (0.5))) y: (([sin v] of ((timer) * (300)) ) * (((100) - (size)) * (0.5)))\n        change [γ v] by (((0) - (γ)) / (3))\n        set [brightness v] effect to (γ)\n        change size by (((100) - (size)) / (7))\n    end\nend\nif <(costume [name v]) = [user]> then\n    repeat (20)\n        go to x: (([sin v] of ((timer) * (200)) ) * (((100) - (size)) * (0.5))) y: (([sin v] of ((timer) * (300)) ) * (((100) - (size)) * (0.5)))\n        change [γ v] by (((0) - (γ)) / (3))\n        set [brightness v] effect to (γ)\n        change size by (((100) - (size)) / (7))\n    end\nend\n\nwhen I start as a clone\nif <(α) = [Instructions]> then\n    switch costume to (instructions v)\n    高速クローン [Effect1] [12]\n    wait until <(timer) > [2.7]>\n    repeat (3)\n        wait (0.55) seconds\n        高速クローン [Effect2] [12]\n    end\n    wait (0.55) seconds\n    高速クローン [Effect3] [12]\n    repeat (4)\n        wait (0.55) seconds\n        高速クローン [Effect2] [12]\n    end\n    wait (0.55) seconds\n    高速クローン [Effect3] [12]\n    delete this clone\nend\nif <(α) = [Effect1]> then\n    set [brightness v] effect to (100)\n    circle [0] [0] ((γ) * (30)) [25] [0.9] [25]\n    delete this clone\nend\nif <(α) = [Effect2]> then\n    set [brightness v] effect to (100)\n    go [backward v] (9) layers\n    line [0] [0] ((γ) * (30)) [24] [-1] [5]\n    delete this clone\nend\nif <(α) = [Effect3]> then\n    set [brightness v] effect to (100)\n    go [backward v] (9) layers\n    circle [0] [0] ((γ) * (30)) [20] [0.9] [20]\n    delete this clone\nend\n\nwhen I start as a clone\nif <(α) = [Pinwheel]> then\n    go to x: (0) y: (0)\n    switch costume to (pinwheel v)\n    wait until <(timer) > [2.7]>\n    show\n    repeat until <(timer) > [8.2]>\n        turn right (5) degrees\n    end\n    repeat (10)\n        change [ghost v] effect by (10)\n        turn right (5) degrees\n    end\n    delete this clone\nend\nif <(α) = [pokosuke]> then\n    go to x: (0) y: (0)\n    switch costume to (made by pokosuke v)\n    show\n    repeat until <(timer) > [9.2]>\n        go to [front v] layer\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(α) = [Rough]> then\n    wait until <(timer) > [2.7]>\n    switch costume to (rough v)\n    show\n    set [ghost v] effect to (80)\n    go to [front v] layer\n    go [backward v] (12) layers\n    wait until <(timer) > [8.4]>\n    repeat (10)\n        change [ghost v] effect by (10)\n        turn right (5) degrees\n    end\n    delete this clone\nend\nif <(α) = [Instructions2]> then\n    wait until <(timer) > [2.7]>\n    高速クローン [Effect4] [1]\n    delete this clone\nend\nif <(α) = [Effect4]> then\n    go to [back v] layer\n    go [forward v] (4) layers\n    wait until <(timer) > [2.7]>\n    set [brightness v] effect to (100)\n    Round [0] [0] [200]\n    wait until <(timer) > [5]>\n    Round [0] [0] [200]\n    wait until <(timer) > [8]>\n    Round [0] [0] [200]\nend\n\ndefine Round (x) (y) (size)\nswitch costume to (circle stroke1 v)\ngo to x: (x) y: (y)\nshow\nset size to (size) %\nrepeat (10)\n    next costume\nend\nhide\n\nwhen flag clicked\nwait (11) seconds\nbroadcast (intro終わり v) and wait\n\n