Phantom Platformer Ⅰ || A Scroll Platformer

Instructions: You can skip Intro by click or tap!\nBlue block >Safe\nRed block >OUT\n<PC>\n[Space],[Up],[W],[Click Upside]: Go up!(ジャンプ)\n[Right],[D],[Click Rightside]: Go next!(進む)\n[Left],[A],[Click Leftside]: Go back!(戻る)\n[L]: Back to the beginning!(最初に戻る)\n[N]: Stop/Restart spin!(スピン)\n\n<Mobile>\n[Tap Upside]: Go up!(ジャンプ)\n[Tap Rightside]: Go next!(進む)\n[Tap Leftside]: Go back!(戻る)

@Stage\n\nwhen flag clicked\nswitch backdrop to (a v)\nwait until <(User 状態) = [1]>\nswitch backdrop to (b v) and wait\n\nwhen I receive [stgo! v]\nforever\n    start sound [Treenan v]\n    wait (243) seconds\nend\n\n@User\n\ndefine Mov\nshow\nchange [yp v] by (-1)\nif <key (l v) pressed?> then\n    broadcast (Bomb v)\nend\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <[29] < (mouse x)>>>> then\n    change [xp v] by (1)\nend\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [-29]>>>> then\n    change [xp v] by (-1)\nend\nset [xp v] to ((XP) * (0.9))\nchange x by (XP)\nrepeat (6)\n    if <touching (zone v)?> then\n        change y by (1)\n    end\nend\nif <touching (zone v)?> then\n    change y by (-5)\n    ErrorX (() - ((XP) / ([abs v] of (XP) ))) ([ceiling v] of ([abs v] of (XP) ) )\n    if <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <<mouse down?> and <<[0] = (mouse y)> or <[0] < (mouse y)>>>> then\n        set [yp v] to ((R) - (88))\n        set [xp v] to ((7) - (<(XP) > [0]> * (13)))\n        broadcast (Spin v)\n    else\n        set [xp v] to [0]\n    end\nend\nchange y by (YP)\nif <touching (zone v)?> then\n    ErrorY (() - ((YP) / ([abs v] of (YP) ))) ([ceiling v] of ([abs v] of (YP) ) )\nend\nchange y by (-1)\nif <<touching (zone v)?> and <<<key (up arrow v) pressed?> or <<key (w v) pressed?> or <key (space v) pressed?>>> or <<mouse down?> and <<[0] = (mouse y)> or <[0] < (mouse y)>>>>> then\n    set [yp v] to ((R) - (85))\n    broadcast (Spin v)\nend\nchange y by (1)\nif <<(User Y) < [-400]> or <touching (out v)?>> then\n    Re:START by Oborou\nend\nOUT\nbroadcast (Loop! v)\nif <touching (out v)?> then\n    Re:START by Oborou\nend\n\nwhen I receive [power v]\nwait until <(User 状態) = [2]>\nMov\n\ndefine OUT\nchange [user x v] by ((x position) - ((User X) - (Flow X)))\nchange [user y v] by ((y position) - (((User Y) - (Flow Y)) - (20)))\nchange [flow x v] by ([floor v] of (((User X) - (Flow X)) * (0.1)) )\nchange [flow y v] by ([floor v] of (((User Y) - (Flow Y)) * (0.2)) )\nset x to ((User X) - (Flow X))\nset y to (((User Y) - (Flow Y)) - (20))\n\ndefine ErrorX (xdir) (xcot)\nif <(XP) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (zone v)?>> or <(i) = ((xcot) + (1))>>\n    change [i v] by (1)\n    change x by (xdir)\nend\nchange x by ((０) - ((xdir) * (((xcot) + (1)) * <<(i) = ((xcot) + (1))> and <touching (zone v)?>>)))\n\ndefine ErrorY (ydir) (ycot)\nif <(YP) = [0]> then\n    stop [this script v]\nend\nset [i v] to [0]\nrepeat until <<not <touching (zone v)?>> or <(i) = ((ycot) + (1))>>\n    change [i v] by (1)\n    change y by (ydir)\nend\nchange y by ((０) - ((ydir) * (((ycot) + (1)) * <<(i) = ((ycot) + (1))> and <touching (zone v)?>>)))\nset [yp v] to [0]\n\ndefine Re:START by Oborou\nclear graphic effects\ngo to [front v] layer\nshow\npoint in direction (90)\ngo to x: (0) y: (-20)\nset [xp v] to [0]\nset [yp v] to [0]\nset [user x v] to [0]\nset [user y v] to [0]\nset [flow x v] to [0]\nset [flow y v] to [0]\n\nwhen I receive [stgo! v]\ngo to [front v] layer\npoint in direction (90)\ngo to x: (0) y: (-20)\nset [user x v] to [0]\nset [user y v] to [0]\nset [xp v] to [0]\nset [yp v] to [0]\nset [flow x v] to [-200]\nset [flow y v] to [-20]\nclear graphic effects\nshow\n\nwhen flag clicked\ngo to [back v] layer\nset [r v] to [100]\nhide\n\nwhen I receive [stgo! v]\nforever\n    change [color v] effect by (0.4)\nend\n\nwhen I receive [bomb v]\nwait (2) seconds\nRe:START by Oborou\n\nwhen I receive [bomb v]\nchange [ghost v] effect by (100)\n\nwhen I receive [spin v]\nif <(Spin) = [0]> then\n    if <[0] < (XP)> then\n        repeat (20)\n            turn right (4.5) degrees\n        end\n        wait (0.3) seconds\n        if <not <<(direction) = [-90]> or <<(direction) = [0]> or <<(direction) = [90]> or <(direction) = [180]>>>>> then\n            point in direction (90)\n        end\n    else\n        repeat (20)\n            turn left (4.5) degrees\n        end\n        wait (0.3) seconds\n        if <not <<(direction) = [-90]> or <<(direction) = [0]> or <<(direction) = [90]> or <(direction) = [180]>>>>> then\n            point in direction (90)\n        end\n    end\nend\nif <(Spin) = [1]> then\n    point in direction (90)\nend\n\nwhen I receive [stgo! v]\nset [spin v] to [0]\nforever\n    if <(Spin) = [0]> then\n        if <key (n v) pressed?> then\n            set [spin v] to [1]\n            wait (0.2) seconds\n        else\n            set [spin v] to [0]\n        end\n    end\n    if <(Spin) = [1]> then\n        if <key (n v) pressed?> then\n            set [spin v] to [0]\n            wait (0.2) seconds\n        else\n            set [spin v] to [1]\n        end\n    end\nend\n\n@Zone\n\ndefine STG (x) (y) (num)\nswitch costume to (1 v)\nset [ｘ v] to (x)\nset [ｙ v] to (y)\nswitch costume to ((num) + (1))\nset [ｎ v] to ((num) + (1))\ncreate clone of (_myself_ v)\n\ndefine Mov (x) (y)\nswitch costume to (1 v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x position) ) < ([abs v] of (x) )> or <([abs v] of (y position) ) < ([abs v] of (y) )>> then\n    hide\nelse\n    show\nend\nswitch costume to (Ｎ)\n\nwhen I receive [loop! v]\nif <(costume [number v]) = [1]> then\n    broadcast (Power v)\nelse\n    Mov ((Ｘ) - (Flow X)) ((Ｙ) - (Flow Y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [stgo! v]\nhide\nSTG ((R) * (0)) ((R) * (0)) [1]\nSTG ((R) * (4.2)) ((R) * (0)) [2]\nSTG ((R) * (8.4)) ((R) * (0)) [3]\nSTG ((R) * (12.6)) ((R) * (0)) [4]\nSTG ((R) * (16.8)) ((R) * (0)) [5]\nSTG ((R) * (21)) ((R) * (0)) [6]\nSTG ((R) * (25.2)) ((R) * (0)) [7]\nSTG ((R) * (29.4)) ((R) * (0)) [8]\nSTG ((R) * (33.6)) ((R) * (0)) [9]\nSTG ((R) * (37.8)) ((R) * (0)) [10]\nSTG ((R) * (42)) ((R) * (0)) [11]\nSTG ((R) * (46.2)) ((R) * (0)) [12]\nSTG ((R) * (50.4)) ((R) * (0)) [13]\nSTG ((R) * (54.6)) ((R) * (0)) [14]\nSTG ((R) * (58.8)) ((R) * (0)) [15]\nswitch costume to (1 v)\nbroadcast (Power v)\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\n@OUT\n\ndefine STG (x) (y) (num)\nswitch costume to (1 v)\nset [ｘ v] to (x)\nset [ｙ v] to (y)\nswitch costume to ((num) + (1))\nset [ｎ v] to ((num) + (1))\ncreate clone of (_myself_ v)\n\ndefine Mov (x) (y)\nswitch costume to (1 v)\ngo to x: (x) y: (y)\nif <<([abs v] of (x position) ) < ([abs v] of (x) )> or <([abs v] of (y position) ) < ([abs v] of (y) )>> then\n    hide\nelse\n    show\nend\nswitch costume to (Ｎ)\n\nwhen I receive [loop! v]\nif <(costume [number v]) = [1]> then\n    broadcast (Power v)\nelse\n    Mov ((Ｘ) - (Flow X)) ((Ｙ) - (Flow Y))\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [stgo! v]\nhide\nSTG ((R) * (0)) ((R) * (0)) [1]\nSTG ((R) * (4.2)) ((R) * (0)) [2]\nSTG ((R) * (8.4)) ((R) * (0)) [3]\nSTG ((R) * (12.6)) ((R) * (0)) [4]\nSTG ((R) * (16.8)) ((R) * (0)) [5]\nSTG ((R) * (21)) ((R) * (0)) [6]\nSTG ((R) * (25.2)) ((R) * (0)) [7]\nSTG ((R) * (29.4)) ((R) * (0)) [8]\nSTG ((R) * (33.6)) ((R) * (0)) [9]\nSTG ((R) * (37.8)) ((R) * (0)) [10]\nSTG ((R) * (42)) ((R) * (0)) [11]\nSTG ((R) * (46.2)) ((R) * (0)) [12]\nSTG ((R) * (50.4)) ((R) * (0)) [13]\nSTG ((R) * (54.6)) ((R) * (0)) [14]\nSTG ((R) * (58.8)) ((R) * (0)) [15]\nswitch costume to (1 v)\nbroadcast (Power v)\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\n@Flow\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\n    switch costume to (<)\n    set x to ((S') + (((R) * (4.82)) * ((<) - (1))))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [stgo! v]\nforever\n    if <((S') / ((R) * (4.82))) < (round ((S') / ((R) * (4.82))))> then\n        set [< v] to ((1) + (round ((S') / ((R) * (-4.82)))))\n    else\n        set [< v] to (round ((S') / ((R) * (-4.82))))\n    end\nend\n\nwhen I receive [stgo! v]\nset [s' v] to [0]\nforever\n    if <key (right arrow v) pressed?> then\n        change [<2 v] by (-0.5)\n    end\n    if <key (left arrow v) pressed?> then\n        change [<2 v] by (0.5)\n    end\n    set [<2 v] to ((0.9) * (<2))\n    change [s' v] by (<2)\nend\n\n@Flow2\n\nwhen I receive [start v]\nshow\nforever\n    go to [back v] layer\n    switch costume to (<)\n    set x to ((S') + (((R) * (4.82)) * (<)))\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\n@背景 Ball\n\nwhen I receive [start v]\npen up\nswitch backdrop to (背景2 v)\nforever\n    set pen size to (pick random (15) to (55))\n    set pen (color v) to (pick random (1) to (99))\n    set pen (saturation v) to (pick random (60) to (99))\n    set pen (transparency v) to (pick random (40) to (70))\n    go to x: (pick random (-240) to (240)) y: (-200)\n    create clone of (_myself_ v)\n    wait (0.2) seconds\nend\n\nwhen I start as a clone\npen down\nglide (pick random (4) to (7)) secs to x: (pick random (-240) to (240)) y: (200)\ndelete this clone\n\nwhen I receive [start v]\nforever\n    erase all\nend\n\n@Logo\n\nwhen flag clicked\nclear graphic effects\nhide\n\nwhen I receive [start v]\ngo to x: (0) y: (0)\nswitch costume to (１ v)\ncreate clone of (_myself_ v)\nset size to (500) %\nswitch costume to (logo v)\nshow\nrepeat (30)\n    change size by (-2)\nend\nwait (3) seconds\nhide\n\nwhen I start as a clone\nset size to (0) %\npoint in direction (90)\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nshow\nrepeat (30)\n    change size by (6)\n    change [ghost v] effect by (-3.1)\nend\nwait (3) seconds\nhide\nset [user 状態 v] to [2]\ndelete this clone\n\nwhen I receive [start v]\nwait (4) seconds\nbroadcast (STGO! v)\n\n@Effect\n\nwhen flag clicked\nhide\n\nwhen I receive [stgo! v]\nforever\n    if <<[5] < ([abs v] of (XP) )> or <[5] < ([abs v] of (YP) )>> then\n        set size to (100) %\n        point in direction (90)\n        set [ghost v] effect to (0)\n        switch costume to (ef v)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen flag clicked\nforever\n    go to x: ([x position v] of [user v]) y: ([y position v] of [user v])\nend\n\nwhen I start as a clone\nshow\nrepeat (20)\n    change size by (-2.5)\n    change [ghost v] effect by (5)\n    change x by (() - (XP))\n    move (2) steps\nend\ndelete this clone\n\nwhen I receive [stgo! v]\nforever\n    change [color v] effect by (0.4)\nend\n\n@Effect2\n\nwhen flag clicked\nhide\n\nwhen I receive [spin v]\nset size to (0) %\nset [ghost v] effect to (0)\nif <[0.5] < (timer)> then\n    create clone of (_myself_ v)\n    reset timer\nend\n\nwhen I start as a clone\nshow\nrepeat (20)\n    change size by (15)\n    change [ghost v] effect by (5)\nend\ndelete this clone\n\nwhen I receive [spin v]\nforever\n    go to x: ([x position v] of [user v]) y: ([y position v] of [user v])\nend\n\n@Bomb\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [ghost v] effect to (100)\n\nwhen I receive [bomb v]\nshow\nrepeat (20)\n    point in direction (pick random (0) to (360))\n    create clone of (_myself_ v)\n    point in direction (pick random (0) to (360))\n    create clone of (_myself_ v)\n    point in direction (pick random (0) to (360))\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nforever\n    go to x: ([x position v] of [user v]) y: ([y position v] of [user v])\nend\n\nwhen I start as a clone\nrepeat (30)\n    change [ghost v] effect by (-3)\n    move (pick random (3) to (7)) steps\nend\ndelete this clone\n\n@スプライト1\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\n@Oborou イ文字\n\nwhen flag clicked\nclear graphic effects\nwait (2) seconds\nset size to (100) %\npoint in direction (90)\nset [ghost v] effect to (100)\nhide\ngo to x: (-150) y: (-120)\nswitch costume to (o v)\ncreate clone of (_myself_ v)\nnext costume\nchange x by (80)\ncreate clone of (_myself_ v)\nnext costume\nchange x by (60)\ncreate clone of (_myself_ v)\nnext costume\nchange x by (60)\ncreate clone of (_myself_ v)\nnext costume\nchange x by (60)\ncreate clone of (_myself_ v)\nnext costume\nchange x by (60)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nrepeat (50)\n    change size by (-1.5)\n    change [ghost v] effect by (-1.5)\nend\nwait (((7) - (costume [number v])) * (0.15)) seconds\nswitch costume to ((costume [number v]) + (18))\nrepeat (30)\n    change size by (1.4)\n    change [ghost v] effect by (2)\nend\nswitch costume to ((costume [number v]) - (6))\nrepeat (30)\n    change size by (-1)\n    change [ghost v] effect by (() - ((100) / (3)))\nend\nrepeat (30)\n    change [brightness v] effect by (-3)\nend\nswitch costume to ((costume [number v]) - (6))\nrepeat (20)\n    change [brightness v] effect by (5)\nend\nrepeat (50)\n    change [ghost v] effect by (2)\nend\ndelete this clone\n\nwhen I start as a clone\nrepeat until <(UserManage) = [1]>\n    go to [front v] layer\nend\n\n@Intro\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(costume [number v]) = [1]> then\n    point in direction (0)\n    go to x: (-500) y: (-500)\n    repeat until <(round (y position)) = [0]>\n        change x by (((Var) - (x position)) / (5)) change y by ((() - (y position)) / (5)) turn (((90) - (direction)) / (5))\n    end\n    wait [1.75]\n    set [brightness v] effect to (-100)\nelse\n    if <(costume [number v]) = [2]> then\n        switch costume to (pick random (2) to (3))\n        set size to (pick random (50) to (150)) %\n        go to (random position v)\n        set [var v] to (pick random (0.1) to (0.5))\n        point in direction (pick random (1) to (360))\n        set [ghost v] effect to (125)\n        if <(costume [number v]) = [2]> then\n            repeat (50)\n                change [ghost v] effect by (-2)\n                move (Var) steps\n            end\n            repeat ((Var) * (100))\n                move (Var) steps\n            end\n            repeat (50)\n                change [ghost v] effect by (2)\n                move (Var) steps\n            end\n            delete this clone\n        else\n            repeat (50)\n                change [ghost v] effect by (-1)\n                move (Var) steps\n            end\n            repeat ((Var) * (100))\n                move (Var) steps\n            end\n            repeat (50)\n                change [ghost v] effect by (1)\n                move (Var) steps\n            end\n            delete this clone\n        end\n    else\n        if <(costume [number v]) = [5]> then\n            point in direction (90)\n            set size to (100) %\n            go to x: (75) y: (0)\n            set [var v] to [75]\n            forever\n                change [var v] by (-150)\n                repeat (15)\n                    change x by (((Var) - (x position)) / (3)) change y by [] turn []\n                    if <(x position) < [-290]> then\n                        delete this clone\n                    end\n                end\n            end\n        else\n            if <(costume [number v]) = [6]> then\n                point in direction (90)\n                set size to (100) %\n                go to x: (-75) y: (0)\n                set [var v] to [-75]\n                forever\n                    change [var v] by (150)\n                    repeat (15)\n                        change x by (((Var) - (x position)) / (3)) change y by [] turn []\n                        if <[290] < (x position)> then\n                            delete this clone\n                        end\n                    end\n                end\n            else\n                if <(costume [number v]) = [4]> then\n                    set [color v] effect to ((current [hour v]) + (pick random (0) to (5.0)))\n                    set [var v] to [0]\n                    set size to (0) %\n                    switch costume to (icon v)\n                    point in direction (180)\n                    repeat (35)\n                        go to [front v] layer\n                        change [color v] effect by (1)\n                        set [var v] to (((Var) * (0.65)) + (((150) - (size)) / (2)))\n                        change x by [] change y by [] turn (((90) - (direction)) / (4))\n                        change size by (Var)\n                    end\n                    set [var v] to [0]\n                    repeat (40)\n                        change [color v] effect by (1)\n                        point in direction ((90) + (([tan v] of (Var) ) / (0.3)))\n                        change [var v] by (4.6)\n                    end\n                    wait [4.9]\n                    set [var v] to [0]\n                    repeat (40)\n                        change [color v] effect by (1)\n                        point in direction ((90) + (([tan v] of (Var) ) / (0.3)))\n                        change [var v] by (4.6)\n                    end\n                    point in direction (90)\n                    wait [7]\n                    set [var v] to [0]\n                    repeat (40)\n                        change [color v] effect by (1)\n                        point in direction ((90) + (([tan v] of (Var) ) / (0.3)))\n                        change [var v] by (4.6)\n                    end\n                    point in direction (90)\n                else\n                    if <(costume [number v]) = [8]> then\n                        point in direction (0)\n                        go to x: (-500) y: (-500)\n                        repeat until <(round (y position)) = [0]>\n                            change x by (((Var) - (x position)) / (5)) change y by ((() - (y position)) / (5)) turn (((90) - (direction)) / (5))\n                        end\n                        wait (1) seconds\n                        repeat (25)\n                            turn right (((direction) - (89)) / (5)) degrees\n                            change x by ((direction) - (90))\n                            change [ghost v] effect by (4)\n                        end\n                        delete this clone\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine change x by (x) change y by (y) turn (di)\nchange x by (x)\nchange y by (y)\nturn right (di) degrees\n\ndefine wait (time)\nwait until <(time) < (timer)>\n\ndefine allow\nswitch costume to (allow v)\ncreate clone of (_myself_ v)\nnext costume\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [number v]) = [4]> then\n    wait (1) seconds\n    forever\n        change size by (50)\n        repeat (14)\n            change size by (((150) - (size)) / (3))\n            go to [front v] layer\n        end\n    end\nelse\n    if <(costume [number v]) = [8]> then\n        forever\n            go to [front v] layer\n        end\n    end\nend\n\nwhen I start as a clone\nif <not <(costume [number v]) = [8]>> then\n    forever\n        if <[10] < (timer)> then\n            broadcast (START v)\n            delete this clone\n        end\n    end\nend\n\nwhen flag clicked\nerase all\nset [usermanage v] to [0]\nhide\nset size to (100) %\ngo to x: (0) y: (0)\npoint in direction (90)\nreset timer\nstart sound [RetroVision-Campfire-NCS-Release2 v]\nset [brightness v] effect to (-50)\nswitch costume to (card v)\nset [var v] to [-225]\nrepeat (5)\n    create clone of (_myself_ v)\n    change [var v] by (120)\n    change [brightness v] effect by (10)\n    wait (0.05) seconds\nend\nclear graphic effects\nwait [1.75]\nswitch costume to (icon v)\ncreate clone of (_myself_ v)\nrepeat until <[9] < (timer)>\n    allow\n    switch costume to (dot v)\n    create clone of (_myself_ v)\n    wait (0.45) seconds\nend\nset [brightness v] effect to (-50)\nswitch costume to (card2 v)\nset [var v] to [-225]\nrepeat (5)\n    create clone of (_myself_ v)\n    change [var v] by (120)\n    wait (0.05) seconds\n    change [brightness v] effect by (10)\nend\n\n