NINJA PLATFORMER

Instructions: -world selection-\n First, press → or ← to choose the world \nThen press ↓ to enter the world\n\nJump with ↑ key\n← → key to walk\n

@Stage\n\nwhen I receive [メッセージ1 v]\nset [ghost v] effect to (10)\nswitch backdrop to (背景4 v)\nset [brightness v] effect to (-100)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nforever\n    play sound [Xylo4 v] until done\n    wait (0.4) seconds\nend\n\nwhen flag clicked\nset [ghost v] effect to (10)\nswitch backdrop to (背景1 v)\nforever\n    if <(ステージ1) = [2]> then\n        set volume to (0) %\n    else\n        if <(ステージ1) = [1]> then\n            set volume to (70) %\n        else\n            set volume to (20) %\n        end\n    end\nend\n\nwhen I receive [1 v]\nset [ghost v] effect to (20)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nswitch backdrop to (backdrop1 v)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [2 v]\nset [ghost v] effect to (20)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nswitch backdrop to (backdrop4 v)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [4 v]\nset [ghost v] effect to (20)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nswitch backdrop to (backdrop2 v)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [3 v]\nset [ghost v] effect to (20)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nswitch backdrop to (背景3 v)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nif <key (down arrow v) pressed?> then\n\nwhen I receive [step v]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nrepeat until <(ステージ1) = [2]>\n\nstart sound [Xylo4 v]\n\n@スプライト1\n\nwhen flag clicked\nset [x v] to [0]\nset [y v] to [0]\nforever\n    if <<(ステージ1) = [2]> and <(q) = [0]>> then\n        if <key (left arrow v) pressed?> then\n            change [x v] by (-1)\n            point in direction (-90)\n        end\n        if <key (right arrow v) pressed?> then\n            change [x v] by (1)\n            point in direction (90)\n        end\n        set [x v] to ((x) * (0.9))\n        change x by (x)\n    end\nend\n\nwhen I receive [メッセージ1 v]\nset [step v] to [0]\nset [ステージ1 v] to [1]\nset [q v] to [1]\nshow\nset size to (60) %\ngo to x: (-165) y: (-87)\nset [brightness v] effect to (-100)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nforever\n    if <(ステージ1) = [1]> then\n        if <<not <touching color (#df1a1a)?>> and <<key (left arrow v) pressed?> or <<mouse down?> and <<(mouse x) < (x position)> and <[20] < (distance to [mouse-pointer v])>>>>> then\n            point in direction (-90)\n            repeat (27)\n                move (4) steps\n            end\n        end\n        if <<not <touching color (#7eff1a)?>> and <<key (right arrow v) pressed?> or <<mouse down?> and <<(x position) < (mouse x)> and <[20] < (distance to [mouse-pointer v])>>>>> then\n            point in direction (90)\n            repeat (27)\n                move (4) steps\n            end\n        end\n        if <touching color (#df1a1a)?> then\n            set [world v] to [1]\n        end\n        if <touching color (#ff9a1a)?> then\n            set [world v] to [2]\n        end\n        if <touching color (#fff61a)?> then\n            set [world v] to [3]\n        end\n        if <touching color (#7eff1a)?> then\n            set [world v] to [4]\n        end\n        if <<key (down arrow v) pressed?> or <<mouse down?> and <(distance to [mouse-pointer v]) < [20]>>> then\n            say [Let’s go!] for (1) seconds\n            if <touching color (#df1a1a)?> then\n                broadcast (1 v)\n                go to x: (-207) y: (-93)\n            end\n            if <touching color (#ff9a1a)?> then\n                broadcast (2 v)\n                go to x: (-207) y: (-93)\n            end\n            if <touching color (#fff61a)?> then\n                broadcast (3 v)\n                go to x: (-207) y: (-93)\n            end\n            if <touching color (#7eff1a)?> then\n                broadcast (4 v)\n                go to x: (-207) y: (-93)\n            end\n        end\n    end\nend\n\nwhen I receive [1 v]\nset [x v] to [0]\nset [y v] to [0]\nset [step v] to [1]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nset size to (40) %\nrepeat (25)\n    change [brightness v] effect by (4)\nend\ngo to x: (-207) y: (-93)\nset [q v] to [0]\nforever\n    if <<touching (スプライト9 v)?> or <(y position) < [-175]>> then\n        set volume to (100) %\n        start sound [Suction Cup v]\n        wait (0.1) seconds\n        go to x: (-207) y: (-93)\n    end\nend\n\nwhen flag clicked\nset rotation style [left-right v]\nset [ステージ1 v] to [0]\nhide variable [world v]\nhide\n\nrepeat until <(ステージ1) = [2]>\n\nwhen flag clicked\nforever\n    if <<(ステージ1) = [2]> and <(q) = [0]>> then\n        change [y v] by (-1)\n        if <<touching (スプライト4 v)?> or <<touching (スプライト7 v)?> or <<touching (スプライト8 v)?> or <touching (スプライト13 v)?>>>> then\n            change y by (1)\n            if <<touching (スプライト4 v)?> or <<touching (スプライト7 v)?> or <<touching (スプライト8 v)?> or <touching (スプライト13 v)?>>>> then\n                change y by (1)\n                if <<touching (スプライト4 v)?> or <<touching (スプライト7 v)?> or <<touching (スプライト8 v)?> or <touching (スプライト13 v)?>>>> then\n                    change y by (1)\n                    if <<touching (スプライト4 v)?> or <<touching (スプライト7 v)?> or <<touching (スプライト8 v)?> or <touching (スプライト13 v)?>>>> then\n                        change y by (1)\n                        if <<touching (スプライト4 v)?> or <<touching (スプライト7 v)?> or <<touching (スプライト8 v)?> or <touching (スプライト13 v)?>>>> then\n                            change y by (1)\n                            if <<touching (スプライト4 v)?> or <<touching (スプライト7 v)?> or <<touching (スプライト8 v)?> or <touching (スプライト13 v)?>>>> then\n                                change y by (-4)\n                                change x by ((x) * (-1))\n                                if <key (up arrow v) pressed?> then\n                                    set [y v] to [15]\n                                    if <([abs v] of (x) ) = (x)> then\n                                        set [x v] to [-10]\n                                    else\n                                        set [x v] to [10]\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        change y by (y)\n        if <<touching (スプライト4 v)?> or <<touching (スプライト7 v)?> or <<touching (スプライト8 v)?> or <touching (スプライト13 v)?>>>> then\n            change y by ((y) - ((y) * (2)))\n            set [y v] to [0]\n        end\n        change y by (-1)\n        if <<key (up arrow v) pressed?> and <<touching (スプライト4 v)?> or <<touching (スプライト7 v)?> or <<touching (スプライト8 v)?> or <touching (スプライト13 v)?>>>>> then\n            set [y v] to [15]\n        end\n        change y by (1)\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nforever\n    if <[238] < (x position)> then\n        broadcast (step v)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [step v]\ngo to x: (-207) y: (-93)\nset [q v] to [1]\nset [x v] to [0]\nset [y v] to [0]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nset size to (40) %\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nset [q v] to [0]\n\nwhen I receive [2 v]\nset [x v] to [0]\nset [y v] to [0]\nset [step v] to [2]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nset size to (40) %\nrepeat (25)\n    change [brightness v] effect by (4)\nend\ngo to x: (-207) y: (-93)\nset [q v] to [0]\nforever\n    if <<touching (スプライト10 v)?> or <(y position) < [-175]>> then\n        set volume to (100) %\n        start sound [Suction Cup v]\n        wait (0.1) seconds\n        go to x: (-207) y: (-93)\n    end\nend\n\nwhen I receive [3 v]\nset [x v] to [0]\nset [y v] to [0]\nset [step v] to [3]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nset size to (40) %\nrepeat (25)\n    change [brightness v] effect by (4)\nend\ngo to x: (-207) y: (-93)\nset [q v] to [0]\nforever\n    if <<touching (スプライト11 v)?> or <(y position) < [-175]>> then\n        set volume to (100) %\n        start sound [Suction Cup v]\n        wait (0.1) seconds\n        go to x: (-207) y: (-93)\n    end\nend\n\nwhen I receive [4 v]\nset [x v] to [0]\nset [y v] to [0]\nset [step v] to [4]\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nset size to (40) %\nrepeat (25)\n    change [brightness v] effect by (4)\nend\ngo to x: (-207) y: (-93)\nset [q v] to [0]\nforever\n    if <<touching (スプライト12 v)?> or <(y position) < [-175]>> then\n        set volume to (100) %\n        start sound [Suction Cup v]\n        wait (0.1) seconds\n        go to x: (-207) y: (-93)\n    end\nend\n\nif <key (space v) pressed?> then\n    go to x: (214) y: (154)\nend\n\nset [ステージ1 v] to [1]\nset [q v] to [1]\nshow\nset size to (60) %\ngo to x: (-165) y: (-87)\nset [brightness v] effect to (-100)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nchange [step v] by (1)\n\n@スプライト2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nset size to (100) %\n\nwhen I receive [メッセージ1 v]\nhide\n\n@スプライト3\n\nwhen flag clicked\nswitch costume to (コスチューム1 v)\ngo to x: (0) y: (-20)\nshow\nforever\n    if <touching (mouse-pointer v)?> then\n        switch costume to (コスチューム2 v)\n        if <mouse down?> then\n            wait (0.1) seconds\n            broadcast (メッセージ1 v)\n            hide\n        end\n    else\n        switch costume to (コスチューム1 v)\n    end\nend\n\nrepeat until <not <touching (mouse-pointer v)?>>\nend\n\nif <key (space v) pressed?> then\n    switch costume to (コスチューム2 v)\n    wait (0.1) seconds\n    broadcast (メッセージ1 v)\n    hide\nend\n\n@スプライト5\n\nwhen I receive [メッセージ1 v]\nset [brightness v] effect to (-100)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nforever\n    if <(ステージ1) = [1]> then\n        if <key (down arrow v) pressed?> then\n            repeat (25)\n                change [brightness v] effect by (4)\n            end\n        end\n    end\nend\n\nwhen I receive [メッセージ1 v]\nshow\nforever\n    if <(World) = [1]> then\n        switch costume to (コスチューム1 v)\n    end\n    if <(World) = [2]> then\n        switch costume to (コスチューム2 v)\n    end\n    if <(World) = [3]> then\n        switch costume to (コスチューム3 v)\n    end\n    if <(World) = [4]> then\n        switch costume to (コスチューム4 v)\n    end\nend\n\nwhen I receive [1 v]\nhide\nset [ステージ1 v] to [2]\n\nwhen I receive [2 v]\nhide\nset [ステージ1 v] to [2]\n\nwhen I receive [3 v]\nhide\nset [ステージ1 v] to [2]\n\nwhen I receive [4 v]\nhide\nset [ステージ1 v] to [2]\n\nwhen flag clicked\nhide\n\n@スプライト4\n\nwhen flag clicked\nset [回数 v] to [0]\nhide\nforever\n    if <<(回数) = [1]> and <(you did it) = [1]>> then\n        change [talalalalalalalala v] by (1)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen I receive [1 v]\nset [ghost v] effect to (100)\nchange [回数 v] by (1)\ngo to x: (0) y: (0)\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nshow\nset [ghost v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [step v]\nif <(step) = [1]> then\n    go to x: (0) y: (0)\n    set [brightness v] effect to (0)\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    show\n    next costume\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nend\n\nwhen flag clicked\nset [step v] to [0]\nforever\n    show\n    if <(step) = [0]> then\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    hide\n    if <(step) = [1]> then\n        show\n    end\nend\n\n@スプライト6\n\nwhen flag clicked\nset [you did it v] to [0]\nhide\n\nwhen I receive [メッセージ1 v]\nset [you did it v] to [0]\nhide\n\nwhen I receive [2 v]\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\ngo to x: (0) y: (0)\nshow\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nforever\n    if <touching (スプライト1 v)?> then\n        set volume to (100) %\n        start sound [Low Whoosh v]\n        set [you did it v] to [1]\n        broadcast (メッセージ1 v)\n        wait (0.2) seconds\n    end\nend\n\nwhen I receive [step v]\nnext costume\nset [brightness v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\ngo to x: (0) y: (0)\nshow\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [4 v]\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\ngo to x: (0) y: (0)\nshow\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nforever\n    if <touching (スプライト1 v)?> then\n        set volume to (100) %\n        start sound [Low Whoosh v]\n        set [you did it v] to [1]\n        wait (0.2) seconds\n        broadcast (メッセージ1 v)\n    end\nend\n\nwhen I receive [1 v]\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\ngo to x: (0) y: (0)\nshow\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nforever\n    if <touching (スプライト1 v)?> then\n        set volume to (100) %\n        start sound [Low Whoosh v]\n        set [you did it v] to [1]\n        wait (0.2) seconds\n        broadcast (メッセージ1 v)\n    end\nend\n\nwhen I receive [3 v]\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\ngo to x: (0) y: (0)\nshow\nrepeat (25)\n    change [brightness v] effect by (4)\nend\nforever\n    if <touching (スプライト1 v)?> then\n        set volume to (100) %\n        start sound [Low Whoosh v]\n        set [you did it v] to [1]\n        wait (0.2) seconds\n        broadcast (メッセージ1 v)\n    end\nend\n\n@スプライト9\n\nwhen flag clicked\nforever\n    hide\n    if <(step) = [1]> then\n        show\n    end\nend\n\nwhen flag clicked\ngo [forward v] (1) layers\nhide\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen I receive [1 v]\ngo to x: (0) y: (0)\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nshow\nset [ghost v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [step v]\nif <(step) = [1]> then\n    go to x: (0) y: (0)\n    set [brightness v] effect to (0)\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    show\n    next costume\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nelse\n    hide\nend\n\n@スプライト7\n\nwhen flag clicked\nforever\n    hide\n    if <(step) = [2]> then\n        show\n    end\nend\n\nwhen flag clicked\nset [回数２ v] to [0]\nhide\nforever\n    if <<(回数２) = [1]> and <(you did it) = [1]>> then\n        change [talalalalalalalala v] by (1)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen I receive [2 v]\nchange [回数２ v] by (1)\ngo to x: (0) y: (0)\nswitch costume to (コスチューム1 v)\nset [ghost v] effect to (100)\nset [brightness v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nshow\nset [ghost v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [step v]\nif <(step) = [2]> then\n    go to x: (0) y: (0)\n    set [brightness v] effect to (0)\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    show\n    next costume\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nend\n\n@スプライト10\n\nwhen flag clicked\nforever\n    hide\n    if <(step) = [2]> then\n        show\n    end\nend\n\nwhen flag clicked\ngo [forward v] (1) layers\nhide\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen I receive [2 v]\ngo to x: (0) y: (0)\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nshow\nset [ghost v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [step v]\nif <(step) = [2]> then\n    go to x: (0) y: (0)\n    set [brightness v] effect to (0)\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    show\n    next costume\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nelse\n    hide\nend\n\n@スプライト8\n\nwhen flag clicked\nforever\n    hide\n    if <(step) = [3]> then\n        show\n    end\nend\n\nwhen flag clicked\nset [回数３ v] to [0]\nhide\nforever\n    if <<(回数３) = [1]> and <(you did it) = [1]>> then\n        change [talalalalalalalala v] by (1)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen I receive [3 v]\nchange [回数３ v] by (1)\ngo to x: (0) y: (0)\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nshow\nset [ghost v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [step v]\nif <(World) = [3]> then\n    go to x: (0) y: (0)\n    set [brightness v] effect to (0)\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    show\n    next costume\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nend\n\n@スプライト11\n\nwhen flag clicked\nforever\n    hide\n    if <(step) = [3]> then\n        show\n    end\nend\n\nwhen flag clicked\ngo [forward v] (1) layers\nhide\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen I receive [3 v]\ngo to x: (0) y: (0)\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nshow\nset [ghost v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [step v]\nif <(step) = [3]> then\n    go to x: (0) y: (0)\n    set [brightness v] effect to (0)\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    show\n    next costume\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nelse\n    hide\nend\n\n@スプライト13\n\nwhen flag clicked\nforever\n    hide\n    if <(step) = [4]> then\n        show\n    end\nend\n\nwhen flag clicked\nset [回数４ v] to [0]\nset [talalalalalalalala v] to [0]\nhide\nforever\n    if <<(回数４) = [1]> and <(you did it) = [1]>> then\n        change [talalalalalalalala v] by (1)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen I receive [4 v]\nchange [回数４ v] by (1)\ngo to x: (0) y: (0)\nswitch costume to (コスチューム1 v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nshow\nset [ghost v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [step v]\nif <(World) = [4]> then\n    go to x: (0) y: (0)\n    set [brightness v] effect to (0)\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    show\n    next costume\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nend\n\n@スプライト12\n\nwhen flag clicked\nforever\n    hide\n    if <(step) = [4]> then\n        show\n    end\nend\n\nwhen flag clicked\ngo [forward v] (1) layers\nhide\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen I receive [4 v]\ngo to x: (0) y: (0)\nswitch costume to (コスチューム1 v)\nset [ghost v] effect to (100)\nset [brightness v] effect to (0)\nrepeat (25)\n    change [brightness v] effect by (-4)\nend\nset [ghost v] effect to (0)\nshow\nrepeat (25)\n    change [brightness v] effect by (4)\nend\n\nwhen I receive [step v]\nif <(step) = [4]> then\n    go to x: (0) y: (0)\n    set [brightness v] effect to (0)\n    repeat (25)\n        change [brightness v] effect by (-4)\n    end\n    show\n    next costume\n    repeat (25)\n        change [brightness v] effect by (4)\n    end\nelse\n    hide\nend\n\n@スプライト14\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\n\nwhen I receive [1 v]\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\nwhen I receive [2 v]\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\nwhen I receive [3 v]\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\nwhen I receive [4 v]\nrepeat (25)\n    change [ghost v] effect by (-4)\nend\nrepeat (25)\n    change [ghost v] effect by (4)\nend\n\n