Clone Follower Platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Unlimited v] until done\nend\n\n@player\n\nwhen flag clicked\nset [☁ person played v] to [1]\nerase all\npen down\nforever\n    if <(pause script) = [1]> then\n        if <not <key (right arrow v) pressed?>> then\n            repeat until <<(run) < [1]> or <key (right arrow v) pressed?>>\n                change [run v] by (-0.2)\n                change x by (run)\n                if <touching (ground v)?> then\n                    change x by (() - (run))\n                end\n            end\n        end\n    end\n    if <(pause script) = [0]> then\n        if <not <key (left arrow v) pressed?>> then\n            repeat until <<(run) > [-1]> or <key (left arrow v) pressed?>>\n                change [run v] by (0.2)\n                change x by (run)\n                if <touching (ground v)?> then\n                    change x by (() - (run))\n                end\n            end\n        end\n    end\nend\n\ndefine Walk\nset [slope v] to [0]\nrepeat until <<not <touching (ground v)?>> or <(slope) = [8]>>\n    change y by (1)\n    change [slope v] by (1)\nend\nif <(slope) = [8]> then\n    broadcast (wall jump v)\n    change x by ((0) - (run))\n    change y by ((0) - (slope))\nend\n\nwhen I start as a clone\nset [ghost v] effect to (40)\nhide\nwait (1) seconds\nshow\nwait (0.0) seconds\ndelete this clone\n\nwhen flag clicked\nforever\n    if <touching (tramploline v)?> then\n        set [speed y v] to [19]\n    end\nend\n\nwhen flag clicked\ngo to [front v] layer\nset [level v] to [0]\nswitch costume to (player v)\nforever\n    create clone of (_myself_ v)\n    if <<(LEVEL) = [0]> and <(x position) = [244]>> then\n        go to x: (-218) y: (-128)\n        broadcast (LEVEL v)\n        erase all\n    end\n    if <touching (spikes v)?> then\n        go to x: (-218) y: (-128)\n        erase all\n    end\nend\n\nwhen flag clicked\nforever\n    if <<key (up arrow v) pressed?> and <(falling) < [3]>> then\n        set [speed y v] to [12]\n    end\nend\n\n\n\nwhen I receive [level v]\nset [hide v] to [1]\nwait (0.1) seconds\nset [hide v] to [0]\n\nwhen I receive [wall jump v]\nif <<key (up arrow v) pressed?> and <key (right arrow v) pressed?>> then\n    set [speed y v] to [12]\n    set [run v] to [-7]\nend\nif <<key (up arrow v) pressed?> and <key (left arrow v) pressed?>> then\n    set [speed y v] to [12]\n    set [run v] to [7]\nend\n\ndefine Touch Ground\nchange [falling v] by (1)\nrepeat until <not <touching (ground v)?>>\n    set [speed y v] to [0]\n    change y by (1)\n    set [falling v] to [0]\nend\n\ndefine Touch ground <up?>\nif <up?> then\n    set [speed y v] to [0]\n    change y by (-11)\nelse\n    Touch Ground\nend\n\nwhen flag clicked\nforever\n    if <<key (left arrow v) pressed?> and <key (right arrow v) pressed?>> then\n        set [run v] to [0.9]\n    end\nend\n\nwhen flag clicked\nset [speed y v] to [0]\nforever\n    change [speed y v] by (-1)\n    change y by (speed Y)\n    Touch ground <<(speed Y) > [0]> and <touching (ground v)?>>\nend\n\nwhen I start as a clone\n\nwhen flag clicked\nforever\n    if <(hold) = [1]> then\n        repeat until <<(run) > [5]> or <<not <key (right arrow v) pressed?>> or <(hold) = [0]>>>\n            change [run v] by (0.9)\n        end\n    end\n    if <(hold) = [0]> then\n        if <key (left arrow v) pressed?> then\n            repeat until <<(run) < [-5]> or <<not <key (left arrow v) pressed?>> or <(hold) = [1]>>>\n                change [run v] by (-0.9)\n            end\n        end\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(hide) = [1]> then\n        delete this clone\n    end\nend\n\nwhen flag clicked\nset size to (100) %\ngo to x: (-186) y: (-70)\nset rotation style [left-right v]\nforever\n    if <key (right arrow v) pressed?> then\n        set [hold v] to [1]\n        set [pause script v] to [1]\n        change x by (run)\n        point in direction (run)\n        Walk\n    end\n    if <key (left arrow v) pressed?> then\n        change x by (run)\n        point in direction (run)\n        Walk\n        set [hold v] to [0]\n        set [pause script v] to [0]\n    end\nend\n\nwhen flag clicked\nset pen size to (7)\nforever\n    change pen (color v) by (10)\nend\n\nwhen flag clicked\nforever\n    wait (10) seconds\n    erase all\nend\n\nwhen I start as a clone\n\nchange y by (stop)\nset [speed y v] to [0]\n\n@ground\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to [back v] layer\ngo to x: (0) y: (0)\n\nwhen I receive [level v]\nnext costume\nstop [this script v]\n\nwhen flag clicked\nforever\n    if <(costume [number v]) = [10]> then\n        set [level v] to [1]\n    end\nend\n\n@back ground\n\nwhen I receive [level v]\nnext costume\nstop [this script v]\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\nforever\n    if <(costume [number v]) = [1]> then\n        go to [front v] layer\n        go [backward v] (1) layers\n    else\n        go to [back v] layer\n    end\nend\n\n@spikes\n\nwhen I receive [level v]\nnext costume\nstop [this script v]\n\nwhen flag clicked\nswitch costume to (costume1 v)\ngo to x: (0) y: (0)\n\n@tramploline\n\nwhen flag clicked\nhide\ngo to x: (44) y: (-5)\nforever\n    if <([costume # v] of [ground v]) = [4]> then\n        show\n    else\n        hide\n    end\nend\n\n@arrow\n\nwhen flag clicked\nforever\n    if <(LEVEL) = [0]> then\n        show\n    else\n        hide\n    end\nend\n\n@color\n\nwhen flag clicked\nset [hide v] to [0]\nset size to (100) %\nhide\nforever\n    glide (0) secs to (player v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nshow\nforever\n    change [ghost v] effect by (5)\n    change size by (-1)\nend\n\nwhen I start as a clone\nwait (1) seconds\ndelete this clone\n\nwhen I start as a clone\nforever\n    if <(hide) = [1]> then\n        delete this clone\n    end\nend\n\n@color2\n\nwhen flag clicked\nset size to (100) %\nhide\nforever\n    glide (0) secs to (player v)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nset [ghost v] effect to (60)\nwait (1.1) seconds\nshow\nforever\n    change [ghost v] effect by (2)\n    change size by (-1)\nend\n\nwhen I start as a clone\nwait (4) seconds\ndelete this clone\n\nwhen I receive [level v]\nset [hide v] to [1]\nwait (0.2) seconds\nset [hide v] to [0]\n\nwhen I start as a clone\nforever\n    if <(hide) = [1]> then\n        delete this clone\n    end\nend\n\n@#thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (0)\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\nwhen flag clicked\nforever\n    set [timer v] to (timer)\nend\n\n@Sprite1\n\nwhen [timer v] > (Timer)\nshow\nforever\n    go to [front v] layer\n    repeat (5)\n        change y by (1)\n    end\n    repeat (5)\n        change y by (-1)\n    end\nend\n\nwhen flag clicked\nset size to (200) %\nhide\n\n
 move the arrow keys to move the player\n avoid the spikes\nlook at the clone move the way you move\nlook at the clone follow you\nplease❤   