DARK ❖scrolling platformer ❖

Instructions: 難易度/difficulty level ★★★☆☆\nplease ♡&☆,follow!!\n\nクリアすると、クラウド変数に載ります‼︎\nクリアを目指して、頑張ってください‼︎\nあと、♡と☆を押していただけると作者の励みになります。\n\n⌘操作方法/How to play ⌘\n\n　◇PC◇\n←→で移動/←→keys to move\n↑でジャンプ/↑keys to jump \n\n　◇スマホ・タブレット/mobile |tablet◇\n左側,右側タップで移動/tap left | right move \n上側をタップで移動/Tap the top to jump

@Stage\n\nwhen flag clicked\nforever\n    play sound [Clarx - Zig Zag \[NCS Release\].mp3 v] until done\nend\n\nwhen flag clicked\nwait until <(item) = [3]>\nif <(item) = [3]> then\n    change [☁ goal players v] by (1)\nend\n\n@start\n\nwhen flag clicked\ngo to [front v] layer\ngo to x: (0) y: (0)\nhide\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\nshow\n\n@player\n\nwhen I receive [play game v]\nset [usedskip? v] to [0]\nset [mobileskip v] to [0]\nset [level v] to [1]\nshow\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game on\n    repeat until <<<(EXIT) > []> or <key (p v) pressed?>> or <(mobileskip) = [1]>>\n        broadcast (Tick v)\n        Tick\n    end\n    if <<key (p v) pressed?> and <not <(LEVEL) = [7]>>> then\n        set [exit v] to [A win win]\n        set [usedskip? v] to [1]\n    end\n    if <<(mobileskip) = [1]> and <not <(LEVEL) = [7]>>> then\n        set [exit v] to [A win win]\n        set [usedskip? v] to [1]\n    end\n    if <(EXIT) = [A win win]> then\n        broadcast (win YOO XD v)\n        GameWinYOO\n        set [mobileskip v] to [0]\n    else\n        if <not <(LEVEL) = [7]>> then\n            Game - die boi boi I’m fed\n        end\n    end\nend\n\ndefine Game on\nswitch costume to (front v)\nset rotation style [left-right v]\npoint in direction (-90)\nset [scroll x v] to (Xx)\nset [scroll y v] to (Yy)\nset [x v] to (xxx)\nset [y v] to (yyy)\nset [speedy v] to [0]\nset [sx v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset size to (100) %\nset [ghost v] effect to (0)\nshow\n\ndefine Tick\nswitch costume to (hitbox v)\npoint in direction (90)\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [sx v] by (2)\nend\nif <<not <(touchskip?) = [1]>> and <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [sx v] by (2)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [sx v] by (-2)\nend\nif <<not <(touchskip?) = [1]>> and <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [sx v] by (-2)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change player x by (round (sx))\nend\nif <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(y position) < (mouse y)>>> then\n    if <(In air) < [4]> then\n        set [speedy v] to [16]\n    end\nend\nif <(Speedy) > [-20]> then\n    change [speedy v] by (-1.5)\nend\nChange player y by (Speedy)\nDie? I think so\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (8)))\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (8)))\nPosition\nif <touching (trampoline v)?> then\n    set [speedy v] to [30]\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    switch costume to (front2 v)\nelse\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n        switch costume to (front3 v)\n    else\n        switch costume to (front v)\n    end\nend\nif <<[-185] > (x position)> and <(item) = [2]>> then\n    broadcast (you win v)\n    set [item v] to [3]\nend\n\ndefine Change player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <<touching (cave v)?> or <<touching (key2 v)?> and <(item) = [0]>>>>\n    if <(sy) > [0]> then\n        change [y v] by (-1)\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [speedy v] to [0]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\ndefine Change player x by (sx)\nchange [x v] by (sx)\nPosition\nif <<touching (cave v)?> or <<touching (key2 v)?> and <(item) = [0]>>> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <<touching (cave v)?> or <<touching (key2 v)?> and <(item) = [0]>>>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    repeat until <not <<touching (cave v)?> or <<touching (key2 v)?> and <(item) = [0]>>>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Game - die boi boi I’m fed\nset [dead? v] to [1]\nset [ghost v] effect to (0)\nstart sound [Bonk v]\nset [y v v] to [15]\nrepeat until <(y position) < [-90]>\n    set rotation style [all around v]\n    change [ghost v] effect by (3)\n    switch costume to (front v)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y v)\n    change [y v v] by (-1)\nend\nrepeat until <(y position) < [-178]>\n    set rotation style [all around v]\n    change [ghost v] effect by (5)\n    go to [front v] layer\n    turn right (10) degrees\n    change y by (Y v)\n    change [y v v] by (-1)\nend\nset [dead? v] to [0]\nbroadcast (ded boiz v)\nhide\n\ndefine Die? I think so\nif <<<touching (lava v)?> or <(SCROLL Y) < [-20]>> or <<touching (die v)?> or <touching (bad guys v)?>>> then\n    set [exit v] to [Die \(other way\)]\nend\n\ndefine GameWinYOO\nset rotation style [all around v]\nrepeat (20)\n    point towards (portal v)\n    turn right (65) degrees\n    move ((distance to [portal v]) / (2)) steps\n    change size by (-2)\n    change [ghost v] effect by (5)\nend\nchange [level v] by (1)\nhide\nset [ghost v] effect to (0)\nset size to (100) %\n\nwhen flag clicked\nset [xxx v] to [-90]\nset [yyy v] to [30]\nset [xx v] to [0]\nset [yy v] to [0]\nset [dead? v] to [0]\nhide\n\n@cave\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    Position x: [630] y: [0]\n    Position x: [400] y: [0]\n    Position x: [400] y: [0]\n    Position x: [500] y: [0]\n    Position x: [570] y: [0]\n    Position x: [570] y: [0]\n    Position x: [400] y: [180]\n    Position x: [500] y: [0]\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Position x: (x) y: (y)\nhide\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen flag clicked\nbroadcast (Play game v)\nhide\n\n@Player Light\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nswitch costume to (Clone #)\nforever\n    change [size v] by (5)\n    go to (player v)\n    set size to ((100) + (([cos v] of (size) ) * (10))) %\n    set [brightness v] effect to (([sin v] of ((size) * (3)) ) * (2))\n    go to [back v] layer\nend\n\nwhen I receive [play game v]\nhide\nset [size v] to [0]\nset [clone # v] to [1]\ncreate clone of (_myself_ v)\nset [size v] to [22]\nset [clone # v] to [2]\ncreate clone of (_myself_ v)\nset [size v] to [45]\nset [clone # v] to [3]\ncreate clone of (_myself_ v)\nset [size v] to [67]\nset [clone # v] to [4]\ncreate clone of (_myself_ v)\n\n@light\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nbroadcast (Play game v)\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [setup v]\ngo to [back v] layer\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (コスチューム1 v)\n    Position x: [630] y: [30]\n    Position x: [200] y: [0]\n    Position x: [400] y: [0]\n    Position x: [640] y: [0]\n    Position x: [400] y: [0]\n    Position x: [300] y: [0]\n    Position x: [600] y: [0]\n    Position x: [400] y: [0]\nend\n\ndefine Position x: (x) y: (y)\nhide\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@lava\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nbroadcast (Play game v)\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [setup v]\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    Position x: [670] y: [0]\n    Position x: [1000] y: [0]\n    Position x: [800] y: [0]\n    Position x: [400] y: [0]\nend\n\ndefine Position x: (x) y: (y)\ngo to [back v] layer\nhide\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@die\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nbroadcast (Play game v)\nhide\n\nwhen I receive [tick v]\nPosition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    Position x: [670] y: [0]\n    Position x: [200] y: [0]\n    Position x: [500] y: [0]\n    Position x: [2000] y: [60]\nend\n\ndefine Position x: (x) y: (y)\ngo to [back v] layer\nhide\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@key\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nset [item v] to [0]\nhide\n\nwhen I receive [tick v]\nif <(item) = [0]> then\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n    if <touching (player v)?> then\n        set [yyy v] to [130]\n        set [xxx v] to [3950]\n        set [xx v] to [3950]\n        set [yy v] to [130]\n        set [item v] to [1]\n        start sound [Coin v]\n        hide\n        delete this clone\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    if <(item) = [0]> then\n        wait (0) seconds\n        Position x: [3900] y: [100]\n    end\nend\n\ndefine Position x: (x) y: (y)\ngo to [back v] layer\nhide\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nif <(item) = [0]> then\n    wait (0) seconds\n    Position x: [3900] y: [100]\nend\n\n@key2\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen flag clicked\nset [item v] to [0]\nset [item v] to [0]\nhide\n\nwhen I receive [tick v]\nif <<(item) = [0]> or <(item) = [1]>> then\n    show\n    Position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n    if <touching (player v)?> then\n        start sound [Coin v]\n        hide\n        set [item v] to [2]\n        delete this clone\n    end\nend\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <<(item) = [1]> or <(item) = [0]>> then\n        show\n    end\nelse\n    if <<(item) = [2]> or <(item) = [3]>> then\n        hide\n    end\nend\n\nwhen I receive [setup v]\nset [y v] to [0]\nset [x v] to [0]\nif <(LEVEL) = [1]> then\n    switch costume to (1 v)\n    if <<(item) = [1]> or <(item) = [0]>> then\n        wait (0) seconds\n        Position x: [0] y: [0]\n    end\nend\n\ndefine Position x: (x) y: (y)\ngo to [back v] layer\nhide\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@clear\n\nwhen flag clicked\nset [ghost v] effect to (100)\nhide\nforever\n    go to [front v] layer\nend\n\nwhen I receive [you win v]\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\n    go to [front v] layer\nend\nstop [all v]\n\nwhen [timer v] > (0)\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\n