Relaxation  （platformer）

Instructions: FLAG×2\n\nHow to operate　　操作方法\n\n　↑\n← →

@Stage\n\n@player\n\ndefine 初期化\nclear graphic effects\nset [y v] to [0]\nset [x v] to [0]\ngo to x: (-210) y: (-80)\nswitch costume to (1 v)\n\nwhen flag clicked\ngo to [back v] layer\nset [stage v] to [1]\n初期化\nforever\n    if <(動く) = [1]> then\n        if <<key (right arrow v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>> then\n            point in direction (90)\n            change [x v] by (1.2)\n        end\n        if <<key (left arrow v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>> then\n            point in direction (-90)\n            change [x v] by (-1.2)\n        end\n        change x by (X)\n        set [x v] to ((X) * (0.86))\n        if <<touching color (#468ee0)?> or <touching color (#4c9bf5)?>> then\n            change y by (1)\n        end\n        if <<touching color (#468ee0)?> or <touching color (#4c9bf5)?>> then\n            change y by (1)\n        end\n        if <<touching color (#468ee0)?> or <touching color (#4c9bf5)?>> then\n            change y by (1)\n        end\n        if <<touching color (#468ee0)?> or <touching color (#4c9bf5)?>> then\n            change y by (1)\n        end\n        if <<touching color (#468ee0)?> or <touching color (#4c9bf5)?>> then\n            change y by (-3)\n            change x by ((X) * (-1.16))\n            if <<key (up arrow v) pressed?> or <<(mouse y) > [20]> and <mouse down?>>> then\n                if <(X) > [0]> then\n                    set [x v] to [-6]\n                else\n                    set [x v] to [6]\n                end\n                set [y v] to [12]\n            else\n                set [x v] to [0]\n            end\n        end\n        change y by (-1)\n        if <<touching color (#468ee0)?> or <touching color (#4c9bf5)?>> then\n            if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [20]>>> then\n                set [y v] to [14]\n            end\n        end\n        change [y v] by (-0.8)\n        change y by (Y)\n        if <<touching color (#468ee0)?> or <touching color (#4c9bf5)?>> then\n            change y by ((Y) * (-1))\n            set [y v] to [0]\n        end\n        if <(x position) > [240]> then\n            broadcast (nextstage v)\n            change [stage v] by (1)\n            初期化\n        end\n        if <<(y position) < [-181]> or <touching (magma v)?>> then\n            start sound [ピアノの単音 v]\n            set [ghost v] effect to (50)\n            switch costume to (2 v)\n            repeat until <[181] < (y position)>\n                change y by (10)\n            end\n            初期化\n        end\n    end\nend\n\nwhen flag clicked\nwait (6) seconds\nforever\n    play sound [bgm_maoudamashii_acoustic41 v] until done\nend\n\n@地面\n\nwhen flag clicked\nwait (0.1) seconds\ngo to [back v] layer\nswitch costume to (コスチューム1 v)\n\nwhen I receive [nextstage v]\nnext costume\n\nwhen [timer v] > (0)\nswitch costume to (コスチューム1 v)\n\n@Intro\n\nwhen I start as a clone\nshow\nif <(0..) = [1]> then\n    set [ghost v] effect to (100)\n    set size to (10) %\n    point in direction (-30)\n    repeat (10)\n        change [ghost v] effect by (-10)\n        change size by (9)\n        turn right (12) degrees\n    end\n    wait until <(0...) = [1]>\n    delete this clone\nend\n\nwhen flag clicked\nset [0... v] to [0]\nset [動く v] to [0]\nhide\nset [0. v] to [0]\nstart sound [ v]\n塗りつぶし\nアイコン\nwait (0.1) seconds\nチラリ\n\ndefine 塗りつぶし\nswitch costume to (1 v)\nset [0.. v] to [1]\ngo to x: (-215) y: (140)\nrepeat (5)\n    create clone of (_myself_ v)\n    repeat (10)\n        change x by (43)\n        create clone of (_myself_ v)\n    end\n    change y by (-70)\n    set x to (-215)\nend\n\ndefine アイコン\nswitch costume to (2 v)\nset [0.. v] to [2]\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(0..) = [2]> then\n    set size to (10) %\n    point in direction (90)\n    repeat until <(0...) = [1]>\n        change [0. v] by (7)\n        go to x: ((([sin v] of (0.) ) * (5)) + (10)) y: (([cos v] of (0.) ) * (5))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(0..) = [2]> then\n    repeat (10)\n        change size by (9)\n    end\nend\n\ndefine チラリ\nset [0.. v] to [3]\nrepeat (25)\n    set [ghost v] effect to (pick random (10) to (50))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(0..) = [3]> then\n    go to [back v] layer\n    go [forward v] (50) layers\n    set size to (50) %\n    switch costume to (pick random (3) to (4))\n    go to (random position v)\n    point in direction (pick random (0) to (360))\n    repeat until <(0...) = [1]>\n        move (1) steps\n        wait (0.2) seconds\n        if on edge, bounce\n    end\n    delete this clone\nend\n\ndefine 終わり\nswitch costume to (5 v)\nset [0.. v] to [4]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(0..) = [4]> then\n    repeat (7)\n        next costume\n    end\n    delete this clone\nend\n\nwhen flag clicked\nwait (5.5) seconds\nset [0... v] to [1]\n終わり\nset [動く v] to [1]\n\ngo to [back v] layer\n\nwhen I start as a clone\nif <(0..) = [2]> then\n    wait (2) seconds\n    repeat (10)\n        change size by (10)\n    end\n    repeat (10)\n        change size by (-10)\n    end\nend\n\n@SMN\n\nwhen [timer v] > (0)\nshow\n\nwhen flag clicked\ngo to [back v] layer\ngo [forward v] (1) layers\nshow\nwait (2) seconds\nhide\nforever\n    reset timer\nend\n\n@NEXT\n\nwhen I receive [nextstage v]\nset [動く v] to [0]\ngo to [front v] layer\nshow\nswitch costume to (コスチューム1 v)\nrepeat (5)\n    next costume\nend\nwait (1) seconds\nrepeat (5)\n    next costume\nend\nset [動く v] to [1]\nhide\n\nwhen flag clicked\nhide\n\n@CO²\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    wait (0.23) seconds\nend\n\nwhen I start as a clone\ngo to [back v] layer\nshow\nset [ghost v] effect to (70)\ngo to x: (pick random (-200) to (200)) y: (-200)\nrepeat (40)\n    change y by (10)\nend\ndelete this clone\n\n@magma\n\nwhen flag clicked\nwait (0.11) seconds\ngo to [back v] layer\nforever\n    if <(stage) = [5]> then\n        switch costume to (コスチューム1 v)\n        set x to (18)\n        show\n        change [magma v] by (4)\n        set y to ((([sin v] of (magma) ) * (5)) - (77))\n    else\n        if <(stage) = [6]> then\n            switch costume to (コスチューム2 v)\n            set x to (30)\n            show\n            change [magma v] by (4)\n            set y to ((([sin v] of (magma) ) * (27)) - (110))\n        else\n            if <(stage) = [8]> then\n                switch costume to (コスチューム3 v)\n                set x to (60)\n                show\n                change [magma v] by (4)\n                set y to ((([sin v] of (magma) ) * (12)) - (70))\n            else\n                hide\n                set [magma v] to [0]\n            end\n        end\n    end\nend\n\n@地面2\n\nwhen flag clicked\nwait (0.12) seconds\ngo to [back v] layer\nforever\n    if <(stage) = [7]> then\n        switch costume to (コスチューム1 v)\n        show\n        repeat until <not <(stage) = [7]>>\n            glide (0.8) secs to x: (0) y: (-120)\n            glide (0.8) secs to x: (90) y: (-80)\n        end\n    else\n        if <(stage) = [8]> then\n            switch costume to (コスチューム2 v)\n            show\n            repeat until <not <(stage) = [8]>>\n                glide (1.5) secs to x: (0) y: (60)\n                glide (1.7) secs to x: (90) y: (-80)\n            end\n        else\n            hide\n        end\n    end\nend\n\n