Lava Platformer!　溶岩プラットフォーマー

Instructions: 日本語は下だよ(読まないと損するよ)\n(English)\nI operate it with arrow key\nWe jump over a splinter, and let's advance!\nBecause there is the lava(？), let's be careful\nThere is a hidden stage\n(日本語)\n矢印キーで操作\nトゲを飛び越えてすすもう！\n溶岩(？)もあるから気をつけよう\n隠しステージがあるよ\n今回もいろいろな仕掛けがあるよ

@Stage\n\nwhen flag clicked\nswitch backdrop to (背景2 v)\n\nwhen I receive [special v]\nswitch backdrop to (背景3 v)\n\n@　\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    play sound [ワットソン v] until done\nend\n\nwhen I receive [メッセージ1 v]\nshow\n\nwhen [1 v] key pressed\nif <(username) = [anikix0902]> then\n    change [level v] by (-1)\n    broadcast (next v)\nend\n\nwhen [2 v] key pressed\nif <(username) = [anikix0902]> then\n    change [level v] by (1)\n    broadcast (next v)\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.01)\nshow\n\n@Platform\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (2) layers\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nset [time v] to [0]\n\nwhen flag clicked\nforever\n    change [time v] by (1)\n    wait (1) seconds\nend\n\nwhen flag clicked\nshow variable [☁ world record v]\nshow variable [time v]\n\nset [☁ world record v] to [999]\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen [timer v] > (0.01)\nhide variable [☁ world record v]\nhide variable [time v]\nhide\n\n@spikes\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\nwhen flag clicked\nshow\n\nwhen [timer v] > (0.01)\nhide\n\nwhen flag clicked\nforever\n    reset timer\nend\n\n@Player2\n\nwhen flag clicked\nshow\nreset  X [-200] Y [0]\nset [ok v] to [0]\nset [level v] to [1]\nforever\n    if <(ok) = [0]> then\n        Speed [1] Friction [0.88] Gravity [-1] Jump height [13]\n        if <touching (spikes v)?> then\n            set [ok v] to [1]\n            set rotation style [all around v]\n            set [y v] to [10]\n            start sound [Crunch v]\n            repeat (20)\n                change [y v] by (-1)\n                change [ghost v] effect by (5)\n                turn right (8) degrees\n                change y by (Y)\n            end\n            set [ok v] to [0]\n            reset  X [-200] Y [0]\n            broadcast (reset v)\n        end\n    end\n    if <[240] < (x position)> then\n        change [level v] by (1)\n        reset  X [-200] Y [0]\n        broadcast (next v)\n    end\nend\n\ndefine reset  X (x) Y (y)\ngo to x: (x) y: (y)\nset [y v] to [0]\nset [x v] to [0]\nset rotation style [left-right v]\npoint in direction (90)\nclear graphic effects\n\ndefine Speed (speed) Friction (friction) Gravity (gravity) Jump height (jump height)\nchange [y v] by (gravity)\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>>> then\n    change [x v] by (speed)\n    point in direction (90)\nend\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>>> then\n    change [x v] by ((speed) * (-1))\n    point in direction (-90)\nend\nset [x v] to ((X) * (friction))\nchange x by (X)\nrepeat (8)\n    change y by <touching (platform v)?>\nend\nif <touching (platform v)?> then\n    change x by (() - (X))\n    change y by (-8)\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>>> then\n        set [y v] to ((jump height) - (3))\n        set [x v] to ((5) - ((14) * <[0] < (X)>))\n    end\nend\nchange y by (Y)\nif <touching (platform v)?> then\n    change y by ((Y) * (-1))\n    set [y v] to [0]\nend\nchange y by (-1)\nif <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(y position) < (mouse y)>>>> then\n    if <touching (platform v)?> then\n        start sound [Jump v]\n        set [y v] to (jump height)\n    end\nend\nchange y by (1)\nif <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <<mouse down?> and <(mouse y) < (y position)>>>> then\n    switch costume to (player2 v)\nelse\n    switch costume to (player v)\nend\n\nwhen I receive [メッセージ1 v]\nhide\n\nwhen [timer v] > (0.01)\nhide\n\nwhen flag clicked\nforever\n    if <touching (スプライト5 v)?> then\n        set [y v] to [17]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(ok) = [0]> then\n        if <touching (スプライト3 v)?> then\n            set [ok v] to [1]\n            set rotation style [all around v]\n            set [y v] to [10]\n            start sound [Crunch v]\n            repeat (20)\n                change [y v] by (-1)\n                change [ghost v] effect by (5)\n                turn right (8) degrees\n                change y by (Y)\n            end\n            set [ok v] to [0]\n            reset  X [-200] Y [0]\n        end\n    end\nend\n\nchange y by (-1)\nchange y by (1.1)\n\nwhen flag clicked\nforever\n    if <touching (スプライト2 v)?> then\n        change x by ((X) * (-1))\n        change y by ((Y) * (-1))\n        set [x v] to [0]\n        set [y v] to [0]\n    end\n    if <touching (スプライト7 v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\nend\n\n@Green Flag\n\nwhen flag clicked\ngo to x: (142) y: (-60)\nshow\n\nwhen flag clicked\nforever\n    if <touching (player2 v)?> then\n        if <(time) < (☁ world record)> then\n            set [☁ world record v] to (time)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (player2 v)?> then\n        broadcast (メッセージ1 v)\n        stop all sounds\n        forever\n            wait (1) seconds\n            change [time v] by (-1)\n        end\n    end\nend\n\nwhen I receive [メッセージ1 v]\nhide variable [☁ world record v]\nshow variable [time v]\n\nwhen I receive [メッセージ1 v]\nforever\n    hide\nend\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@タボフィー\n\nwhen flag clicked\nforever\n    set [turbo v] to [0]\n    wait (0.001) seconds\n    if <[3] < (Turbo)> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\ngo [backward v] (1) layers\ngo to x: (0) y: (0)\nforever\n    change [turbo v] by (1)\nend\n\n@スプライト1\n\nwhen flag clicked\nforever\n    if <touching (player2 v)?> then\n        broadcast (open v)\n        glide (0.5) secs to x: (0) y: (30)\n        hide\n    end\nend\n\nwhen I receive [open v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\nforever\n    switch costume to (level)\nend\n\nwhen I receive [reset v]\nshow\ngo to x: (0) y: (0)\nset [ghost v] effect to (0)\n\n@スプライト2\n\nwhen I receive [open v]\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\n\nwhen flag clicked\nshow\nforever\n    switch costume to (level)\nend\n\nwhen I receive [reset v]\nset [ghost v] effect to (0)\nshow\n\n@スプライト3\n\nwhen flag clicked\nshow\ngo to x: (0) y: (200)\n\nwhen flag clicked\nforever\n    x: [0] y: [200] から X: [0] Y: [60] DIV: [5] 初期V: [3]\n    wait (1) seconds\n    x: [0] y: [60] から X: [0] Y: [200] DIV: [10] 初期V: [1]\n    wait (1) seconds\nend\n\ndefine x: (x1) y: (y1) から X: (x2) Y: (y2) DIV: (d) 初期V: (v)\ngo to x: (x1) y: (y1)\nset [v v] to (v)\nset [distance moved v] to [0]\nrepeat until <(Distance moved) > (([sqrt v] of ((((x2) - (x1)) * ((x2) - (x1))) + (((y2) - (y1)) * ((y2) - (y1)))) ) / (3))>\n    change [v v] by ((v) / (7))\n    change x by ((v) * ((([abs v] of ((x2) - (x1)) ) / ([sqrt v] of ((((x2) - (x1)) * ((x2) - (x1))) + (((y2) - (y1)) * ((y2) - (y1)))) )) * (((x2) - (x1)) / ([abs v] of ((x2) - (x1)) ))))\n    change y by ((v) * ((([abs v] of ((y2) - (y1)) ) / ([sqrt v] of ((((x2) - (x1)) * ((x2) - (x1))) + (((y2) - (y1)) * ((y2) - (y1)))) )) * (((y2) - (y1)) / ([abs v] of ((y2) - (y1)) ))))\n    set [distance moved v] to ((Distance moved) + (v))\nend\nrepeat until <<(round (x position)) = (x2)> and <(round (y position)) = (y2)>>\n    change x by (((x2) - (x position)) / (d))\n    change y by (((y2) - (y position)) / (d))\nend\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@スプライト4\n\ndefine x: (x1) y: (y1) から X: (x2) Y: (y2) DIV: (d) 初期V: (v)\ngo to x: (x1) y: (y1)\nset [v v] to (v)\nset [distance moved v] to [0]\nrepeat until <(Distance moved) > (([sqrt v] of ((((x2) - (x1)) * ((x2) - (x1))) + (((y2) - (y1)) * ((y2) - (y1)))) ) / (3))>\n    change [v v] by ((v) / (7))\n    change x by ((v) * ((([abs v] of ((x2) - (x1)) ) / ([sqrt v] of ((((x2) - (x1)) * ((x2) - (x1))) + (((y2) - (y1)) * ((y2) - (y1)))) )) * (((x2) - (x1)) / ([abs v] of ((x2) - (x1)) ))))\n    change y by ((v) * ((([abs v] of ((y2) - (y1)) ) / ([sqrt v] of ((((x2) - (x1)) * ((x2) - (x1))) + (((y2) - (y1)) * ((y2) - (y1)))) )) * (((y2) - (y1)) / ([abs v] of ((y2) - (y1)) ))))\n    set [distance moved v] to ((Distance moved) + (v))\nend\nrepeat until <<(round (x position)) = (x2)> and <(round (y position)) = (y2)>>\n    change x by (((x2) - (x position)) / (d))\n    change y by (((y2) - (y position)) / (d))\nend\n\nwhen flag clicked\nshow\ngo to x: (0) y: (200)\n\nwhen flag clicked\nforever\n    x: [0] y: [200] から X: [0] Y: [60] DIV: [5] 初期V: [3]\n    wait (1) seconds\n    x: [0] y: [60] から X: [0] Y: [200] DIV: [10] 初期V: [1]\n    wait (1) seconds\nend\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@スプライト5\n\nwhen flag clicked\nforever\n    switch costume to (level)\nend\n\n@スプライト6\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    switch costume to (level)\nend\n\nwhen [timer v] > (0.01)\nhide\n\n@スプライト7\n\nwhen flag clicked\nshow\ngo to x: (-170) y: (-100)\nforever\n    switch costume to (level)\nend\n\nwhen I receive [reset v]\nshow\ngo to x: (-170) y: (-100)\nwait (0.5) seconds\nglide (5) secs to x: (170) y: (-100)\nwait (1) seconds\nhide\n\nwhen I receive [next v]\nif <(level) = [11]> then\n    broadcast (reset v)\nend\n\nwhen I receive [next v]\nif <(level) = [16]> then\n    broadcast (reset v)\nend\n\n@スプライト8\n\nwhen I start as a clone\nswitch costume to (コスチューム2 v)\nset [☆2 v] to [NO]\nforever\n    set [☆1 v] to <touching (mouse-pointer v)?>\n    if <touching (mouse-pointer v)?> then\n        wait (0.5) seconds\n        set [☆2 v] to [YES]\n        wait (0.6) seconds\n        broadcast (SPECIAL v)\n        wait until <(Level) = [100]>\n    end\nend\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nset [♡2 v] to [NO]\nforever\n    set [♡1 v] to <touching (mouse-pointer v)?>\n    if <touching (mouse-pointer v)?> then\n        wait (0.5) seconds\n        set [♡2 v] to [YES]\n        wait (0.6) seconds\n        broadcast (SPECIAL v)\n    end\nend\n\n