Thunder - A Platformer
@Stage\n\nwhen [m v] key pressed\n\nset volume to (<(volume) = [0]> * (100)) %\n\n@Text\n\nwhen flag clicked\nhide\n\ngo to x: (0) y: (-154)\nswitch costume to (1 v)\ngo to [front v] layer\nshow\n\n@Player\n\nwhen flag clicked\nforever\n    if <(xxx) = [1]> then\n        set rotation style [left-right v]\n        if < or <<mouse down?> and <(x position) < (mouse x)>>> then\n            point in direction (90)\n            change [x v] by (1)\n        end\n        if < or <<mouse down?> and <(x position) > (mouse x)>>> then\n            point in direction (-90)\n            change [x v] by (-1)\n        end\n        set [x v] to ((x) * (0.9))\n    end\nend\n\nwhen I receive [next v]\nshow\nset size to (55) %\nset [x=/ v] to [0]\nset [x v] to [0]\nset [jump v] to [1]\ngo to x: (-190) y: (-20)\npoint in direction (90)\nset [xxx v] to [1]\n\nwhen flag clicked\ngo to x: (-190) y: (-59)\nshow\nset [jump v] to [1]\nset [xxx v] to [1]\nset [x=/ v] to [0]\nset [x v] to [0]\nforever\n    if <(xxx) = [1]> then\n        change x by (x)\n        if  then\n            change y by (1)\n            if  then\n                change y by (1)\n                if  then\n                    change y by (1)\n                    if  then\n                        change y by (1)\n                        if  then\n                            change y by (1)\n                            if  then\n                                change y by (-4)\n                                change x by ((0) - (x))\n                                if <<key (up arrow v) pressed?> or <<(y position) < (mouse y)> and <mouse down?>>> then\n                                    start sound [jump v]\n                                    set [x=/ v] to [13]\n                                    if <[0] < (x)> then\n                                        set [x v] to [-7]\n                                    else\n                                        set [x v] to [7]\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 [x=/ v] by (-1)\n        change y by (X=/)\n        if  then\n            if <[0] > (X=/)> then\n                set [jump v] to [0]\n            else\n                set [jump v] to [1]\n            end\n            change y by ((0) - (X=/))\n            set [x=/ v] to [0]\n        end\n        change y by (-1)\n        if << or <<(y position) < (mouse y)> and <mouse down?>>> and <<(Jump) = [0]> and >> then\n            start sound [jump v]\n            set [jump v] to [1]\n            set [x=/ v] to [13]\n        end\n        if <[230] < (x position)> then\n            broadcast (o v)\n            go to x: (-190) y: (-20)\n            point in direction (90)\n            set [x=/ v] to [0]\n            set [x v] to [0]\n            hide\n            set [xxx v] to [0]\n        end\n        if  then\n            repeat (2)\n                change [ghost v] effect by (50)\n            end\n            hide\n            set [ghost v] effect to (0)\n            set size to (55) %\n            go to x: (-190) y: (-20)\n            point in direction (90)\n            set [xxx v] to [1]\n            set [x=/ v] to [0]\n            set [x v] to [0]\n            show\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    if <(y position) < [-170]> then\n        repeat (2)\n            change [ghost v] effect by (50)\n        end\n        hide\n        set [ghost v] effect to (0)\n        set size to (55) %\n        go to x: (-190) y: (-20)\n        point in direction (90)\n        set [xxx v] to [1]\n        set [x=/ v] to [0]\n        set [x v] to [0]\n        show\n    end\nend\n\nwhen I start as a clone\nswitch costume to (player3 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-3)\n    change [brightness v] effect by (-5)\nend\ndelete this clone\n\nwhen I receive [o v]\nbroadcast (NEXT v)\n\nwhen flag clicked\nforever\n    if <<<mouse down?> or <key (left arrow v) pressed?>> or > then\n        switch costume to (player v)\n    else\n        switch costume to (player2 v)\n    end\nend\n\n@Ground\n\nwhen flag clicked\nswitch costume to (1. v)\ngo to x: (0) y: (0)\n\nwhen I receive [next v]\nif <(costume [number v]) = [9]> then\n    broadcast (文字表示 v)\nend\nnext costume\n\n@Needle\n\nwhen flag clicked\nshow\nswitch costume to (1/ v)\ngo to [back v] layer\n\nwhen I receive [next v]\ngo [backward v] (30) layers\nnext costume\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    動き [0.3]\n    wait (0.7) seconds\n    動き [-0.3]\n    wait (0.7) seconds\nend\n\ndefine 動き (数値)\nrepeat (10)\n    change y by (数値)\nend\n\n@Sunny\n\nwhen flag clicked\ngo to x: (210) y: (152)\nforever\n    Big [1]\n    wait (0.4) seconds\n    Big [-1]\n    wait (0.4) seconds\nend\n\ndefine Big (n)\nrepeat (7)\n    change size by (n)\nend\n\nwhen flag clicked\nforever\n    go to [back v] layer\nend\n\n@P\n\nwhen flag clicked\nset size to (50) %\nhide\nforever\n    set [ghost v] effect to (pick random (40) to (60))\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (pick random (-225) to (225)) y: (150)\nshow\nglide (pick random (2) to (8)) secs to x: (pick random (240) to (-240)) y: (-160)\ndelete this clone\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\nforever\n    go to [front v] layer\nend\n\n