DARK // -platformer- (Mobile Friendly)

Instructions: WASD,↑ ← ↓ →,画面タップで移動\n針に触れるとゲームオーバー\n\nWASD, ↑ ← ↓ →, move by tapping the screen\nThe game is over when you touch the needle\n\nリミックスして下さい!\n\nPlease remix!

@Stage\n\nwhen I receive [op v]\nforever\n    play sound [NCS v] until done\nend\n\n@b\n\nwhen I receive [→ v]\nnext costume\n\nwhen flag clicked\nhide\n\nwhen I receive [op v]\nshow\nswitch costume to (1 v)\n\n@a\n\nwhen I start as a clone\nrepeat (8)\n    change size by (-2)\n    change [ghost v] effect by (10)\nend\nwait (0.1) seconds\nset [ghost v] effect to (0)\ndelete this clone\n\nwhen I receive [op v]\nset [変数 v] to [1]\nforever\n    if <(x position) > [220]> then\n        broadcast (→ v)\n        change [変数 v] by (1)\n        go to x: (-210) y: (50)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [op v]\nset [x v] to [0]\nset [y v] to [0]\ngo to x: (-210) y: (50)\npoint in direction (90)\nswitch costume to (1 v)\nset size to (20) %\ngo to [front v] layer\nset drag mode [not draggable v]\nshow\nforever\n    if <touching (b v)?> then\n        change y by (1)\n        if <touching (b v)?> then\n            change y by (1)\n            if <touching (b v)?> then\n                change y by (1)\n                if <touching (b v)?> then\n                    change y by (1)\n                    if <touching (b v)?> then\n                        change y by (1)\n                        if <touching (b v)?> then\n                            change y by (1)\n                            if <touching (b v)?> then\n                                change x by ((x) * (-1.1))\n                                change y by (-6)\n                                if <<<<(y position) < (mouse y)> and <mouse down?>> or <key (w v) pressed?>> or <key (up arrow v) pressed?>> then\n                                    set [y v] to [12]\n                                    if <[0] < (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                        end\n                    end\n                end\n            end\n        end\n    end\n    change y by (-1)\nend\n\nwhen I receive [op v]\nforever\n    if <<touching (block v)?> or <(y position) < [-164]>> then\n        start sound [ oof v]\n        repeat (20)\n            change size by (2)\n            change [ghost v] effect by (10)\n        end\n        set [ghost v] effect to (0)\n        set size to (20) %\n        set [x v] to [0]\n        set [y v] to [0]\n        go to x: (-210) y: (50)\n    else\n        if <<<(mouse x) < (x position)> and <mouse down?>> or <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n            change [x v] by (-1)\n            switch costume to (2 v)\n            create clone of (_myself_ v)\n        end\n        if <<<(x position) < (mouse x)> and <mouse down?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n            change [x v] by (1)\n            switch costume to (1 v)\n            create clone of (_myself_ v)\n        end\n        set [x v] to ((x) * (0.9))\n        change x by (x)\n    end\nend\n\nwhen I receive [op v]\nforever\n    if <touching (b v)?> then\n        if <<<(y position) < (mouse y)> and <mouse down?>> or <<key (w v) pressed?> or <key (up arrow v) pressed?>>> then\n            start sound [jump v]\n            set [y v] to [15]\n            create clone of (_myself_ v)\n        end\n    end\n    change y by (1)\n    change [y v] by (-1)\n    change y by (y)\n    if <touching (b v)?> then\n        change y by ((y) * (-1))\n        set [y v] to [0]\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen [timer v] > (0)\nhide\n\n@ intro\n\ndefine (fx) (fy) (ft) (fs) (fi) (tx) (ty) (tt) (ts) (ti) (fra) (fri)\ngo to x: (fx) y: (fy)\npoint in direction (ft)\nset size to (fs) %\nset [c v] to (costume [name v])\nset [ghost v] effect to (fi)\nset [i v] to (fi)\nrepeat (fra)\n    change x by (((tx) - (x position)) / (fri))\n    change y by (((ty) - (y position)) / (fri))\n    turn right (((tt) - (direction)) / (fri)) degrees\n    switch costume to (dummy v)\n    change size by (((ts) - (size)) / (fri))\n    switch costume to (c)\n    change [ghost v] effect by (((ti) - (i)) / (fri))\n    change [i v] by (((ti) - (i)) / (fri))\nend\n\nwhen flag clicked\nstart sound [foxstevenson v]\ngo to x: (0) y: (0)\npoint in direction (90)\ngo to [front v] layer\nset size to (100) %\nclear graphic effects\nhide\nswitch costume to (back v)\ncreate clone of (_myself_ v)\nwait (2) seconds\nswitch costume to (logo v)\ncreate clone of (_myself_ v)\nwait (1) seconds\nforever\n    effect\n    wait (0.2) seconds\nend\n\nwhen I start as a clone\nshow\nif <(costume [name v]) = [back]> then\n    set [r v] to [0]\n    repeat (60)\n        turn right (r) degrees\n        change [r v] by (1)\n    end\n    point in direction (90)\nend\nif <(costume [name v]) = [logo]> then\n    [0] [-180] [180] [50] [100] [0] [0] [90] [100] [0] [30] [5]\n    [0] [0] [90] [100] [0] [0] [0] [120] [80] [0] [12] [3]\n    [0] [0] [120] [80] [0] [0] [0] [60] [120] [0] [12] [3]\n    [0] [0] [60] [120] [0] [0] [0] [90] [100] [0] [12] [3]\n    [0] [0] [90] [120] [0] [60] [0] [90] [100] [0] [12] [5]\n    [60] [0] [90] [100] [0] [0] [0] [90] [100] [0] [5] [2]\n    [0] [0] [90] [120] [0] [0] [45] [90] [100] [0] [5] [5]\n    [0] [45] [90] [100] [0] [0] [0] [90] [100] [0] [5] [2]\n    [0] [0] [90] [120] [0] [-60] [0] [45] [100] [0] [12] [5]\n    [-60] [0] [45] [100] [0] [0] [0] [90] [100] [0] [12] [2]\n    [0] [0] [90] [120] [0] [0] [-45] [135] [100] [0] [12] [5]\n    [0] [-45] [135] [80] [0] [0] [45] [45] [100] [0] [12] [2]\n    [0] [45] [45] [120] [0] [0] [0] [135] [100] [0] [12] [5]\n    [0] [0] [135] [120] [0] [60] [0] [90] [100] [0] [12] [3]\n    [60] [0] [90] [120] [0] [0] [0] [135] [100] [0] [5] [3]\n    [0] [0] [135] [120] [0] [0] [45] [45] [100] [0] [12] [3]\n    [0] [45] [45] [120] [0] [0] [0] [90] [100] [0] [12] [3]\n    broadcast (intro_end v)\nend\nif <(costume [number v]) > [2]> then\n    set [brightness v] effect to ((-100) * (pick random (0) to (1)))\n    set [uuhcnadutaz intro: x v] to (pick random (-5.0) to (5))\n    set [uuhcnadutaz intro: y v] to (pick random (5.0) to (15))\n    set [r v] to (pick random (-1.0) to (1))\n    repeat until <(y position) < [-175]>\n        change x by (Uuhcnadutaz intro: x)\n        change y by (Uuhcnadutaz intro: y)\n        turn right (r) degrees\n        change [uuhcnadutaz intro: y v] by (-1)\n    end\n    delete this clone\nend\n\ndefine effect\ngo to (random position v)\nrepeat (8)\n    switch costume to (pick random (3) to (7))\n    set size to (140) %\n    create clone of (_myself_ v)\nend\n\nwhen I receive [intro_end v]\nstop [other scripts in sprite v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nbroadcast (op v)\ndelete this clone\n\nwhen I start as a clone\nif <(costume [name v]) = [logo]> then\n    forever\n        go to [front v] layer\n    end\nend\n\n@block\n\nwhen I receive [→ v]\nif <(変数) = [4]> then\n    switch costume to (4 v)\n    show\nelse\n    if <(変数) = [5]> then\n        switch costume to (5 v)\n        show\n    else\n        if <(変数) = [6]> then\n            switch costume to (6 v)\n            show\n        else\n            if <(変数) = [8]> then\n                switch costume to (8 v)\n                show\n            else\n                if <(変数) = [9]> then\n                    switch costume to (9 v)\n                    show\n                else\n                    hide\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\n@スプライト1\n\nwhen I receive [intro_end v]\nshow\nrepeat (3)\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (pick random (10) to (20))\n    set size to (pick random (70) to (150)) %\n    go to x: (pick random (-240) to (240)) y: (-180)\n    create clone of (_myself_ v)\n    wait (0.5) seconds\nend\n\nwhen I receive [intro_end v]\nforever\n    change [ghost v] effect by (-1)\n    change y by (1)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nforever\n    change [ghost v] effect by (-1)\n    change y by (1)\nend\n\nwhen I start as a clone\nforever\n    if <(y position) = [170]> then\n        delete this clone\n    end\nend\n\nwhen I receive [intro_end v]\nforever\n    set [ghost v] effect to (100)\n    set [brightness v] effect to (pick random (0) to (10))\n    set size to (pick random (70) to (150)) %\n    go to x: (pick random (-240) to (240)) y: (-180)\n    create clone of (_myself_ v)\n    wait (pick random (0.8) to (2)) seconds\nend\n\nwhen [timer v] > (0)\nhide\n\n@サムネ\n\nwhen flag clicked\nhide\n\nwhen [timer v] > (0)\nshow\n\nwhen flag clicked\nforever\n    reset timer\nend\n\n