Red Runner ( A Scrolling Platformer ) #Games #Platformer #Tutorial #Games #Trending #All  
@Stage\n\nwhen flag clicked\nswitch backdrop to (menu v)\n\nwhen [m v] key pressed\nset [mouse v] to (join ((mouse x) + (PLAYER X)) (join [ , ] ((mouse y) + (Y))))\nshow variable [mouse v]\n\nwhen I receive [start v]\nset [music v] to [1]\nbroadcast (Music v)\nswitch backdrop to (bg1 v)\nforever\n    if <(PLAYER X) > [0]> then\n        switch backdrop to (bg1 v)\n    end\n    if <(PLAYER X) > [4450]> then\n        switch backdrop to (bg2 v)\n    end\n    if <(PLAYER X) > [7910]> then\n        switch backdrop to (backdrop1 v)\n    end\n    if <(PLAYER X) > [11248]> then\n        switch backdrop to (bg v)\n    end\n    if <(PLAYER X) > [14627]> then\n        switch backdrop to (bg1 v)\n    end\nend\n\nwhen I receive [music v]\nstop all sounds\nset volume to (50) %\nforever\n    play sound (Music) until done\nend\n\nwhen I receive [start v]\nforever\n    if <(PLAYER X) > [0]> then\n        set [music v] to [1]\n        broadcast (Music v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(PLAYER X) > [4450]> then\n        set [music v] to [2]\n        broadcast (Music v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(PLAYER X) > [7910]> then\n        set [music v] to [3]\n        broadcast (Music v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(PLAYER X) > [11248]> then\n        set [music v] to [4]\n        broadcast (Music v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(PLAYER X) > [14627]> then\n        set [music v] to [5]\n        broadcast (Music v)\n        stop [this script v]\n    end\nend\n\n@Laggy\n\n@Player\n\nwhen flag clicked\nset [checkpoint v] to [0]\nhide\n\nwhen I receive [start v]\nset rotation style [don't rotate v]\nclear graphic effects\nset [player x v] to (CHECKPOINT)\nset [x v] to [0]\npoint in direction (90)\nset size to (100) %\nshow\ngo to x: (0) y: (180)\nset [y v] to [0]\nset y to (180)\nforever\n    set [ghost v] effect to (100)\n    if <key (right arrow v) pressed?> then\n        change [x v] by (0.8)\n        point in direction (90)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x v] by (-0.8)\n        point in direction (-90)\n    end\n    set [x v] to ((X) * (0.9))\n    change [player x v] by (X)\n    if <touching (platfroms v)?> then\n        change y by (1)\n        if <touching (platfroms v)?> then\n            change y by (1)\n            if <touching (platfroms v)?> then\n                change y by (1)\n                if <touching (platfroms v)?> then\n                    change y by (1)\n                    if <touching (platfroms v)?> then\n                        change y by (1)\n                        if <touching (platfroms v)?> then\n                            change y by (-4)\n                            change [player x v] by ((X) * (-2))\n                            if <touching (platfroms v)?> then\n                                if <(X) < [0]> then\n                                    set [x v] to [5]\n                                else\n                                    set [x v] to [-5]\n                                end\n                                set [y v] to [10]\n                            else\n                                set [x v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    change [y v] by (-1)\n    change y by (Y)\n    if <touching (platfroms v)?> then\n        change y by ((Y) * (-1))\n        set [y v] to [0]\n    end\n    change y by (-1)\n    if <touching (platfroms v)?> then\n        if <key (up arrow v) pressed?> then\n            set [y v] to [12.92]\n        end\n    end\n    if <<[-179] > (y position)> or <<touching (spikes v)?> or <touching (water v)?>>> then\n        start sound [crunch v]\n        go to x: (0) y: (100)\n        repeat until <(round (PLAYER X)) = (CHECKPOINT)>\n            change [player x v] by (((CHECKPOINT) - (PLAYER X)) / (7))\n        end\n        set [player x v] to (CHECKPOINT)\n        point in direction (90)\n        set size to (100) %\n        show\n        set [x v] to [0]\n        set [y v] to [0]\n        set y to (100)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Player?) = [5]> then\n        switch costume to (1x2 v)\n    else\n        switch costume to (1x v)\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(PLAYER X) > [14627]> then\n        wait (5) seconds\n        stop [all v]\n    end\nend\n\n@Platfroms\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\nSet X to (((costume [number v]) - (2)) * (480)) Costumes (costume [number v])\n\ndefine Set X to (x) Costumes (costumes)\nforever\n    if <<(PLAYER X) > ((x) - (960))> or <((x) + (960)) > (PLAYER X)>> then\n        set size to (100) %\n        switch costume to (costume2 v)\n        go to x: ((0) - ((PLAYER X) + ((0) - (x)))) y: (0)\n        switch costume to (costumes)\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nswitch costume to (costume2 v)\nclear graphic effects\nrepeat (32)\n    next costume\n    create clone of (_myself_ v)\nend\n\n@RedRunner\n\nwhen flag clicked\nhide\n\ndefine Change\nif <(costume [number v]) = [19]> then\n    switch costume to (0exl3y v)\nend\nif <(costume [number v]) = [21]> then\n    switch costume to (idle v)\nend\n\nwhen I receive [start v]\npoint in direction (90)\nclear graphic effects\nset rotation style [left-right v]\nforever\n    if <(Player?) = [1]> then\n        show\n        go to (player v)\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <key (right arrow v) pressed?> then\n        point in direction (90)\n        next costume\n        Change\n    end\n    if <key (left arrow v) pressed?> then\n        point in direction (-90)\n        next costume\n        Change\n    end\n    if <not <key (any v) pressed?>> then\n        switch costume to (idle v)\n    end\n    if <(Y) > [0]> then\n        switch costume to (jump 1 v)\n    end\n    if <[0] > (Y)> then\n        switch costume to (jump 2 v)\n    end\nend\n\n@BG\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I start as a clone\nshow\nSet x to (((costume [number v]) - (2)) * (480)) costumes (costume [number v])\n\ndefine Set x to (x) costumes (costumes)\ngo to [back v] layer\nforever\n    if <<((x) - (960)) < (PLAYER X)> or <((x) + (960)) > (PLAYER X)>> then\n        set size to (105) %\n        switch costume to (costume2 v)\n        go to x: ((0) - ((PLAYER X) + ((0) - (x)))) y: (0)\n        switch costume to (costumes)\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nswitch costume to (costume2 v)\nclear graphic effects\nrepeat (32)\n    next costume\n    create clone of (_myself_ v)\nend\n\n@Spikes\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I start as a clone\nswitch costume to (spike_left&down v)\nforever\n    if <<(PLAYER X) > [0]> or <(PLAYER X) = [0]>> then\n        set [sc v] to [2]\n        switch costume to (spike_left&down v)\n    end\n    if <(PLAYER X) > [7910]> then\n        set [sc v] to [3]\n        switch costume to (costume1 v)\n    end\n    if <(PLAYER X) > [11248]> then\n        set [sc v] to [2]\n        switch costume to (spike_left&down v)\n    end\nend\n\ndefine Set X (x) Set Y (y)\ngo to [back v] layer\nforever\n    if <<(PLAYER X) > ((x) - (-960))> or <((x) - (-960)) > (PLAYER X)>> then\n        switch costume to (costume2 v)\n        go to x: ((0) - ((PLAYER X) + ((0) - (x)))) y: (y)\n        switch costume to (SC)\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nset [sx v] to (Spike X)\nset [sy v] to (Spike Y)\nshow\nSet X (SX) Set Y (SY)\n\nwhen I receive [start v]\nswitch costume to (spike_left&down v)\nset [spike x v] to [-170]\nset [spike y v] to [-115]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [280]\nset [spike y v] to [-115]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [300]\nset [spike y v] to [-115]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [320]\nset [spike y v] to [-115]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [340]\nset [spike y v] to [-115]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [1721]\nset [spike y v] to [68]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [1751]\nset [spike y v] to [68]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [1781]\nset [spike y v] to [68]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [1865]\nset [spike y v] to [10]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [1980]\nset [spike y v] to [10]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [2050]\nset [spike y v] to [-50]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [2413]\nset [spike y v] to [-115]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [2380]\nset [spike y v] to [-115]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4345]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4365]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4385]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [613]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [2171]\nset [spike y v] to [-50]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [633]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [3317]\nset [spike y v] to [5]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4592]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4612]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4632]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4572]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4552]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4849]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4869]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4889]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4829]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [4909]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6238]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6258]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6278]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6298]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6626]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6646]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6666]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6750]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6770]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6790]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6810]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6830]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6850]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6950]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6970]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [6990]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7010]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7070]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7110]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7130]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7150]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7170]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7190]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7256]\nset [spike y v] to [-55]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7285]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7305]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7325]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7345]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7365]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7385]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [7405]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [8280]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [8570]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [10920]\nset [spike y v] to [-35]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [11150]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [11580]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [11600]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [11620]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [11640]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [11790]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [11810]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [11830]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [11850]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [12080]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [12100]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [12690]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [12837]\nset [spike y v] to [-45]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [12980]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [13000]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [13020]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [13040]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [13245]\nset [spike y v] to [-86]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [13505]\nset [spike y v] to [-67]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [14168]\nset [spike y v] to [-60]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [13897]\nset [spike y v] to [-60]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [spike x v] to [14206]\nset [spike y v] to [-118]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\n\n@Water\n\nwhen flag clicked\ngo to [back v] layer\nhide\n\nwhen I start as a clone\nset [wx v] to (Water X)\nset [wy v] to (Water Y)\nshow\nSet x (WX) Set Y (WY)\n\ndefine Set x (x) Set Y (y)\ngo to [back v] layer\nforever\n    if <<(PLAYER X) > ((x) - (960))> or <((x) - (960)) > (PLAYER X)>> then\n        switch costume to (costume2 v)\n        go to x: ((0) - ((PLAYER X) + ((0) - (x)))) y: (y)\n        switch costume to (costumes)\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nswitch costume to (image 1 v)\nset [water x v] to [779]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [963]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [2680]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [3150]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [3275]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [3398]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [3650]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [3775]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [3900]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [4025]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [4150]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [5090]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [5218]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [5343]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [5468]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [5593]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [5718]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [5843]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [5968]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [12500]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\nset [water x v] to [12626]\nset [water y v] to [-190]\ncreate clone of (_myself_ v)\nwait (0.000000000001) seconds\n\nwhen I receive [start v]\nset [costumes v] to [2]\nforever\n    change [costumes v] by (1)\n    if <(costumes) = [18]> then\n        set [costumes v] to [2]\n    end\nend\n\n@Checkpoint\n\nwhen flag clicked\nset [ghost v] effect to (0)\nhide\n\ndefine Set checkpoint (x) (y) (id)\nset [checkpoint x v] to (x)\nset [checkpoint y v] to (y)\nset [cloneid v] to (id)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nset [cx v] to (Checkpoint X)\nset [cy v] to (Checkpoint Y)\nshow\nSet X (CX) Set Y (CY) costumes (costume [number v])\n\ndefine Set X (x) Set Y (y) costumes (costumes)\ngo to [back v] layer\nforever\n    turn left (1) degrees\n    if <<(PLAYER X) > ((x) - (960))> or <(PLAYER X) > ((x) + (960))>> then\n        switch costume to (costume2 v)\n        go to x: ((0) - ((PLAYER X) + ((0) - (x)))) y: (y)\n        switch costume to (costumes)\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nif <not <(First??) = [0]>> then\n    set [ghost v] effect to (100)\n    hide\nend\nforever\n    if <touching (player v)?> then\n        start sound [collect v]\n        change [first?? v] by (1)\n        set [checkpoint?? v] to (cloneid)\n        repeat (10)\n            change [ghost v] effect by (10)\n            change y by (-1)\n        end\n        delete this clone\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(checkpoint??) = [1]> then\n        set [checkpoint v] to [0]\n    end\n    if <(checkpoint??) = [2]> then\n        set [checkpoint v] to [4491]\n    end\n    if <(checkpoint??) = [3]> then\n        set [checkpoint v] to [7800]\n    end\n    if <(checkpoint??) = [4]> then\n        set [checkpoint v] to [11207]\n    end\nend\n\nwhen I receive [start v]\nset [first?? v] to [0]\nswitch costume to (costume1 v)\nSet checkpoint [0] [0] [1]\nwait (0.0000001) seconds\nSet checkpoint [4491] [-65] [2]\nwait (0.0000001) seconds\nSet checkpoint [7854] [-65] [3]\nwait (0.0000001) seconds\nSet checkpoint [11207] [-65] [4]\nwait (0.0000001) seconds\n\n@Clouds\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nshow\ngo to [back v] layer\nswitch costume to (pick random (1) to (2))\nset size to (pick random (80) to (50)) %\nset [ghost v] effect to (pick random (10) to (20))\ngo to x: (-400) y: (pick random (110) to (150))\nforever\n    repeat until <(x position) > [250]>\n        move (1) steps\n    end\n    delete this clone\nend\n\nwhen I receive [start v]\nforever\n    wait (pick random (10) to (12)) seconds\n    create clone of (_myself_ v)\nend\n\n@StartMenu\n\nwhen I start as a clone\ngo to [front v] layer\nshow\nif <(Clones) = [1]> then\n    go to x: (14) y: (121)\n    set size to (100) %\n    switch costume to (text v)\n    forever\n        point in direction ((([sin v] of (((timer) * (12)) * (15)) ) * (5)) + (90))\n    end\nend\nif <<(Clones) = [2]> and <(Instructions ?) = [0]>> then\n    go to x: (15) y: (-1)\n    set size to (70) %\n    switch costume to (play button v)\n    forever\n        if <<(Instructions ?) = [0]> and <(Shop ?) = [0]>> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((90) - (size)) / (3))) %\n            else\n                set size to ((size) + (((70) - (size)) / (3))) %\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                start sound [Click v]\n                broadcast (Start v)\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clones) = [3]> then\n    go to x: (84) y: (-95)\n    set size to (125) %\n    switch costume to (instructions button v)\n    forever\n        if <<(Instructions ?) = [0]> and <(Shop ?) = [0]>> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((155) - (size)) / (3))) %\n            else\n                set size to ((size) + (((125) - (size)) / (3))) %\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                start sound [Click v]\n                go to x: (0) y: (0)\n                set size to (100) %\n                switch costume to (instructions v)\n                clear graphic effects\n                set [instructions ? v] to [1]\n                wait until <(Instructions ?) = [0]>\n                go to x: (84) y: (-95)\n                set size to (125) %\n                switch costume to (instructions button v)\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clones) = [4]> then\n    go to x: (-62) y: (-95)\n    set size to (50) %\n    switch costume to (shop button v)\n    forever\n        if <<(Instructions ?) = [0]> and <(Shop ?) = [0]>> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((70) - (size)) / (3))) %\n            else\n                set size to ((size) + (((50) - (size)) / (3))) %\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                start sound [Click v]\n                go to x: (0) y: (0)\n                set size to (100) %\n                switch costume to (shop v)\n                clear graphic effects\n                set [shop ? v] to [1]\n                wait until <(Shop ?) = [0]>\n                go to x: (-62) y: (-95)\n                set size to (50) %\n                switch costume to (shop button v)\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clones) = [5]> then\n    switch costume to (back button v)\n    go to x: (188) y: (127)\n    forever\n        if <<(Instructions ?) = [1]> or <(Shop ?) = [1]>> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((60) - (size)) / (3))) %\n            else\n                set size to ((size) + (((50) - (size)) / (3))) %\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                start sound [Click v]\n                set [shop ? v] to [0]\n                set [instructions ? v] to [0]\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clones) = [6]> then\n    switch costume to (red runner v)\n    forever\n        if <(Shop ?) = [1]> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((110) - (size)) / (3))) %\n            else\n                set size to ((size) + (((100) - (size)) / (3))) %\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                start sound [Click v]\n                set [player? v] to [1]\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clones) = [7]> then\n    switch costume to (boy v)\n    forever\n        if <(Shop ?) = [1]> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((110) - (size)) / (3))) %\n            else\n                set size to ((size) + (((100) - (size)) / (3))) %\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                start sound [Click v]\n                set [player? v] to [2]\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clones) = [8]> then\n    switch costume to (girl v)\n    forever\n        if <(Shop ?) = [1]> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((110) - (size)) / (3))) %\n            else\n                set size to ((size) + (((100) - (size)) / (3))) %\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                start sound [Click v]\n                set [player? v] to [3]\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clones) = [9]> then\n    switch costume to (scratch cat v)\n    forever\n        if <(Shop ?) = [1]> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((110) - (size)) / (3))) %\n            else\n                set size to ((size) + (((100) - (size)) / (3))) %\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                start sound [Meow v]\n                set [player? v] to [4]\n            end\n        else\n            hide\n        end\n    end\nend\nif <(Clones) = [10]> then\n    switch costume to (pikachu v)\n    forever\n        if <(Shop ?) = [1]> then\n            show\n            if <touching (mouse-pointer v)?> then\n                set size to ((size) + (((110) - (size)) / (3))) %\n            else\n                set size to ((size) + (((100) - (size)) / (3))) %\n            end\n            if <<touching (mouse-pointer v)?> and <mouse down?>> then\n                wait until <not <mouse down?>>\n                start sound [Pikachu v]\n                set [player? v] to [5]\n            end\n        else\n            hide\n        end\n    end\nend\n\nwhen flag clicked\nset [player? v] to [1]\nset [shop ? v] to [0]\nset [instructions ? v] to [0]\nset [delete v] to [0]\nAssets [10] Start [0]\n\ndefine Assets (assets) Start (num)\nset [clones v] to (num)\nrepeat (assets)\n    change [clones v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [start v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen flag clicked\nset volume to (30) %\nforever\n    play sound [Goodbye v] until done\nend\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (costume1 v)\nreset timer\nhide\ngo to x: (-480) y: (0)\nforever\n    set [timer v] to ((timer) + (0.1))\nend\n\nwhen [timer v] > (Timer)\nbroadcast (hide variables v)\nshow\ngo to [front v] layer\nrepeat until <(round (x position)) = [0]>\n    change x by (((0) - (x position)) / (5))\nend\nset x to (0)\n\nwhen I receive [start v]\nreset timer\nshow variable [timer v]\nforever\n    set [timer v] to ((timer) + (0.1))\nend\n\nwhen I receive [hide variables v]\nhide variable [timer v]\n\n@Boy\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [run v] to [0]\nforever\n    if <(Player?) = [2]> then\n        if <(Run) > [15]> then\n            set [run v] to [0]\n        end\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            switch costume to (join [Run 0] (Run))\n            change [run v] by (1)\n        end\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            switch costume to (join [Run 0] (Run))\n            change [run v] by (1)\n        end\n        if <not <key (any v) pressed?>> then\n            switch costume to (idle  v)\n        end\n        if <key (up arrow v) pressed?> then\n            switch costume to (jump 07 v)\n        end\n    else\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Player?) = [2]> then\n        show\n        go to (player v)\n    else\n        hide\n        stop [this script v]\n    end\nend\n\n@Girl\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nforever\n    if <(Player?) = [3]> then\n        show\n        go to (player v)\n    else\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Player?) = [3]> then\n        if <(Run) > [20]> then\n            set [run v] to [0]\n        end\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            switch costume to (join [Run 0] (Run))\n            change [run v] by (1)\n        end\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            switch costume to (join [Run 0] (Run))\n            change [run v] by (1)\n        end\n        if <key (up arrow v) pressed?> then\n            switch costume to (jump 029 v)\n        end\n        if <not <key (any v) pressed?>> then\n            switch costume to (idle v)\n        end\n    else\n        stop [this script v]\n    end\nend\n\n@Scratch Cat \n\ndefine Change\nif <(costume [number v]) = [17]> then\n    switch costume to (run_r1 v)\nend\n\nwhen I receive [start v]\nforever\n    if <(Player?) = [4]> then\n        show\n        go to (player v)\n    else\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Player?) = [4]> then\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            next costume\n            Change\n        end\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            next costume\n            Change\n        end\n        if <key (up arrow v) pressed?> then\n            switch costume to (run_j1 v)\n        end\n        if <not <key (any v) pressed?>> then\n            switch costume to (stand v)\n        end\n    else\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\n\n@pikachu\n\nwhen I receive [start v]\nforever\n    if <(Player?) = [5]> then\n        show\n        go to (player v)\n    else\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Player?) = [5]> then\n        if <key (right arrow v) pressed?> then\n            point in direction (90)\n            wait (0.01) seconds\n            next costume\n        end\n        if <key (left arrow v) pressed?> then\n            point in direction (-90)\n            wait (0.01) seconds\n            next costume\n        end\n        if <not <key (any v) pressed?>> then\n            switch costume to (pikachu4 v)\n        end\n    else\n        stop [this script v]\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <(Player?) = [5]> then\n        play sound [Pikachu v] until done\n        wait (pick random (10) to (8)) seconds\n    else\n        stop [this script v]\n    end\nend\n\nwhen flag clicked\nhide\n\n
Hi Guys,\nThis is the My new Game \n"RED RUNNER"\nCharacters with animations, Start Menu, Shop, Different Levels , Spikes , BG , Water , Checkpoints, Obstacles and Many MORE!!!!\n\n=========================================\n\nMOVEMENTS\n\n⋆Jump - UP ARROW \n⋆Move Right - RIGHT ARROW\n⋆Move Left - LEFT ARRO\n⋆STARS ARE CHECKPOINTS \n⋆AVOID SPIKES AND ICE CRYSTALS\n\n=========================================