Mythical Ravine // A Platformer v0.5

Instructions: Hello! Here's my platforming engine which I made. I hope you like it! \nAll code by me @Cometblazer. Make sure to follow!!\nIt has:\n- Double Jump\n- Wall Jump\n- Crouching\n- 8 Levels\n- Timer\n- Spikes\nYour score is how long it took you to finish the game. Try to finish the game as fast as possible! The lower the score the better. Have Fun!!\n

@Stage\n\n@恐龙\n\ndefine 恐龙跳跃高度 (h) 移动速度 (v) 摩擦力 (f)\ngo to [back v] layer\ngo [forward v] (2) layers\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [x 速度 v] by ((v) * (-1))\n    point in direction (-90)\nend\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [x 速度 v] by (v)\n    point in direction (90)\nend\nif <<key (down arrow v) pressed?> or <key (s v) pressed?>> then\n    set size to (125) %\n    set [brightness v] effect to (15)\nelse\n    set size to (175) %\n    set [brightness v] effect to (0)\nend\nset [x 速度 v] to ((x 速度) * (f))\nchange x by (x 速度)\nif <<touching (关卡 v)?> or <touching (移动平台 v)?>> then\n    set [斜率 v] to [0]\n    repeat until <<not <<touching (关卡 v)?> or <touching (移动平台 v)?>>> or <(斜率) = [8]>>\n        change [斜率 v] by (1)\n        change y by (1)\n    end\n    if <<touching (关卡 v)?> or <touching (移动平台 v)?>> then\n        change y by ((斜率) * (-1))\n        repeat ([ceiling v] of ([abs v] of (x 速度) ) )\n            if <<touching (关卡 v)?> or <touching (移动平台 v)?>> then\n                change x by ((([abs v] of (x 速度) ) / (x 速度)) * (-1))\n            end\n        end\n    end\nend\nchange y by (y 速度)\nif <<touching (关卡 v)?> or <touching (移动平台 v)?>> then\n    repeat ([ceiling v] of ([abs v] of (y 速度) ) )\n        if <<touching (关卡 v)?> or <touching (移动平台 v)?>> then\n            change y by ((([abs v] of (y 速度) ) / (y 速度)) * (-1))\n        end\n    end\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(([abs v] of (y 速度) ) / (y 速度)) = [-1]>> then\n        set [y 速度 v] to (h)\n    else\n        set [y 速度 v] to [0]\n    end\nelse\n    change [y 速度 v] by (-1)\nend\nif <<<<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> or <key (d v) pressed?>> or <key (a v) pressed?>> then\n    switch costume to (跑起来!)\nend\n\ndefine 制作跑动时的粒子 (💨) 模式 (m)\nset [粒子种类 v] to (m)\nrepeat (💨)\n    create clone of (粒子 v)\nend\n\ndefine 死亡\nbroadcast (死亡 v)\nif <([abs v] of (y 速度) ) < [5]> then\n    set [y 速度 v] to (([abs v] of (y 速度) ) + (pick random (3) to (6)))\nelse\n    set [y 速度 v] to ([abs v] of (y 速度) )\n    if <(y 速度) > [12]> then\n        set [y 速度 v] to [12]\n    end\nend\nset [x 速度 v] to ((x 速度) * (-1))\nset rotation style [all around v]\nrepeat until <(y position) < [-175]>\n    change x by (x 速度)\n    change y by (y 速度)\n    point in direction ((y 速度) * (2))\n    change [y 速度 v] by (-1)\n    go to [front v] layer\nend\nhide\nwait (0.5) seconds\n\ndefine 设置\nset [x 速度 v] to [0]\nset [y 速度 v] to [0]\nset [跳过关卡 v] to [no]\nset size to (175) %\nclear graphic effects\nshow\nset rotation style [left-right v]\nif <(关卡) = [1]> then\n    point in direction (90)\n    go to x: (-180) y: (-100)\nelse\n    if <(关卡) = [2]> then\n        point in direction (90)\n        go to x: (-211) y: (-120)\n    else\n        if <(关卡) = [3]> then\n            point in direction (90)\n            go to x: (-202) y: (95)\n        else\n            if <(关卡) = [4]> then\n                point in direction (90)\n                go to x: (-198) y: (-120)\n            else\n                if <(关卡) = [5]> then\n                    point in direction (90)\n                    go to x: (-185) y: (150)\n                else\n                    if <(关卡) = [6]> then\n                        point in direction (90)\n                        go to x: (-170) y: (-125)\n                    else\n                        if <(关卡) = [7]> then\n                            point in direction (90)\n                            go to x: (-213) y: (144)\n                        else\n                            if <(关卡) = [8]> then\n                                point in direction (-90)\n                                go to x: (135) y: (120)\n                            else\n                                if <(关卡) = [9]> then\n                                    point in direction (90)\n                                    go to x: (-165) y: (-70)\n                                else\n                                    if <(关卡) = [10]> then\n                                        point in direction (90)\n                                        go to x: (-200) y: (40)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [开始声音 v]\nset volume to (60) %\n\nwhen I receive [暂停声音 v]\nset volume to (0) %\n\nwhen I receive [设置 v]\n设置\n\nwhen I receive [死亡 v]\nset [brightness v] effect to (100)\nwait (0) seconds\nrepeat (10)\n    change [brightness v] effect by (-10)\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [开始游戏 v]\nstop all sounds\nforever\n    play sound [Bjm - Happiness v] until done\nend\n\nwhen I receive [开始游戏 v]\nset [关卡 v] to [1]\nset volume to (60) %\nbroadcast (设置 v) and wait\nforever\n    恐龙跳跃高度 [10] 移动速度 [6.5] 摩擦力 [0.5]\n    if <<<<<key (left arrow v) pressed?> or <key (right arrow v) pressed?>> or <key (a v) pressed?>> or <key (d v) pressed?>> and <(粒子) > [.35]>> then\n        制作跑动时的粒子 (pick random (2) to (3)) 模式 [0]\n        set [粒子 v] to [0]\n    end\n    if <<(y 速度) < [-7]> and <(粒子) > [.35]>> then\n        制作跑动时的粒子 (pick random (3) to (4)) 模式 [1]\n        set [粒子 v] to [0]\n    end\n    if <<touching (旗子 v)?> or <(跳过关卡) = [yes]>> then\n        set [结束时的屏幕 v] to [yes]\n        start sound [下一关 v]\n        broadcast (通关成功 v) and wait\n        change [关卡 v] by (1)\n        broadcast (清除克隆体 v)\n        broadcast (设置 v) and wait\n    end\n    set [当前的frame v] to (costume [number v])\n    if <<touching (尖刺 v)?> or <<touching (锯子 v)?> or <touching (有毒物质 v)?>>> then\n        start sound [砸 v]\n        死亡\n        broadcast (清除克隆体 v)\n        broadcast (设置 v) and wait\n    end\n    switch costume to (当前的frame)\nend\n\nwhen I receive [绿色恐龙 v]\nif <not <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n    switch costume to (gdino v)\n    forever\n        switch costume to (gdino2 v)\n        wait (0.08) seconds\n        switch costume to (gdino3 v)\n        wait (0.08) seconds\n        switch costume to (gdino4 v)\n        wait (0.08) seconds\n    end\nend\n\nwhen I receive [绿色恐龙 v]\nset [跑起来! v] to [5]\nforever\n    change [跑起来! v] by (1)\n    if <(跑起来!) > [6]> then\n        set [跑起来! v] to [5]\n    end\n    wait (0.08) seconds\nend\n\nwhen I receive [红色恐龙 v]\nif <not <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n    switch costume to (rdino v)\n    forever\n        switch costume to (rdino2 v)\n        wait (0.08) seconds\n        switch costume to (rdino3 v)\n        wait (0.08) seconds\n        switch costume to (rdino4 v)\n        wait (0.08) seconds\n    end\nend\n\nwhen I receive [红色恐龙 v]\nset [跑起来! v] to [11]\nforever\n    change [跑起来! v] by (1)\n    if <(跑起来!) > [12]> then\n        set [跑起来! v] to [11]\n    end\n    wait (0.08) seconds\nend\n\nwhen I receive [黄色恐龙 v]\nif <not <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n    switch costume to (ydino v)\n    forever\n        switch costume to (ydino2 v)\n        wait (0.08) seconds\n        switch costume to (ydino3 v)\n        wait (0.08) seconds\n        switch costume to (ydino4 v)\n        wait (0.08) seconds\n    end\nend\n\nwhen I receive [黄色恐龙 v]\nset [跑起来! v] to [17]\nforever\n    change [跑起来! v] by (1)\n    if <(跑起来!) > [18]> then\n        set [跑起来! v] to [17]\n    end\n    wait (0.08) seconds\nend\n\nwhen I receive [蓝色恐龙 v]\nif <not <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<key (left arrow v) pressed?> or <key (a v) pressed?>>>> then\n    switch costume to (bdino v)\n    forever\n        switch costume to (bdino2 v)\n        wait (0.08) seconds\n        switch costume to (bdino3 v)\n        wait (0.08) seconds\n        switch costume to (bdino5 v)\n        wait (0.08) seconds\n    end\nend\n\nwhen I receive [蓝色恐龙 v]\nset [跑起来! v] to [23]\nforever\n    change [跑起来! v] by (1)\n    if <(跑起来!) > [23]> then\n        set [跑起来! v] to [24]\n    end\n    wait (0.08) seconds\nend\n\nwhen flag clicked\nset volume to (100) %\nplay sound [Bjm - Utopia v] until done\n\nwhen I receive [开始游戏 v]\nset [粒子 v] to [0]\nforever\n    change [粒子 v] by (0.05)\nend\n\n@关卡\n\nwhen flag clicked\nhide\n\nwhen I receive [开始游戏 v]\nforever\n    go to [front v] layer\n    go [backward v] (3) layers\n    switch costume to (关卡)\n    show\nend\n\n@背景\n\nwhen I receive [开始游戏 v]\ngo to [back v] layer\nshow\nforever\n    go to x: (0) y: (0)\n    repeat (50)\n        change y by (-1)\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [开始游戏 v]\nforever\n    if <<(关卡) = [1]> or <(关卡) = [6]>> then\n        switch costume to (1 v)\n    end\n    if <<(关卡) = [2]> or <(关卡) = [7]>> then\n        switch costume to (2 v)\n    end\n    if <<(关卡) = [3]> or <(关卡) = [8]>> then\n        switch costume to (3 v)\n    end\n    if <<(关卡) = [4]> or <(关卡) = [9]>> then\n        switch costume to (4 v)\n    end\n    if <<(关卡) = [5]> or <(关卡) = [10]>> then\n        switch costume to (5 v)\n    end\nend\n\n@旗子\n\nwhen I receive [设置 v]\nset size to (10) %\n设置\n\ndefine 设置\nshow\nif <(关卡) = [1]> then\n    go to x: (209) y: (-55)\nelse\n    if <(关卡) = [2]> then\n        go to x: (-211) y: (119)\n    else\n        if <(关卡) = [3]> then\n            go to x: (-211) y: (-119)\n        else\n            if <(关卡) = [4]> then\n                go to x: (190) y: (147)\n            else\n                if <(关卡) = [5]> then\n                    go to x: (-129) y: (-73)\n                else\n                    if <(关卡) = [6]> then\n                        go to x: (191) y: (47)\n                    else\n                        if <(关卡) = [7]> then\n                            go to x: (-164) y: (-120)\n                        else\n                            if <(关卡) = [8]> then\n                                go to x: (-175) y: (-119)\n                            else\n                                if <(关卡) = [9]> then\n                                    go to x: (-182) y: (118)\n                                else\n                                    if <(关卡) = [10]> then\n                                        hide\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen flag clicked\nhide\n\nwhen I receive [开始游戏 v]\nswitch costume to (1 v)\nforever\n    if <(结束时的屏幕) = [no]> then\n        next costume\n        wait (0.05) seconds\n    end\nend\n\n@粒子\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nset size to (pick random (70) to (125)) %\nset [速度 v] to (pick random (-0.5) to (-1.5))\ngo to (恐龙 v)\nchange y by (pick random (-9) to (-12))\nif <(粒子种类) = [0]> then\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n    else\n        point in direction (-90)\n    end\nelse\n    point in direction (pick random (-90) to (90))\n    forever\n        move ((速度) * (2)) steps\n        change y by ((速度) / (-4))\n    end\nend\nmove (pick random (3) to (6)) steps\nforever\n    move (速度) steps\n    change y by ((速度) / (-4))\nend\n\nwhen I start as a clone\nswitch costume to (粒子 v)\nclear graphic effects\nrepeat (10)\n    change [ghost v] effect by (7)\nend\ndelete this clone\n\nwhen I start as a clone\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\nwhen I receive [开始游戏 v]\nset rotation style [left-right v]\nhide\n\n@橙子\n\nwhen flag clicked\nhide\n\nwhen I receive [清除克隆体 v]\ndelete this clone\n\nwhen I receive [设置 v]\n设置\n\ndefine 设置\nif <(关卡) = [1]> then\n    克隆于 x  [-75] y  [-50]\n    克隆于 x  [-75] y  [-80]\n    克隆于 x  [95] y  [-20]\n    克隆于 x  [125] y  [-20]\n    克隆于 x  [155] y  [-20]\nelse\n    if <(关卡) = [2]> then\n        克隆于 x  [-180] y  [-45]\n        克隆于 x  [-180] y  [-20]\n        克隆于 x  [-130] y  [-20]\n        克隆于 x  [20] y  [100]\n        克隆于 x  [20] y  [75]\n    else\n        if <(关卡) = [3]> then\n            克隆于 x  [3] y  [100]\n            克隆于 x  [3] y  [75]\n        else\n            if <(关卡) = [4]> then\n                克隆于 x  [180] y  [20]\n                克隆于 x  [210] y  [20]\n                克隆于 x  [-200] y  [70]\n                克隆于 x  [-150] y  [70]\n            else\n                if <(关卡) = [5]> then\n                    克隆于 x  [200] y  [80]\n                    克隆于 x  [200] y  [55]\n                    克隆于 x  [-128] y  [55]\n                    克隆于 x  [-128] y  [35]\n                    克隆于 x  [120] y  [-80]\n                else\n                    if <(关卡) = [6]> then\n                        克隆于 x  [130] y  [120]\n                        克隆于 x  [130] y  [90]\n                        克隆于 x  [-130] y  [30]\n                        克隆于 x  [-207] y  [100]\n                        克隆于 x  [-207] y  [120]\n                    else\n                        if <(关卡) = [7]> then\n                            克隆于 x  [-80] y  [40]\n                            克隆于 x  [130] y  [145]\n                            克隆于 x  [167] y  [15]\n                            克隆于 x  [-130] y  [-120]\n                            克隆于 x  [-105] y  [-120]\n                        else\n                            if <(关卡) = [8]> then\n                                克隆于 x  [-210] y  [100]\n                                克隆于 x  [-210] y  [120]\n                                克隆于 x  [132] y  [-120]\n                                克隆于 x  [110] y  [-120]\n                                克隆于 x  [154] y  [-120]\n                            else\n                                if <(关卡) = [9]> then\n                                    克隆于 x  [-75] y  [-68]\n                                    克隆于 x  [-75] y  [-88]\n                                    克隆于 x  [10] y  [-120]\n                                    克隆于 x  [35] y  [-120]\n                                    克隆于 x  [60] y  [-120]\n                                else\n                                    if <(关卡) = [10]> then\n                                        克隆于 x  [-50] y  [-90]\n                                        克隆于 x  [-80] y  [-90]\n                                        克隆于 x  [-110] y  [-90]\n                                        克隆于 x  [200] y  [-90]\n                                        克隆于 x  [170] y  [-90]\n                                        克隆于 x  [140] y  [-90]\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine 克隆于 x  (x) y  (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    if <touching (恐龙 v)?> then\n        start sound [Fruit collect v]\n        delete this clone\n    end\n    go to [back v] layer\n    go [forward v] (1) layers\nend\n\nwhen I start as a clone\nshow\n\nwhen I receive [开始游戏 v]\nset rotation style [left-right v]\nset size to (50) %\nhide\n\n@危险警示\n\nwhen flag clicked\nhide\n\nwhen I receive [死亡 v]\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\nwait (.1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\n\nwhen I receive [开始游戏 v]\nhide\nset [ghost v] effect to (100)\nshow\ngo to x: (0) y: (0)\n\n@尖刺\n\nwhen flag clicked\nhide\n\nwhen I receive [开始游戏 v]\nforever\n    go to [front v] layer\n    show\n    switch costume to (关卡)\n    go [backward v] (5) layers\nend\n\n@锯子\n\nwhen flag clicked\nhide\n\nwhen I receive [清除克隆体 v]\ndelete this clone\n\nwhen I receive [设置 v]\n设置\n\ndefine 设置\nif <(关卡) = [1]> then\n    set size to (50) %\n    克隆于 x  [-22] y  [-115]\nelse\n    if <(关卡) = [2]> then\n        set size to (95) %\n        克隆于 x  [-68] y  [30]\n    else\n        if <(关卡) = [3]> then\n            set size to (30) %\n            克隆于 x  [-130] y  [110]\n            broadcast (上下 v)\n        else\n            if <(关卡) = [4]> then\n                set size to (20) %\n                克隆于 x  [-115] y  [-55]\n                broadcast (上下 v)\n            else\n                if <(关卡) = [5]> then\n                    set size to (25) %\n                    克隆于 x  [30] y  [-70]\n                    broadcast (左右 v)\n                else\n                    if <(关卡) = [6]> then\n                        set size to (45) %\n                        克隆于 x  [-75] y  [5]\n                    else\n                        if <(关卡) = [7]> then\n                            set size to (50) %\n                            克隆于 x  [20] y  [-70]\n                            broadcast (左右 v)\n                        else\n                            if <(关卡) = [8]> then\n                                set size to (30) %\n                                克隆于 x  [60] y  [-70]\n                                broadcast (上下 v)\n                                set size to (30) %\n                                克隆于 x  [190] y  [-70]\n                                broadcast (上下 v)\n                            else\n                                if <(关卡) = [9]> then\n                                    set size to (45) %\n                                    克隆于 x  [20] y  [2]\n                                    broadcast (左右 v)\n                                    set size to (45) %\n                                    克隆于 x  [-7] y  [32]\n                                    broadcast (左右 v)\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine 克隆于 x  (x) y  (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    go to [back v] layer\n    go [forward v] (1) layers\n    show\nend\n\nwhen I start as a clone\nforever\n    set rotation style [all around v]\n    turn right (5) degrees\nend\n\nwhen I receive [上下 v]\nforever\n    repeat (20)\n        change y by (1)\n    end\n    repeat (20)\n        change y by (-1)\n    end\nend\n\nwhen I receive [上下 v]\nforever\n    repeat (20)\n        change y by (1)\n    end\n    repeat (20)\n        change y by (-1)\n    end\nend\n\nwhen I receive [左右 v]\nforever\n    repeat (20)\n        change x by (2)\n    end\n    repeat (20)\n        change x by (-2)\n    end\nend\n\nwhen I receive [开始游戏 v]\nhide\n\n@移动平台\n\nwhen flag clicked\nhide\n\nwhen I receive [清除克隆体 v]\ndelete this clone\n\nwhen I receive [设置 v]\n设置\n\ndefine 设置\nif <(关卡) = [4]> then\n    set size to (110) %\n    克隆于 x  [-150] y  [-100]\n    克隆于 x  [-60] y  [-60]\n    克隆于 x  [30] y  [-20]\nelse\n    if <(关卡) = [5]> then\n        克隆于 x  [60] y  [50]\n    else\n        if <(关卡) = [6]> then\n            克隆于 x  [30] y  [-60]\n            克隆于 x  [60] y  [60]\n        else\n            if <(关卡) = [7]> then\n                克隆于 x  [50] y  [60]\n                克隆于 x  [120] y  [120]\n            else\n                if <(关卡) = [8]> then\n                    克隆于 x  [135] y  [100]\n                else\n                    if <(关卡) = [9]> then\n                        克隆于 x  [180] y  [-40]\n                        克隆于 x  [120] y  [-100]\n                        克隆于 x  [120] y  [20]\n                    else\n                        if <(关卡) = [10]> then\n                            克隆于 x  [30] y  [-60]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine 克隆于 x  (x) y  (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nforever\n    go to [front v] layer\nend\n\nwhen I start as a clone\nshow\nforever\n    repeat (20)\n        change x by (1)\n    end\n    repeat (20)\n        change x by (-1)\n    end\nend\n\nwhen I receive [开始游戏 v]\nhide\n\n@选择角色指示\n\nwhen flag clicked\ngo to x: (0) y: (-100)\nshow\nforever\n    point in direction (((([sin v] of ((timer) * (120)) ) * (2)) + (100)) - (10))\nend\n\nwhen I receive [开始游戏 v]\nhide\n\n@有毒物质\n\nwhen flag clicked\nhide\n\nwhen I receive [清除克隆体 v]\ndelete this clone\n\nwhen I receive [设置 v]\n设置\n\ndefine 设置\nif <(关卡) = [5]> then\n    克隆于 x  [-60] y  [22]\n    broadcast (左右 v)\nelse\n    if <(关卡) = [6]> then\n        克隆于 x  [-60] y  [-127]\n        broadcast (左右 v)\n    else\n        if <(关卡) = [7]> then\n            克隆于 x  [-70] y  [32]\n            broadcast (左右 v)\n        else\n            if <(关卡) = [8]> then\n                克隆于 x  [-3] y  [70]\n                broadcast (左右 v)\n            else\n                if <(关卡) = [9]> then\n                    克隆于 x  [0] y  [-126]\n                    broadcast (左右 v)\n                end\n            end\n        end\n    end\nend\n\ndefine 克隆于 x  (x) y  (y)\ngo to x: (x) y: (y)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nshow\nforever\n    next costume\n    wait (0.01) seconds\nend\n\nwhen I receive [左右 v]\nforever\n    repeat (50)\n        change x by (1)\n    end\n    repeat (50)\n        change x by (-1)\n    end\nend\n\nwhen I receive [开始游戏 v]\nset rotation style [left-right v]\nset size to (10) %\nhide\n\n@按钮\n\nwhen flag clicked\nhide\n\ndefine 摆动\nrepeat (4)\n    change y by (0.5)\n    go to [front v] layer\nend\nrepeat (4)\n    change y by (-0.5)\n    go to [front v] layer\nend\n\nwhen I start as a clone\nshow\nif <(ID) = [1]> then\n    go to x: (225) y: (165)\n    switch costume to (跳过关卡 v)\n    forever\n        if <<mouse down?> and <touching (mouse-pointer v)?>> then\n            if <not <(关卡) = [10]>> then\n                set [跳过关卡 v] to [yes]\n            end\n            wait until <not <mouse down?>>\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <touching (mouse-pointer v)?> then\n        摆动\n        repeat until <not <touching (mouse-pointer v)?>>\n            go to [front v] layer\n        end\n    end\n    go to [front v] layer\nend\n\ndefine •ᴗ•\nset [id v] to [1]\ngo to x: (-205) y: (165)\nset volume to (100) %\nswitch costume to (开启声音 v)\nrepeat (1)\n    create clone of (_myself_ v)\n    change [id v] by (1)\nend\nswitch costume to (开启声音 v)\n\nwhen I receive [开始游戏 v]\n•ᴗ•\nforever\n    if <touching (mouse-pointer v)?> then\n        摆动\n        repeat until <not <touching (mouse-pointer v)?>>\n            go to [front v] layer\n        end\n    end\n    go to x: (-225) y: (165)\n    go to [front v] layer\n    show\nend\n\nwhen I receive [开始游戏 v]\nforever\n    if <<mouse down?> and <touching (mouse-pointer v)?>> then\n        if <(costume [number v]) = [2]> then\n            switch costume to (静音 v)\n            broadcast (暂停声音 v)\n        else\n            switch costume to (开启声音 v)\n            broadcast (开始声音 v)\n        end\n        wait until <not <mouse down?>>\n    end\nend\n\n@绿色恐龙\n\nwhen this sprite clicked\nstart sound [Press v]\nbroadcast (开始游戏 v)\nbroadcast (绿色恐龙 v)\n\nwhen flag clicked\ngo to [front v] layer\nset size to (500) %\ngo to x: (-172) y: (27)\nshow\nforever\n    point in direction (((([sin v] of ((timer) * (120)) ) * (2)) + (100)) - (10))\nend\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (450) %\n        set [ghost v] effect to (25)\n    else\n        set size to (500) %\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen I receive [开始游戏 v]\nhide\n\n@红色恐龙\n\nwhen flag clicked\ngo to [front v] layer\nset size to (500) %\ngo to x: (-64) y: (27)\nshow\nforever\n    point in direction (((([sin v] of ((timer) * (120)) ) * (2)) + (100)) - (10))\nend\n\nwhen I receive [开始游戏 v]\nhide\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (450) %\n        set [ghost v] effect to (25)\n    else\n        set size to (500) %\n        set [ghost v] effect to (0)\n    end\nend\n\nwhen this sprite clicked\nstart sound [Press v]\nbroadcast (开始游戏 v)\nbroadcast (红色恐龙 v)\n\n@黄色恐龙\n\nwhen flag clicked\ngo to [front v] layer\nset size to (500) %\ngo to x: (62) y: (27)\nshow\nforever\n    point in direction (((([sin v] of ((timer) * (120)) ) * (2)) + (100)) - (10))\nend\n\nwhen I receive [开始游戏 v]\nhide\n\nwhen this sprite clicked\nstart sound [Press v]\nbroadcast (开始游戏 v)\nbroadcast (黄色恐龙 v)\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (450) %\n        set [ghost v] effect to (25)\n    else\n        set size to (500) %\n        set [ghost v] effect to (0)\n    end\nend\n\n@蓝色恐龙\n\nwhen flag clicked\ngo to [front v] layer\nset size to (500) %\ngo to x: (175) y: (27)\nshow\nforever\n    point in direction (((([sin v] of ((timer) * (120)) ) * (2)) + (100)) - (10))\nend\n\nwhen I receive [开始游戏 v]\nhide\n\nwhen this sprite clicked\nstart sound [Press v]\nbroadcast (开始游戏 v)\nbroadcast (蓝色恐龙 v)\n\nwhen flag clicked\nset [ghost v] effect to (0)\nforever\n    if <touching (mouse-pointer v)?> then\n        set size to (450) %\n        set [ghost v] effect to (25)\n    else\n        set size to (500) %\n        set [ghost v] effect to (0)\n    end\nend\n\n@缩略图\n\ndefine smooth glide to (y) (speed)\nrepeat until <((y position) - (1)) < (y)>\n    change y by (((y) - (y position)) / (speed))\nend\nset y to (y)\n\nwhen flag clicked\nhide\n\nwhen flag clicked\nforever\n    set [timer v] to ((timer) + (0.1))\nend\n\nwhen I receive [message1 v]\ngo to [front v] layer\nshow\ngo to x: (0) y: (700)\nsmooth glide to [0] [5]\n\nwhen [timer v] > (Timer)\ngo to [front v] layer\nshow\ngo to x: (0) y: (700)\nsmooth glide to [0] [5]\n\n@选择角色背景\n\nwhen I receive [开始游戏 v]\nhide\nstop [other scripts in sprite v]\n\nwhen flag clicked\ngo to [back v] layer\nshow\nforever\n    go to x: (0) y: (0)\n    repeat (50)\n        change y by (-1)\n    end\nend\n\n