MINECRAFTscroll Platformer!
@Stage\n\n@Player\n\nwhen flag clicked\nswitch costume to (hitbox v)\nshow\nforever\n    if <<(x position) > [240]> and <touching (_edge_ v)?>> then\n        broadcast (Next level v)\n    end\n    if <<(y position) < [-170]> and <touching (_edge_ v)?>> then\n        broadcast (Restart v)\n        create clone of (_myself_ v)\n    end\n    if <touching (bounce v)?> then\n        set [y v] to [20]\n    end\nend\n\nwhen [r v] key pressed\nbroadcast (Restart v)\n\nwhen I receive [restart v]\ngo to x: (-220) y: (-30)\npoint in direction (90)\nset [y v] to [0]\nset [x v] to [0]\nbroadcast (Setup Enemies v)\n\nwhen I start as a clone\nclear graphic effects\nset rotation style [all around v]\nrepeat (20)\n    turn right (15) degrees\n    change y by (10)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen flag clicked\nforever\n    if <touching (water v)?> then\n        change [y v] by (0.7)\n        if <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> then\n            change [y v] by (1)\n        end\n        if <<key (down arrow v) pressed?> or <<mouse down?> and <(y position) > (mouse y)>>> then\n            change [y v] by (-1)\n        end\n    end\nend\n\nwhen flag clicked\nbroadcast (Restart v)\nswitch costume to (costume1 v)\nshow\nset [x v] to [0]\nset [y v] to [0]\nforever\n    switch costume to (a0 v)\n    go to [front v] layer\n    if <not <touching (water v)?>> then\n        change [y v] by (-1)\n    end\n    if <<key (left arrow v) pressed?> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        change [x v] by (-1)\n        point in direction (-90)\n    end\n    if <<key (right arrow v) pressed?> or <<mouse down?> and <(x position) < (mouse x)>>> 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    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (1)\n    end\n    if <touching (level v)?> then\n        change y by (-4)\n        change x by ((x) * (-1))\n        if <<<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>> and <not <touching (water v)?>>> 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    change y by (y)\n    if <touching (level 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?> or <<mouse down?> and <(mouse y) > (y position)>>> and <touching (level v)?>> then\n        set [y v] to [15]\n    end\n    change y by (1)\n    switch costume to (join [A] (Weapon Number))\nend\n\nclear graphic effects\nset rotation style [all around v]\nrepeat (20)\n    turn right (15) degrees\n    change y by (10)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen flag clicked\nset [weapon number v] to [0]\nset [weapon max v] to [0]\nforever\n    if <key (z v) pressed?> then\n        if <not <(Weapon MAX) = [0]>> then\n            if <(Weapon Number) = (Weapon MAX)> then\n                set [weapon number v] to [1]\n            else\n                change [weapon number v] by (1)\n            end\n        end\n    end\n    wait until <not <key (z v) pressed?>>\nend\n\nwhen I receive [switch costume v]\nswitch costume to (a0 v)\n\nwait until <not <key (space v) pressed?>>\n\n\n    change [y v] by (-1.5)\nend\n\nwhen I receive [switch weapon v]\nif <not <(Weapon MAX) = [0]>> then\n    if <(Weapon Number) = (Weapon MAX)> then\n        set [weapon number v] to [1]\n    else\n        change [weapon number v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [9109kj821kaw.mp3 v] until done\nend\n\n@Level\n\nwhen I receive [next level v]\nnext costume\nbroadcast (Restart v)\n\nwhen flag clicked\nswitch costume to (level 1 v)\n\n@Clouds\n\nwhen flag clicked\nforever\n    create clone of (_myself_ v)\n    wait (pick random (2) to (4)) seconds\nend\n\nwhen I start as a clone\nswitch costume to (cloud hitbox v)\ngo to x: (240) y: (pick random (10) to (150))\nset [my costume v] to (pick random (1) to (2))\nswitch costume to (My costume)\nset [ghost v] effect to (pick random (50) to (70))\nrepeat (96)\n    switch costume to (cloud hitbox v)\n    change x by (-5)\n    switch costume to (My costume)\nend\ndelete this clone\n\n@Deco\n\nwhen flag clicked\nswitch costume to (level 1 v)\nforever\n    go to [back v] layer\n    switch costume to ([costume # v] of [level v])\nend\n\n@Sprite1\n\ndefine Swing\nshow\nif <([direction v] of [player v]) = [90]> then\n    set size to (150) %\n    point in direction (30)\n    repeat (7)\n        turn right (20) degrees\n        switch costume to (swing v)\n        go to (player v)\n        broadcast (switch costume v)\n    end\nelse\n    set size to (150) %\n    point in direction (150)\n    repeat (7)\n        turn right (-20) degrees\n        switch costume to (swing2 v)\n        go to (player v)\n        broadcast (switch costume v)\n    end\nend\nhide\n\nwhen flag clicked\nhide\nforever\n    if <([costume # v] of [level v]) = [3]> then\n        go to x: (-45) y: (19)\n        create clone of (_myself_ v)\n        stop [this script v]\n    end\nend\n\nwhen I start as a clone\nforever\n    show\n    point in direction (90)\n    switch costume to (swing3 v)\n    set size to (200) %\n    repeat (10)\n        change y by (1)\n    end\n    repeat (20)\n        change y by (-1)\n    end\n    repeat (10)\n        change y by (1)\n    end\n    go to x: (-45) y: (19)\nend\n\nwhen I start as a clone\nwait until <touching (player v)?>\nset [weapon number v] to [1]\nset [weapon max v] to [1]\nbroadcast (W1 v)\ndelete this clone\n\nwhen I receive [w1 v]\nforever\n    if <<(Weapon Number) = [1]> and <key (space v) pressed?>> then\n        Swing\n        wait until <not <key (space v) pressed?>>\n    end\nend\n\nwhen flag clicked\ndelete this clone\n\nwhen I receive [flash v]\nif <(Weapon Number) = [1]> then\n    Swing\nend\n\n@Enemies\n\nwhen I start as a clone\nclear graphic effects\nset size to (100) %\nshow\nset [enemyx v] to [0]\nset [enemyy v] to [0]\nset [dead v] to [0]\ngo to [front v] layer\nif <(costume [number v]) < [5]> then\n    forever\n        switch costume to ((Clone#) + (1))\n        if <<touching (sprite1 v)?> or <[-170] > (y position)>> then\n            point in direction (90)\n            clear graphic effects\n            set rotation style [all around v]\n            set [dead v] to [1]\n            repeat (20)\n                turn right (15) degrees\n                change y by (10)\n                change [ghost v] effect by (5)\n            end\n            delete this clone\n        end\n        change [enemyy v] by (-1)\n        if <touching (water v)?> then\n            change [enemyy v] by (1.2)\n        end\n        if <([x position v] of [player v]) < ((x position) - (50))> then\n            change [enemyx v] by (-0.2)\n            point in direction (-90)\n        end\n        if <((x position) - (-20)) < ([x position v] of [player v])> then\n            change [enemyx v] by (0.2)\n            point in direction (90)\n        end\n        set [enemyx v] to ((Enemyx) * (0.9))\n        change x by (Enemyx)\n        if <touching (level v)?> then\n            change y by (1)\n        end\n        if <touching (level v)?> then\n            change y by (1)\n        end\n        if <touching (level v)?> then\n            change y by (1)\n        end\n        if <touching (level v)?> then\n            change y by (1)\n        end\n        if <touching (level v)?> then\n            change y by (-4)\n            change x by ((Enemyx) * (-1))\n            if <((y position) - (-40)) < ([y position v] of [player v])> then\n                set [enemyy v] to [15]\n                if <([abs v] of (Enemyx) ) = (Enemyx)> then\n                    set [enemyx v] to [-3]\n                else\n                    set [enemyx v] to [3]\n                end\n            else\n                set [enemyx v] to [0]\n            end\n        end\n        change y by (Enemyy)\n        if <touching (level v)?> then\n            change y by ((Enemyy) - ((Enemyy) * (2)))\n            set [enemyy v] to [0]\n        end\n        change y by (-1)\n        if <<((y position) - (-50)) < ([y position v] of [player v])> and <touching (level v)?>> then\n            set [enemyy v] to [14]\n        end\n        change y by (1)\n        switch costume to (Clone#)\n        if <touching (sprite2 v)?> then\n            point in direction (90)\n            clear graphic effects\n            set rotation style [all around v]\n            set [dead v] to [1]\n            repeat (20)\n                turn right (15) degrees\n                change y by (10)\n                change [ghost v] effect by (5)\n            end\n            delete this clone\n        end\n    end\nelse\n    if <(costume [number v]) = [5]> then\n        set rotation style [all around v]\n        if <(Katana rotation) = [1]> then\n            set size to (150) %\n            point in direction (30)\n            repeat (5)\n                turn right (30) degrees\n                switch costume to (weapon1 v)\n                broadcast (Blue guy switch v)\n                if <touching (player v)?> then\n                    create clone of (player v)\n                    broadcast (Restart v)\n                end\n            end\n        else\n            set size to (150) %\n            point in direction (150)\n            repeat (5)\n                turn right (-30) degrees\n                switch costume to (weapon2 v)\n                broadcast (Blue guy switch v)\n                if <touching (player v)?> then\n                    create clone of (player v)\n                    broadcast (Restart v)\n                end\n            end\n        end\n        delete this clone\n    else\n        if <(costume [number v]) = [7]> then\n            clear graphic effects\n            set rotation style [all around v]\n            point towards (player v)\n            repeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n                move (10) steps\n                if <touching (player v)?> then\n                    create clone of (player v)\n                    broadcast (Restart v)\n                end\n            end\n            repeat (10)\n                change [ghost v] effect by (10)\n                if <touching (player v)?> then\n                    create clone of (player v)\n                    broadcast (Restart v)\n                end\n            end\n            delete this clone\n        end\n    end\nend\n\nwhen I receive [restart v]\ndelete this clone\n\nwhen I receive [setup enemies v]\nif  then\n    delete this clone\nend\nif <([costume # v] of [level v]) = [4]> then\n    Clone [1] [194] [-60]\nend\nif <([costume # v] of [level v]) = [5]> then\n    Clone [1] [81] [-61]\n    Clone [1] [168] [87]\nend\nif <([costume # v] of [level v]) = [6]> then\n    Clone [1] [81] [-13]\n    Clone [1] [147] [-61]\nend\nif <([costume # v] of [level v]) = [7]> then\n    Clone [3] [186] [38]\nend\nif <([costume # v] of [level v]) = [8]> then\n    Clone [1] [-71] [-11]\n    Clone [3] [215] [39]\nend\nif <([costume # v] of [level v]) = [9]> then\n    Clone [3] [175] [39]\n    Clone [3] [22] [39]\n    Clone [1] [220] [-11]\nend\nif <([costume # v] of [level v]) = [10]> then\n    Clone [3] [170] [-61]\n    Clone [1] [-71] [-111]\nend\nif <([costume # v] of [level v]) = [11]> then\n    Clone [1] [-7] [89]\n    Clone [3] [218] [37]\n    Clone [3] [25] [-11]\n    Clone [1] [137] [-110]\nend\nif <([costume # v] of [level v]) = [12]> then\n    Clone [3] [155] [-110]\n    Clone [1] [218] [37]\n    Clone [3] [55] [-110]\n    Clone [1] [-55] [-110]\nend\nif <([costume # v] of [level v]) = [13]> then\n    Clone [3] [120] [-110]\n    Clone [3] [24] [-110]\n    Clone [3] [69] [-59]\n    Clone [3] [168] [-59]\nend\n\ndefine Clone (type) (x) (y)\ngo to x: (x) y: (y)\nswitch costume to (type)\nset [clone# v] to (type)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\n\n\nswitch costume to (weapon1 v)\nset [katana rotation v] to (() * (90))\ncreate clone of (_myself_ v)\nswitch costume to (costume1 v)\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [1]> then\n        if <(distance to [player v]) < [115]> then\n            if <(dead) = [0]> then\n                switch costume to (weapon1 v)\n                set [katana rotation v] to ((direction) / (90))\n                create clone of (_myself_ v)\n                switch costume to (costume1 v)\n            end\n        end\n        wait until <[115] < (distance to [player v])>\n    end\nend\n\nwhen I receive [blue guy switch v]\nif <(costume [number v]) = [1]> then\n    switch costume to (costume3 v)\nend\n\nwhen I start as a clone\nforever\n    if <(costume [number v]) = [3]> then\n        if <(dead) = [0]> then\n            switch costume to (weapon3 v)\n            set [katana rotation v] to ((direction) / (90))\n            create clone of (_myself_ v)\n            switch costume to (costume2 v)\n        end\n        wait (1.5) seconds\n    end\nend\n\nswitch costume to (weapon3 v)\ncreate clone of (_myself_ v)\n\n@Sprite2\n\nwhen flag clicked\nhide\nwait until <([costume # v] of [level v]) = [1]>\nforever\n    if <([costume # v] of [level v]) = [6]> then\n        show\n        go to x: (-120) y: (0)\n        stop [this script v]\n    end\nend\n\nwhen I receive [w2 v]\nforever\n    if <<(Weapon Number) = [2]> and <key (space v) pressed?>> then\n        create clone of (_myself_ v)\n        wait until <not <key (space v) pressed?>>\n    end\nend\n\nwhen flag clicked\ndelete this clone\n\nwhen flag clicked\nforever\n    point in direction (90)\n    switch costume to (costume1 v)\n    set size to (200) %\n    repeat (10)\n        change y by (1)\n    end\n    repeat (20)\n        change y by (-1)\n    end\n    repeat (10)\n        change y by (1)\n    end\n    go to x: (-120) y: (0)\nend\n\nwhen flag clicked\nhide\nwait until <touching (player v)?>\nset [weapon number v] to [2]\nset [weapon max v] to [2]\nbroadcast (W2 v)\nhide\n\nwhen I start as a clone\ngo to (player v)\nshow\nset size to (150) %\nclear graphic effects\nif <([direction v] of [player v]) = [90]> then\n    repeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n        change x by (10)\n    end\nelse\n    repeat until <<touching (_edge_ v)?> or <touching (level v)?>>\n        change x by (-10)\n    end\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nshow\n\nwhen I receive [flash v]\nif <(Weapon Number) = [2]> then\n    create clone of (_myself_ v)\nend\n\n@WATER\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    set [ghost v] effect to (60)\n    go to [back v] layer\n    change y by (tide)\n    switch costume to ([costume # v] of [level v])\nend\n\nwhen flag clicked\nforever\n    set [tide v] to [0]\n    repeat (10)\n        change [tide v] by (0.1)\n    end\n    repeat (20)\n        change [tide v] by (-0.1)\n    end\n    repeat (10)\n        change [tide v] by (0.1)\n    end\nend\n\n@Button1\n\nwhen flag clicked\nswitch costume to (造型1 v)\ncreate clone of (_myself_ v)\nswitch costume to (change v)\nforever\n    go to [front v] layer\n    set [ghost v] effect to (20)\n    if <touching (mouse-pointer v)?> then\n        set size to (130) %\n        set [show b1v v] to [1]\n    else\n        set size to (120) %\n        set [show b1v v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    point in direction (90)\n    repeat (10)\n        turn left (1) degrees\n    end\n    repeat (20)\n        turn left (-1) degrees\n    end\n    repeat (10)\n        turn left (1) degrees\n    end\nend\n\nwhen I start as a clone\nforever\n    go to (mouse-pointer v)\n    go to [front v] layer\n    if <(Show B1v) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen flag clicked\nforever\n    set y to (-150)\n    if <([direction v] of [player v]) = [90]> then\n        set x to (205)\n    else\n        set x to (-205)\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Switch weapon v)\nwait until <not <touching (mouse-pointer v)?>>\n\n@Button2\n\nwhen flag clicked\nswitch costume to (造型1 v)\ncreate clone of (_myself_ v)\nswitch costume to (change v)\nforever\n    go to [front v] layer\n    set [ghost v] effect to (20)\n    if <touching (mouse-pointer v)?> then\n        set [show b2v v] to [1]\n        set size to (130) %\n    else\n        set size to (120) %\n        set [show b2v v] to [0]\n    end\n    set y to (-150)\n    if <([direction v] of [player v]) = [90]> then\n        set x to (155)\n    else\n        set x to (-155)\n    end\nend\n\nwhen flag clicked\nforever\n    point in direction (90)\n    repeat (10)\n        turn left (1) degrees\n    end\n    repeat (20)\n        turn left (-1) degrees\n    end\n    repeat (10)\n        turn left (1) degrees\n    end\nend\n\nwhen I start as a clone\nforever\n    go to (mouse-pointer v)\n    go to [front v] layer\n    if <(Show b2v) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nbroadcast (Flash v)\nwait until <not <touching (mouse-pointer v)?>>\n\n@Thumbnail\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\n    reset timer\n    hide\nend\n\nwhen [timer v] > (0.01)\nset [ghost v] effect to (100)\nrepeat (10)\n    show\n    change [ghost v] effect by (-10)\n    go to [front v] layer\nend\n\n
ーｰｰｰｰｰｰｰｰｰｰ≫new Platformer≪ｰｰｰｰｰｰｰｰｰｰｰｰｰｰｰｰｰｰｰｰｰｰ\n\n十字キー、ADWキーで操作\nOperate with the cross key and ADW key\n\nTry remixing and adding more stages\nリミックスしてステージを追加してみてください\n\nハートと星を押してくれると作品作りの励みになります\nステージ数が少ないので続編を作ってほしい人はハートと星を押してください\nPushing the heart and the stars will encourage you to make your work.\n Since the number of stages is small, if you want to make a sequel, please press the heart and the star\n\nPlayer costume:@StratfordJames\n\n#Platformer\n#Night\n#yuhaku\n#Game\n#Games\n#Mobile\n