簡單跑酷 Easy Platformer
@Stage\n\n@縮圖\n\nwhen flag clicked\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    set [ghost v] effect to (100)\nend\n\n@Intro\n\nwhen I start as a clone\nif <(cloneID) = [logo]> then\n    show\n    set [clone_dir v] to [360]\n    switch costume to (bit v)\n    set size to (1200) %\n    switch costume to (logo v)\n    repeat until <[101] > (size)>\n        switch costume to (bit v)\n        change size by (((65) - (size)) / (6.9))\n        change [clone_dir v] by (((90) - (clone_dir)) / (6.9))\n        point in direction (clone_dir)\n        switch costume to (logo v)\n    end\n    repeat until <[66] > (size)>\n        change size by (((65) - (size)) / (6.9))\n        change [clone_dir v] by (((90) - (clone_dir)) / (6.9))\n        point in direction (clone_dir)\n    end\n    set [clone_dir v] to [0.5]\n    repeat until <(size) > [100]>\n        change [clone_dir v] by ((clone_dir) / (2))\n        change size by (clone_dir)\n        turn right ((clone_dir) / (-12)) degrees\n    end\n    repeat (7)\n        switch costume to (bit v)\n        change [clone_dir v] by ((clone_dir) / (2))\n        change size by (clone_dir)\n        turn right ((clone_dir) / (-12)) degrees\n        switch costume to (logo v)\n    end\n    hide\n    switch costume to (square1 v)\n    set [cloneid v] to [square2]\n    create clone of (_myself_ v)\n    switch costume to (square2 v)\n    set [cloneid v] to [square3]\n    create clone of (_myself_ v)\n    set [cloneid v] to [kirbyzaz]\n    create clone of (_myself_ v)\n    set [cloneid v] to [back3]\n    create clone of (_myself_ v)\n    repeat (8)\n        set [clone_size v] to [50]\n        set [cloneid v] to [square1]\n        create clone of (_myself_ v)\n        set [cloneid v] to [back2]\n        create clone of (_myself_ v)\n        broadcast (\[INTRO\]size v)\n        switch costume to (square1 v)\n        wait (0.561) seconds\n    end\n    broadcast (\[INTRO\]spin v)\n    delete this clone\nend\n\nwhen I start as a clone\nif <(cloneID) = [back]> then\n    show\n    set [clone_dir v] to [360]\n    switch costume to (bit v)\n    set size to (1200) %\n    switch costume to (blackbar1 v)\n    repeat until <[175] > (size)>\n        switch costume to (bit v)\n        change size by (((174) - (size)) / (6.9))\n        change [clone_dir v] by (((65) - (clone_dir)) / (6.9))\n        point in direction (clone_dir)\n        switch costume to (back v)\n    end\n    set [clone_dir v] to [0.5]\n    repeat (15)\n        switch costume to (bit v)\n        change [clone_dir v] by ((clone_dir) / (2))\n        change size by (clone_dir)\n        switch costume to (back v)\n        turn right ((clone_dir) / (12)) degrees\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(cloneID) = [b1]> then\n    switch costume to (blackbar1 v)\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    show\n    repeat (10)\n        set size to (100) %\n        go to [front v] layer\n        change [ghost v] effect by (-10)\n    end\n    wait (0.1) seconds\n    repeat until <(timer) > [9]>\n        go to [front v] layer\n        change y by (((125) - (y position)) / (5))\n        switch costume to (blackbar1 v)\n        show\n    end\n    repeat until <(timer) > [10]>\n        go to [front v] layer\n        change y by (((-1) - (y position)) / (5))\n        switch costume to (blackbar1 v)\n        show\n    end\n    broadcast (\[INTRO\]end v)\nend\n\nwhen I start as a clone\nif <(cloneID) = [b2]> then\n    switch costume to (blackbar2 v)\n    set [ghost v] effect to (100)\n    go to x: (0) y: (0)\n    show\n    repeat (10)\n        set size to (100) %\n        go to [front v] layer\n        change [ghost v] effect by (-10)\n    end\n    wait (0.1) seconds\n    repeat until <(timer) > [9]>\n        go to [front v] layer\n        change y by (((-125) - (y position)) / (5))\n        switch costume to (blackbar2 v)\n        show\n    end\n    repeat until <(timer) > [10]>\n        go to [front v] layer\n        change y by (((1) - (y position)) / (5))\n        switch costume to (blackbar2 v)\n        show\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nreset timer\nstart sound [Foxsky - Kirby Smash v]\nwait (0.7) seconds\nhide\nset [cloneid v] to [b1]\ncreate clone of (_myself_ v)\nset [cloneid v] to [b2]\ncreate clone of (_myself_ v)\nwait (0.3) seconds\nset [cloneid v] to [back]\ncreate clone of (_myself_ v)\nset [cloneid v] to [logo]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(cloneID) = [square1]> then\n    go to [back v] layer\n    go [forward v] (3) layers\n    set [clone_dir v] to [0]\n    show\n    set [clone_cos v] to (costume [number v])\n    set size to (0) %\n    repeat until <(size) > [100]>\n        change size by (((clone_size) - (size)) / (5))\n        turn right (((clone_dir) - (direction)) / (5)) degrees\n    end\n    repeat until <(size) > [1500]>\n        switch costume to (bit v)\n        change size by (((clone_size) - (size)) / (5))\n        switch costume to (clone_cos)\n        turn right (((clone_dir) - (direction)) / (5)) degrees\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(cloneID) = [back2]> then\n    switch costume to (back2 v)\n    clear graphic effects\n    set [ghost v] effect to (50)\n    show\n    go to [front v] layer\n    repeat (25)\n        change [ghost v] effect by (2)\n    end\n    hide\n    delete this clone\nend\n\nwhen I start as a clone\nif <(cloneID) = [back3]> then\n    go to x: (0) y: (0)\n    show\n    switch costume to (back3 v)\n    set [intro_s v] to [90]\n    show\n    set [clone_dir v] to [90]\n    \n        switch costume to (bit v)\n        set size to (100) %\n        go to [back v] layer\n        change [clone_dir v] by (((intro_s) - (clone_dir)) / (5))\n        point in direction (clone_dir)\n        switch costume to (back3 v)\n    end\nend\n\nwhen I start as a clone\nif <(cloneID) = [square3]> then\n    set [clone_dir v] to [0]\n    show\n    set [clone_cos v] to (costume [number v])\n    set size to (0) %\n    go to x: (0) y: (0)\n    repeat until <(size) > [100]>\n        change size by ((((clone_size) * ((2.25) * (2.25))) - (size)) / (5))\n        turn right ((((clone_dir) * ((2.25) * (2.25))) - (direction)) / (5)) degrees\n    end\n    repeat until <(size) > [1500]>\n        switch costume to (bit v)\n        change size by ((((clone_size) * ((2.25) * (2.25))) - (size)) / (5))\n        turn right ((((clone_dir) * ((2.25) * (2.25))) - (direction)) / (5)) degrees\n        switch costume to (clone_cos)\n        turn right (0.1) degrees\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(cloneID) = [square2]> then\n    set [clone_dir v] to [0]\n    show\n    set [clone_cos v] to (costume [number v])\n    set size to (0) %\n    go to x: (0) y: (0)\n    repeat until <(size) > [100]>\n        change size by ((((clone_size) * (2.25)) - (size)) / (5))\n        turn right ((((clone_dir) * (2.25)) - (direction)) / (5)) degrees\n    end\n    repeat until <(size) > [1500]>\n        switch costume to (bit v)\n        change size by ((((clone_size) * (2.25)) - (size)) / (5))\n        turn right ((((clone_dir) * (2.25)) - (direction)) / (5)) degrees\n        switch costume to (clone_cos)\n        turn right (0.1) degrees\n    end\n    delete this clone\nend\n\nwhen I receive [\[intro\]size v]\nif < (cloneID) contains [square]?> then\n    if <[350] < (clone_dir)> then\n        set [clone_dir v] to [0]\n    end\n    change [clone_size v] by ((clone_size) * (1.5))\n    change [clone_dir v] by (22.5)\nend\nif <(cloneID) = [back3]> then\n    change [intro_s v] by (90)\nend\n\nwhen I receive [\[intro\]spin v]\nif <<(cloneID) = [b1]> or <(cloneID) = [b2]>> then\n\nwhen I receive [\[intro\]size v]\nif <(cloneID) = [kirbyzaz]> then\n    set [clone_cos v] to (pick random (5) to (10))\n    change size by (30)\n    repeat (35)\n        set [clone_cos v] to (((clone_cos) * (0.75)) + (((90) - (direction)) * (0.3)))\n        turn right (clone_cos) degrees\n    end\nend\n\nwhen I start as a clone\nif <(cloneID) = [kirbyzaz]> then\n    show\n    set [clone_dir v] to [90]\n    point in direction (90)\n    go to x: (0) y: (0)\n    switch costume to (bit v)\n    set size to (200) %\n    switch costume to (yourname v)\n    \n        switch costume to (bit v)\n        change size by (((120) - (size)) / (5))\n        switch costume to (yourname v)\n        go to [front v] layer\n        go [backward v] (2) layers\n    end\nend\n\nwhen I receive [\[intro\]size v]\nif <(cloneID) = [b1]> then\n    set [clone_cos v] to [2]\n    repeat (35)\n        set [clone_cos v] to (((clone_cos) * (0.75)) + (((90) - (direction)) * (0.3)))\n        turn right (clone_cos) degrees\n    end\nend\nif <(cloneID) = [b2]> then\n    set [clone_cos v] to [-5]\n    repeat (35)\n        set [clone_cos v] to (((clone_cos) * (0.75)) + (((90) - (direction)) * (0.3)))\n        turn right (clone_cos) degrees\n    end\nend\n\nwhen I receive [\[intro\]end v]\nif <<(cloneID) = [b1]> or <(cloneID) = [b2]>> then\n    wait (1) seconds\n    if <(cloneID) = [b1]> then\n        change y by (1.5)\n        repeat until <(y position) > [200]>\n            switch costume to (back2 v)\n            change y by ((y position) / (3))\n            switch costume to (blackbar1 v)\n        end\n    else\n        change y by (-1.5)\n        repeat until <[-200] > (y position)>\n            switch costume to (back2 v)\n            change y by ((y position) / (3))\n            switch costume to (blackbar2 v)\n        end\n    end\n    delete this clone\nelse\n    hide\n    delete this clone\nend\n\n@小貓咪電視\n\nwhen flag clicked\nset [小貓咪電視 v] to [902]\nswitch costume to (小貓咪電視)\nhide\n\nwhen I receive [\[intro\]end v]\nwait (3) seconds\nshow\nset [ghost v] effect to (100)\nwait (1) seconds\nrepeat (999)\n    change [ghost v] effect by (-1.5)\nend\n\n@小貓咪\n\nwhen flag clicked\nhide\n\ndefine 移動\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [小貓咪的x v] by (1)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [小貓咪的x v] by (-1)\nend\nset [小貓咪的x v] to ((小貓咪的X) * (0.9))\nchange x by (小貓咪的X)\nif <<touching (關卡 v)?> or <touching (微笑移動方塊 v)?>> then\n    change y by (1)\n    if <<touching (關卡 v)?> or <touching (微笑移動方塊 v)?>> then\n        change y by (1)\n        if <<touching (關卡 v)?> or <touching (微笑移動方塊 v)?>> then\n            change y by (1)\n            if <<touching (關卡 v)?> or <touching (微笑移動方塊 v)?>> then\n                change y by (1)\n                if <<touching (關卡 v)?> or <touching (微笑移動方塊 v)?>> then\n                    change x by ((小貓咪的X) * (-1))\n                    change y by (-4)\n                    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n                        if <(小貓咪的X) > [0]> then\n                            set [小貓咪的x v] to [-4]\n                        else\n                            set [小貓咪的x v] to [4]\n                        end\n                        set [小貓咪的y v] to [16]\n                    else\n                        set [小貓咪的x v] to [0]\n                    end\n                    if <<touching (彈跳床 v)?> and <(mouse y) > (y position)>> then\n                        if <(小貓咪的X) > [0]> then\n                            set [小貓咪的x v] to [-4]\n                        else\n                            set [小貓咪的x v] to [4]\n                        end\n                        set [小貓咪的y v] to [20]\n                    else\n                        set [小貓咪的x v] to [0]\n                    end\n                end\n            end\n        end\n    end\nend\nchange [小貓咪的y v] by (-1)\nchange y by (小貓咪的Y)\nif <<touching (關卡 v)?> or <touching (微笑移動方塊 v)?>> then\n    change y by ((小貓咪的Y) * (-1))\n    set [小貓咪的y v] to [0]\nend\nchange y by (-1)\nif <<<touching (關卡 v)?> or <touching (微笑移動方塊 v)?>> and <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n    set [小貓咪的y v] to [15]\nend\nchange y by (1)\n\ndefine 小貓咪碰到陷阱\ngo to x: (-205) y: (-30)\n\nwhen flag clicked\nforever\n    if <touching (陷阱 v)?> then\n        小貓咪碰到陷阱\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching (下一關 v)?> then\n        下一關\n    end\nend\n\ndefine 下一關\nbroadcast (下一關 v)\ngo to x: (-205) y: (-30)\n\ndefine 除錯\nset [死亡次數 v] to [0]\nshow variable [關卡 v]\nif <(username) = [fsc-s181216]> then\n    show variable [小貓咪的x v]\n    show variable [小貓咪的y v]\nelse\n    hide variable [小貓咪的x v]\n    hide variable [小貓咪的y v]\nend\n\nwhen flag clicked\n除錯\n\nwhen I receive [\[intro\]end v]\nwait (2) seconds\ngo [forward v] (2) layers\nswitch costume to (小貓咪 v)\ngo to [front v] layer\nshow\ngo to x: (-205) y: (-30)\nset size to (100) %\npoint in direction (90)\nset [小貓咪的x v] to [0]\nset [小貓咪的y v] to [0]\nset [關卡 v] to [1]\nforever\n    移動\nend\n\nif <<<touching (彈跳床 v)?> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n    if <(小貓咪的X) > [0]> then\n        set [小貓咪的x v] to [-4]\n    else\n        set [小貓咪的x v] to [4]\n    end\n    set [小貓咪的y v] to [20]\nelse\n    set [小貓咪的x v] to [0]\nend\nif <<touching (彈跳床 v)?> and <(mouse y) > (y position)>> then\n    if <(小貓咪的X) > [0]> then\n        set [小貓咪的x v] to [-4]\n    else\n        set [小貓咪的x v] to [4]\n    end\n    set [小貓咪的y v] to [20]\nelse\n    set [小貓咪的x v] to [0]\nend\n\n@關卡\n\nwhen I receive [下一關 v]\nnext costume\n\nwhen flag clicked\nswitch costume to (1 v)\nhide\n\nwhen flag clicked\nforever\n    set [關卡 v] to (costume [name v])\nend\n\nwhen I receive [\[intro\]end v]\nwait (2) seconds\nswitch costume to (1 v)\ngo to [front v] layer\nshow\ngo to x: (0) y: (0)\nset size to (100) %\n\n@陷阱\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    switch costume to (關卡)\nend\n\nwhen I receive [\[intro\]end v]\nwait (2) seconds\nshow\n\nwhen flag clicked\nforever\n    if <touching (小貓咪 v)?> then\n        change [死亡次數 v] by (1)\n    end\nend\n\n@下一關\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    go to [front v] layer\n    switch costume to (關卡)\nend\n\nwhen I receive [\[intro\]end v]\nwait (2) seconds\nshow\n\n@微笑移動方塊\n\nwhen flag clicked\nhide\nforever\n    go to [front v] layer\n    switch costume to (關卡)\nend\n\ndefine 移動 (幾多秒?) 秒到 x: (x的哪裏?) :y (y的哪裏?)\nglide (幾多秒?) secs to x: (x的哪裏?) y: (y的哪裏?)\n\nwhen flag clicked\ngo to x: (-4) y: (-130)\nhide\nforever\n    if <(關卡) = [3]> then\n        show\n        移動 [5] 秒到 x: [100] :y [-130]\n        wait (4) seconds\n        移動 [5] 秒到 x: [-4] :y [-130]\n        wait (4) seconds\n    else\n        hide\n    end\nend\n\n@彈跳床\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    if <(關卡) = [5]> then\n        show\n        有沒有碰到玩家?\n    else\n        hide\n    end\nend\n\ndefine 有沒有碰到玩家?\nswitch costume to (1 v)\nif <touching (小貓咪 v)?> then\n    switch costume to (2 v)\n    wait (0.25) seconds\n    switch costume to (1 v)\nelse\n    switch costume to (1 v)\nend\n\n
簡單跑酷2: https://scratch.mit.edu/projects/497680908/\n簡單跑酷3: https://scratch.mit.edu/projects/497680908/\n簡單跑酷4: https://scratch.mit.edu/projects/686041938/\n電腦:\n箭咀或WASD\n平板電腦(ipad)和手機:\n拖動屏幕\nComputer:\nWASD/Arrow\nIpad and Phone:\nDrag the Screen