⚡LONG⚡Platformer!


@Stage\n\nwhen I receive [ゴル v]\nstop [other scripts in sprite v]\n\nwhen I receive [スタート v]\nforever\n    if <(ステージ) = [18]> then\n        switch backdrop to (2 v)\n    else\n        if <(ステージ) = [27]> then\n            switch backdrop to (3 v)\n            broadcast (aaaaa v)\n            stop [this script v]\n        end\n    end\nend\n\nwhen I receive [スタート v]\nif <(cos) = [6]> then\n    switch backdrop to (裏ステージ v)\nelse\n    switch backdrop to (1 v)\nend\n\nwhen I receive [スタート v]\nforever\n    if <(ステージ) = [29]> then\n        switch backdrop to (裏ステージ2 v)\n    else\n        if <(ステージ) = [30]> then\n            switch backdrop to (裏ステージ3 v)\n            show variable [time v]\n            stop [other scripts in sprite v]\n        end\n    end\nend\n\nwhen flag clicked\nhide variable [time v]\n\nwhen I receive [スタート v]\nset [time v] to [0]\nforever\n    wait (1) seconds\n    change [time v] by (1)\nend\n\n@プレイヤー\n\ndefine スタートプログラム\nshow\nset [x v] to [0]\nset [y v] to [0]\nset rotation style [left-right v]\ngo to x: (-210) y: (-30)\nset size to (90) %\n\nwhen I receive [スタート v]\nshow\nset volume to (100) %\nshow\nswitch costume to (cos)\nスタートプログラム\nforever\n    if <<key (right arrow v) pressed?> or <<<mouse down?> and <(x position) < (mouse x)>> or <key (d v) pressed?>>> then\n        change [x v] by (1)\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <<<mouse down?> and <(mouse x) < (x position)>> or <key (a v) pressed?>>> then\n        point in direction (-90)\n        change [x v] by (-1)\n    end\n    set [x v] to ((x) * (0.89))\n    change x by (x)\n    if <<touching (ステージ v)?> or <touching (ホワッツ？ v)?>> then\n        change y by (1)\n        if <<touching (ステージ v)?> or <touching (ホワッツ？ v)?>> then\n            change y by (1)\n            if <<touching (ステージ v)?> or <touching (ホワッツ？ v)?>> then\n                change y by (1)\n                if <<touching (ステージ v)?> or <touching (ホワッツ？ v)?>> then\n                    change y by (1)\n                    if <<touching (ステージ v)?> or <touching (ホワッツ？ v)?>> then\n                        change y by (1)\n                        if <<touching (ステージ v)?> or <touching (ホワッツ？ v)?>> then\n                            change y by (-5)\n                            change x by ((x) * (-1))\n                            if <<key (up arrow v) pressed?> or <<<mouse down?> and <(y position) < (mouse y)>> or <key (w v) pressed?>>> then\n                                if <(x) < [0]> then\n                                    start sound [壁キック v]\n                                    set [x v] to [10]\n                                else\n                                    start sound [壁キック v]\n                                    set [x v] to [-10]\n                                end\n                                set [y v] to [15]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-0.9)\n    change y by (y)\n    if <<touching (ステージ v)?> or <touching (ホワッツ？ v)?>> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <<key (up arrow v) pressed?> or <<<mouse down?> and <(y position) < (mouse y)>> or <key (w v) pressed?>>> then\n        if <<touching (ステージ v)?> or <touching (ホワッツ？ v)?>> then\n            start sound [ジャンプ v]\n            set [y v] to [15]\n        end\n    end\n    change y by (1)\n    if <<touching (oooo v)?> or <<<touching (マグマ v)?> or <<<touching (dosin v)?> or <<touching (トゲ v)?> or <(y position) < [-180]>>> or <touching (dosin2 v)?>>> or <touching (beam v)?>>> then\n        start sound [Crunch v]\n        change [hp v] by (-2)\n        スタートプログラム\n    end\n    if <[242] < (x position)> then\n        broadcast (次 v)\n        スタートプログラム\n    end\n    if <touching (バネ v)?> then\n        set [y v] to [18]\n        broadcast (バネ v)\n    end\n    if <key (r v) pressed?> then\n        スタートプログラム\n        change [hp v] by (-2)\n    end\nend\n\nwhen I receive [0% v]\nset volume to (0) %\n\nwhen I receive [100% v]\nset volume to (100) %\n\nwhen flag clicked\nhide variable [hp v]\nset [hp v] to [100]\nhide\n\nwhen I receive [スタート v]\nshow variable [hp v]\nforever\n    if <<(HP) < [0]> or <(HP) = [0]>> then\n        stop [all v]\n    end\nend\n\nwhen I receive [? v]\nスタートプログラム\n\n@ステージ\n\nwhen I receive [次 v]\nchange [ステージ v] by (1)\nswitch costume to (ステージ)\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nset [ステージ v] to [1]\nswitch costume to (1 v)\n\nwhen I receive [振動 v]\nrepeat (15)\n    go to x: (0) y: (pick random (0) to (15))\nend\ngo to x: (0) y: (0)\n\nwhen I receive [スタート v]\nshow\nforever\n    if <(ステージ) = [29]> then\n        set [hp v] to [200]\n        broadcast (oh v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [震度5 v]\nrepeat (20)\n    go to x: (0) y: (pick random (-20) to (25))\nend\ngo to x: (0) y: (0)\n\nwhen I receive [? v]\nbroadcast (次 v)\n\n@ターボモード検知\n\nwhen I receive [メッセージ1 v]\nset [ターボモード検知 v] to [0]\nforever\n    if <(ターボモード検知) = [完了]> then\n        set [ターボモード検知 v] to [OK]\n        stop [this script v]\n    else\n        change [ターボモード検知 v] by (1)\n    end\n    wait (0) seconds\nend\n\nwhen flag clicked\nhide\nforever\n    broadcast (メッセージ1 v)\n    wait (0.001) seconds\n    if <(ターボモード検知) > [10]> then\n        show\n        stop [all v]\n    end\n    set [ターボモード検知 v] to [完了]\n    wait until <(ターボモード検知) = [OK]>\nend\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n@コスチューム\n\nwhen flag clicked\ngo to x: (0) y: (0)\nshow\n\nwhen I receive [スタート v]\nhide\n\n@cos\n\nwhen flag clicked\ngo to x: (-240) y: (0)\nhide\nset size to (150) %\nswitch costume to (無 v)\ngo to [front v] layer\nrepeat (7)\n    show\n    create clone of (_myself_ v)\n    next costume\n    change x by (70)\nend\nforever\n    go to [front v] layer\n    play sound [8bit 29 v] until done\nend\n\nwhen I start as a clone\nforever\n    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(costume [number v]) = [2]>> then\n        cos [1]\n    else\n        if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(costume [number v]) = [3]>> then\n            cos [2]\n        else\n            if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(costume [number v]) = [4]>> then\n                cos [3]\n            else\n                if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(costume [number v]) = [5]>> then\n                    cos [4]\n                else\n                    if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(costume [number v]) = [6]>> then\n                        cos [5]\n                    else\n                        if <<<mouse down?> and <touching (mouse-pointer v)?>> and <(costume [number v]) = [7]>> then\n                            cos [6]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [スタート v]\nstop [other scripts in sprite v]\ndelete this clone\n\ndefine cos (番号)\nset [cos v] to (番号)\nbroadcast (スタート v)\nstop [this script v]\n\n@マグマ\n\nwhen I receive [スタート v]\ngo to [back v] layer\nforever\n    if <(ステージ) = [10]> then\n        show\n        set y to (([sin v] of ((timer) * (200)) ) * (30))\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\n@バネ\n\nwhen I receive [バネ v]\nstart sound [バネ v]\nswitch costume to (2 v)\nwait (0.05) seconds\nswitch costume to (3 v)\nwait (0.05) seconds\nswitch costume to (2 v)\nwait (0.05) seconds\nswitch costume to (1 v)\n\nwhen flag clicked\nhide\n\nwhen I receive [0% v]\nset volume to (0) %\n\nwhen I receive [100% v]\nset volume to (100) %\n\nwhen I receive [スタート v]\nforever\n    if <(ステージ) = [11]> then\n        go to x: (-140) y: (-80)\n        show\n    else\n        hide\n    end\nend\n\n@dosin\n\nwhen flag clicked\nhide\n\nwhen I receive [スタート v]\ngo to [back v] layer\ngo to x: (0) y: (120)\nforever\n    if <(ステージ) = [8]> then\n        switch costume to (コスチューム1 v)\n        show\n        glide (0.5) secs to x: (0) y: (-40)\n        broadcast (振動 v)\n        start sound [se_maoudamashii_explosion06.mp3 v]\n        wait (0.7) seconds\n        glide (0.5) secs to x: (0) y: (120)\n        wait (1) seconds\n    else\n        if <(ステージ) = [21]> then\n            switch costume to (コスチューム2 v)\n            show\n            glide (0.4) secs to x: (-50) y: (-200)\n            wait (1) seconds\n            glide (0.5) secs to x: (-50) y: (200)\n            broadcast (震度5 v)\n            start sound [se_maoudamashii_explosion06.mp3 v]\n            wait (0.3) seconds\n        else\n            if <(ステージ) = [25]> then\n                switch costume to (コスチューム3 v)\n                show\n                glide (0.5) secs to x: (pick random (220) to (-100)) y: (-50)\n                broadcast (震度5 v)\n                start sound [se_maoudamashii_explosion06.mp3 v]\n                glide (0.6) secs to x: (pick random (250) to (-100)) y: (200)\n                broadcast (震度5 v)\n                start sound [se_maoudamashii_explosion06.mp3 v]\n                wait (0.8) seconds\n            else\n                hide\n            end\n        end\n    end\nend\n\nwhen I receive [スタート v]\nforever\n    if <not <<(ステージ) = [25]> or <<(ステージ) = [8]> or <(ステージ) = [21]>>>> then\n        hide\n    end\nend\n\nwhen I receive [スタート v]\nforever\n    if <(ステージ) = [25]> then\n        turn right (10) degrees\n    else\n        point in direction (90)\n    end\nend\n\n@bgm\n\nwhen flag clicked\nhide\n\nwhen I receive [スタート v]\ngo to x: (-210) y: (89)\ngo to [front v] layer\nswitch costume to (1 v)\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        next costume\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <(costume [number v]) = [1]> then\n        set volume to (100) %\n        broadcast (100% v)\n    else\n        set volume to (0) %\n        broadcast (0% v)\n    end\nend\n\nwhen I receive [スタート v]\nforever\n    if <(cos) = [6]> then\n        play sound (pick random (4) to (5)) until done\n    else\n        play sound (pick random (1) to (3)) until done\n    end\nend\n\nwhen I receive [oh v]\nwait (0.2) seconds\ngo to x: (-210) y: (89)\ngo to [front v] layer\nswitch costume to (1 v)\nshow\nforever\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        next costume\n        wait until <not <<touching (mouse-pointer v)?> and <mouse down?>>>\n    end\n    if <(costume [number v]) = [1]> then\n        set volume to (100) %\n        broadcast (100% v)\n    else\n        set volume to (0) %\n        broadcast (0% v)\n    end\nend\n\nwhen I receive [oh v]\nstop [other scripts in sprite v]\nforever\n    play sound [MDK - Press Start \[Free Download\] v] until done\nend\n\n@透明\n\nwhen I receive [スタート v]\nforever\n    if <(ステージ) = [11]> then\n        go to x: (0) y: (0)\n        show\n        if <touching (プレイヤー v)?> then\n            set [ghost v] effect to (50)\n        else\n            set [ghost v] effect to (0)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\n@ス暗闇\n\nwhen flag clicked\nhide\n\nwhen I receive [スタート v]\nforever\n    if <<(ステージ) = [17]> or <(ステージ) = [27]>> then\n        go to [back v] layer\n        set [ghost v] effect to (80)\n        show\n    else\n        hide\n    end\nend\n\n@スプライト1\n\nwhen I receive [スタート v]\nwait (1) seconds\nforever\n    if <(backdrop [number v]) = [2]> then\n        show\n        forever\n            go to (プレイヤー v)\n        end\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [aaaaa v]\nstop [other scripts in sprite v]\nhide\nstop [this script v]\n\n@dosin2\n\nwhen flag clicked\ngo to x: (-250) y: (200)\nhide\n\nwhen I receive [スタート v]\nforever\n    if <not <(ステージ) = [21]>> then\n        hide\n    end\nend\n\nwhen I receive [wow v]\ngo to [back v] layer\nforever\n    if <(ステージ) = [21]> then\n        show\n        glide (0.5) secs to x: (-250) y: (-200)\n        wait (0.8) seconds\n        glide (0.5) secs to x: (-250) y: (200)\n        broadcast (震度5 v)\n        start sound [se_maoudamashii_explosion06.mp3 v]\n        wait (0.5) seconds\n    else\n        hide\n    end\nend\n\nwhen I receive [スタート v]\nforever\n    if <(ステージ) = [21]> then\n        broadcast (wow v)\n        stop [this script v]\n    end\nend\n\n@ホワッツ？\n\nwhen flag clicked\nhide\n\nwhen I receive [スタート v]\nforever\n    if <(ステージ) = [22]> then\n        switch costume to (1 v)\n        go to x: (0) y: (0)\n        set [ghost v] effect to (100)\n        show\n    else\n        if <(ステージ) = [23]> then\n            switch costume to (2 v)\n            set [ghost v] effect to (100)\n            go to x: (0) y: (0)\n            show\n        else\n            hide\n        end\n    end\nend\n\n@トゲ\n\nwhen flag clicked\nswitch costume to (1 v)\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    switch costume to (ステージ)\n    show\n    if <<(costume [number v]) = [3]> or <(costume [number v]) = [23]>> then\n        set y to (([sin v] of ((timer) * (180)) ) * (30))\n    else\n        if <(costume [number v]) = [5]> then\n            turn right (-3) degrees\n        else\n            point in direction (90)\n            go to x: (0) y: (0)\n        end\n    end\nend\n\ngo to [back v] layer\n\n@oooo\n\nwhen flag clicked\nhide\n\nwhen I receive [oh v]\nset [ghost v] effect to (100)\nswitch costume to (コスチューム1 v)\nset rotation style [left-right v]\ngo to x: (50) y: (-30)\npoint in direction (-90)\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nrepeat (20)\n    wait (1) seconds\n    glide (0.2) secs to x: (pick random (50) to (60)) y: (pick random (100) to (-100))\n    start sound [beam-gun-charge1 v]\n    repeat (pick random (2) to (5))\n        switch costume to (コスチューム3 v)\n        wait (0.05) seconds\n        next costume\n        wait (0.05) seconds\n    end\n    switch costume to (コスチューム2 v)\n    broadcast (dooooooooooooooooooooo  v) and wait\n    switch costume to (コスチューム1 v)\nend\nswitch costume to (コスチューム5 v)\nwait (1) seconds\nrepeat (50)\n    change [ghost v] effect by (2)\nend\nhide\nbroadcast (? v)\n\n@beam\n\nwhen flag clicked\nhide\n\nwhen I receive [dooooooooooooooooooooo  v]\ngo to x: ([x position v] of [oooo v]) y: ([y position v] of [oooo v])\nshow\nstart sound [qigong1 v]\nrepeat (10)\n    change y by (10)\n    wait (0.01) seconds\n    change y by (-10)\n    wait (0.01) seconds\nend\nhide\n\n@サムネ\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    switch costume to (サムネ v)\n    set [ghost v] effect to (100)\n    show\nend\n\n