Pirate - A Multiplayer Scrolling Platformer                                           #games #all

Instructions: [][][][][][] Pirate - A Multiplayer Scrolling Platformer [][][][][][]\n\nYou are a pirate exploring a cave, hoping to find some treasure.\n\n> INSTRUCTIONS <\n- WAD or arrow keys to move.\n- Avoid spikes and water.\n- Race your friends!\n- Follow me 'cause I'm racing a bunch of people.

@Stage\n\nwhen flag clicked\n\nswitch backdrop to (oh hi :\) v)\nclear graphic effects\nwait (1) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nswitch backdrop to (\(: v)\nclear graphic effects\n\nwhen I receive [game start v]\nbroadcast (init v) and wait\nbroadcast (Start v)\n\n@Blank\n\n@Opponents\n\nwhen flag clicked\nhide\n\nwhen I receive [update v]\nif <(_clone) = [0]> then\n    hide\n    change [~tick v] by (1)\n    if <(~Tick) > [999]> then\n        set [~tick v] to [10]\n    end\nelse\n    if <(item (_clone) of [#checkactive v]) = [1]> then\n        set size to (400) %\n        go to x: ((item ((((_clone) - (1)) * (&MaxElements)) + (3)) of [#cloudlist v]) - (Scroll X)) y: ((item ((((_clone) - (1)) * (&MaxElements)) + (4)) of [#cloudlist v]) - (Scroll Y))\n        set size to (100) %\n        say (item ((((_clone) - (1)) * (&MaxElements)) + (2)) of [#cloudlist v])\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\ngo to x: (0) y: (0)\nchange [clones v] by (1)\nset [_clone v] to (clones)\n\nwhen I receive [start v]\nset [player x v] to [0]\nset [player y v] to [0]\nset [_clone v] to [0]\nset [clones v] to [0]\nset [color v] effect to (0)\nshow\nforever\n    broadcast (update v)\nend\n\n@Online Multiplayer Engine 2.0 by XShrunk\n\ndefine Init\ndelete all of [@players v]\ndelete all of [@ids v]\ndelete all of [@playeroffset v]\ndelete all of [#checkactive v]\ndelete all of [#checkvalue v]\ndelete all of [#cloudlist v]\ndelete all of [clouddata v]\nadd (join [=] (☁ Cloud1)) to [clouddata v]\nadd (join [=] (☁ Cloud2)) to [clouddata v]\nadd (join [=] (☁ Cloud3)) to [clouddata v]\nadd (join [=] (☁ Cloud4)) to [clouddata v]\nadd (join [=] (☁ Cloud5)) to [clouddata v]\nadd (join [=] (☁ Cloud6)) to [clouddata v]\nadd (join [=] (☁ Cloud7)) to [clouddata v]\nadd (join [=] (☁ Cloud8)) to [clouddata v]\nset [@id v] to (([floor v] of ((days since 2000) * (100000000)) ) mod (1000))\n\ndefine Process Cloud (id) (var)\nif <(var) = (item (id) of [clouddata v])> then\n    stop [this script v]\nend\nreplace item (id) of [clouddata v] with (var)\nDecode (var)\nif <<(item (2) of [decoded v]) = (username)> and <(item (5) of [decoded v]) = (@ID)>> then\n    stop [this script v]\nend\nFind Player (item (2) of [decoded v]) (item (5) of [decoded v])\nif <(~i) = [0]> then\n    set [~i v] to (item # of [] in [@players v])\n    if <(~i) = [0]> then\n        New Player\n    else\n        replace item (~i) of [@players v] with (item (2) of [decoded v])\n        replace item (~i) of [@ids v] with (item (5) of [decoded v])\n    end\nend\nset [~j v] to [1]\nrepeat (length of [decoded v])\n    replace item ((((~i) - (1)) * (&MaxElements)) + (~j)) of [#cloudlist v] with (item (~j) of [decoded v])\n    change [~j v] by (1)\nend\n\ndefine Read Cloud\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))\n\ndefine Decode (clouddata)\ndelete all of [decoded v]\nset [~temp v] to []\nset [~i v] to [2]\nrepeat (((length of (clouddata)) - (1)) / (2))\n    switch costume to (join (letter (~i) of (clouddata)) (letter ((~i) + (1)) of (clouddata)))\n    if <(costume [number v]) = [1]> then\n        add (~temp) to [decoded v]\n        set [~temp v] to []\n    else\n        set [~temp v] to (join (~temp) (costume [name v]))\n    end\n    change [~i v] by (2)\nend\n\ndefine Encode\nset [~temp v] to []\nset [~i v] to [1]\nrepeat (length of [#playerlist v])\n    set [~j v] to [1]\n    repeat (length of (item (~i) of [#playerlist v]))\n        switch costume to (letter (~j) of (item (~i) of [#playerlist v]))\n        if <(costume [number v]) < [10]> then\n            set [~temp v] to (join (~temp) (join [0] (costume [number v])))\n        else\n            set [~temp v] to (join (~temp) (costume [number v]))\n        end\n        change [~j v] by (1)\n    end\n    set [~temp v] to (join (~temp) [01])\n    change [~i v] by (1)\nend\n\ndefine SaveToCloud (playerid)\nSavePlayer\nEncode\nif <(playerid) < [6]> then\n    if <(playerid) < [3]> then\n        if <(playerid) = [1]> then\n            set [☁ cloud1 v] to (~temp)\n        else\n            set [☁ cloud2 v] to (~temp)\n        end\n    else\n        if <(playerid) = [3]> then\n            set [☁ cloud3 v] to (~temp)\n        else\n            if <(playerid) = [4]> then\n                set [☁ cloud4 v] to (~temp)\n            else\n                set [☁ cloud5 v] to (~temp)\n            end\n        end\n    end\nelse\n    if <(playerid) < [8]> then\n        if <(playerid) = [6]> then\n            set [☁ cloud6 v] to (~temp)\n        else\n            set [☁ cloud7 v] to (~temp)\n        end\n    else\n        if <(playerid) = [8]> then\n            set [☁ cloud8 v] to (~temp)\n        end\n    end\nend\n\nwhen I receive [update v]\nUpdatePlayersList [1]\nRead Cloud\nSaveToCloud (pick random (1) to (length of [clouddata v]))\nCountPlayers\nUpdatePlayersList [0]\n\ndefine CountPlayers\nset [#playersonline v] to [1]\nset [~i v] to [1]\nrepeat (length of [@players v])\n    if <(item (~i) of [#checkactive v]) = [1]> then\n        change [#playersonline v] by (1)\n    end\n    change [~i v] by (1)\nend\nif <(#PlayersOnline) > [1]> then\n    hide\nelse\n    if <(username) = []> then\n        switch costume to (log in v)\n    else\n        if <(☁ Online) = [0]> then\n            switch costume to (new v)\n        else\n            switch costume to (alone v)\n        end\n    end\n    show\nend\ngo to [front v] layer\nif <(☁ Online) < [0]> then\n    switch costume to (offline v)\n    show\n    stop [all v]\nend\nif <<not <(Version) = (☁ Online)>> and <(☁ Online) > [0]>> then\n    switch costume to (update v)\n    show\n    stop [all v]\nend\n\nwhen I receive [init v]\nInit\n\ndefine UpdatePlayersList (first)\nif <(first) = [1]> then\n    set [~c v] to [0]\n    repeat (length of [@players v])\n        if <not <<(item (((~c) * (&MaxElements)) + (2)) of [#cloudlist v]) = (username)> and <(item (((~c) * (&MaxElements)) + (5)) of [#cloudlist v]) = (@ID)>>> then\n            if <(item ((~c) + (1)) of [@playeroffset v]) = [0]> then\n                replace item ((~c) + (1)) of [#checkvalue v] with (item (((~c) * (&MaxElements)) + (1)) of [#cloudlist v])\n            end\n            replace item ((~c) + (1)) of [@playeroffset v] with ((item ((~c) + (1)) of [@playeroffset v]) + (1))\n        end\n        change [~c v] by (1)\n    end\nelse\n    set [~c v] to [0]\n    repeat (length of [@players v])\n        if <not <<(item (((~c) * (&MaxElements)) + (2)) of [#cloudlist v]) = (username)> and <(item (((~c) * (&MaxElements)) + (5)) of [#cloudlist v]) = (@ID)>>> then\n            if <<not <(item ((~c) + (1)) of [#checkvalue v]) = (item (((~c) * (&MaxElements)) + (1)) of [#cloudlist v])>> or <(item ((~c) + (1)) of [@playeroffset v]) > [99]>> then\n                if <<(item ((~c) + (1)) of [#checkvalue v]) = (item (((~c) * (&MaxElements)) + (1)) of [#cloudlist v])> or <(item (((~c) * (&MaxElements)) + (5)) of [#cloudlist v]) = [X]>> then\n                    replace item ((~c) + (1)) of [#checkactive v] with [0]\n                    replace item ((~c) + (1)) of [@players v] with []\n                    replace item ((~c) + (1)) of [@ids v] with []\n                else\n                    replace item ((~c) + (1)) of [#checkactive v] with [1]\n                end\n                replace item ((~c) + (1)) of [@playeroffset v] with [0]\n            end\n        end\n        change [~c v] by (1)\n    end\nend\n\ndefine EmptyCloud\nset [☁ cloud1 v] to []\nwait (0.1) seconds\nset [☁ cloud2 v] to []\nwait (0.1) seconds\nset [☁ cloud3 v] to []\nwait (0.1) seconds\nset [☁ cloud4 v] to []\nwait (0.1) seconds\nset [☁ cloud5 v] to []\nwait (0.1) seconds\nset [☁ cloud6 v] to []\nwait (0.1) seconds\nset [☁ cloud7 v] to []\nwait (0.1) seconds\nset [☁ cloud8 v] to []\n\nwhen flag clicked\nhide\nset [last v] to [1]\nset [version v] to [1]\nif <(username) = [username]> then\n    wait (0.1) seconds\n    set [☁ online v] to (Version)\nend\nif <(#PlayersOnline) > [0]> then\n    replace item (5) of [#playerlist v] with [X]\n    repeat (10)\n        SaveToCloud (pick random (1) to (length of [clouddata v]))\n    end\nend\nset [#playersonline v] to [0]\n\ndefine SavePlayer\ndelete all of [#playerlist v]\nadd (~Tick) to [#playerlist v]\nadd (username) to [#playerlist v]\nadd ((round ((([x position v] of [hitbox v]) + (Scroll X)) * (10))) / (10)) to [#playerlist v]\nadd ((round ((([y position v] of [hitbox v]) + (Scroll Y)) * (10))) / (10)) to [#playerlist v]\nadd (@ID) to [#playerlist v]\n\nset [&maxelements v] to [5]\n\nset [☁ online v] to [0]\n\ndefine New Player\nadd (item (2) of [decoded v]) to [@players v]\nadd (item (5) of [decoded v]) to [@ids v]\nadd [0] to [@playeroffset v]\nadd [0] to [#checkactive v]\nadd [0] to [#checkvalue v]\nrepeat (&MaxElements)\n    add [0] to [#cloudlist v]\nend\ncreate clone of (opponents v)\n\ndefine Find Player (name) (id)\nset [~i v] to [0]\nrepeat (length of [@players v])\n    change [~i v] by (1)\n    if <<(item (~i) of [@players v]) = (name)> and <(item (~i) of [@ids v]) = (id)>> then\n        stop [this script v]\n    end\nend\nset [~i v] to [0]\n\n@Player\n\nwhen flag clicked\nforever\n    go to (hitbox v)\nend\n\nwhen flag clicked\nforever\n    if <[-180] > (Scroll Y)> then\n        broadcast (Kill v) and wait\n    end\n    if <touching (lava v)?> then\n        broadcast (Kill v) and wait\n    end\nend\n\nwhen flag clicked\npoint in direction (90)\nset rotation style [left-right v]\nforever\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        point in direction (90)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        point in direction (-90)\n    end\nend\n\nwhen I receive [game start v]\nforever\n    play sound [Call to Adventur v] until done\nend\n\nwhen flag clicked\nswitch costume to (player v)\nforever\n\nwhen I receive [game start v]\npoint in direction (90)\n\n@Sprite3\n\nwhen flag clicked\nshow\nclear graphic effects\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\n    go to [front v] layer\nend\n\n@Sprite1\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    repeat until <(round (direction)) = [90]>\n        turn right (((90) - (direction)) / (5)) degrees\n        change [ghost v] effect by (-5)\n    end\n    point in direction (90)\n    change [sequence v] by (1)\nend\nif <(costume [number v]) = [3]> then\n    go to x: (0) y: (181)\n    repeat until <(round (y position)) = [0]>\n        clear graphic effects\n        change y by ((y position) / (-3))\n    end\n    repeat (10)\n        switch costume to (blank v)\n        change size by ((size) * (0.4))\n        switch costume to (dot v)\n    end\n    change [sequence v] by (1)\nend\nif <(costume [number v]) = [2]> then\n    set [brightness v] effect to (0)\n    change [sequence v] by (1)\n    repeat (30)\n        set [i v] to (((i) * (0.8)) + (((150) - (size)) * (0.3)))\n        change size by (i)\n        set y to (i)\n        change [ghost v] effect by (-5)\n    end\n    wait until <(Sequence) = [44]>\n    set [i v] to [0]\n    repeat until <(i) > [15]>\n        change y by (i)\n        change x by ((i) * (4))\n        change [i v] by (1)\n        change [ghost v] effect by (i)\n        turn right (i) degrees\n    end\n    change [sequence v] by (1)\nend\nif < (costume [name v]) contains [Particle]?> then\n    go to x: (0) y: (0)\n    clear graphic effects\n    go [backward v] (1) layers\n    repeat (30)\n        change x by (i)\n        change y by (i2)\n        change [i2 v] by (-1)\n        change [ghost v] effect by ((i2) * (-0.4))\n    end\n    change [sequence v] by (1)\n    delete this clone\nend\nif <(costume [number v]) = [7]> then\n    go to x: (0) y: (-1000)\n    set [i2 v] to ((-300) + ((i) * (160)))\n    repeat until <(round (y position)) = (i2)>\n        change y by (((i2) - (y position)) / (3))\n        change size by (((100) - (size)) / (3))\n        change [ghost v] effect by (-8)\n    end\n    clear graphic effects\n    set size to (100) %\n    go to x: (0) y: (i2)\n    change [sequence v] by (1)\nend\nif <(costume [number v]) = [8]> then\n    set [brightness v] effect to (0)\n    repeat (30)\n        set [i v] to (((i) * (0.8)) + (((100) - (size)) * (0.3)))\n        change size by (i)\n        set y to (i)\n        change [ghost v] effect by (-5)\n    end\n    change [sequence v] by (1)\nend\nforever\n    if <(stop) = [5]> then\n        delete this clone\n    end\nend\n\ndefine Spam\nrepeat (30)\n    set [i v] to ((pick random (-5) to (5)) * (2))\n    set [i2 v] to (pick random (10) to (15))\n    switch costume to (pick random (5) to (6))\n    create clone of (_myself_ v)\nend\n\nwhen I receive [intro v]\nset [stop v] to [0]\nshow\ngo to [front v] layer\nset [sequence v] to [0]\nset volume to (100) %\nswitch costume to (bars v)\nset [brightness v] effect to (0)\nset [ghost v] effect to (100)\nset size to (100) %\npoint in direction (60)\ngo to x: (-200) y: (0)\nrepeat (6)\n    create clone of (_myself_ v)\n    change x by (80)\n    wait () seconds\nend\ngo to x: (200) y: (0)\npoint in direction (120)\nset [brightness v] effect to (100)\nrepeat (6)\n    create clone of (_myself_ v)\n    change x by (-80)\n    wait () seconds\nend\nwait until <(Sequence) = [12]>\nswitch costume to (dot v)\ncreate clone of (_myself_ v)\nwait until <(Sequence) = [13]>\ngo to x: (0) y: (0)\npoint in direction (90)\nswitch costume to (oc v)\nset size to (0) %\ncreate clone of (_myself_ v)\nset size to (100) %\nwait until <(Sequence) = [14]>\nSpam\nwait until <(Sequence) = [45]>\nswitch costume to (white bars v)\nset size to (0) %\nset [i v] to [0]\nrepeat (3)\n    change [i v] by (1)\n    create clone of (_myself_ v)\n    wait (0) seconds\nend\nwait until <(Sequence) = [48]>\nswitch costume to (name v)\ncreate clone of (_myself_ v)\nwait until <(Sequence) = [49]>\nswitch costume to (bars v)\nset [brightness v] effect to (0)\nset size to (100) %\npoint in direction (60)\ngo to x: (-200) y: (0)\nrepeat (6)\n    create clone of (_myself_ v)\n    change x by (80)\n    wait () seconds\nend\ngo to x: (200) y: (0)\npoint in direction (120)\nset [brightness v] effect to (100)\nrepeat (6)\n    create clone of (_myself_ v)\n    change x by (-80)\n    wait () seconds\nend\nhide\nbroadcast (game start v)\nstop [other scripts in sprite v]\nset [stop v] to [5]\nbroadcast (manandefbsgi v)\n\nwhen I receive [intro v]\nplay sound [Tobu - Candyland pt II2 v] until done\n\nwhen flag clicked\nbroadcast (Intro v)\n\n@Lava\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\nset [clone number v] to [1]\nrepeat (10)\n    create clone of (_myself_ v)\n    change [clone number v] by (1)\nend\n\nwhen I start as a clone\nshow\nswitch costume to (Clone Number)\nif <(Clone Number) = [1]> then\n    set [x v] to [0]\n    set [y v] to [0]\nend\nif <(Clone Number) = [2]> then\n    set [x v] to [450]\n    set [y v] to [0]\nend\nif <(Clone Number) = [3]> then\n    set [x v] to [900]\n    set [y v] to [0]\nend\nif <(Clone Number) = [4]> then\n    set [x v] to [1350]\n    set [y v] to [0]\nend\nif <(Clone Number) = [5]> then\n    set [x v] to [1350]\n    set [y v] to [500]\nend\nif <(Clone Number) = [6]> then\n    set [x v] to [2100]\n    set [y v] to [500]\nend\nif <(Clone Number) = [7]> then\n    set [x v] to [2550]\n    set [y v] to [500]\nend\nif <(Clone Number) = [8]> then\n    set [x v] to [3000]\n    set [y v] to [500]\nend\nif <(Clone Number) = [9]> then\n    set [x v] to [3450]\n    set [y v] to [500]\nend\nif <(Clone Number) = [10]> then\n    set [x v] to [3450]\n    set [y v] to [500]\nend\nif <(Clone Number) = [11]> then\n    set [x v] to [3900]\n    set [y v] to [1000]\nend\nif <(Clone Number) = [12]> then\n    set [x v] to [4350]\n    set [y v] to [850]\nend\nif <(Clone Number) = [13]> then\n    set [x v] to [4700]\n    set [y v] to [850]\nend\nforever\n    Position ((x) - (Scroll X)) ((y) - (Scroll Y))\nend\n\nwhen I start as a clone\nforever\n    go to [back v] layer\nend\n\nif <(Clone Number) = []> then\n    set [x v] to []\n    set [y v] to []\nend\n\n@Hitbox\n\nwhen flag clicked\nforever\n    if <touching (lava v)?> then\n        broadcast (Kill v) and wait\n    end\nend\n\nwhen flag clicked\nerase all\nset [ghost v] effect to (100)\nset [x vel v] to [0]\nset [walljumping v] to [False]\nset [y vel v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nset [in air v] to [3]\nforever\n    set [player x v] to ((Scroll X) + (y position))\n    set [player y v] to ((Scroll Y) + (x position))\n    if <touching (moving platform v)?> then\n        if <(Player X) > (TMPX)> then\n            change [x vel v] by (MPXVEL)\n        end\n        if <(PLayer Y) > (TMPY)> then\n            change [y vel v] by (MPYVEL)\n        end\n    else\n        set [mpxvel v] to [0]\n        set [mpyvel v] to [0]\n    end\n    switch costume to (hitbox v)\n    point in direction (90)\n    change [y vel v] by (-1)\n    change y by (Y Vel)\n    Detect <(Y Vel) > [0]>\n    change [x vel v] by ((<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>) * (2))\n    set [x vel v] to ((X Vel) * (0.85))\n    change x by (X Vel)\n    Wall\n    Scroll\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(In air) < [2]>> then\n        set [y vel v] to [12]\n    end\n    broadcast (Move Platforms v)\nend\n\ndefine Scroll\nchange x by ((0) - (round ((x position) / (10))))\nchange y by ((0) - (round ((y position) / (10))))\nchange [scroll x v] by (round ((x position) / (10)))\nchange [scroll y v] by (round ((y position) / (10)))\n\ndefine Detect <up or down>\npoint in direction (90)\nchange [in air v] by (1)\nrepeat until <not <touching (platform v)?>>\n    if <up or down> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [in air v] to [0]\n    end\n    set [y vel v] to [0]\nend\nrepeat until <not <touching (moving platform v)?>>\n    if <up or down> then\n        change y by (-1)\n    else\n        change y by (1)\n        set [in air v] to [0]\n    end\n    set [y vel v] to [0]\nend\n\ndefine Wall\npoint in direction (90)\nset [touching wall? v] to [0]\nset [walljumping v] to [False]\nrepeat until <<<not <touching (platform v)?>> and <not <touching (moving platform v)?>>> or <(Touching Wall?) = [11]>>\n    change y by (1)\n    change [touching wall? v] by (1)\nend\nif <(Touching Wall?) = [11]> then\n    change x by ((0) - (X Vel))\n    change y by (-11)\n    if <key (up arrow v) pressed?> then\n        set [walljumping v] to [True]\n        set [y vel v] to [10]\n        if <(X Vel) > [0]> then\n            set [x vel v] to [-15]\n        else\n            set [x vel v] to [15]\n        end\n    else\n        set [x vel v] to [0]\n        set [walljumping v] to [False]\n    end\nend\n\nwhen flag clicked\nforever\n    Touching PLatform?\nend\n\ndefine Touching PLatform?\nchange y by (-10)\nif <touching (platform v)?> then\n    set [touching platform? v] to [True]\nelse\n    set [touching platform? v] to [False]\nend\nchange y by (10)\n\n@Platform\n\ndefine Position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\nhide\nset [clone number v] to [1]\nrepeat (13)\n    create clone of (_myself_ v)\n    change [clone number v] by (1)\nend\n\nwhen I start as a clone\nshow\nswitch costume to (Clone Number)\nif <(Clone Number) = [1]> then\n    set [x v] to [0]\n    set [y v] to [-100]\nend\nif <(Clone Number) = [2]> then\n    set [x v] to [450]\n    set [y v] to [0]\nend\nif <(Clone Number) = [3]> then\n    set [x v] to [900]\n    set [y v] to [0]\nend\nif <(Clone Number) = [4]> then\n    set [x v] to [1350]\n    set [y v] to [0]\nend\nif <(Clone Number) = [5]> then\n    set [x v] to [1350]\n    set [y v] to [500]\nend\nif <(Clone Number) = [6]> then\n    set [x v] to [2100]\n    set [y v] to [500]\nend\nif <(Clone Number) = [7]> then\n    set [x v] to [2550]\n    set [y v] to [500]\nend\nif <(Clone Number) = [8]> then\n    set [x v] to [3000]\n    set [y v] to [500]\nend\nif <(Clone Number) = [9]> then\n    set [x v] to [3450]\n    set [y v] to [500]\nend\nif <(Clone Number) = [10]> then\n    set [x v] to [3450]\n    set [y v] to [500]\nend\nif <(Clone Number) = [11]> then\n    set [x v] to [3900]\n    set [y v] to [1000]\nend\nif <(Clone Number) = [12]> then\n    set [x v] to [4350]\n    set [y v] to [850]\nend\nif <(Clone Number) = [13]> then\n    set [x v] to [4700]\n    set [y v] to [850]\nend\nforever\n    Position ((x) - (Scroll X)) ((y) - (Scroll Y))\nend\n\n@Kill\n\nwhen I receive [kill v]\nswitch costume to (costume1 v)\ngo to [front v] layer\nclear graphic effects\nshow\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nwait (0.5) seconds\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\n\nwhen I receive [kill v]\nplay sound [Die v] until done\n\n@Sprite2\n\nwhen flag clicked\nshow\ngo to [front v] layer\n\nwhen I receive [manandefbsgi v]\nhide\n\n@Sprite4\n\nwhen flag clicked\nhide\nforever\n    go to [back v] layer\n    create clone of (_myself_ v)\n    wait (0.2) seconds\nend\n\nwhen I start as a clone\ngo to x: (pick random (-220) to (220)) y: (-200)\nset [ghost v] effect to (pick random (25) to (50))\nshow\nforever\n    change y by (2)\n    go to [back v] layer\n    if <(y position) > [180]> then\n        delete this clone\n    end\nend\n\n