yuhaku platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Teminite & MDK - Space Invaders  v] until done\nend\n\n@　\n\nwhen flag clicked\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Stage/ステージ\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to [back v] layer\nshow\n\nwhen I receive [氷1かい v]\nswitch costume to (2 v)\n\nwhen I receive [氷終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [next氷 v]\nstop [other scripts in sprite v]\n\n@cloud/雲\n\nwhen I start as a clone\nshow\nglide (pick random (4) to (8)) secs to x: (-281) y: (y position)\ndelete this clone\n\nwhen flag clicked\ngo to [back v] layer\nhide\nforever\n    go to x: (287) y: (pick random (50) to (150))\n    switch costume to (pick random (1) to (2))\n    create clone of (_myself_ v)\n    wait (pick random (2) to (4)) seconds\nend\n\nwhen I receive [氷終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [next氷 v]\nstop [other scripts in sprite v]\n\n@stage/ステージ\n\nwhen flag clicked\nswitch costume to (stage1 v)\nhide\ngo to x: (0) y: (-2)\n\nwhen flag clicked\nshow\n\nwhen I receive [氷1かい v]\nswitch costume to (stage20 v)\n\nwhen I receive [氷終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [next氷 v]\nstop [other scripts in sprite v]\n\n@player/プレイヤー\n\ndefine reset\nshow\ngo to x: (-220) y: (-50)\nswitch costume to (＼\(^o^\)／ v)\nset [xx v] to [0]\nset [yy v] to [0]\nhide variable [xx v]\nhide variable [yy v]\nset rotation style [left-right v]\npoint in direction (90)\n\ndefine Movement\nif <<<mouse down?> and <(mouse y) < [0]>> or <<key (s v) pressed?> or <key (down arrow v) pressed?>>> then\n    switch costume to (ʕ⁎̯͡⁎ʔ༄ v)\nelse\n    switch costume to (＼\(^o^\)／ v)\nend\nif <<<mouse down?> and <[0] < (mouse x)>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n    change [xx v] by (1)\n    point in direction (90)\nend\nif <<<mouse down?> and <(mouse x) < [0]>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n    change [xx v] by (-1)\n    point in direction (-90)\nend\nif <touching color (#00fff5)?> then\n    set [xx v] to ((Xx) * (0.8))\nelse\n    set [xx v] to ((Xx) * (0.9))\nend\nchange x by (Xx)\nif <touching color (#00fff5)?> then\n    change y by (1)\n    if <touching color (#00fff5)?> then\n        change y by (1)\n        if <touching color (#00fff5)?> then\n            change y by (1)\n            if <touching color (#00fff5)?> then\n                change y by (1)\n                if <touching color (#00fff5)?> then\n                    change y by (1)\n                    if <touching color (#00fff5)?> then\n                        change y by (1)\n                        if <touching color (#00fff5)?> then\n                            change y by (1)\n                            if <touching color (#00fff5)?> then\n                                change x by ((0) - (Xx))\n                                change y by (-7)\n                                if <<<mouse down?> and <[0] < (mouse y)>> or <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>>> then\n                                    set [yy v] to [9]\n                                    if <((Xx) - (Xx)) < (Xx)> then\n                                        set [xx v] to [-5]\n                                    else\n                                        set [xx v] to [5]\n                                    end\n                                else\n                                    set [xx v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (-1)\nif <touching color (#00fff5)?> then\n    if <<<mouse down?> and <[0] < (mouse y)>> or <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>>> then\n        set [yy v] to [12]\n    end\nend\nchange y by (1)\nchange [yy v] by (-1)\nchange y by (Yy)\nif <touching color (#00fff5)?> then\n    change y by (((Yy) - (Yy)) - (Yy))\n    set [yy v] to [0]\nend\n\ndefine Judgment\nif <<(y position) < [-169]> or <touching color (#ff0000)?>> then\n    reset\nend\nif <[235] < (x position)> then\n    hide\n    set [ok v] to [0]\n    if <(氷の世界) = [0]> then\n        broadcast (氷1かい v)\n        change [氷の世界 v] by (1)\n    else\n        broadcast (NEXT氷 v)\n    end\nend\n\nwait until <(OK) = [1]>\nset [ok v] to [0]\nreset\n\nwhen flag clicked\nset [氷の世界 v] to [0]\nreset\nhide\n\nset size to (100) %\n\nwhen I start as a clone\nshow\nset [ghost v] effect to (0)\nset size to (100) %\nrepeat (25)\n    change size by (-5)\n    change [ghost v] effect by (5)\nend\nhide\ndelete this clone\n\nwhen I receive [ stage ok v]\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <touching (_edge_ v)?> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    Judgment\nend\n\nwhen flag clicked\nset size to (100) %\nreset\nforever\n    Movement\nend\n\nwhen I receive [氷1かい v]\nreset\n\nbroadcast (氷終了 v)\n\nwhen I receive [氷終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [next氷 v]\nstop [other scripts in sprite v]\n\n@2 (2)\n\nwhen I receive [simple - platformer 痒い v]\nshow\ngo to [back v] layer\n\nwhen I receive [simple - platformer 終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [sinext v]\nstop [other scripts in sprite v]\n\n@STAGE\n\nwhen flag clicked\n\nwhen I receive [simple - platformer 痒い v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (9 v)\n\nwhen I receive [si1かい v]\nswitch costume to (17 v)\n\nwhen I receive [simple - platformer 終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [sinext v]\nstop [other scripts in sprite v]\n\n@YOU\n\ndefine Reset\nset [x v] to [0]\nset [y v] to [0]\nset rotation style [left-right v]\ngo to x: (-200) y: (0)\n\nwhen I receive [simple - platformer 痒い v]\nwait (1) seconds\nset [simple - platformer v] to [0]\nReset\nshow\nforever\n    if <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <[25] < (mouse x)>>>> then\n        change [x v] by (1)\n        point in direction ([abs v] of (direction) )\n    end\n    if <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [-25]>>>> then\n        change [x v] by (-1)\n        point in direction ((-1) * ([abs v] of (direction) ))\n    end\n    set [x v] to ((x) * (.88))\n    change x by (x)\n    if <touching color (#000000)?> then\n        change y by (1.11)\n        if <touching color (#000000)?> then\n            change y by (1.11)\n            if <touching color (#000000)?> then\n                change y by (1.11)\n                if <touching color (#000000)?> then\n                    change y by (1.11)\n                    if <touching color (#000000)?> then\n                        change y by (1.11)\n                        if <touching color (#000000)?> then\n                            change y by (1.11)\n                            if <touching color (#000000)?> then\n                                change y by (1.11)\n                                if <touching color (#000000)?> then\n                                    change x by ((-1) * (x))\n                                    change y by (-7.77)\n                                    if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <[0] < (mouse y)>>>> then\n                                        start sound [ジャンプ v]\n                                        if <(x) = ([abs v] of (x) )> then\n                                            set [x v] to [-6]\n                                        else\n                                            set [x v] to [6]\n                                        end\n                                        set [y v] to [10]\n                                    else\n                                        set [x v] to [0]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\n    if <touching color (#000000)?> then\n        if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <[0] < (mouse y)>>>> then\n            start sound [ジャンプ v]\n            set [y v] to [13]\n        end\n    end\n    change y by (1)\n    change [y v] by (-1)\n    change y by (y)\n    if <touching color (#000000)?> then\n        change y by ((-1) * (y))\n        set [y v] to [0]\n    end\n    if <<(y position) < [-170]> or <touching color (#110000)?>> then\n        repeat (25)\n            change [ghost v] effect by (4)\n        end\n        Reset\n        repeat (25)\n            change [ghost v] effect by (-4)\n        end\n    end\n    if <[230] < (x position)> then\n        if <(SIMPLE - PLATFORMER) = [0]> then\n            Reset\n            broadcast (si1かい v)\n            change [simple - platformer v] by (1)\n        else\n            broadcast (sinext v)\n        end\n    end\nend\n\nwhen I receive [simple - platformer 終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [氷終了 v]\nbroadcast (SIMPLE - PLATFORMER 痒い v)\n\nwhen flag clicked\nhide\n\nwhen I receive [sinext v]\nstop [other scripts in sprite v]\n\n@　2\n\ndefine A\nif <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<mouse down?> and <[30] < (mouse x)>>> then\n    change [x v] by (0.8)\n    point in direction ([abs v] of (direction) )\nend\nif <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<mouse down?> and <(mouse x) < [-30]>>> then\n    change [x v] by (-0.8)\n    point in direction (() - ([abs v] of (direction) ))\nend\nset [x v] to ((X) / (1.15))\nchange x by (X)\nif <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n    change y by (1)\n    if <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n        change y by (1)\n        if <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n            change y by (1)\n            if <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n                change y by (1)\n                if <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n                    change y by (1)\n                    if <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n                        change y by (1)\n                        if <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n                            change y by (1)\n                            if <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n                                change x by (() - (X))\n                                change y by (-7)\n                                if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<[30] < (mouse y)> and <mouse down?>>>> then\n                                    start sound [scratchより【壁キック】 v]\n                                    set [y v] to [10]\n                                    if <(X) = ([abs v] of (X) )> then\n                                        set [x v] to [-6]\n                                    else\n                                        set [x v] to [6]\n                                    end\n                                else\n                                    set [x v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nchange y by (-1)\nif <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n    if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<[30] < (mouse y)> and <mouse down?>>>> then\n        start sound [ジャンプ v]\n        set [y v] to [10]\n    end\nend\nchange y by (1)\nchange [y v] by (-0.5)\nchange y by (Y)\nif <<touching color (#4eff00)?> or <touching color (#6b1212)?>> then\n    change y by (() - (Y))\n    set [y v] to [0]\nend\nif <touching color (#00adff)?> then\n    change y by (-0.1)\n    change [y v] by (0.6)\nend\n\ndefine リスポーン\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (-200) y: (0)\nset rotation style [left-right v]\npoint in direction (90)\n\ndefine B\nif <<<(y position) < [-175]> and <touching (_edge_ v)?>> or <<touching color (#ff0000)?> or <touching color (#ff7979)?>>> then\n    repeat (25)\n        change [ghost v] effect by (4)\n    end\n    リスポーン\n    repeat (25)\n        change [ghost v] effect by (-4)\n    end\nend\nif <[240] < (x position)> then\n    if <(家に帰ろう) = [0]> then\n        リスポーン\n        broadcast (家に帰ろう１かい v)\n        change [家に帰ろう v] by (1)\n    else\n        broadcast (家に帰ろうNEXT v)\n    end\nend\n\nset [y v] to []\n\nwhen I receive [家に帰ろうスタート v]\nset [家に帰ろう v] to [0]\nshow\ngo [forward v] (2013) layers\nリスポーン\nforever\n    A\n    B\nend\n\nwhen I receive [家に帰ろう終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [simple - platformer 終了 v]\nbroadcast (家に帰ろうスタート v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [家に帰ろうnext v]\nstop [other scripts in sprite v]\n\n@　　\n\nwhen flag clicked\n\nwhen I receive [家に帰ろうスタート v]\ngo to x: (0) y: (0)\nshow\nswitch costume to (5 v)\n\nwhen I receive [家に帰ろう１かい v]\nswitch costume to (6 v)\n\nwhen I receive [家に帰ろう終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [家に帰ろうnext v]\nstop [other scripts in sprite v]\n\n@ステージ\n\nwhen I receive [家に帰ろう終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [家に帰ろうスタート v]\nshow\ngo to [back v] layer\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [家に帰ろうnext v]\nstop [other scripts in sprite v]\n\n@はいけい\n\nwhen I receive [nightスタート v]\nshow\nforever\n    go to [back v] layer\nend\n\nwhen I receive [night終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [nightnext v]\nstop [other scripts in sprite v]\n\n@Platformer\n\nwhen flag clicked\n\nwhen I receive [nightスタート v]\nswitch costume to (3 v)\nshow\n\nwhen I receive [night１かい v]\nswitch costume to (5 v)\n\nwhen I receive [night終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [nightnext v]\nstop [other scripts in sprite v]\n\n@Light\n\nwhen flag clicked\n\nchange size by (10)\n\nwhen flag clicked\n\nbroadcast (Nightスタート v)\n\nwhen I receive [nightスタート v]\nforever\n    go to (player v)\nend\n\nwhen I receive [nightスタート v]\nswitch costume to (pick random (1) to (2))\ngo to [back v] layer\nset [ghost v] effect to (30)\nshow\nforever\n    set size to ((120) + (([cos v] of ((timer) * (180)) ) * (20))) %\nend\n\nwhen I receive [night終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [nightnext v]\nstop [other scripts in sprite v]\n\n@Player\n\ndefine 初期化\nset size to (125) %\ngo to x: (-200) y: (0)\nset [y2 v] to [0]\nset [x2 v] to [0]\nset rotation style [left-right v]\npoint in direction (90)\n\ndefine 移動作\nchange [y2 v] by (-1)\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <[0] < (mouse x)>>>> then\n    change [x2 v] by (1)\n    point in direction (90)\nend\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [0]>>>> then\n    change [x2 v] by (-1)\n    point in direction (-90)\nend\nset [x2 v] to ((X2) * (0.88))\nchange x by (X2)\nrepeat (8)\n    if <touching (platformer v)?> then\n        change y by (1.1)\n    end\nend\nif <touching (platformer v)?> then\n    change x by (() - (X2))\n    change y by (-8.8)\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <[0] < (mouse y)>>>> then\n        set [y2 v] to [11]\n        set [x2 v] to ((7) - ((14) * <[0] < (X2)>))\n    end\nend\nchange y by (Y2)\nif <touching (platformer v)?> then\n    change y by (() - (Y2))\n    set [y2 v] to [0]\nend\nchange y by (-1)\nif <touching (platformer v)?> then\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <[0] < (mouse y)>>>> then\n        set [y2 v] to [13]\n    end\nend\nchange y by (1)\nif <[235] < (x position)> then\n    if <(Night) = [0]> then\n        初期化\n        broadcast (Night１かい v)\n        change [night v] by (1)\n    else\n        broadcast (NightNEXT v)\n    end\nend\nif <<(y position) < [-180]> or <touching (together v)?>> then\n    初期化\nend\n\nwhen I receive [nightスタート v]\nset [night v] to [0]\nshow\n初期化\nforever\n    移動作\nend\n\nwhen I receive [night終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [家に帰ろう終了 v]\nbroadcast (Nightスタート v)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [nightnext v]\nstop [other scripts in sprite v]\n\n@膜\n\nwhen I receive [nightスタート v]\nshow\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\nend\n\nwhen I receive [night終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [nightnext v]\nstop [other scripts in sprite v]\n\n@スプライト1\n\nbroadcast (WALK 開始 v)\n\nwhen I receive [walk 開始 v]\nshow\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nhide\n\nwhen I receive [walk 終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [wlnext v]\nstop [other scripts in sprite v]\n\n@Sun\n\nwhen flag clicked\n\nwhen I receive [walk 開始 v]\ngo to x: (-210) y: (150)\nshow\ngo to [back v] layer\nforever\n    set size to ((160) + (([cos v] of ((timer) * (120)) ) * (40))) %\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [walk 終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [wlnext v]\nstop [other scripts in sprite v]\n\n@☁︎\n\nwhen I start as a clone\nset [ghost v] effect to (20)\nshow\nglide (pick random (5) to (7)) secs to x: (-284) y: (y position)\ndelete this clone\n\nwhen flag clicked\n\nwhen I receive [walk 開始 v]\nhide\nset x to (284)\nforever\n    set y to (pick random (0) to (150))\n    create clone of (_myself_ v)\n    wait (pick random (1) to (3)) seconds\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [walk 終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [wlnext v]\nstop [other scripts in sprite v]\n\n@Platformer2\n\nwhen flag clicked\nhide\n\nwhen I receive [walk 開始 v]\nshow\ngo to [back v] layer\nswitch costume to (9 v)\n\nwhen I receive [walk 1買い v]\nswitch costume to (12 v)\n\nwhen I receive [walk 終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [wlnext v]\nstop [other scripts in sprite v]\n\n@Player2\n\ndefine 初期化\nset size to (20) %\npoint in direction (90)\nset rotation style [left-right v]\ngo to x: (-200) y: ((0) + ())\nset [x3 v] to [0]\nset [y3 v] to [0]\n\ndefine Program\nif <<<mouse down?> and <(mouse x) > [0]>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n    change [x3 v] by (1.1)\n    point in direction ([abs v] of (direction) )\nend\nif <<<mouse down?> and <[0] > (mouse x)>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n    change [x3 v] by (-1.1)\n    point in direction (() - ([abs v] of (direction) ))\nend\nset [x3 v] to ((X3) * (0.888))\nchange x by (X3)\nrepeat (8)\n    if <touching (platformer2 v)?> then\n        change y by (1)\n    end\nend\nif <touching (platformer2 v)?> then\n    change x by (() - (X3))\n    change y by (-8)\n    if <<<(mouse y) > [0]> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        set [y3 v] to [10]\n        if <(X3) = ([abs v] of (X3) )> then\n            set [x3 v] to [-6]\n        else\n            set [x3 v] to [6]\n        end\n    else\n        set [x3 v] to [0]\n    end\nend\nchange y by (-1)\nif <touching (platformer2 v)?> then\n    if <<<(mouse y) > [0]> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n        set [y3 v] to [15]\n    end\nend\nchange y by (1)\nchange [y3 v] by (-1)\nchange y by (Y3)\nif <touching (platformer2 v)?> then\n    change y by (() - (Y3))\n    set [y3 v] to [0]\nend\n\nProgram\n\nwhen flag clicked\n\nwhen flag clicked\n\nwhen I receive [walk 開始 v]\nset [walk v] to [0]\nshow\n初期化\nset [ok v] to [0]\nforever\n    if <(OK) = [0]> then\n        Program\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [walk 終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [walk 開始 v]\nforever\n    if <[235] < (x position)> then\n        set [ok v] to [1]\n        change [l v] by (1)\n        if <(WALK) = [0]> then\n            broadcast (WALK 1買い v)\n            change [walk v] by (1)\n            初期化\n        else\n            broadcast (WLNEXT v)\n        end\n        set [ok v] to [0]\n    end\n    if <(y position) < [-175]> then\n        初期化\n    end\nend\n\nwhen I receive [night終了 v]\nbroadcast (WALK 開始 v)\n\nwhen I receive [wlnext v]\nstop [other scripts in sprite v]\n\nset [l v] to [0]\n\nwhen flag clicked\nhide\n\n@moon\n\nwhen flag clicked\n\ndefine (1~9▽) 層目へ行く\ngo to [front v] layer\ngo [backward v] (1~9▽) layers\n\nrepeat (30)\n    change size by (0.5)\nend\nrepeat (30)\n    change size by (-0.5)\nend\n\nset [ghost v] effect to (50)\n\nwhen flag clicked\n\ngo to x: (-77) y: (-31)\n\nwhen I start as a clone\nforever\n    set size to ((125) + (([cos v] of ((timer) * (ID)) ) * (25))) %\nend\n\nwhen I start as a clone\nset [ghost v] effect to (50)\nshow\ngo to x: (200) y: (150)\nforever\n    [1] 層目へ行く\nend\n\nwhen I receive [ night 2開始 v]\nhide\nswitch costume to (　 v)\nset [id v] to [45]\ncreate clone of (_myself_ v)\nswitch costume to (　　　 v)\nset [id v] to [75]\ncreate clone of (_myself_ v)\nswitch costume to (　　 v)\nset [id v] to [90]\ncreate clone of (_myself_ v)\nswitch costume to (　　　　 v)\nset [id v] to [60]\ncreate clone of (_myself_ v)\n\nwhen I receive [ night 2終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nbroadcast (WALK 終了 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [walk 終了 v]\nbroadcast ( Night 2開始 v)\n\nwhen I receive [ night 2next v]\nstop [other scripts in sprite v]\n\n@Platformer3\n\ndefine (1~9▽) 層目へ行く\ngo to [front v] layer\ngo [backward v] (1~9▽) layers\n\ngo to x: (0) y: (0)\nforever\n    go to [back v] layer\n    switch costume to (level2)\nend\n\nwhen I receive [ night 2開始 v]\nshow\nforever\n    [9] 層目へ行く\nend\n\nwhen I receive [ night 2開始 v]\nswitch costume to (11 v)\n\nwhen I receive [ night 2１かい v]\nswitch costume to (15 v)\n\nwhen I receive [ night 2終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [ night 2next v]\nstop [other scripts in sprite v]\n\n@Light2\n\nwhen flag clicked\n\ndefine (1~9▽) 層目へ行く\ngo to [front v] layer\ngo [backward v] (1~9▽) layers\n\nrepeat (30)\n    change size by (0.5)\nend\nrepeat (30)\n    change size by (-0.5)\nend\n\nset [ghost v] effect to (20)\n\nwhen flag clicked\n\nwhen I receive [ night 2開始 v]\nshow\nforever\n    set size to ((80) + (([cos v] of ((timer) * (120)) ) * (10))) %\nend\n\nwhen I receive [ night 2開始 v]\ngo to x: (0) y: (0)\nforever\n    go to (player3 v)\n    [6] 層目へ行く\nend\n\nwhen I receive [ night 2終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [ night 2next v]\nstop [other scripts in sprite v]\n\n@Player3\n\ndefine (1~9▽) 層目へ行く\ngo to [front v] layer\ngo [backward v] (1~9▽) layers\n\nwhen flag clicked\n\nwhen flag clicked\n\ndefine 初期化\nset [x4 v] to [0]\nset [y4 v] to [0]\ngo to x: (-200) y: (0)\nswitch costume to (右 v)\n\ndefine 移動\nshow\nif <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<[0] < (mouse x)> and <mouse down?>>>> then\n    change [x4 v] by (1)\n    switch costume to (右 v)\nend\nif <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<(mouse x) < [0]> and <mouse down?>>>> then\n    change [x4 v] by (-1)\n    switch costume to (左 v)\nend\nset [x4 v] to ((X4) * (0.85))\nchange x by (X4)\nrepeat (10)\n    if <touching (platformer3 v)?> then\n        change y by (1)\n    end\nend\nif <touching (platformer3 v)?> then\n    change x by (() - (X4))\n    change y by (-10)\n    if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<[0] < (mouse y)> and <mouse down?>>>> then\n        set [y4 v] to [10]\n        if <[0] < (X4)> then\n            set [x4 v] to [-6]\n        else\n            set [x4 v] to [6]\n        end\n    else\n        set [x4 v] to [0]\n    end\nend\nchange y by (-1)\nif <touching (platformer3 v)?> then\n    if <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<[0] < (mouse y)> and <mouse down?>>>> then\n        if <(([ceiling v] of (([abs v] of (X4) ) * (10)) ) / (10)) = [5.7]> then\n            set [y4 v] to [20]\n        else\n            set [y4 v] to [12.5]\n        end\n    end\nend\nchange y by (1)\nchange [y4 v] by (-1)\nchange y by (Y4)\nif <touching (platformer3 v)?> then\n    change y by (() - (Y4))\n    set [y4 v] to [0]\nend\nif <[235] < ([ceiling v] of (x position) )> then\n    if <(Night 2) = [0]> then\n        初期化\n        broadcast ( Night 2１かい v)\n        change [night 2 v] by (1)\n    else\n        broadcast ( Night 2NExT v)\n    end\nend\n\nwhen flag clicked\n\nwhen I receive [ night 2開始 v]\nset [night 2 v] to [0]\n初期化\nset [level2 v] to [1]\nforever\n    移動\nend\n\nwhen I receive [ night 2開始 v]\nforever\n    [1] 層目へ行く\nend\n\nwhen I receive [ night 2開始 v]\nforever\n    if <<(y position) < [-175]> or <touching (platformerオトゲ。 v)?>> then\n        初期化\n    end\nend\n\nbroadcast ( Night 2終了 v)\n\nwhen I receive [ night 2終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I receive [ night 2next v]\nstop [other scripts in sprite v]\n\n@NEXT\n\nwhen flag clicked\nhide\n\ndefine 動き (メール)\nshow\nclear graphic effects\ngo to x: (999) y: (0)\nrepeat until <[.1] > (x position)>\n    change x by (((0) - (x position)) / (7))\n    go to [front v] layer\nend\nbroadcast (メール)\ngo to x: (1) y: (0)\nrepeat (20)\n    change x by (((-473) - (x position)) / (7))\n    change [ghost v] effect by (5)\n    go to [front v] layer\nend\nhide\n\nwhen I receive [next氷 v]\n動き [氷終了]\n\nwhen I receive [sinext v]\n動き [8]\n\nwhen I receive [8 v]\nbroadcast (SIMPLE - PLATFORMER 終了 v)\n\nwhen I receive [家に帰ろうnext v]\n動き [家に帰ろう終了]\n\nwhen I receive [nightnext v]\n動き [Night終了]\n\nwhen I receive [wlnext v]\n動き [7]\n\nwhen I receive [7 v]\nbroadcast (WALK 終了 v)\n\nwhen I receive [ night 2next v]\n動き [6]\n\nwhen I receive [6 v]\nbroadcast ( Night 2終了 v)\n\nwhen I receive [mixnext v]\n動き [tt]\n\n@革\n\ndefine (1~9▽) 層目へ行く\ngo to [front v] layer\ngo [backward v] (1~9▽) layers\n\nwhen flag clicked\nhide\n\ncreate clone of (_myself_ v)\n\nwhen I receive [ night 2開始 v]\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (10)\nforever\n    [0] 層目へ行く\nend\n\nwhen I receive [ night 2終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [ night 2next v]\nstop [other scripts in sprite v]\n\n@スプライト2\n\nwhen I receive [ night 2開始 v]\nshow\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [ night 2next v]\nstop [other scripts in sprite v]\n\nwhen I receive [ night 2終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Stage\n\nwhen flag clicked\nhide\n\nwhen I receive [mix開始 v]\ngo to x: (0) y: (0)\nshow\ngo to [back v] layer\nswitch costume to (10 v)\n\nwhen I receive [next v]\ngo to x: (0) y: (0)\nshow\ngo to [back v] layer\nswitch costume to (7 v)\n\nwhen I receive [mix終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [tt v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@CHANGE\n\nwhen flag clicked\n\nwhen I start as a clone\nif <(ID) = [1]> then\n    show\n    forever\n        if <touching (mouse-pointer v)?> then\n            change size by (((100) - (size)) / (9))\n        else\n            change size by (((80) - (size)) / (9))\n        end\n        if <(LVEVL) = [20]> then\n            delete this clone\n        end\n        turn right ([cos v] of ((timer) * ((160) - ((20) * ((([abs v] of (x position) ) - (180)) / (10))))) ) degrees\n    end\nelse\n    show\n    forever\n        if <touching (mouse-pointer v)?> then\n            change size by (((100) - (size)) / (9))\n            if <mouse down?> then\n                broadcast (costume [name v])\n                wait until <not <mouse down?>>\n            end\n        else\n            change size by (((80) - (size)) / (9))\n        end\n        if <(LVEVL) = [20]> then\n            delete this clone\n        end\n        turn right ([cos v] of ((timer) * ((160) - ((20) * ((([abs v] of (x position) ) - (180)) / (10))))) ) degrees\n    end\nend\n\nbroadcast (            v)\nbroadcast (SKIP v)\nbroadcast (CHANGE v)\n\nif <mouse down?> then\n    wait until <not <mouse down?>>\nend\n\nwhen I receive [mix開始 v]\npoint in direction (90)\npoint in direction (90)\nhide\nset [id v] to [1]\nswitch costume to (skip v)\ngo to x: (-190) y: (140)\ncreate clone of (_myself_ v)\nset [id v] to [2]\nswitch costume to (change v)\ngo to x: (180) y: (150)\ncreate clone of (_myself_ v)\n\nwhen I receive [mix終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [tt v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@Player4\n\nset size to (50) %\n\nset rotation style [all around v]\n\nwhen I receive [change v]\npoint in direction ((180) - (direction))\n\nwhen flag clicked\n\nwhen flag clicked\nhide\n\nset [lvevl v] to [1]\n\nwhen I receive [reset v]\nshow\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-200) y: (0)\npoint in direction (0)\n\ndefine Hit () \nset [hit v] to []\nif <touching (stage v)?> then\n    if <() = [G]> then\n        if <[0] < (direction)> then\n            set [hit v] to <color (#ffffff) is touching (#ffffff)?>\n        else\n            set [hit v] to <color (#000000) is touching (#000000)?>\n        end\n        set [hit v] to (() + (Hit))\n    else\n        if <[0] < (direction)> then\n            set [hit v] to <color (#ffffff) is touching (#000000)?>\n        else\n            set [hit v] to <color (#000000) is touching (#ffffff)?>\n        end\n        set [hit v] to ((() + (Hit)) + (1))\n    end\nend\n\nHit [] \n\ndefine Program\nif <<key (d v) pressed?> or <<key (right arrow v) pressed?> or <<mouse down?> and <[50] < (mouse x)>>>> then\n    change [xv v] by (1)\nend\nif <<key (a v) pressed?> or <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < [-50]>>>> then\n    change [xv v] by (-1)\nend\nset [xv v] to ((Xv) * (0.88))\nchange x by (Xv)\nrepeat (8)\n    Hit [G] \n    if <(Hit) = [1]> then\n        change y by (1)\n    end\nend\nHit [G] \nif <(Hit) = [1]> then\n    change x by (() - (Xv))\n    change y by (-8)\nend\nchange y by (-1)\nHit [G] \nif <(Hit) = [1]> then\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <[50] < (mouse y)>>>> then\n        set [yv v] to [14]\n    end\nend\nchange y by (1)\nchange [yv v] by (-1)\nchange y by (Yv)\nHit [G] \nif <(Hit) = [1]> then\n    change y by (() - (Yv))\n    set [yv v] to [0]\nend\n\nwhen flag clicked\n\nwhen I receive [skip v]\nwait (0.5) seconds\nbroadcast (RESET v)\n\nwhen I receive [mix開始 v]\nshow\nset [mix v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\ngo to x: (-200) y: (0)\npoint in direction (0)\nforever\n    Program\n    Hit [] \n    if <(Hit) = [2]> then\n        set [yv v] to [15]\n        repeat until <(y position) < [-175]>\n            turn right (15.75) degrees\n            change y by (Yv)\n            change [yv v] by (-1)\n        end\n        broadcast (RESET v)\n    end\n    if <[235] < (x position)> then\n        if <(MIX) = [0]> then\n            broadcast (NEXT v)\n            change [mix v] by (1)\n            hide\n            broadcast (RESET v)\n        else\n            broadcast (MIXnext v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [mix開始 v]\nshow\n\nwhen I receive [mix開始 v]\nforever\n    if <key (space v) pressed?> then\n        broadcast (CHANGE v)\n        wait until <not <key (space v) pressed?>>\n    end\nend\n\nwhen I receive [mix終了 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\nwhen I receive [ night 2終了 v]\nbroadcast (MIX開始 v)\n\nwhen I receive [tt v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@スプライト3\n\nwhen I receive [mix開始 v]\nshow\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\nhide\n\n@背景\n\nwhen flag clicked\nhide\n\nwhen I receive [ラスト v]\nshow\ngo to [back v] layer\n\n@地面\n\nwhen I receive [ラスト v]\nshow\n\nwhen flag clicked\nhide\n\n@プレイヤー\n\nwhen I receive [ラスト v]\nclear graphic effects\nset size to (100) %\nset rotation style [left-right v]\npoint in direction (90)\ngo to [front v] layer\nset [x2 v] to [0]\nset [y2 v] to [0]\nclear graphic effects\ngo to x: (-200) y: (0)\nshow\nforever\n    if <<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<(mouse x) < (x position)> and <mouse down?>>> then\n        change [x2 v] by (-1)\n    end\n    if <<<key (d v) pressed?> or <key (right arrow v) pressed?>> or <<(x position) < (mouse x)> and <mouse down?>>> then\n        change [x2 v] by (1)\n    end\n    set [x2 v] to ((x2) * (0.87))\n    change x by (x2)\n    if <touching (地面 v)?> then\n        change y by (1)\n        if <touching (地面 v)?> then\n            change y by (1)\n            if <touching (地面 v)?> then\n                change y by (1)\n                if <touching (地面 v)?> then\n                    change y by (1)\n                    if <touching (地面 v)?> then\n                        change y by (1)\n                        if <touching (地面 v)?> then\n                            change y by (1)\n                            if <touching (地面 v)?> then\n                                change x by ((0) - (x2))\n                                change y by (-5)\n                                if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<[0] < (mouse y)> and <mouse down?>>> then\n                                    if <[0] < (x2)> then\n                                        set [x2 v] to [-6]\n                                    else\n                                        set [x2 v] to [6]\n                                    end\n                                    set [y2 v] to [15]\n                                else\n                                    set [x2 v] to [0]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y2 v] by (-1)\n    change y by (y2)\n    if <touching (地面 v)?> then\n        change y by ((0) - (y2))\n        set [y2 v] to [0]\n    end\n    change y by (-2)\n    if <<<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<[0] < (mouse y)> and <mouse down?>>> and <touching (地面 v)?>> then\n        set [y2 v] to [15]\n    end\n    change y by (1)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [tt v]\nbroadcast (ラスト v)\n\n
yuhaku platformerです((((\nサムネの画質悪いのは許してください(((\n\n＜操作方法＞\n基本十字キー、WADSキー、タップで操作