The City | Platformer

Instructions: Hope you enjoy it!\nLove, fav, and follow PLz\nCredits go for @madrid2030 for her Platformer engine edited by me!

@Stage\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\n\nif <not <<(username) = [griffpatch]> or <(username) = [griffpatch_tutor]>>> then\n    stop [all v]\nend\n\nwhen I receive [message - show v]\nswitch backdrop to (reload v)\n\n@スプライト3\n\n@Blank\n\nset [@best time v] to [0]\nset [@crouching v] to [0]\nset [@falling v] to [0]\nset [@fastest player v] to [0]\nset [@fastest time v] to [0]\nset [@level v] to [0]\nset [@on wall v] to [0]\nset [@platform sx v] to [0]\nset [@platform sy v] to [0]\nset [@player die v] to [0]\nset [@player dir v] to [0]\nset [@player emoji v] to [0]\nset [@player mode v] to [0]\nset [@player sx v] to [0]\nset [@player sy v] to [0]\nset [@player x v] to [0]\nset [@player y v] to [0]\nset [@scroll x v] to [0]\nset [@scroll y v] to [0]\nset [@slope v] to [0]\nset [@spawn x v] to [0]\nset [@scroll y v] to [0]\nset [@timer v] to [0]\nset [@totalflags v] to [0]\nset [@walking v] to [0]\nset [☁ cloud1 v] to [0]\nset [☁ cloud2 v] to [0]\nset [☁ cloud3 v] to [0]\nset [☁ cloud4 v] to [0]\nset [☁ cloud5 v] to [0]\nset [☁ cloud6 v] to [0]\nset [☁ cloud7 v] to [0]\nset [☁ cloud8 v] to [0]\nset [☁ cloud9 v] to [0]\nset [☁ online2 v] to [0]\nset [☁ sekakiro v] to [0]\nset [active players v] to [0]\nset [char v] to [0]\nset [chat timer v] to [0]\nset [clones v] to [0]\nset [cnt v] to [0]\nset [cnt2 v] to [0]\nset [cnt3 v] to [0]\nset [debug v] to [0]\nset [fastest v] to [0]\nset [filtered chat v] to [0]\nset [flag count v] to [0]\nset [fps v] to [0]\nset [fps time v] to [0]\nset [frame v] to [0]\nset [j_ v] to [0]\nset [jump key v] to [0]\nset [mouse inactive v] to [0]\nset [reload v] to [0]\nset [sync frames v] to [0]\nset [t v] to [0]\nset [tag player v] to [0]\nset [temp v] to [0]\nset [test v] to [0]\nset [time v] to [0]\nset [time分解 v] to [0]\nset [time分解（0.1秒） v] to [0]\nset [time分解（10秒） v] to [0]\nset [time分解（10分） v] to [0]\nset [time分解（秒） v] to [0]\nset [time分解（分） v] to [0]\nset [worldrankingリストの番号 v] to [0]\nset [スコア（項目no） v] to [0]\nset [スコア（項目no+1） v] to [0]\nset [ベストタイム v] to [0]\nset [ランキング用 v] to [0]\nset [リストの表示数 v] to [0]\nset [交換フラグ v] to [0]\nset [交換フラグ２ v] to [0]\nset [実行フラグ v] to [0]\nset [項目no v] to [0]\nset [項目no２ v] to [0]\nset [交換フラグ v] to [0]\nset [順位_ v] to [0]\nset [世界記録表示 v] to [0]\nset [待避用変数 v] to [0]\n\nset [debug v] to [0]\nset [@best time v] to [0]\n\nwhen [m v] key pressed\nif <(DEBUG) = [1]> then\n    set [@spawn x v] to (@Player X)\n    set [@spawn y v] to (@Player Y)\nend\n\n@Game\n\ndefine fix player (x) (y)\nset [t v] to [1]\nrepeat ((length of [fix v]) / (2))\n    set [@player x v] to ((x) + (item (t) of [fix v]))\n    set [@player y v] to ((y) + (item ((t) + (1)) of [fix v]))\n    Check Collide\n    if <(touch) = [0]> then\n        stop [this script v]\n    end\n    change [t v] by (2)\nend\nset [@player x v] to (x)\nset [@player y v] to (y)\n\ndefine Move Out Of Collision dir x,y: (dx) (dy) limit: (limit)\nset [lim v] to [1]\nrepeat until <<(lim) > (limit)> or <(touch) < [100]>>\n    change [@player x v] by (dx)\n    change [@player y v] by (dy)\n    change [lim v] by (1)\n    Check Collide\nend\nif <(lim) > (limit)> then\n    change [@player x v] by ((0) - ((dx) * (limit)))\n    change [@player y v] by ((0) - ((dy) * (limit)))\n    if <<(@Player SX) = [0]> or <not <(dx) = [0]>>> then\n        set [@player die v] to [1]\n    else\n        Check Collide\n        if <(@Player SX) > []> then\n            if <(@Player SX) > [0.01]> then\n                Move Out Of Collision dir x,y: (-1) (0) limit: (24)\n            else\n                if <(@Player SX) < [-0.01]> then\n                    Move Out Of Collision dir x,y: (1) (0) limit: (24)\n                end\n            end\n        end\n        set [@player sx v] to [0]\n    end\n    set [lim v] to [999]\nend\n\ndefine Check Collide\ngo to x: (round ((@Player X) - (@Scroll X))) y: (round ((@Player Y) - (@Scroll Y)))\nif <touching (level v)?> then\n    set [touch v] to [101]\nelse\n    if <touching (moving platform v)?> then\n        set [touch v] to [102]\n    else\n        set [touch v] to [0]\n    end\nend\n\ndefine Scroll Level\nchange [@scroll x v] by (round (((@Player X) - (@Scroll X)) * (0.1)))\nif <(@Scroll X) < [-370]> then\n    set [@scroll x v] to [-370]\nend\nchange [@scroll y v] by (round (((@Player Y) - (@Scroll Y)) * (0.1)))\nif <(@Scroll Y) < [0]> then\n    set [@scroll y v] to [0]\nend\n\ndefine Player Tick\nif <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<key (space v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>>> then\n    change [jump key v] by (1)\nelse\n    set [jump key v] to [0]\nend\nset [pushed sx v] to [0]\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n    set [key left right v] to [1]\n    set [mouse inactive v] to [0]\nelse\n    if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n        set [key left right v] to [-1]\n        set [mouse inactive v] to [0]\n    else\n        set [key left right v] to [0]\n    end\nend\nPlayer Tick - Fix Up\nPlayer Tick - Crouch / Jump Key\nPlayer Tick - Left / Right\nPlayer Tick - Up / Down\nif <touching (lava v)?> then\n    set [@player die v] to [1]\nend\n\ndefine Reset Player\nset [@player x v] to (@Spawn X)\nset [@player y v] to (@Spawn Y)\nset [@scroll x v] to (@Player X)\nset [@scroll y v] to (@Player Y)\nset [@player sx v] to [0]\nset [@player sy v] to [0]\nset [@falling v] to [0]\nset [@walking v] to [-1]\nset [@player die v] to [0]\nset [@player mode v] to [0]\nset [onground v] to [100]\nset [@slope v] to [0]\nset [@crouching v] to [0]\ndelete all of [debug v]\ndelete all of [slope history v]\nScroll Level\n\nwhen flag clicked\ndelete all of [emoji spawn v]\nset [@best time v] to [0]\nset [last user v] to (username)\nif <<(username) = [griffpatch_tutor]> or <(username) = [griffpatch]>> then\n    set [reload v] to [29]\n    set [☁ online2 v] to (reload)\nelse\n    if <not <(reload) = (☁ ONLINE2)>> then\n        \n            broadcast (Message - Show v) and wait\n        end\n    end\nend\nbroadcast (Green Flag v) and wait\nbroadcast (Cloud - Setup v) and wait\nset [frame v] to [0]\nset [fps time v] to [1]\nset [ghost v] effect to (100)\nset [@level v] to [1]\nset [@totalflags v] to [0]\nset [@timer v] to [0]\nset [@player dir v] to [90]\nif <(DEBUG) < [1]> then\n    set [@spawn x v] to [-500]\n    set [@spawn y v] to [76]\nend\nset [clock v] to [0]\nReset Player\nbroadcast (setup level v) and wait\nbroadcast (game loop tick v) and wait\ngo to [front v] layer\nbroadcast (pre game loop v)\nrepeat until < or <(MOUSE INACTIVE) > [10000]>>\n    broadcast (Player - pre-move v)\n    broadcast (Player - Begin Frame v)\n    broadcast (game loop tick v)\n    broadcast (Cloud - tick v)\n    broadcast (Players - Tick v)\n    if <(DEBUG) = [1]> then\n        if <key (p v) pressed?> then\n            wait until <not <key (p v) pressed?>>\n            repeat until <key (p v) pressed?>\n                broadcast (game loop tick v)\n            end\n            wait until <not <key (p v) pressed?>>\n        end\n    end\nend\nbroadcast (Message - Show v) and wait\n\nwhen I receive [player - pre-move v]\nset [last fastest v] to (@Fastest Player)\nif <<(@Fastest Time) > [0]> and <(@Fastest Time) < [9999999]>> then\n    Show Time (@Fastest Time)\n    set [fastest v] to (join [Fastest: ] (join (join (@Fastest Player) [: ]) (TIME)))\nelse\n    set [fastest v] to [Awaiting Fastest Time...]\nend\nget speed (@Player SX) (@Player SY)\nset [active players v] to [1]\nset [@platform sx v] to []\nset [@platform sy v] to []\nchange [@timer v] by (1)\nif <<not <(@Player X) = [-500]>> and <(FLAG COUNT) > [0]>> then\n    change [clock v] by (1)\nend\nShow Time (clock)\nchange [mouse inactive v] by (1)\nif <not <<(mouse x) = (mouse x)> and <(mouse y) = (mouse y)>>> then\n    set [mouse x v] to (mouse x)\n    set [mouse y v] to (mouse y)\n    set [mouse inactive v] to [0]\nend\nif <(@Best Time) > [0]> then\n    set [@fastest time v] to (@Best Time)\n    set [@fastest player v] to (username)\nelse\n    set [@fastest time v] to [9999999]\n    set [@fastest player v] to []\nend\n\nwhen I receive [player - begin frame v]\nswitch costume to (hitbox v)\nif <(@Player Die) = [0]> then\n    Player Tick\n    if <(@Player Y) < [-200]> then\n        set [@player die v] to [25]\n    end\nelse\n    change [@player die v] by (1)\n    if <(@Player Die) > [60]> then\n        Reset Player\n    end\nend\nif <<key (q v) pressed?> and <key (r v) pressed?>> then\n    set [@spawn x v] to [-500]\n    set [@spawn y v] to [76]\n    set [clock v] to [0]\n    Reset Player\n    set [kimitatihadoutobunoka? v] to [0]\n    broadcast (Reset v)\nend\nif <(@crouching) = [2]> then\n    Check Slide []\nend\nSlope Detect\nScroll Level\n\ndefine Show Time (frame)\nset [t v] to ([floor v] of (((frame) / (30)) * (10)) )\nset [time v] to ((t) mod (10))\nset [t v] to ([floor v] of ((t) / (10)) )\nset [time v] to (join [.] (TIME))\nset [time v] to (join ((t) mod (10)) (TIME))\nset [t v] to ([floor v] of ((t) / (10)) )\nset [time v] to (join ((t) mod (6)) (TIME))\nset [t v] to ([floor v] of ((t) / (6)) )\nset [time v] to (join ['] (TIME))\nset [time v] to (join ((t) mod (10)) (TIME))\nset [t v] to ([floor v] of ((t) / (10)) )\nif <(t) = [0]> then\n    stop [this script v]\nend\nset [time v] to (join ((t) mod (10)) (TIME))\nset [time v] to (join [:] (TIME))\nset [time v] to (join ((t) mod (10)) (TIME))\nset [t v] to ([floor v] of ((t) / (10)) )\nif <((t) mod (10)) > [0]> then\n    set [time v] to (join ((t) mod (10)) (TIME))\nend\n\ndefine Slope Detect\ngo to x: (round ((@Player X) - (@Scroll X))) y: (round ((@Player Y) - (@Scroll Y)))\nif <<(@Falling) > [2]> or <(@walking) > [-1]>> then\n    set [@slope v] to [0]\nelse\n    switch costume to (slope-4 v)\n    if <<touching (level v)?> or <touching (moving platform v)?>> then\n        next costume\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            next costume\n            if <<touching (level v)?> or <touching (moving platform v)?>> then\n                next costume\n                if <<touching (level v)?> or <touching (moving platform v)?>> then\n                    next costume\n                end\n            end\n        end\n    end\n    set [@slope v] to ((costume [number v]) - (7))\n    switch costume to (slope4 v)\n    if <<touching (level v)?> or <touching (moving platform v)?>> then\n        switch costume to (slope3 v)\n        if <<touching (level v)?> or <touching (moving platform v)?>> then\n            switch costume to (slope2 v)\n            if <<touching (level v)?> or <touching (moving platform v)?>> then\n                switch costume to (slope1 v)\n                if <<touching (level v)?> or <touching (moving platform v)?>> then\n                    switch costume to (slope-1 v)\n                end\n            end\n        end\n    end\n    change [@slope v] by ((costume [number v]) - (6))\nend\ndelete (3) of [slope history v]\ninsert (@Slope) at (1) of [slope history v] \nchange [@slope v] by (item (2) of [slope history v])\nchange [@slope v] by (item (3) of [slope history v])\nset [@slope v] to (round ((@Slope) / (length of [slope history v])))\nswitch costume to (hitbox v)\n\ndefine Player Tick - Fix Up\nif <(on platform) = []> then\n    Check Collide\n    if <(touch) = [102]> then\n        set [pushed sx v] to (@Player X)\n        change [@player x v] by (@Platform SX)\n        Check Collide\n        if <(touch) > [100]> then\n            if <(touch) = [102]> then\n                fix player (@Player X) (@Player Y)\n            else\n                Move Out Of Collision dir x,y: (0) (1) limit: (([abs v] of (@Platform SX) ) + (2))\n                if <(@Player Die) > [0]> then\n                    set [pushed sx v] to [0]\n                    stop [this script v]\n                end\n                set [@player sy v] to [0]\n                set [@falling v] to [0]\n            end\n        end\n        set [pushed sx v] to ((@Player X) - (pushed sx))\n        set [@platform sx v] to [0]\n    end\nelse\n    Check Collide\n    if <(touch) > [0]> then\n        fix player (@Player X) (@Player Y)\n    end\nend\n\ndefine Player Tick - Crouch / Jump Key\nif <(DEBUG) > [0]> then\n    if <key (2 v) pressed?> then\n        set [@player sy v] to [8]\n        set [@falling v] to [4]\n        set [@player mode v] to []\n        stop [this script v]\n    end\nend\nset [t v] to <<key (down arrow v) pressed?> or <<key (s v) pressed?> or <key (z v) pressed?>>>\nif <<(t) = [true]> and <<(@Falling) < [3]> or <(@crouching) > [1]>>> then\n    set [@on wall v] to [0]\n    \n        Check Slide ((@Player SX) / ([abs v] of (@Player SX) ))\n    end\n    if <<not <(key left right) = [0]>> and <([abs v] of (@Player SX) ) > [0]>> then\n        if <([abs v] of (@Slope) ) > [1]> then\n            if <<(@Slope) < [0]> = <(@Player SX) < [0]>> then\n                set [@crouching v] to [2]\n            end\n        end\n    end\n    if <(@crouching) < [2]> then\n        if <([abs v] of (@Slope) ) < [2]> then\n            set [@crouching v] to [1]\n        else\n            if <(@crouching) > [0]> then\n                set [@crouching v] to [-3]\n            end\n            if <(@crouching) < [0]> then\n                change [@crouching v] by (1)\n            end\n        end\n    end\nelse\n    if <(@crouching) > [0]> then\n        set [@crouching v] to [-3]\n    end\n    if <(@crouching) < [0]> then\n        change [@crouching v] by (1)\n    end\n    if <<(t) = [true]> and <(@On Wall) > [0]>> then\n        set [@on wall v] to [0]\n    end\nend\nif <<(JUMP KEY) > [0]> and <(@Falling) < [3]>> then\n    set [@falling v] to [3]\n    set [onground v] to [0]\n    if <<not <(@crouching) = [0]>> and <(JUMP KEY) < [2]>> then\n        set [@crouching v] to [0]\n        if <<not <(key left right) = [0]>> and <([abs v] of (@Player SX) ) > [1]>> then\n            accelerate ((7) * ((@Player SX) / ([abs v] of (@Player SX) ))) percent [1]\n            set [@player sy v] to [10]\n            set [@player mode v] to [long jump]\n            if <([abs v] of (@Player SX) ) > [9]> then\n                set [@player sx v] to ((10) * ((@Player SX) / ([abs v] of (@Player SX) )))\n            end\n        else\n            set [@player sy v] to [17]\n            set [@player mode v] to [High jump]\n        end\n    else\n        set [@crouching v] to [0]\n        set [@player sy v] to [14]\n        set [@player mode v] to [jump]\n    end\nelse\n    if <(@On Wall) > [0]> then\n        if <(JUMP KEY) = [1]> then\n            Wall Kick / Jump\n        else\n            if <<(JUMP KEY) > [0]> and <((key left right) * (-90)) = (@Player Dir)>> then\n                Wall Kick / Jump\n            end\n        end\n    end\nend\n\ndefine Player Tick - Up / Down\nif <(@Player SY) > [-16]> then\n    if <<(@Player Mode) = [long jump]> and <(@Player SY) > [-10]>> then\n        change [@player sy v] by (-0.6)\n    else\n        if <<(@On Wall) > [0]> and <(@Player SY) < [1]>> then\n            change [@player sy v] by (((-5) - (@Player SY)) * (0.1))\n        else\n            change [@player sy v] by (-1.2)\n        end\n    end\nend\nif <<(@Player SY) < [-8]> and <<key (space v) pressed?> and <(FLAG COUNT) < [1]>>> then\n    set [@player mode v] to [Parachute]\nend\nif <(@Player Mode) = [Parachute]> then\n    set [@player sy v] to ((@Player SY) * (0.6))\n    if <not <key (space v) pressed?>> then\n        set [@player mode v] to []\n    end\nend\nchange [@player y v] by (@Player SY)\nif <not <(on platform) = []>> then\n    change [@player y v] by (-5)\n    Check Collide\n    if <not <(touch) = [102]>> then\n        change [@player y v] by (5)\n    end\nend\nset [on platform v] to [0]\nif <(@crouching) = [2]> then\n    change [@player y v] by (-4)\nend\nCheck Collide\nif <(touch) = [102]> then\n    set [on platform v] to (@Platform SX)\nelse\n    set [on platform v] to []\nend\nchange [onground v] by (1)\nif <(onGround) > [4]> then\n    set [@player mode v] to []\nend\nif <(touch) > [100]> then\n    if <<(@Player Mode) = [Long Jump]> or <(@Player Mode) = [Wall Jump]>> then\n        set [@player mode v] to []\n    end\n    if <(@Player SY) > [0]> then\n        Move Out Of Collision dir x,y: (0) (-1) limit: (22)\n        if <(@Player Die) > [0]> then\n            set [@player die v] to [0]\n            Move Out Of Collision dir x,y: (0) (1) limit: (22)\n            set [@player sy v] to ((@Player SY) / (2))\n            set [@falling v] to [0]\n        else\n            set [@falling v] to [3]\n            set [@player sy v] to [0]\n        end\n        set [onground v] to [0]\n    else\n        slide off ledge\n        if <(@Player Mode) = [Parachute]> then\n            set [@player mode v] to []\n        end\n        Move Out Of Collision dir x,y: (0) (1) limit: (22)\n        if <(@Player Die) > [0]> then\n            set [@player die v] to [0]\n            Move Out Of Collision dir x,y: (0) (-1) limit: (22)\n            set [@falling v] to [3]\n            set [@player sy v] to ((@Platform SY) - (2))\n        else\n            if <(@crouching) = [2]> then\n                set [@player sy v] to ((@Player SY) / (1.5))\n            else\n                set [@player sy v] to ((@Player SY) / (2))\n            end\n            set [@falling v] to [0]\n        end\n    end\nelse\n    set [onground v] to [0]\n    change [@falling v] by (1)\nend\n\ndefine Player Tick - Left / Right\nif <<<(@Player Mode) = [long jump]> or <(@Player Mode) = [Wall jump]>> and <(@Player SY) > [5]>> then\nchange [@player x v] by (@Player SX)\nCheck Collide\nif <(touch) > [100]> then\n    if <<(@Player Mode) = [Long Jump]> or <(@Player Mode) = [Wall Jump]>> then\n        set [@player mode v] to []\n    end\n    Move Out Of Collision dir x,y: (0) (1) limit: (round ((([abs v] of (@Player SX) ) * (2)) + (2)))\n    if <<(lim) > [2]> and <(lim) < [999]>> then\n        set [@player sx v] to ((@Player SX) * (0.6))\n        Check Still On Wall\n    else\n        if <<(@Falling) > [2]> and <(@Player SY) < [6]>> then\n            if <not <(@Player Mode) = [Parachute]>> then\n                change [@on wall v] by (1)\n                set [@player mode v] to []\n            end\n        else\n            set [@on wall v] to [0]\n        end\n    end\nelse\n    Check Still On Wall\nend\nif <not <(pushed sx) = [0]>> then\n    accelerate (pushed sx) percent [0.5]\nend\nif <(@Player X) < [-605]> then\n    set [@player x v] to [-605]\nend\n\ndefine Check Still On Wall\nif <(@On Wall) = [0]> then\n    stop [this script v]\nend\nif <(@Falling) < [1]> then\n    set [@on wall v] to [0]\n    stop [this script v]\nend\nchange [@player x v] by ((@Player Dir) / (45))\nCheck Collide\nchange [@player x v] by ((@Player Dir) / (-45))\nif <(touch) = [0]> then\n    set [@on wall v] to [0]\n    stop [this script v]\nend\n\ndefine Wall Kick / Jump\nset [@falling v] to [3]\nset [onground v] to [0]\nset [@player dir v] to ((-1) * (@Player Dir))\nset [@player sx v] to ((7) * ((@Player Dir) / ([abs v] of (@Player Dir) )))\nset [@player sy v] to [14]\nset [@player mode v] to [wall jump]\nset [@crouching v] to [0]\nset [@on wall v] to [0]\n\ndefine Check Slide (dir1)\nswitch costume to (hitbox v)\nset [t v] to (@Player Y)\ngo to x: (round ((@Player X) - (@Scroll X))) y: (round ((@Player Y) - (@Scroll Y)))\nrepeat (2)\n    change [@player y v] by (-1)\n    change y by (-1)\n    if <<<touching (level v)?> or <touching (moving platform v)?>> or <touching (level v)?>> then\n        change y by (1)\n        change [@player y v] by (1)\n        set [@falling v] to [0]\n        stop [this script v]\n    end\nend\nset [@player y v] to (t)\nset [@slope v] to [0]\n\ndefine accelerate (target) percent (friction)\nset [lim v] to (((target) - (@Player SX)) * (friction))\nif <<(@Falling) < [3]> or <(key left right) = [0]>> then\n    change [@player sx v] by (lim)\n    stop [this script v]\nend\nif <<(key left right) > [0]> = <(lim) > [0]>> then\n    change [@player sx v] by (lim)\n    stop [this script v]\nend\n\ndefine slide off ledge\nchange [@player x v] by (-2)\nchange [@player y v] by (-5)\nCheck Collide\nchange [@player y v] by (5)\nchange [@player x v] by (1)\nif <(touch) = [0]> then\n    Check Collide\n    if <(touch) = [0]> then\n        stop [this script v]\n    end\nend\nchange [@player x v] by (3)\nchange [@player y v] by (-5)\nCheck Collide\nchange [@player y v] by (5)\nchange [@player x v] by (-1)\nif <(touch) = [0]> then\n    Check Collide\n    if <(touch) = [0]> then\n        stop [this script v]\n    end\nend\nchange [@player x v] by (-1)\n\ndefine get speed (dx) (dy)\nset [player speed v] to ([sqrt v] of (((dx) * (dx)) + ((dy) * (dy))) )\nset [start x v] to (@Player X)\nset [start y v] to (@Player Y)\n\nset [fastest v] to [0]\n\n@Player\n\ndefine Set Costume (costume#)\nif <not <(costume#) = (costume [number v])>> then\n    switch costume to (costume#)\n    if <(costume#) = [14]> then\n        point in direction (90)\n        set rotation style [all around v]\n    else\n        set rotation style [left-right v]\n    end\nend\n\nwhen I receive [setup level v]\nset rotation style [left-right v]\ndelete all of [record v]\nshow\nwait (0.1) seconds\ngo to [front v] layer\n\nwhen I receive [game loop tick v]\ngo to x: (round ((@Player X) - (@Scroll X))) y: (round ((@Player Y) - (@Scroll Y)))\nif <(@Player Die) = [0]> then\n    if <(last Die) > [0]> then\n        set size to (100) %\n        set [ghost v] effect to (0)\n    end\n    if <<(@Player Mode) = [Long Jump]> or <(@Player Mode) = [Wall Jump]>> then\n        Set Costume (14)\n        turn right ((20) * ((@Player SX) / ([abs v] of (@Player SX) ))) degrees\n        change y by (12)\n    else\n        if <<(@Player Mode) = [High Jump]> and <(@Falling) > [2]>> then\n            if <(@Player SY) > [12]> then\n                Set Costume (2)\n            else\n                set [t v] to (item ((round (((12) - (@Player SY)) / (1.3))) + (1)) of [flip costumes v])\n                if <(t) > []> then\n                    Set Costume (t)\n                else\n                    Set Costume (4)\n                end\n            end\n        else\n            if <(@On Wall) > [0]> then\n                Set Costume (20)\n            else\n                if <(@Player Mode) = [Parachute]> then\n                    Set Costume (13)\n                else\n                    if <(@crouching) > [0]> then\n                        if <(@crouching) = [2]> then\n                            Set Costume (21)\n                        else\n                            Set Costume (8)\n                        end\n                    else\n                        if <(@Falling) > [3]> then\n                            if <(@Player SY) > [0]> then\n                                Set Costume (2)\n                            else\n                                if <(@Player SY) > [-2]> then\n                                    Set Costume (3)\n                                else\n                                    Set Costume (4)\n                                end\n                            end\n                        else\n                            if <(@walking) < [0]> then\n                                if <(@Slope) = [0]> then\n                                    Set Costume (1)\n                                else\n                                    if <(@Slope) < [0]> then\n                                        set [@player dir v] to [90]\n                                        Set Costume ((8) + ([abs v] of (@Slope) ))\n                                    else\n                                        set [@player dir v] to [-90]\n                                        Set Costume ((8) + ([abs v] of (@Slope) ))\n                                    end\n                                end\n                            else\n                                if <((@walking) mod (9)) < [3]> then\n                                    Set Costume (5)\n                                else\n                                    if <((@walking) mod (9)) < [6]> then\n                                        Set Costume (6)\n                                    else\n                                        Set Costume (7)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n        if <not <(@Player Dir) = (direction)>> then\n            point in direction (@Player Dir)\n        end\n    end\nelse\n    if <(@Player Die) < [25]> then\n        set size to ((size) + (10)) %\n        change [ghost v] effect by (4)\n        change [@player y v] by (-1)\n    else\n        change [ghost v] effect by (100)\n    end\n    set [last die v] to [1]\nend\nif <((@timer) mod (2)) = [0]> then\n    add (round (@Player X)) to [record v]\n    add (round (@Player Y)) to [record v]\n    if <(@Player Die) > [0]> then\n        add [0] to [record v]\n    else\n        if <(@Player Emoji) > [0]> then\n            add ((@Player Emoji) + (100)) to [record v]\n            set [@player emoji v] to []\n        else\n            if <(direction) < [0]> then\n                add ((0) - (costume [number v])) to [record v]\n            else\n                add (costume [number v]) to [record v]\n            end\n        end\n    end\nend\nif <(username) = ([last fastest v] of [game v])> then\n    set [brightness v] effect to (0)\n    change [color v] effect by (10)\nelse\n    set [brightness v] effect to (100)\n    set [color v] effect to (0)\nend\n\nwhen flag clicked\nforever\n    if <touching color (#97ff12)?> then\n        change [@player sy v] by (10)\n    end\nend\n\nwhen [v v] key pressed\nif <key (b v) pressed?> then\n    set [@player die v] to [1]\nend\n\nwhen flag clicked\nset [水 v] to [1500]\nforever\n    if <(水) < [0]> then\n        set [@player die v] to [1]\n        set [水 v] to [1500]\n    end\n    wait until <(@Player Die) = [0]>\n    if <touching color (#00ffd9)?> then\n        set [水 v] to [1500]\n        set [水分　moisture v] to (join (round ((水) / (15))) [%])\n    else\n        if <touching color (#ff1212)?> then\n            change [水 v] by (-3)\n            set [水分　moisture v] to (join (round ((水) / (15))) [%])\n        else\n            if <touching color (#ffa313)?> then\n                change [水 v] by (-6)\n                set [水分　moisture v] to (join (round ((水) / (15))) [%])\n            else\n                if <touching color (#ffffff)?> then\n                    change [水 v] by (-10)\n                    set [水分　moisture v] to (join (round ((水) / (15))) [%])\n                else\n                    if <touching color (#0016ff)?> then\n                        change [水 v] by (-15)\n                        set [水分　moisture v] to (join (round ((水) / (15))) [%])\n                    else\n                        change [水 v] by (-1)\n                        set [水分　moisture v] to (join (round ((水) / (15))) [%])\n                    end\n                end\n            end\n        end\n    end\nend\n\n@Cloud Players\n\nwhen I receive [players - tick v]\nif <(pid) > [0]> then\n    Player Tick (item (pid) of [player names v])\nend\n\ndefine Player Tick (name)\nif <not <(name) = (username)>> then\n    set [username v] to (name)\n    set [¬inactive v] to [0]\n    delete all of [parsenext v]\n    set [player best v] to [0]\n    set [parsestr v] to []\n    set [lastframestart v] to []\n    if <(name) = []> then\n        hide\n    else\n        init\n    end\nend\nif <(name) = []> then\n    stop [this script v]\nend\nif <[] = [griffpatch]> then\n    say (¬inactive)\nend\nchange [active players v] by (1)\nif <(item (pid) of [pdata v]) > []> then\n    if <not <(skip) < [7]>> then\n        set [parsestr v] to []\n    end\n    set [skip v] to [0]\n    set [¬inactive v] to [0]\n    add (item (pid) of [pdata v]) to [parsenext v]\n    add (item (pid) of [pidx v]) to [parsenext v]\n    replace item (pid) of [pdata v] with []\n    if <(length of [parsenext v]) > [12]> then\n        repeat until <(length of [parsenext v]) < [7]>\n            delete (1) of [parsenext v]\n            delete (1) of [parsenext v]\n        end\n        if <((((¬frame) - (@timer)) + (0)) mod (SYNC FRAMES)) = [0]> then\n            skip forward (¬frame)\n        else\n            set [parsestr v] to []\n        end\n    end\n    if <(parseStr) = []> then\n        Catch up\n    end\nend\nif <(parseStr) > []> then\n    if <((((¬frame) - (@timer)) + (0)) mod (SYNC FRAMES)) = [0]> then\n        change [¬frame v] by (1)\n        if <(skip) < [7]> then\n            if <((¬frame) mod (2)) = [0]> then\n                Process Tick [2]\n            else\n                change [~x v] by (sx)\n                change [~y v] by (sy)\n            end\n        else\n            change [parseidx v] by (3)\n        end\n    end\nelse\n    change [¬inactive v] by (1)\n    if <(¬inactive) > [30]> then\n        replace item (pid) of [player names v] with []\n        hide\n        stop [this script v]\n    end\nend\nif <(~y) < [-240]> then\n    hide\n    if <[] = [griffpatch]> then\n        show\n        say (~y)\n    end\n    stop [this script v]\nend\nif <(costume) = [0]> then\n    set size to ((size) + (10)) %\n    change [ghost v] effect by (4)\n    position ((~x) - (@Scroll X)) ((~y) - (@Scroll Y))\nelse\n    Set Costume ([abs v] of (costume) )\n    set [ghost v] effect to (0)\n    if <(costume [number v]) = [14]> then\n        turn right ((20) * ((sx) / ([abs v] of (sx) ))) degrees\n        position ((~x) - (@Scroll X)) (((~y) - (@Scroll Y)) + (12))\n    else\n        if <<(costume) < [0]> = <(direction) > [0]>> then\n            point in direction ((0) - (direction))\n        end\n        position ((~x) - (@Scroll X)) ((~y) - (@Scroll Y))\n    end\nend\nif <<(player best) > [0]> and <(player best) < (@Fastest Time)>> then\n    if <<(~y) < [10000]> and <(¬ok) > [25]>> then\n        set [@fastest time v] to (player best)\n        set [@fastest player v] to (username)\n    end\nend\nif <(username) = ([last fastest v] of [game v])> then\n    change [color v] effect by (10)\nelse\n    set [color v] effect to (-110)\nend\n\nwhen I start as a clone\nchange [clones v] by (1)\nset [pid v] to (CLONES)\nset [~x v] to [0]\nset [~y v] to [0]\nset [action v] to []\nset [team v] to []\nset [color v] to [0xff7000]\nset [immune v] to [0]\nset [costume v] to [1]\n\nwhen I receive [green flag v]\nset [color v] effect to (-110)\nhide\nset [show names v] to [2]\nset [pid v] to [0]\nset [clones v] to [0]\nset [username v] to (username)\nset [action v] to []\nset [team v] to []\nset [lastcmd v] to []\nset [immune v] to [0]\nset [player best v] to [0]\ninit\n\ndefine init\nset [¬frame v] to [0]\nset [¬ok v] to [0]\nset [skip v] to [0]\nif <<(username) = [griffpatch]> or <(username) = [griffpatch_tutor]>> then\n    set [color v] effect to (15)\nelse\n    set [color v] effect to (-110)\nend\n\ndefine Read Number\nset [?val v] to []\nrepeat (letter (parseIdx) of (parseStr))\n    change [parseidx v] by (1)\n    set [?val v] to (join (?Val) (letter (parseIdx) of (parseStr)))\nend\nif <(letter (1) of (?Val)) = [0]> then\n    set [?val v] to ((0) - (?Val))\nend\nchange [parseidx v] by (1)\n\ndefine Read Change\nset [?val v] to (join (letter (parseIdx) of (parseStr)) (letter ((parseIdx) + (1)) of (parseStr)))\nchange [parseidx v] by (2)\nif <(?Val) = [0]> then\n    Read Number\nelse\n    change [?val v] by (-50)\nend\n\ndefine position (x) (y)\nshow\nif <<([abs v] of (x) ) > [250]> or <([abs v] of (y) ) > [190]>> then\n    if <(skip) < [1]> then\n        set [skip v] to ([ceiling v] of ((([abs v] of (x) ) + ([abs v] of (y) )) / (180)) )\n    end\n    switch costume to (offscreen v)\n    set rotation style [left-right v]\n    set size to (100) %\n    set [_i v] to (((y) / ([abs v] of (x) )) * (235))\n    if <([abs v] of (_i) ) < [175]> then\n        go to x: ((235) * ((x) / ([abs v] of (x) ))) y: (_i)\n    else\n        set [_i v] to (((x) / ([abs v] of (y) )) * (175))\n        go to x: (_i) y: ((175) * ((y) / ([abs v] of (y) )))\n    end\nelse\n    set [skip v] to [0]\n    if <(costume) = [0]> then\n        go to x: (round (x)) y: (round (y))\n    else\n        go to x: (round (x)) y: (round (y))\n        if <not <(size) = [100]>> then\n            set size to (100) %\n        end\n    end\n    if <<(distance to [mouse-pointer v]) < [50]> and <(MOUSE INACTIVE) < [45]>> then\n        if <(name time) < [1]> then\n            say (username)\n        end\n        set [name time v] to [30]\n    end\nend\nif <(name time) > [0]> then\n    change [name time v] by (-1)\n    if <not <(name time) > [0]>> then\n        say []\n    end\nend\n\ndefine Process Tick (rate)\nrepeat until <(parseIdx) < (length of (parseStr))>\n    if <(length of [parsenext v]) = [0]> then\n        set [parsestr v] to []\n        stop [this script v]\n    end\n    Catch up\nend\nRead Change\nset [sx v] to ((?Val) / (rate))\nchange [~x v] by (sx)\nRead Change\nset [sy v] to ((?Val) / (rate))\nchange [~y v] by (sy)\nRead Change\nif <(?Val) > [100]> then\n    add (?Val) to [emoji spawn v]\n    add (~x) to [emoji spawn v]\n    add (~y) to [emoji spawn v]\nelse\n    set [costume v] to (?Val)\nend\n\ndefine Catch up\nset [parsestr v] to (item (3) of [parsenext v])\nset [parseidx v] to (item (4) of [parsenext v])\nRead Number\nrepeat until <<(?Val) > (¬frame)> or <(?Val) = []>>\n    delete (1) of [parsenext v]\n    delete (1) of [parsenext v]\n    set [parsestr v] to (item (3) of [parsenext v])\n    set [parseidx v] to (item (4) of [parsenext v])\n    Read Number\nend\nset [parsestr v] to (item (1) of [parsenext v])\nset [parseidx v] to (item (2) of [parsenext v])\nset [t v] to (parseIdx)\ndelete (1) of [parsenext v]\ndelete (1) of [parsenext v]\nRead Number\nif <not <(lastFrameStart) < (?Val)>> then\n    set [¬ok v] to [0]\n    set [parsestr v] to []\n    stop [this script v]\nend\nchange [¬ok v] by (1)\nset [lastframestart v] to (?Val)\nRead Number\nset [player best v] to (?Val)\nif <(lastFrameStart) < (¬frame)> then\n    set [_i v] to ((¬frame) - (lastFrameStart))\n    Read Number\n    set [~x v] to (?Val)\n    Read Number\n    set [~y v] to (?Val)\n    Read Change\n    repeat ([floor v] of (((_i) / (2)) - (1)) )\n        Read Change\n        if <(?Val) < [-49]> then\n            Catch up\n            stop [this script v]\n        end\n        change [~x v] by (?Val)\n        Read Change\n        change [~y v] by (?Val)\n        Read Change\n    end\n    set [costume v] to (?Val)\n    set [sx v] to [0]\n    set [sy v] to [0]\nelse\n    set [¬frame v] to (lastFrameStart)\n    Read Number\n    set [~x v] to (?Val)\n    Read Number\n    set [~y v] to (?Val)\n    Read Change\n    set [costume v] to (?Val)\n    set [sx v] to [0]\n    set [sy v] to [0]\nend\n\ndefine skip forward (from frame)\nCatch up\nset [¬frame v] to ((lastFrameStart) + ((from frame) mod (SYNC FRAMES)))\n\nwhen I receive [setup level v]\nwait (0.05) seconds\ngo to [front v] layer\n\ndefine Set Costume (costume#)\nif <not <(costume#) = (costume [number v])>> then\n    switch costume to (costume#)\n    if <(costume#) = [14]> then\n        point in direction (90)\n        set rotation style [all around v]\n    else\n        set rotation style [left-right v]\n    end\nend\n\nset [parsestr v] to [15424325242256505042555314638505038505038505038505038505038505038505038505038505038505038505038505038505038505038505038]\nset [parseidx v] to [14]\n\nRead Number\n\nRead Change\n\n@Level\n\nwhen I receive [setup level v]\nsetup\n\ndefine setup clone at x,y: (x) (y)\ngo to x: (0) y: (0)\nhide\nset [showing v] to [0]\nset [x v] to (round ((x) * (460)))\nset [y v] to (round ((y) * (340)))\nset [costume v] to (costume [number v])\ncreate clone of (_myself_ v)\n\ndefine position (x) (y)\nif <(showing) = [1]> then\n    switch costume to (big v)\nend\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    set [showing v] to [1]\n    switch costume to (costume)\n    show\nelse\n    if <(showing) = [1]> then\n        set [showing v] to [0]\n        hide\n    end\nend\n\nif <(showing) = [0]> then\n\nwhen I receive [game loop tick v]\nif <(showing) > [-1]> then\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\nend\n\ndefine setup\ngo to [front v] layer\nswitch costume to ((1) + (1))\nrepeat until <(costume [number v]) = [1]>\n    set [t v] to (costume [name v])\n    if <(letter (1) of (t)) = [L]> then\n        set [y v] to (join (letter (4) of (t)) (letter (5) of (t)))\n        set [x v] to (join (letter (7) of (t)) (letter (8) of (t)))\n        setup clone at x,y: (round (x)) (round (y))\n    end\n    next costume\nend\nset [showing v] to [-1]\nnext costume\n\nwhen I start as a clone\nswitch costume to (big v)\n\n@moving platform\n\nwhen I receive [setup level v]\nset rotation style [all around v]\npoint in direction (90)\nswitch costume to (barrier v)\nsetup clone at x,y: (1059) (2240) typ [13] width [220] time [0] costume [3white] mul []\nsetup clone at x,y: (1100) (2301) typ [4] width [105] time [0.7] costume [Stomper] mul []\nset [showing v] to [-1]\n\nsetup clone at x,y: (-50) (173) typ [20] width [105] time [0.7] costume [] mul []\n\nsetup clone at x,y: (308) (2) typ [14] width [180] time [0] costume [] mul []\nsetup clone at x,y: (1320) (321) typ [13] width [220] time [0] costume [] mul []\nsetup clone at x,y: (1850) (260) typ [20] width [100] time [0] costume [] mul []\nsetup clone at x,y: (2100) (200) typ [21] width [100] time [0.125] costume [] mul []\nsetup clone at x,y: (3750) (0) typ [10] width [40] time [0.5] costume [] mul []\nsetup clone at x,y: (4100) (787) typ [21] width [105] time [0] costume [] mul [0.5]\nsetup clone at x,y: (4300) (870) typ [20] width [105] time [0] costume [] mul [0.43]\nsetup clone at x,y: (5150) (0) typ [10] width [40] time [0.5] costume [] mul []\n\ndefine move to (x) (y) cycle (cycle)\nif <([abs v] of ((@Player X) - (x)) ) < (width)> then\n    if <([abs v] of ((@Player Y) - (y)) ) < (height)> then\n        set [@platform sx v] to (((((x) - (x)) + ((cycle) / (2))) mod (cycle)) - ((cycle) / (2)))\n        set [@platform sy v] to (((((y) - (y)) + ((cycle) / (2))) mod (cycle)) - ((cycle) / (2)))\n    end\nend\nset [x v] to (x)\nset [y v] to (y)\n\ndefine setup clone at x,y: (x) (y) typ (typ) width (width) time (time) costume (costume) mul (mul)\ngo to x: (0) y: (0)\npoint in direction (90)\nhide\nset [typ v] to (typ)\nset [time iterations v] to [1]\nset [width v] to (width)\nset [ox v] to (x)\nset [oy v] to (y)\nset [x v] to (x)\nset [y v] to (y)\nset [time v] to (time)\nset [showing v] to [0]\nset [height v] to [48]\nif <(typ) < [10]> then\n    if <(typ) = [1]> then\n        switch costume to (barriernew v)\n    else\n        switch costume to (barrier2 v)\n        if <(typ) = [3]> then\n            set [time iterations v] to [2]\n        else\n            if <(typ) = [4]> then\n                switch costume to (stomper v)\n            end\n        end\n    end\nelse\n    if <(typ) < [20]> then\n        if <(typ) < [12]> then\n            switch costume to (lift2 v)\n            set [height v] to [1000]\n        else\n            if <(typ) = [13]> then\n                switch costume to (3white v)\n            else\n                if <(typ) = [14]> then\n                    set [time iterations v] to [0.25]\n                    set [height v] to (width)\n                    switch costume to (escalator v)\n                end\n            end\n        end\n    else\n        if <(width) = [100]> then\n            set [time iterations v] to [1]\n            switch costume to (squareeye v)\n        else\n            if <(costume) = []> then\n                switch costume to (circle4 v)\n            else\n                switch costume to (costume)\n            end\n        end\n        set [height v] to (width)\n    end\nend\nif <(mul) > []> then\n    set [time iterations v] to (mul)\nend\npre move (@timer)\ncreate clone of (_myself_ v)\n\ndefine position (x) (y)\nif <(showing) = [1]> then\n    switch costume to (big v)\nend\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    set [showing v] to [1]\n    switch costume to (costume)\n    show\nelse\n    if <(showing) = [1]> then\n        set [showing v] to [0]\n        hide\n    end\nend\n\nwhen I receive [player - pre-move v]\nif <(showing) > [-1]> then\n    pre move ((((@timer) / ((SYNC FRAMES) * (time iterations))) + (time)) mod (1))\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\nend\n\ndefine moving platform? (timer)\nif <(typ) = [1]> then\n    move to (ox) (round ((oy) + ((20) + ((20) * ([sin v] of (([sin v] of ((timer) * (360)) ) * (90)) ))))) cycle []\nelse\n    if <(typ) = [2]> then\n        move to (round ((ox) + ((64) + (([sin v] of ((timer) * (360)) ) * (64))))) (oy) cycle []\n    else\n        if <(typ) = [3]> then\n            move to (round ((ox) + ((128) + (([sin v] of ((timer) * (360)) ) * (128))))) (round ((oy) + ((0) + (([cos v] of ((timer) * (360)) ) * (90))))) cycle []\n        else\n            if <(typ) = [4]> then\n                move to (ox) (round ((oy) + ((24) + ((24) * ([sin v] of (([sin v] of ((timer) * (360)) ) * (90)) ))))) cycle []\n            end\n        end\n    end\nend\n\ndefine barrier (percent) run length (len)\nif <(percent) < [0.15]> then\n    move to (round ((ox) + ((percent) * (len)))) (round ((oy) - (((0.15) - (percent)) * (800)))) cycle []\nelse\n    if <(percent) > [0.85]> then\n        move to (round ((ox) + ((percent) * (len)))) (round ((oy) - (((percent) - (0.85)) * (800)))) cycle []\n    else\n        move to (round ((ox) + ((percent) * (len)))) (round (oy)) cycle []\n    end\nend\nset [ox v] to (round ((7.9) * (460)))\n\nwhen I receive [game loop tick v]\nif <(showing) > [-1]> then\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\nend\n\ndefine move lift (timer)\nif <(typ) = [10]> then\n    move to (ox) ((round ((oy) + ((timer) * (96)))) + ((96) * ([floor v] of ((@Scroll Y) / (96)) ))) cycle []\nelse\n    if <(typ) = [11]> then\n        move to (ox) ((round ((oy) + ((48) + ((48) * ([sin v] of ((timer) * (360)) ))))) + ((96) * ([floor v] of ((@Scroll Y) / (96)) ))) cycle []\n    else\n        if <(typ) = [12]> then\n            move to (round ((ox) + (((1) - (timer)) * (170)))) (oy) cycle [170]\n        else\n            if <(typ) = [13]> then\n                move to (round ((ox) + ((timer) * (170)))) (oy) cycle [170]\n            else\n                if <(typ) = [14]> then\n                    move to (round ((ox) + ((timer) * (32)))) (round ((oy) + (((1) - (timer)) * (32)))) cycle [32]\n                end\n            end\n        end\n    end\nend\n\ndefine pre move (time)\nif <(typ) > [0]> then\n    if <(typ) < [10]> then\n        moving platform? (time)\n    else\n        if <(typ) < [20]> then\n            move lift (time)\n        else\n            if <(typ) = [20]> then\n                rotate (((1) - (time)) mod (1))\n            else\n                if <(typ) = [21]> then\n                    rotate (time)\n                end\n            end\n        end\n    end\nend\n\ndefine rotate (timer)\nset [t v] to (direction)\npoint in direction ((timer) * (90))\nset [t v] to (((((direction) - (t)) + (45)) mod (90)) - (45))\nset [ox v] to (((@Player X) - (x)) * (1))\nif <([abs v] of (ox) ) < (width)> then\n    set [oy v] to (((@Player Y) - (y)) * (1))\n    if <([abs v] of (oy) ) < (height)> then\n        set [@platform sx v] to ((ox) - (((ox) * ([cos v] of (t) )) - ((oy) * ([sin v] of (t) ))))\n        set [@platform sy v] to ((oy) - (((ox) * ([sin v] of (t) )) + ((oy) * ([cos v] of (t) ))))\n    end\nend\n\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(showing) = [0]> then\n        set [showing v] to [1]\n        show\n    end\nelse\n    if <(showing) = [1]> then\n        set [showing v] to [0]\n        hide\n    end\nend\n\nwhen I start as a clone\nset [costume v] to (costume [number v])\nswitch costume to (big v)\nset [showing v] to [0]\n\nsetup clone at x,y: (3880) (200) typ [21] width [270] time [0.5] costume [4eyes] mul []\nsetup clone at x,y: (4010) (200) typ [21] width [270] time [0] costume [4eyes] mul []\n\nsetup clone at x,y: (540) (200) typ [3] width [60] time [0.2] costume [] mul []\nsetup clone at x,y: (540) (200) typ [3] width [60] time [0.7] costume [] mul []\nsetup clone at x,y: (1046) (0) typ [10] width [40] time [0.08] costume [] mul []\nsetup clone at x,y: (3414) (14) typ [4] width [60] time [0.8] costume [] mul []\nsetup clone at x,y: (3912) (0) typ [11] width [40] time [0.8] costume [] mul []\n\nsetup clone at x,y: (3750) (200) typ [21] width [270] time [0] costume [4eyes] mul []\n\nsetup clone at x,y: (1600) (-70) typ [10] width [220] time [0] costume [] mul []\n\nsetup clone at x,y: (-440) (1350) typ [13] width [220] time [0] costume [3white] mul []\nsetup clone at x,y: (-360) (1450) typ [13] width [220] time [0] costume [3white] mul []\nsetup clone at x,y: (-320) (1550) typ [13] width [220] time [0] costume [3white] mul []\nsetup clone at x,y: (-400) (2700) typ [21] width [105] time [0] costume [] mul []\nsetup clone at x,y: (-240) (2800) typ [20] width [105] time [0.7] costume [] mul []\n\n@Check Points\n\ndefine setup clone at x,y: (x) (y)\ngo to x: (0) y: (0)\nhide\nset [showing v] to [0]\nset [x v] to (x)\nset [y v] to (y)\nset [spawn y v] to (y)\nchange [@totalflags v] by (1)\nchange [flag count v] by (1)\nset [flag id v] to (FLAG COUNT)\ncreate clone of (_myself_ v)\n\nwhen I receive [game loop tick v]\nif <(showing) > [-1]> then\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\n    if <(showing) > [25]> then\n        set [showing v] to [-2]\n        hide\n    end\nend\n\nwhen I receive [setup level v]\nset size to (100) %\nsetup\n\ndefine on screen\nif <((@timer) mod (5)) = [0]> then\n    next costume\nend\nif <touching (game v)?> then\n    change [@集めた部品の数内部 v] by (1)\n    set [集めた部品の数　quantity of parts v] to (join (@集めた部品の数内部) [/5])\n    set [showing v] to [2]\n    set [@spawn x v] to (x)\n    set [@spawn y v] to (y)\n    change [@totalflags v] by (-1)\n    if <(flag id) = [1]> then\n        set [flag count v] to [0]\n        if <<(@Best Time) = [0]> or <([clock v] of [game v]) < (@Best Time)>> then\n            set [@best time v] to ([clock v] of [game v])\n        end\n    end\n    if <(flag id) = (FLAG COUNT)> then\n        set [flag count v] to [1]\n    end\nend\n\ndefine position (x) (y)\nif <<(flag id) = [1]> and <(FLAG COUNT) > [1]>> then\n    stop [this script v]\nend\ngo to x: (x) y: (y)\nif <(showing) < [2]> then\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        if <(showing) = [0]> then\n            set [showing v] to [1]\n            show\n        end\n        on screen\n    else\n        if <(showing) = [1]> then\n            set [showing v] to [0]\n            hide\n        end\n    end\nelse\n    set size to ((size) + (15)) %\n    change [ghost v] effect by (4)\n    change [y v] by (5)\n    change [showing v] by (1)\nend\n\nwhen I receive [reset v]\nif <(showing) = [-1]> then\n    setup\nelse\n    delete this clone\nend\n\ndefine setup\nset [@集めた部品の数内部 v] to [0]\nset [集めた部品の数　quantity of parts v] to [0]\nswitch costume to (costume1 v)\nset [flag count v] to [0]\nsetup clone at x,y: (440) (2550)\nsetup clone at x,y: (550) (-5)\nsetup clone at x,y: (2860) (410)\nsetup clone at x,y: (2300) (1370)\nsetup clone at x,y: (2760) (2260)\nsetup clone at x,y: (1500) (2260)\nsetup clone at x,y: (760) (2265)\nset [showing v] to [-1]\n\nset [集めた部品の数　quantity of parts v] to (join (@集めた部品の数内部) [/5])\n\n@Music\n\nwhen flag clicked\nset volume to (100) %\nset [sync frames v] to [63]\nforever\n    if <(username) = [griffpatch]> then\n    else\n        play sound [Thousand_Absolutes_Xaf_Remix v] until done\n    end\nend\n\n\nend\n\nset volume to (0) %\n\nwhen I receive [エンドムービー v]\nrepeat (10)\n    change volume by (-10)\nend\nwait until <(エンドムービー中) = [0]>\nrepeat (10)\n    change volume by (10)\nend\n\n@Cloud\n\ndefine Cloud Tick\nProcess Cloud [1] (join [=] (☁ CLOUD1))\nProcess Cloud [2] (join [=] (☁ CLOUD2))\nProcess Cloud [3] (join [=] (☁ CLOUD3))\nProcess Cloud [4] (join [=] (☁ CLOUD4))\nProcess Cloud [5] (join [=] (☁ CLOUD5))\nProcess Cloud [6] (join [=] (☁ CLOUD6))\nProcess Cloud [7] (join [=] (☁ CLOUD7))\nProcess Cloud [8] (join [=] (☁ CLOUD8))\nProcess Cloud [9] (join [=] (☁ CLOUD9))\nif <<(timer) < (next post)> or <((@timer) mod (2)) = [1]>> then\n    stop [this script v]\nend\nset [next post v] to ((timer) + (pick random (0.5) to (0.7)))\nEncode Player\nset [_i v] to (pick random (1) to (length of [cloud data v]))\nif <(_i) < [5]> then\n    if <(_i) < [3]> then\n        if <(_i) < [2]> then\n            set [☁ cloud1 v] to (parseStr)\n        else\n            set [☁ cloud2 v] to (parseStr)\n        end\n    else\n        if <(_i) < [4]> then\n            set [☁ cloud3 v] to (parseStr)\n        else\n            set [☁ cloud4 v] to (parseStr)\n        end\n    end\nelse\n    if <(_i) < [7]> then\n        if <(_i) < [6]> then\n            set [☁ cloud5 v] to (parseStr)\n        else\n            set [☁ cloud6 v] to (parseStr)\n        end\n    else\n        if <(_i) < [8]> then\n            set [☁ cloud7 v] to (parseStr)\n        else\n            if <(_i) < [9]> then\n                set [☁ cloud8 v] to (parseStr)\n            else\n                set [☁ cloud9 v] to (parseStr)\n            end\n        end\n    end\nend\n\ndefine Write Number (val)\nif <(val) < [0]> then\n    if <(val) < [-99999999]> then\n        set [?val v] to [0]\n    else\n        set [?val v] to (join [0] ([abs v] of (round (val)) ))\n    end\nelse\n    if <(val) > [99999999]> then\n        set [?val v] to [0]\n    else\n        set [?val v] to (round (val))\n    end\nend\nset [parsestr v] to (join (parseStr) (join (length of (?Val)) (?Val)))\n\ndefine Init Reader (text)\nset [parsestr v] to (text)\nset [parseidx v] to [1]\n\ndefine Write String (txt)\nWrite Number (length of (txt))\nset [?val v] to []\nset [i3 v] to [1]\nrepeat (length of (txt))\n    set [i2 v] to (item # of (letter (i3) of (txt)) in [_encode v])\n    if <(i2) < [10]> then\n        set [?val v] to (join (?Val) (join [0] (i2)))\n    else\n        set [?val v] to (join (?Val) (i2))\n    end\n    change [i3 v] by (1)\nend\nset [parsestr v] to (join (parseStr) (?Val))\n\ndefine Skip String\nRead Number\nchange [parseidx v] by ((?Val) * (2))\n\ndefine Read String\nRead Number\nif <((parseIdx) + ((?Val) * (2))) > ((length of (parseStr)) + (1))> then\n    set [i2 v] to ((((length of (parseStr)) + (1)) - (parseIdx)) / (2))\nelse\n    set [i2 v] to (?Val)\nend\nset [?val v] to []\nrepeat (i2)\n    set [i2 v] to (join (letter (parseIdx) of (parseStr)) (letter ((parseIdx) + (1)) of (parseStr)))\n    set [?val v] to (join (?Val) (item (i2) of [_encode v]))\n    change [parseidx v] by (2)\nend\n\nset [_chars v] to [ !"#$%&'\(\)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~]\n\ndefine Read Number\nset [?val v] to []\nrepeat (letter (parseIdx) of (parseStr))\n    change [parseidx v] by (1)\n    set [?val v] to (join (?Val) (letter (parseIdx) of (parseStr)))\nend\nif <(letter (1) of (?Val)) = [0]> then\n    set [?val v] to ((0) - (?Val))\nend\nchange [parseidx v] by (1)\n\nwhen I receive [cloud - setup v]\nhide variable [tag player v]\nset [show names v] to [0]\nshow list [player names v]\ndelete all of [player names v]\ndelete all of [pidx v]\ndelete all of [pdata v]\ndelete all of [say v]\nInit Reader []\nWrite String (username)\nset [encoded name v] to (parseStr)\nset [next post v] to ((timer) + (0.2))\nInit Cloud Data\nif <(TEST) > [0]> then\n    add (username) to [player names v]\n    add [] to [pidx v]\n    add [] to [pdata v]\nend\n\ndefine Process Cloud (id) (var)\nif <(var) = (item (id) of [cloud data v])> then\n    stop [this script v]\nend\nreplace item (id) of [cloud data v] with (var)\nInit Reader (var)\nchange [parseidx v] by (1)\nRead String\nif <(?Val) = (username)> then\n    stop [this script v]\nend\nset [pid v] to (item # of (?Val) in [player names v])\nif <(pid) = [0]> then\n    set [pid v] to (item # of [] in [player names v])\n    if <(pid) = [0]> then\n        if <(length of [player names v]) = [199]> then\n            stop [this script v]\n        end\n        add (?Val) to [player names v]\n        add [] to [pidx v]\n        add [] to [pdata v]\n        set [pid v] to (length of [player names v])\n        create clone of (cloud players v)\n    else\n        replace item (pid) of [player names v] with (?Val)\n    end\nend\nreplace item (pid) of [pidx v] with (parseIdx)\nreplace item (pid) of [pdata v] with (parseStr)\n\nwhen I receive [cloud - tick v]\nCloud Tick\n\ndefine Init Cloud Data\ndelete all of [cloud data v]\nadd (join [=] (☁ CLOUD1)) to [cloud data v]\nadd (join [=] (☁ CLOUD2)) to [cloud data v]\nadd (join [=] (☁ CLOUD3)) to [cloud data v]\nadd (join [=] (☁ CLOUD4)) to [cloud data v]\nadd (join [=] (☁ CLOUD5)) to [cloud data v]\nadd (join [=] (☁ CLOUD6)) to [cloud data v]\nadd (join [=] (☁ CLOUD7)) to [cloud data v]\nadd (join [=] (☁ CLOUD8)) to [cloud data v]\nadd (join [=] (☁ CLOUD9)) to [cloud data v]\n\ndefine Encode Player\nInit Reader (Encoded Name)\nset [i2 v] to (((length of [record v]) / (3)) - (1))\nWrite Number ((@timer) - ((i2) * (2)))\nWrite Number (@Best Time)\nset [nx v] to (item (1) of [record v])\nset [ny v] to (item (2) of [record v])\nWrite Number (nx)\nWrite Number (ny)\nWrite Change (item (3) of [record v])\nset [_i v] to [4]\nrepeat (i2)\n    set [lx v] to (nx)\n    set [ly v] to (ny)\n    set [nx v] to (item (_i) of [record v])\n    set [ny v] to (item ((_i) + (1)) of [record v])\n    Write Change ((nx) - (lx))\n    Write Change ((ny) - (ly))\n    Write Change (item ((_i) + (2)) of [record v])\n    change [_i v] by (3)\nend\nrepeat ((length of [record v]) - ((3) * (15)))\n    delete (1) of [record v]\nend\n\ndefine Write Change (val)\nif <([abs v] of (val) ) < [50]> then\n    if <(val) < [-40]> then\n        set [parsestr v] to (join (parseStr) (join [0] ((val) + (50))))\n    else\n        set [parsestr v] to (join (parseStr) ((val) + (50)))\n    end\nelse\n    set [parsestr v] to (join (parseStr) [00])\n    Write Number (val)\nend\n\nwhen [n v] key pressed\nif <(show names) > [0]> then\n    set [show names v] to [0]\n    show list [player names v]\nelse\n    set [show names v] to [1]\n    hide list [player names v]\nend\n\n@Closest\n\ndefine insert (d) (x) (y)\nif <(d) > [5.5]> then\n    stop [this script v]\nend\nset [i v] to (length of [xy v])\nrepeat until <not <(d) < (item (i) of [xy v])>>\n    change [i v] by (-1)\nend\nchange [i v] by (1)\ninsert (d) at (i) of [xy v] \ninsert (y) at (((i) * (2)) - (1)) of [fix v] \ninsert (x) at (((i) * (2)) - (1)) of [fix v] \n\ndefine create fixer (rad)\ndelete all of [xy v]\ndelete all of [fix v]\nset [y v] to ((-0.1) - (rad))\nrepeat (((rad) * (2)) + (1))\n    set [x v] to ((0) - (rad))\n    repeat (((rad) * (2)) + (1))\n        set [t v] to ([sqrt v] of (((x) * (x)) + ((y) * (y))) )\n        insert (t) (x) (round (y))\n        change [x v] by (1)\n    end\n    change [y v] by (1)\nend\n\ncreate fixer [3]\n\n@Splash\n\nwhen flag clicked\ngo to [front v] layer\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\n\nshow\ngo to [front v] layer\nset [ghost v] effect to (0)\ngo to x: (0) y: (0)\n\n@スプライト2\n\nwhen flag clicked\nhide\nset size to (100) %\nforever\n    go to [back v] layer\nend\n\nwhen flag clicked\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nswitch costume to (コスチューム4 v)\ngo to x: (300) y: (200)\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    if <not <(bbbbbbbbbbbbbbbb) = (round (@Player X))>> then\n        change x by (((@Player X) - (bbbbbbbbbbbbbbbb)) / (-5))\n        set [bbbbbbbbbbbbbbbb v] to (round (@Player X))\n    end\nend\n\n\n\nwhen I start as a clone\nshow\nforever\n    go to [back v] layer\n    if <not <(aaaaa) = (round (@Player Y))>> then\n        change y by (((@Player Y) - (aaaaa)) / (-5))\n        set [aaaaa v] to (round (@Player Y))\n    end\nend\n\n@ha\n\nwhen flag clicked\nwait until <touching (mouse-pointer v)?>\nrepeat until <(ha-toosita?) = [1]>\n    if <touching (mouse-pointer v)?> then\n        set [ha-toosita? v] to [1]\n    end\nend\nwait until <not <touching (mouse-pointer v)?>>\nrepeat until <(ha-toosita?) = [0]>\n    if <touching (mouse-pointer v)?> then\n        wait (0.5) seconds\n        set [ha-toosita? v] to [0]\n    end\nend\nwait (0.3) seconds\n\nwait (0.5) seconds\n\n@ho\n\nwhen flag clicked\nwait until <touching (mouse-pointer v)?>\nrepeat until <(hosiosita?) = [1]>\n    if <touching (mouse-pointer v)?> then\n        set [hosiosita? v] to [1]\n    end\nend\nwait until <not <touching (mouse-pointer v)?>>\nwait (0.3) seconds\nrepeat until <(hosiosita?) = [0]>\n    if <touching (mouse-pointer v)?> then\n        wait (0.5) seconds\n        set [hosiosita? v] to [0]\n    end\nend\n\nsay [こんにちは!] for (0.1) seconds\n\n@Emoji\n\nwhen flag clicked\nset size to (40) %\nhide\nset [id v] to []\nset [e frame v] to [0]\nset [@player emoji v] to []\n\nwhen I receive [pre game loop v]\nforever\n    wait until <<key (e v) pressed?> or <key (r v) pressed?>>\n    set [@player emoji v] to [0]\n    if <key (r v) pressed?> then\n        spawn ui [34] [60]\n    else\n        spawn ui [1] [33]\n    end\n    hide\n    wait until <not <<key (e v) pressed?> or <key (r v) pressed?>>>\n    set [@player emoji v] to []\n    wait (0.4) seconds\nend\n\ndefine spawn ui (from) (to)\nset [id v] to [0]\nset size to (40) %\nclear graphic effects\nset y to (-75)\ngo to [front v] layer\nshow\nswitch costume to (from)\nset [ghost v] effect to (100)\nrepeat (3)\n    set x to (((11) - (1)) * (-20))\n    repeat (11)\n        create clone of (_myself_ v)\n        if <(costume [number v]) = (to)> then\n            set [id v] to []\n            stop [this script v]\n        end\n        change x by (40)\n        next costume\n    end\n    change y by (-40)\nend\nset [id v] to []\n\nwhen I start as a clone\nif <(id) = [0]> then\n    UI\nelse\n    set size to (20) %\n    change [y v] by (22)\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\n    repeat (5)\n        change [ghost v] effect by (-20)\n        change size by (4)\n    end\n    wait (1.5) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n        change size by (-5)\n    end\n    delete this clone\nend\n\ndefine UI\nset size to (40) %\nrepeat (5)\n    change size by (4)\n    change y by (1)\n    change [ghost v] effect by (-20)\nend\nrepeat until <not <(@Player Emoji) = [0]>>\n    if <(distance to [mouse-pointer v]) < [20]> then\n        if <(size) < [90]> then\n            change size by (10)\n        end\n    else\n        if <(size) > [60]> then\n            change size by (-5)\n        end\n    end\nend\nif <(distance to [mouse-pointer v]) < [20]> then\n    set [@player emoji v] to (costume [number v])\n    set [id v] to [1]\n    set [x v] to (@Player X)\n    set [y v] to (@Player Y)\n    create clone of (_myself_ v)\n    set [id v] to []\nend\nrepeat (5)\n    change [ghost v] effect by (10)\n    change y by (-1)\n    change size by (-4)\nend\ndelete this clone\n\nwhen I receive [game loop tick v]\nif <(id) > [0]> then\n    change [y v] by (1)\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\nelse\n    if <(id) = []> then\n        spawn emoji\n    end\nend\n\ndefine spawn emoji\nset [id v] to [1]\nrepeat until <(length of [emoji spawn v]) = [0]>\n    set [x v] to (item (2) of [emoji spawn v])\n    set [y v] to (item (3) of [emoji spawn v])\n    if <<([abs v] of ((x) - (@Scroll X)) ) < [280]> and <([abs v] of ((y) - (@Scroll Y)) ) < [200]>> then\n        switch costume to ((item (1) of [emoji spawn v]) - (100))\n        create clone of (_myself_ v)\n    end\n    delete (1) of [emoji spawn v]\n    delete (1) of [emoji spawn v]\n    delete (1) of [emoji spawn v]\nend\nset [id v] to []\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    if <(showing) = [0]> then\n        set [showing v] to [1]\n        show\n    end\nelse\n    if <(showing) = [1]> then\n        set [showing v] to [0]\n        hide\n    end\nend\n\n@s@oudane\n\ndefine setup clone at x,y: (x) (y)\ngo to x: (0) y: (0)\nhide\nset [showing v] to [0]\nset [x v] to (x)\nset [y v] to (y)\nset [spawn y v] to (y)\nchange [@totalflags v] by (1)\nchange [flag count v] by (1)\nset [flag id v] to (FLAG COUNT)\ncreate clone of (_myself_ v)\n\nwhen I receive [game loop tick v]\nif <(showing) > [-1]> then\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\n    if <(showing) > [25]> then\n        set [showing v] to [-2]\n        hide\n    end\nend\n\nwhen I receive [setup level v]\nset size to (100) %\nsetup\n\ndefine on screen\nif <((@timer) mod (5)) = [0]> then\n    next costume\nend\n\nset [showing v] to [2]\n\nchange [@totalflags v] by (-1)\nif <(flag id) = [1]> then\n    set [flag count v] to [0]\n    if <<(@Best Time) = [0]> or <([clock v] of [game v]) < (@Best Time)>> then\n        set [@best time v] to ([clock v] of [game v])\n    end\nend\nif <(flag id) = (FLAG COUNT)> then\n    set [flag count v] to [1]\nend\n\ndefine position (x) (y)\nif <<(flag id) = [1]> and <(FLAG COUNT) > [1]>> then\n    stop [this script v]\nend\ngo to x: (x) y: (y)\nif <(showing) < [2]> then\n    if <<(x) = (x position)> and <(y) = (y position)>> then\n        if <(showing) = [0]> then\n            on screen\n            show\n            set [showing v] to [1]\n        end\n    else\n        if <(showing) = [1]> then\n            set [showing v] to [0]\n            hide\n        end\n    end\nelse\n    set size to ((size) + (15)) %\n    change [ghost v] effect by (4)\n    change [y v] by (5)\n    change [showing v] by (1)\nend\n\nwhen I receive [reset v]\nif <(showing) = [-1]> then\n    setup\nelse\n    delete this clone\nend\n\ndefine setup\nswitch costume to (costume7 v)\nset [flag count v] to [0]\nsetup clone at x,y: (400) (2550)\nset [showing v] to [-1]\n\nsetup clone at x,y: (-418) (3477)\n\nwhen I start as a clone\nforever\n    if <touching (player v)?> then\n        set [ranking測定する？ v] to [そうだね]\n        set [kimitatihadoutobunoka? v] to [1]\n        hide\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(kimitatihadoutobunoka?) = [0]> then\n        show\n    else\n        delete this clone\n    end\nend\n\n@toberu?\n\nwhen [x v] key pressed\nif <(username) = [KANATOKO]> then\n    set [@player sy v] to [15]\nend\n\nwhen flag clicked\nset [kimitatihadoutobunoka? v] to [0]\n\nwhen flag clicked\n\nwhen flag clicked\nset [えんろるみた? v] to [まだ]\n\nwhen [x v] key pressed\nif <(ha-toosita?) = [1]> then\n    if <(hosiosita?) = [1]> then\n        if <(kimitatihadoutobunoka?) = [1]> then\n            set [@player sy v] to [15]\n        end\n    end\nend\n\nwhen I receive [飛ぶか判断 v]\nforever\n    if <(@Player Y) > [4945]> then\n        set [えんろるみた? v] to [みた]\n    end\nend\n\n@スプライト4\n\nwhen I start as a clone\nforever\n    if <key (g v) pressed?> then\n    end\nend\n\nwhen flag clicked\nhide\nset [モバイルのための v] to [PC]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\ngo to x: (36) y: (28)\nforever\n    if <key (any v) pressed?> then\n        delete this clone\n    end\n    if <<touching (mouse-pointer v)?> and <mouse down?>> then\n        if <(Guide) = [0]> then\n            set [guide v] to [1]\n            wait until <not <touching (mouse-pointer v)?>>\n        else\n            wait until <not <touching (mouse-pointer v)?>>\n            set [guide v] to [0]\n        end\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    go to [front v] layer\n    go [backward v] (1) layers\nend\n\n@Level４\n\nwhen I receive [setup level v]\nsetup\n\ndefine setup clone at x,y: (x) (y)\ngo to x: (0) y: (0)\nhide\nset [showing v] to [0]\nset [x v] to (round ((x) * (460)))\nset [y v] to (round ((y) * (340)))\nset [costume v] to (costume [number v])\ncreate clone of (_myself_ v)\n\ndefine position (x) (y)\nif <(showing) = [1]> then\n    switch costume to (big v)\nend\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    set [showing v] to [1]\n    switch costume to (costume)\n    show\nelse\n    if <(showing) = [1]> then\n        set [showing v] to [0]\n        hide\n    end\nend\n\nif <(showing) = [0]> then\n\nwhen I receive [game loop tick v]\nif <(showing) > [-1]> then\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\nend\n\ndefine setup\ngo to [back v] layer\nswitch costume to ((1) + (1))\nrepeat until <(costume [number v]) = [1]>\n    set [t v] to (costume [name v])\n    if <(letter (1) of (t)) = [L]> then\n        set [y v] to (join (letter (4) of (t)) (letter (5) of (t)))\n        set [x v] to (join (letter (7) of (t)) (letter (8) of (t)))\n        setup clone at x,y: (round (x)) (round (y))\n    end\n    next costume\nend\nset [showing v] to [-1]\nnext costume\n\nwhen I start as a clone\nswitch costume to (big v)\n\n@Level6\n\nwhen I receive [setup level v]\nset [エンドムービー中 v] to [0]\nsetup\n\ndefine setup clone at x,y: (x) (y)\ngo to x: (0) y: (0)\nhide\nset [showing v] to [0]\nset [x v] to (round ((x) * (460)))\nset [y v] to (round ((y) * (340)))\nset [costume v] to (costume [number v])\ncreate clone of (_myself_ v)\n\ndefine position (x) (y)\nif <(showing) = [1]> then\n    switch costume to (big v)\nend\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    set [showing v] to [1]\n    switch costume to (costume)\n    show\nelse\n    if <(showing) = [1]> then\n        set [showing v] to [0]\n        hide\n    end\nend\n\nif <(showing) = [0]> then\n\nwhen I receive [game loop tick v]\nif <(showing) > [-1]> then\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\nend\n\ndefine setup\ngo to [back v] layer\nswitch costume to ((1) + (1))\nrepeat until <(costume [number v]) = [1]>\n    set [t v] to (costume [name v])\n    if <(letter (1) of (t)) = [L]> then\n        set [y v] to (join (letter (4) of (t)) (letter (5) of (t)))\n        set [x v] to (join (letter (7) of (t)) (letter (8) of (t)))\n        setup clone at x,y: (round (x)) (round (y))\n    end\n    next costume\nend\nset [showing v] to [-1]\nnext costume\n\nwhen I start as a clone\nswitch costume to (big v)\n\nwhen [c v] key pressed\nif <<touching (mouse-pointer v)?> and <<<(@集めた部品の数内部) = [5]> or <(@集めた部品の数内部) = [6]>> or <(@集めた部品の数内部) = [7]>>> then\n    set [@集めた部品の数内部 v] to [0]\n    set [集めた部品の数　quantity of parts v] to (join (@集めた部品の数内部) [/5])\n    broadcast (エンドムービー v)\n    set [エンドムービー中 v] to [1]\nend\n\n@Level2\n\nwhen flag clicked\nset [guide v] to [0]\nhide\n\nwhen I start as a clone\nforever\n    if <key (g v) pressed?> then\n        if <(Guide) = [0]> then\n            wait until <not <key (g v) pressed?>>\n            set [guide v] to [1]\n        else\n            wait until <not <key (g v) pressed?>>\n            set [guide v] to [0]\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <not <(costume [name v]) = [BIG]>> then\n        if <(Guide) = [0]> then\n            hide\n        else\n            if <(Guide) = [1]> then\n                show\n            end\n        end\n    end\nend\n\nwhen I receive [setup level v]\nsetup\n\ndefine setup clone at x,y: (x) (y)\ngo to x: (0) y: (0)\nhide\nset [showing v] to [0]\nset [x v] to (round ((x) * (460)))\nset [y v] to (round ((y) * (340)))\nset [costume v] to (costume [number v])\ncreate clone of (_myself_ v)\n\ndefine position (x) (y)\nif <(showing) = [1]> then\n    switch costume to (big v)\nend\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    set [showing v] to [1]\n    switch costume to (costume)\nelse\n    if <(showing) = [1]> then\n        set [showing v] to [0]\n        hide\n    end\nend\n\nif <(showing) = [0]> then\n\nwhen I receive [game loop tick v]\nif <(showing) > [-1]> then\n    position (round ((x) - (@Scroll X))) (round ((y) - (@Scroll Y)))\nend\n\ndefine setup\ngo to [front v] layer\nswitch costume to ((1) + (1))\nrepeat until <(costume [number v]) = [1]>\n    set [t v] to (costume [name v])\n    if <(letter (1) of (t)) = [L]> then\n        set [y v] to (join (letter (4) of (t)) (letter (5) of (t)))\n        set [x v] to (join (letter (7) of (t)) (letter (8) of (t)))\n        setup clone at x,y: (round (x)) (round (y))\n    end\n    next costume\nend\nset [showing v] to [-1]\nnext costume\n\nwhen I start as a clone\nswitch costume to (big v)\n\n@セカランリストの表示と全てのリセット2\n\nwhen I receive [worldranking変換 v]\nset [worldrankingリストの番号 v] to [2]\nrepeat until <(WORLDRANKINGリストの番号) = [6]>\n    if <not <(letter (4) of (item (WORLDRANKINGリストの番号) of [世界ランキング v])) = [:]>> then\n        set [セカラン名前 v] to [6]\n        set [time分解 v] to (round ((join (join (join (letter (1) of (item (WORLDRANKINGリストの番号) of [世界ランキング v])) (letter (2) of (item (WORLDRANKINGリストの番号) of [世界ランキング v]))) (letter (3) of (item (WORLDRANKINGリストの番号) of [世界ランキング v]))) (letter (4) of (item (WORLDRANKINGリストの番号) of [世界ランキング v]))) / (3)))\n    else\n        set [セカラン名前 v] to [5]\n        set [time分解 v] to (round ((join (join (letter (1) of (item (WORLDRANKINGリストの番号) of [世界ランキング v])) (letter (2) of (item (WORLDRANKINGリストの番号) of [世界ランキング v]))) (letter (3) of (item (WORLDRANKINGリストの番号) of [世界ランキング v]))) / (3)))\n    end\n    set [time分解（10分） v] to [0]\n    set [time分解（0.1秒） v] to [0]\n    set [time分解（10秒） v] to [0]\n    set [time分解（分） v] to [0]\n    set [time分解（秒） v] to [0]\n    set [time分解（0.1秒） v] to (letter (length of (TIME分解)) of (TIME分解))\n    set [time分解（秒） v] to (letter ((length of (TIME分解)) - (1)) of (TIME分解))\n    repeat until <(TIME分解) < [600]>\n        if <<(TIME分解) = [600]> or <(TIME分解) > [600]>> then\n            change [time分解 v] by (-600)\n            change [time分解（分） v] by (1)\n        end\n    end\n    set [time分解（10秒） v] to (letter ((length of (TIME分解)) - (2)) of (TIME分解))\n    set [リストの表示数 v] to (join (join (join (join (join (TIME分解（分）) [']) (TIME分解（10秒）)) (TIME分解（秒）)) [.]) (TIME分解（0.1秒）))\n    if <(セカラン名前) = [6]> then\n        set [セカラン名前今どこ v] to [0]\n        set [セカラン名前変数 v] to []\n        set [セカラン名前引く v] to [0]\n        repeat until <(セカラン名前今どこ) = [6]>\n            set [セカラン名前今どこ v] to ((length of (item (WORLDRANKINGリストの番号) of [世界ランキング v])) - (セカラン名前引く))\n            change [セカラン名前引く v] by (1)\n            set [セカラン名前変数 v] to (join (letter (セカラン名前今どこ) of (item (WORLDRANKINGリストの番号) of [世界ランキング v])) (セカラン名前変数))\n        end\n    else\n        set [セカラン名前今どこ v] to [0]\n        set [セカラン名前変数 v] to []\n        set [セカラン名前引く v] to [0]\n        repeat until <(セカラン名前今どこ) = [5]>\n            set [セカラン名前今どこ v] to ((length of (item (WORLDRANKINGリストの番号) of [世界ランキング v])) - (セカラン名前引く))\n            change [セカラン名前引く v] by (1)\n            set [セカラン名前変数 v] to (join (letter (セカラン名前今どこ) of (item (WORLDRANKINGリストの番号) of [世界ランキング v])) (セカラン名前変数))\n        end\n    end\n    replace item (WORLDRANKINGリストの番号) of [world　ranking v] with (join (セカラン名前変数) (join [:] (リストの表示数)))\n    change [worldrankingリストの番号 v] by (1)\nend\n\nwhen flag clicked\ndelete all of [world　ranking v]\nshow list [world　ranking v]\nadd [bug] to [world　ranking v]\nrepeat until <(length of [world　ranking v]) = [5]>\n    add [まだいないよ！] to [world　ranking v]\nend\n\nwhen flag clicked\nset [ranking測定する？ v] to [測定終了]\nwait until <not <(@Best Time) = [0]>>\nbroadcast (スコアランキング表示 v)\n\nif <<(RANKING測定する？) = [そうだね]> and > then\n    set [ranking測定する？ v] to [測定終了]\nend\n\nwhen flag clicked\nset [ベストタイム v] to [0]\n\nhide list [世界ランキング v]\nhide list [世界ランキング　player v]\n\ndelete all of [world　ranking v]\ndelete all of [世界ランキング v]\ndelete all of [世界ランキング　player v]\nset [@best time v] to [0]\nset [@crouching v] to [0]\nset [@falling v] to [0]\nset [@fastest player v] to [0]\nset [@fastest time v] to [0]\nset [@level v] to [0]\nset [@on wall v] to [0]\nset [@platform sx v] to [0]\nset [@platform sy v] to [0]\nset [@player die v] to [0]\nset [@player dir v] to [0]\nset [@player emoji v] to [0]\nset [@player mode v] to [0]\nset [@player sx v] to [0]\nset [@player sy v] to [0]\nset [@player x v] to [0]\nset [@player y v] to [0]\nset [@scroll x v] to [0]\nset [@scroll y v] to [0]\nset [@slope v] to [0]\nset [@spawn x v] to [0]\nset [@scroll y v] to [0]\nset [@timer v] to [0]\nset [@totalflags v] to [0]\nset [@walking v] to [0]\nset [☁ cloud1 v] to [0]\nset [☁ cloud2 v] to [0]\nset [☁ cloud3 v] to [0]\nset [☁ cloud4 v] to [0]\nset [☁ cloud5 v] to [0]\nset [☁ cloud6 v] to [0]\nset [☁ cloud7 v] to [0]\nset [☁ cloud8 v] to [0]\nset [☁ cloud9 v] to [0]\nset [☁ sekakiro v] to [0]\nset [☁ 世界記録 v] to [0]\nset [active players v] to [0]\nset [char v] to [0]\nset [chat timer v] to [0]\nset [clones v] to [0]\nset [cnt v] to [0]\nset [cnt2 v] to [0]\nset [cnt3 v] to [0]\nset [debug v] to [0]\nset [fastest v] to [0]\nset [filtered chat v] to [0]\nset [flag count v] to [0]\nset [fps v] to [0]\nset [fps time v] to [0]\nset [frame v] to [0]\nset [j_ v] to [0]\nset [jump key v] to [0]\nset [mouse inactive v] to [0]\nset [reload v] to [0]\nset [sync frames v] to [0]\nset [t v] to [0]\nset [tag player v] to [0]\nset [temp v] to [0]\nset [test v] to [0]\nset [time v] to [0]\nset [time分解 v] to [0]\nset [time分解（0.1秒） v] to [0]\nset [time分解（10秒） v] to [0]\nset [time分解（10分） v] to [0]\nset [time分解（秒） v] to [0]\nset [time分解（分） v] to [0]\nset [worldrankingリストの番号 v] to [0]\nset [スコア（項目no） v] to [0]\nset [スコア（項目no+1） v] to [0]\nset [ベストタイム v] to [0]\nset [ランキング用 v] to [0]\nset [リストの表示数 v] to [0]\nset [交換フラグ v] to [0]\nset [交換フラグ２ v] to [0]\nset [実行フラグ v] to [0]\nset [項目no v] to [0]\nset [項目no２ v] to [0]\nset [交換フラグ v] to [0]\nset [順位_ v] to [0]\nset [世界記録表示 v] to [0]\nset [待避用変数 v] to [0]\n\nset [@best time v] to [0]\nset [@best time v] to [0]\n\nwhen I receive [飛ぶか判断 v]\n\nwhen flag clicked\nif <(username) = [KANATOKO]> then\n    forever\n        wait (20) seconds\n        broadcast (スコアランキング表示 v)\n    end\nend\n\n@ランキング表示用\n\nwhen [k v] key pressed\nif <(世界記録表示) = [0]> then\n    set [世界記録表示 v] to [1]\n    hide list [world　ranking v]\n    wait until <not <key (k v) pressed?>>\nelse\n    set [世界記録表示 v] to [0]\n    show list [world　ranking v]\n    wait until <not <key (k v) pressed?>>\nend\n\ndefine 復号化\nset [char v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!"#$%&'\(\)=~|`{+*}<>?_-^\@\[;:\],./\ ]\nset [cnt v] to [0]\ndelete all of [世界ランキング v]\nif <not <(☁ sekakiro) = []>> then\n    add [] to [世界ランキング v]\nend\nrepeat (((length of (☁ sekakiro)) / (2)) - (1))\n    change [cnt v] by (2)\n    if <(join (letter ((cnt) - (1)) of (☁ sekakiro)) (letter (cnt) of (☁ sekakiro))) = [00]> then\n        add [] to [世界ランキング v]\n    else\n        replace item (length of [世界ランキング v]) of [世界ランキング v] with (join (item (length of [世界ランキング v]) of [世界ランキング v]) (letter (join (letter ((cnt) - (1)) of (☁ sekakiro)) (letter (cnt) of (☁ sekakiro))) of (char)))\n    end\nend\n\ndefine 符号化\nset [char v] to [ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!"#$%&'\(\)=~|`{+*}<>?_-^\@\[;:\],./\ ]\nset [cnt v] to [0]\nset [temp v] to []\nrepeat (length of [世界ランキング v])\n    change [cnt v] by (1)\n    set [cnt2 v] to [0]\n    repeat (length of (item (cnt) of [世界ランキング v]))\n        change [cnt2 v] by (1)\n        set [cnt3 v] to [0]\n        repeat until <(letter (cnt2) of (item (cnt) of [世界ランキング v])) = (letter (cnt3) of (char))>\n            change [cnt3 v] by (1)\n        end\n        if <(cnt3) < [10]> then\n            set [temp v] to (join (temp) (join [0] (cnt3)))\n        else\n            set [temp v] to (join (temp) (cnt3))\n        end\n    end\n    set [temp v] to (join (temp) [00])\nend\nset [☁ sekakiro v] to (temp)\n\ndefine 順位判定\nset [順位_ v] to [1]\nrepeat until <(順位_) > [5]>\n    if <(join (@Best Time) (join [:] (username))) = (item (順位_) of [世界ランキング v])> then\n    change [順位_ v] by (1)\nend\n\ndefine スコア（項目No）取り出し\nset [スコア（項目no） v] to []\nset [j_ v] to [1]\nrepeat until <(j_) > [4]>\n    if <not <(letter (j_) of (item (項目No) of [世界ランキング v])) = [:]>> then\n        set [スコア（項目no） v] to (join (スコア（項目No）) (letter (j_) of (item (項目No) of [世界ランキング v])))\n    end\n    change [j_ v] by (1)\nend\n\ndefine スコア（項目No+1）取り出し\nset [スコア（項目no+1） v] to []\nset [j_ v] to [1]\nrepeat until <(j_) > [4]>\n    if <not <(letter (j_) of (item ((項目No) + (1)) of [世界ランキング v])) = [:]>> then\n        set [スコア（項目no+1） v] to (join (スコア（項目No+1）) (letter (j_) of (item ((項目No) + (1)) of [世界ランキング v])))\n    end\n    change [j_ v] by (1)\nend\n\ndefine 並び替え\nset [実行フラグ v] to [0]\nset [交換フラグ v] to [0]\nrepeat until <<(実行フラグ) > [0]> and <(交換フラグ) = [0]>>\n    set [項目no v] to [0]\n    change [実行フラグ v] by (1)\n    set [交換フラグ v] to [0]\n    repeat ((length of [世界ランキング v]) - (1))\n        change [項目no v] by (1)\n        スコア（項目No+1）取り出し\n        スコア（項目No）取り出し\n        if <(スコア（項目No+1）) < (スコア（項目No）)> then\n            set [待避用変数 v] to (item ((項目No) + (1)) of [世界ランキング v])\n            replace item ((項目No) + (1)) of [世界ランキング v] with (item (項目No) of [世界ランキング v])\n            replace item (項目No) of [世界ランキング v] with (待避用変数)\n            change [交換フラグ v] by (1)\n        end\n    end\nend\n\nwhen I receive [スコアランキング表示 v]\nset [世界記録表示 v] to [1]\nshow\nif <not <(username) = [KANATOKO]>> then\n    add (join (@Best Time) (join [:] (username))) to [世界ランキング v]\nend\n並び替え\ndelete (6) of [世界ランキング v]\n順位判定\nhide\n符号化\nbroadcast (WORLDRANKING変換 v)\n\nhide list [世界ランキング v]\n\nwhen flag clicked\nhide\nshow list [世界ランキング v]\n復号化\n\nsay (join (順位_) [位ランクイン！！]) for (3) seconds\n\nwhen flag clicked\nset [世界記録表示 v] to [0]\n\n@スプライト1\n\nrepeat (38)\n\nforever\n\nwhen I receive [着水 v]\nhide\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [エンドムービー v]\nhide variable [水分　moisture v]\nhide variable [集めた部品の数　quantity of parts v]\nhide variable [fastest v]\nhide variable [time v]\nhide variable [active players v]\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nswitch costume to (コスチューム24 v)\nstart sound [ゴゴゴゴ v]\nrepeat (14)\n    wait (0.007) seconds\n    next costume\nend\nrepeat (11)\n    wait (0.007) seconds\n    next costume\nend\nrepeat (8)\n    wait (0.001) seconds\n    next costume\nend\nwait (0.4) seconds\nrepeat (9)\n    next costume\nend\nwait (0.3) seconds\nrepeat (18)\n    next costume\n    wait (0.01) seconds\nend\nwait (0.8) seconds\nnext costume\nwait (1) seconds\nbroadcast (メッセージ1 v)\nswitch costume to (backdrop19 v)\nstart sound [風が吹く2 v]\nrepeat (18)\n    next costume\nend\nwait (3) seconds\nbroadcast (着水 v)\n\nwhen flag clicked\nforever\n    if <not <(エンドムービー中) = [1]>> then\n        hide\n    end\nend\n\n@スプライト5\n\nwhen I receive [メッセージ1 v]\nrepeat (10)\n    wait (0.3) seconds\n    create clone of (_myself_ v)\nend\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nif <(pick random (1) to (2)) = [1]> then\n    switch costume to (コスチューム1 v)\nelse\n    switch costume to (コスチューム2 v)\nend\ngo to x: (pick random (-250) to (250)) y: (-250)\nshow\ngo to [front v] layer\nset size to (pick random (10) to (100)) %\ngo [forward v] (size) layers\nrepeat until <[160] < (y position)>\n    change y by (size)\nend\ndelete this clone\n\nwhen I receive [着水 v]\ndelete this clone\n\nwhen I receive [着水 v]\nhide\nstop [this script v]\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen flag clicked\nforever\n    if <not <(エンドムービー中) = [1]>> then\n        hide\n    end\nend\n\n@スプライト6\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I receive [着水 v]\nswitch costume to (backdrop39 v)\nshow\ngo to [front v] layer\nrepeat (3)\n    wait (0.05) seconds\n    next costume\nend\nstop all sounds\nrepeat (10)\n    wait (0.05) seconds\n    next costume\nend\nwait (0.4) seconds\nrepeat (11)\n    wait (0.05) seconds\n    next costume\nend\nwait (1) seconds\nrepeat (2)\n    switch costume to (backdrop57 v)\n    start sound [水ぶくぶく1 v]\n    repeat (10)\n        wait (0.05) seconds\n        next costume\n    end\n    wait (0.4) seconds\nend\nwait (0.4) seconds\nstop all sounds\nrepeat (7)\n    wait (0.05) seconds\n    next costume\nend\nswitch costume to (backdrop3 v)\nrepeat (8)\n    wait (0.05) seconds\n    next costume\nend\nwait (0.5) seconds\nrepeat (5)\n    wait (0.05) seconds\n    next costume\nend\nwait (0.3) seconds\nrepeat (21)\n    wait (0.05) seconds\n    next costume\nend\nwait (0.5) seconds\nbroadcast (ザウ見え v)\nbroadcast (モワモワもわぁー v)\n\nstart sound [風が吹く2 v]\n\nwhen flag clicked\nswitch costume to (backdrop39 v)\n\nwhen [space v] key pressed\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [5]> then\n        play sound [爆発3 v] until done\n    else\n        if <(costume [number v]) = [44]> then\n            play sound [水面に浮かび上がる v] until done\n        else\n            if <(costume [number v]) = [71]> then\n                play sound [水面に石投げ2 v] until done\n            end\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(エンドムービー中) = [1]>> then\n        hide\n    end\nend\n\n@スプライト7\n\nwhen I receive [モワモワもわぁー v]\nrepeat (50)\n    create clone of (_myself_ v)\nend\n\ngo to (random position v)\nchange y by (-10000)\n\nwhen I start as a clone\nrepeat (30)\n    change y by (10)\nend\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (pick random (-250) to (250)) y: (-1000)\nshow\ngo to [front v] layer\nset size to (pick random (40) to (80)) %\nrepeat until <[160] < (y position)>\n    change y by (10)\nend\ndelete this clone\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\n\nwhen I receive [モワモワもわぁー v]\nstart sound [水ぶくぶく2 \(1\) v]\nwait (0.1) seconds\nwait (0.1) seconds\nwait (0.1) seconds\nwait (0.1) seconds\nwait (0.05) seconds\nstart sound [水ぶくぶく2 \(1\)2 v]\nwait (0.1) seconds\nwait (0.1) seconds\nwait (0.1) seconds\nstart sound [水ぶくぶく2 \(1\)3 v]\n\n@スプライト9\n\nwhen I receive [モワモワもわぁー v]\nrepeat (50)\n    create clone of (_myself_ v)\nend\n\ngo to (random position v)\nchange y by (-10000)\n\nwhen I start as a clone\n\nrepeat (30)\n    change y by (10)\nend\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (pick random (-250) to (250)) y: (-1000)\nshow\ngo to [front v] layer\nset size to (pick random (90) to (80)) %\nrepeat until <[160] < (y position)>\n    change y by (10)\nend\ndelete this clone\n\ngo [forward v] (size) layers\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\n\n@スプライト8\n\nwhen I receive [モワモワもわぁー v]\nrepeat (50)\n    create clone of (_myself_ v)\nend\n\ngo to (random position v)\nchange y by (-10000)\n\nwhen I start as a clone\n\nrepeat (30)\n    change y by (10)\nend\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (pick random (-250) to (250)) y: (-1000)\nshow\ngo to [front v] layer\nset size to (pick random (40) to (80)) %\nrepeat until <[160] < (y position)>\n    change y by (10)\nend\ndelete this clone\n\ngo [forward v] (size) layers\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\n\n@スプライト10\n\nwhen I receive [モワモワもわぁー v]\nrepeat (50)\n    create clone of (_myself_ v)\nend\n\ngo to (random position v)\nchange y by (-10000)\n\nwhen I start as a clone\n\nrepeat (30)\n    change y by (10)\nend\nrepeat until <touching (_edge_ v)?>\n    change y by (10)\nend\ndelete this clone\n\nwhen I start as a clone\ngo to [front v] layer\ngo to x: (pick random (-250) to (250)) y: (-1000)\nshow\ngo to [front v] layer\nset size to (pick random (40) to (80)) %\nrepeat until <[160] < (y position)>\n    change y by (10)\nend\ndelete this clone\n\ngo [forward v] (size) layers\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\n\n@スプライト11\n\nwhen flag clicked\nhide\nswitch costume to (コスチューム1 v)\ngo to x: (0) y: (0)\n\nwhen I receive [ザウ見え v]\nswitch costume to (コスチューム47 v)\ngo to [front v] layer\nshow\nwait (1) seconds\nnext costume\nwait (1.5) seconds\nstart sound [水中 v]\nrepeat (49)\n    wait (0.1) seconds\n    next costume\nend\nstop all sounds\nbroadcast (さむね v)\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [36]> then\n        glide (1) secs to x: (-50) y: (27)\n    end\nend\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [15]> then\n        play sound [水中で息を吐く1 v] until done\n    end\nend\n\nwhen flag clicked\nforever\n    if <not <(エンドムービー中) = [1]>> then\n        hide\n    end\nend\n\n@スプライト12\n\nwhen flag clicked\nclear graphic effects\ngo to [back v] layer\nhide\n\nwhen I receive [さむね v]\nset [ghost v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (50)\n    change [ghost v] effect by (-2)\nend\nwait (2) seconds\nbroadcast (ゲームに戻る v)\n\nwhen flag clicked\nforever\n    if <not <(エンドムービー中) = [1]>> then\n        hide\n    end\nend\n\n@スプライト13\n\nwhen flag clicked\nset [戻る許可 v] to [0]\nhide\n\nwhen [space v] key pressed\nif <(エンドムービー中) = [1]> then\n    if <(戻る許可) = [1]> then\n        set [エンドムービー中 v] to [0]\n        hide\n        show variable [fastest v]\n        show variable [time v]\n        show variable [水分　moisture v]\n        show variable [active players v]\n        show variable [集めた部品の数　quantity of parts v]\n    end\nend\n\nwhen I receive [ゲームに戻る v]\ngo to [front v] layer\nset [ghost v] effect to (100)\nshow\nrepeat (20)\n    change [ghost v] effect by (-5)\nend\nset [戻る許可 v] to [1]\n\n