Ghost Run! [BETA] #games #platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [Ghostbusters Theme \(Remix Instrumental\) v] until done\nend\n\n@Blank\n\n@UI\n\nwhen flag clicked\nbroadcast (green flag v)\nhide\n\nwhen I start as a clone\nif <(costume [name v]) = [overlay]> then\n    go to x: (0) y: (0)\n    set size to (100) %\n    set [ghost v] effect to (60)\n    go to [front v] layer\n    show\nend\nif <(costume [name v]) = [text]> then\n    go to x: (0) y: (70)\n    set size to (0) %\n    go to [front v] layer\n    set [animation v] to [0]\n    show\n    repeat (40)\n        set [animation v] to (((animation) * (0.7)) + (((100) - (size)) / (5)))\n        change size by (animation)\n    end\nend\nif <(costume [name v]) = [play]> then\n    go to x: (0) y: (-30)\n    set size to (0) %\n    go to [front v] layer\n    set [animation v] to [0]\n    show\n    repeat (40)\n        set [animation v] to (((animation) * (0.7)) + (((100) - (size)) / (5)))\n        change size by (animation)\n    end\n    forever\n        if <touching (mouse-pointer v)?> then\n            change size by (((120) - (size)) / (3))\n            if <mouse down?> then\n                broadcast (start v)\n            end\n        else\n            change size by (((100) - (size)) / (3))\n        end\n    end\nend\nif <(costume [name v]) = [ad]> then\n    go to x: (0) y: (-110)\n    set size to (0) %\n    go to [front v] layer\n    set [animation v] to [0]\n    show\n    repeat (30)\n        set [animation v] to (((animation) * (0.7)) + (((80) - (size)) / (5)))\n        change size by (animation)\n    end\n    wait until <<(loved?) = [true]> and <(faved?) = [true]>>\n    set size to (60) %\n    switch costume to (ad check v)\n    repeat (30)\n        set [animation v] to (((animation) * (0.7)) + (((80) - (size)) / (5)))\n        change size by (animation)\n    end\nend\n\nwhen I receive [start v]\nrepeat (30)\n    set [animation v] to (((100) - (animation)) / (5))\n    change [ghost v] effect by (animation)\nend\ndelete this clone\n\nwhen I receive [green flag v]\nwait (0.01) seconds\nclear graphic effects\nswitch costume to (overlay v)\ncreate clone of (_myself_ v)\nswitch costume to (text v)\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nswitch costume to (play v)\ncreate clone of (_myself_ v)\nswitch costume to (ad v)\ncreate clone of (_myself_ v)\n\nwhen I receive [green flag v]\ndelete this clone\n\n@Ground\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset size to (100) %\nrepeat until <((x) + (480)) < ([x v] of [storm v])>\n    position\nend\ndelete this clone\n\ndefine position\nswitch costume to (dummy v)\nset size to ((size) * (4)) %\nswitch costume to (full v)\ngo to x: ((x) - (scroll x)) y: (0)\nswitch costume to (ground v)\nset size to ((size) / (4)) %\nif <((x) - (scroll x)) = (x position)> then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nwait (0.01) seconds\nset [x v] to [-480]\nforever\n    if <([x v] of [guy v]) > ((x) - (480))> then\n        change [x v] by (480)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [green flag v]\ndelete this clone\n\n@Guy\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [game active? v] to [1]\nif <(costume [name v]) = [idle]> then\n    forever\n        controls\n    end\nelse\n    if <(costume [name v]) = [vacuum gun thing]> then\n        forever\n            point towards (mouse-pointer v)\n        end\n    end\nend\n\nwhen I receive [start v]\nif <(costume [name v]) = [idle]> then\n    forever\n        if <<<<key (a v) pressed?> or <key (left arrow v) pressed?>> or <<key (d v) pressed?> or <key (right arrow v) pressed?>>> and <(yv) = [0]>> then\n            animate\n            wait (0.08) seconds\n        else\n            switch costume to (idle v)\n        end\n    end\nend\n\ndefine physics\nset [costume v] to (costume [name v])\nswitch costume to (hitbox v)\nif <not <<touching (ground v)?> or < or <touching (blocks v)?>>>> then\n    change [yv v] by (-1)\nend\nchange [y v] by (yv)\nposition\nset [touching danger? v] to <touching color (#00ff08)?>\nif <<touching (ground v)?> or < or <touching (blocks v)?>>> then\n    repeat ([abs v] of ([ceiling v] of (yv) ) )\n        if <<touching (ground v)?> or < or <touching (blocks v)?>>> then\n            change [y v] by ((([abs v] of (yv) ) / (yv)) * (-1))\n            position\n        end\n    end\n    set [yv v] to [0]\nend\nchange [x v] by (xv)\nposition\nif <<touching (ground v)?> or < or <touching (blocks v)?>>> then\n    set [slope v] to [0]\n    repeat until <<(slope) = [-8]> or <not <<touching (ground v)?> or < or <touching (blocks v)?>>>>>\n        change [slope v] by (-1)\n        change [y v] by (1)\n        position\n    end\n    if <(slope) = [-8]> then\n        change [y v] by (slope)\n        position\n    end\n    repeat ([abs v] of ([ceiling v] of (xv) ) )\n        change [x v] by ((([abs v] of (xv) ) / (xv)) * (-1.5))\n        position\n    end\n    set [xv v] to [0]\nend\nset [xv v] to ((xv) * (0.9))\nswitch costume to (costume)\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: ((x) - (scroll x)) y: (y)\nset size to ((size) / (4)) %\nif <(round ((x) - (scroll x))) = (round (x position))> then\n    show\nelse\n    hide\nend\n\ndefine controls\nset [costume v] to (costume [name v])\nswitch costume to (hitbox v)\nchange y by (-1)\nif <<<key (w v) pressed?> or <key (up arrow v) pressed?>> and <<touching (ground v)?> or <<touching (vacuum v)?> or <touching (blocks v)?>>>> then\n    set [yv v] to [15]\nend\nchange y by (1)\nif <<not <((x) - ([x v] of [vacuum v])) < [-100]>> and <<key (a v) pressed?> or <key (left arrow v) pressed?>>> then\n    point in direction (-90)\n    change [xv v] by (-1)\nend\nif <<not <((x) - ([x v] of [vacuum v])) > [100]>> and <<key (d v) pressed?> or <key (right arrow v) pressed?>>> then\n    point in direction (90)\n    change [xv v] by (1)\nend\nswitch costume to (costume)\n\ndefine animate\nnext costume\nrepeat until <not <<(costume [name v]) = [hitbox]> or <<(costume [name v]) = [vacuum gun thing]> or <<(costume [name v]) = [drawing thing]> or <(costume [name v]) = [tube]>>>>>\n    next costume\nend\n\nwhen I start as a clone\nif <(costume [name v]) = [vacuum gun thing]> then\n    set rotation style [all around v]\n    point in direction (90)\n    forever\n        set [x v] to (player x)\n        set [y v] to ((player y) - (5))\n        position\n    end\nend\nif <(costume [name v]) = [drawing thing]> then\n    set rotation style [all around v]\n    forever\n        broadcast (delete tube v)\n        if <(game active?) = [1]> then\n            point towards (mouse-pointer v)\n        else\n            point in direction (90)\n        end\n        set [x v] to ((player x) + (([sin v] of (direction) ) * (-18)))\n        set [y v] to (((player y) - (5)) + (([cos v] of (direction) ) * (-18)))\n        position\n        if <(player y) < [160]> then\n            draw tube\n        end\n    end\nend\nif <(costume [name v]) = [tube]> then\n    forever\n        position\n    end\nend\n\nwhen I receive [delete tube v]\nif <(costume [name v]) = [tube]> then\n    delete this clone\nend\n\ndefine find distance x1: (x1) x2: (x2) y1: (y1) y2: (y2)\nset [distance v] to ([sqrt v] of ((((x1) - (x2)) * ((x1) - (x2))) + (((y1) - (y2)) * ((y1) - (y2)))) )\n\nwhen I receive [green flag v]\nwait (0.01) seconds\nset [game active? v] to [0]\nset [scroll x v] to [0]\nset size to (60) %\nclear graphic effects\nset [x v] to [-100]\nset [y v] to [200]\nset [xv v] to [0]\nset [yv v] to [0]\nset [slope v] to [0]\nset rotation style [left-right v]\npoint in direction (90)\nswitch costume to (vacuum gun thing v)\ncreate clone of (_myself_ v)\nswitch costume to (drawing thing v)\ncreate clone of (_myself_ v)\nswitch costume to (idle v)\nposition\nset [touching danger? v] to [0]\nrepeat until <<touching (storm v)?> or <<(touching danger?) = [1]> or <touching (ghosts v)?>>>\n    go to [back v] layer\n    go [forward v] (1) layers\n    physics\n    change [scroll x v] by (round (((x) - (scroll x)) / (10)))\n    if <(scroll x) < [0]> then\n        set [scroll x v] to [0]\n    end\n    if <(x) < [-215]> then\n        set [x v] to [-215]\n    end\n    position\n    set [player x v] to (x)\n    set [player y v] to (y)\nend\nswitch costume to (idle v)\nset [effect v] to [100]\nset [xv v] to [10]\nset [yv v] to [12]\nset rotation style [all around v]\nrepeat until <(y position) < [-180]>\n    change y by (yv)\n    set [brightness v] effect to (effect)\n    turn right ((0) - (xv)) degrees\n    change [yv v] by (-1)\n    set [effect v] to ((effect) * (0.8))\n    set [player y v] to (y position)\n    set [xv v] to ((xv) * (0.9))\nend\nstop [other scripts in sprite v]\nbroadcast (green flag v)\n\nwhen I receive [green flag v]\ndelete this clone\n\ndefine draw tube\npoint towards (vacuum v)\nset [range v] to [0]\nrepeat until <<touching (vacuum v)?> or <(range) > [100]>>\n    change [range v] by (1)\n    change [x v] by ([sin v] of (direction) )\n    change [y v] by ([cos v] of (direction) )\n    position\n    switch costume to (tube v)\n    create clone of (_myself_ v)\n    switch costume to (drawing thing v)\nend\n\n@Vacuum\n\ndefine find direction x1: (x1) x2: (x2) y1: (y1) y2: (y2)\nset [distance v] to ([sqrt v] of ((((x1) - (x2)) * ((x1) - (x2))) + (((y1) - (y2)) * ((y1) - (y2)))) )\n\nwhen flag clicked\nhide\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: ((x) - (scroll x)) y: (y)\nset size to ((size) / (4)) %\nif <(round ((x) - (scroll x))) = (round (x position))> then\n    show\nelse\n    hide\nend\n\ndefine physics\nswitch costume to (hitbox v)\nif <not <<touching (ground v)?> or <touching (blocks v)?>>> then\n    change [yv v] by (-1)\nend\nchange [y v] by (yv)\nposition\nif <<touching (ground v)?> or <touching (blocks v)?>> then\n    repeat ([abs v] of ([ceiling v] of (yv) ) )\n        if <<touching (ground v)?> or <touching (blocks v)?>> then\n            change [y v] by ((([abs v] of (yv) ) / (yv)) * (-1))\n            position\n        end\n    end\n    set [yv v] to [0]\nend\nchange [x v] by (xv)\nposition\nif <<touching (ground v)?> or <touching (blocks v)?>> then\n    set [slope v] to [0]\n    repeat until <<(slope) = [-8]> or <not <<touching (ground v)?> or <touching (blocks v)?>>>>\n        change [slope v] by (-1)\n        change [y v] by (1)\n        position\n    end\n    if <(slope) = [-8]> then\n        change [y v] by (slope)\n        position\n    end\n    repeat ([abs v] of ([ceiling v] of (xv) ) )\n        change [x v] by ((([abs v] of (xv) ) / (xv)) * (-1.5))\n        position\n    end\n    set [xv v] to [0]\nend\nset [xv v] to ((xv) * (0.9))\nswitch costume to (vacuum v)\n\nwhen I receive [green flag v]\ndelete this clone\n\nwhen I start as a clone\nset [xv v] to (pick random (-10) to (10))\nset [yv v] to (pick random (5) to (10))\nshow\nrepeat until <(y position) < [-180]>\n    change x by (xv)\n    change y by (yv)\n    turn right (xv) degrees\n    change [yv v] by (-1)\n    set [xv v] to ((xv) * (0.9))\nend\ndelete this clone\n\nwhen I receive [green flag v]\nset size to (50) %\nset [x v] to [-180]\nset [y v] to [200]\nset [xv v] to [0]\nset [yv v] to [0]\nswitch costume to (vacuum v)\nset rotation style [left-right v]\npoint in direction (90)\nposition\nrepeat until <<touching (storm v)?> or <touching (ghosts v)?>>\n    go to [back v] layer\n    go to x: ((x) - (scroll x)) y: (y)\n    if <(round ((x) - (scroll x))) = (round (x position))> then\n        physics\n    end\n    position\n    find direction x1: (x) x2: ([x v] of [guy v]) y1: (y) y2: ([y v] of [guy v])\n    if <(distance) > [90]> then\n        point towards (guy v)\n        if <((90) - (direction)) < [5]> then\n            point in direction (90)\n        end\n        if <((direction) - (90)) > [5]> then\n            point in direction (-90)\n        end\n        change [xv v] by (([sin v] of (direction) ) * (1))\n        if <(y) < ([y v] of [guy v])> then\n            change [yv v] by (([cos v] of (direction) ) * (2))\n        end\n    end\nend\nset rotation style [all around v]\nrepeat (30)\n    go to x: (((x) - (scroll x)) + (pick random (-2) to (2))) y: ((y) + (pick random (-2) to (2)))\n    turn right (pick random (-2) to (2)) degrees\nend\nhide\nswitch costume to (particle1 v)\ncreate clone of (_myself_ v)\nswitch costume to (particle2 v)\ncreate clone of (_myself_ v)\nswitch costume to (particle3 v)\ncreate clone of (_myself_ v)\nswitch costume to (particle4 v)\ncreate clone of (_myself_ v)\nwait (0.5) seconds\nbroadcast (green flag v)\n\nif <(game active?) = [1]> then\nend\n\n@Storm\n\nwhen I receive [start v]\nwait (1) seconds\nset [xv v] to [1]\nset size to (100) %\nset [ghost v] effect to (40)\nshow\nforever\n    go to [front v] layer\n    position\n    change [x v] by (xv)\n    change [xv v] by (0.005)\n    if <(xv) > [4]> then\n        set [xv v] to [4]\n    end\nend\n\ndefine position\nswitch costume to (dummy v)\nset size to ((size) * (4)) %\nswitch costume to (storm v)\ngo to x: ((x) - (scroll x)) y: (0)\nset size to ((size) / (4)) %\nif <((x) - (scroll x)) = (x position)> then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nset [x v] to [-480]\nstop [other scripts in sprite v]\nhide\n\n@Background\n\nwhen flag clicked\nhide\n\nwhen I start as a clone\nset size to (100) %\nrepeat until \n    go to [back v] layer\n    position\nend\ndelete this clone\n\ndefine position\nswitch costume to (dummy v)\nset size to ((size) * (4)) %\nswitch costume to (background v)\ngo to x: ((x) - ((scroll x) / (20))) y: (0)\nset size to ((size) / (4)) %\nif <((x) - ((scroll x) / (20))) = (x position)> then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nwait (0.01) seconds\nset [x v] to [-480]\nforever\n    if <([x v] of [guy v]) > ((x) - (480))> then\n        change [x v] by (480)\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I receive [green flag v]\ndelete this clone\n\n@Moon\n\nwhen flag clicked\ngo to x: (230) y: (180)\nset size to (100) %\nshow\n\n@Blocks\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset [x v] to [0]\nforever\n    if <([x v] of [guy v]) > (x)> then\n        set [x v] to (([x v] of [guy v]) + (pick random (300) to (500)))\n        switch costume to (pick random (1) to (7))\n        if <<not < (costume [name v]) contains [dangerous]?>> and <(pick random (1) to (2)) = [1]>> then\n            point in direction (0)\n        else\n            point in direction (90)\n        end\n        create clone of (_myself_ v)\n    end\nend\n\nwhen I start as a clone\nset [y v] to [200]\nset [xv v] to [0]\nset [yv v] to [0]\nset [direction v] to [0]\nset [slope v] to [0]\nshow\nrepeat until <(x) < (([x v] of [guy v]) - (480))>\n    set size to ((size) * (4)) %\n    go to x: ((x) - (scroll x)) y: (y)\n    set size to ((size) / (4)) %\n    if <(round ((x) - (scroll x))) = (round (x position))> then\n        physics\n        if < (costume [name v]) contains [wood]?> then\n            change [x v] by (1)\n            position\n            if <touching (guy v)?> then\n                change [xv v] by (-1)\n            end\n            change [x v] by (-2)\n            position\n            if <touching (guy v)?> then\n                change [xv v] by (1)\n            end\n            change [x v] by (1)\n            position\n        end\n    end\nend\ndelete this clone\n\ndefine physics\nif <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>> then\n    change [yv v] by (-1)\nend\nchange [y v] by (yv)\nposition\nif <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>> then\n    repeat until <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>>\n        change [y v] by (1)\n        position\n    end\n    set [yv v] to [0]\nend\nchange [x v] by (xv)\nposition\nif <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>> then\n    set [slope v] to [0]\n    repeat until <<(slope) = [-8]> or <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>>>\n        change [slope v] by (-1)\n        change [y v] by (1)\n        position\n    end\n    if <(slope) = [-8]> then\n        change [y v] by (slope)\n        position\n    end\n    repeat ([abs v] of ([ceiling v] of (xv) ) )\n        change [x v] by ((([abs v] of (xv) ) / (xv)) * (-1.5))\n        position\n    end\n    set [xv v] to [0]\nend\nset [xv v] to ((xv) * (0.8))\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: ((x) - (scroll x)) y: (y)\nset size to ((size) / (4)) %\nif <(round ((x) - (scroll x))) = (round (x position))> then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nstop [other scripts in sprite v]\ndelete this clone\n\nturn right ((direction) * (0.6)) degrees\nif <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>> then\n    change [x v] by (10)\n    position\n    if <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>> then\n        change [direction v] by (3)\n        change [xv v] by (0.3)\n    end\n    change [x v] by (-20)\n    position\n    if <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>> then\n        change [direction v] by (-3)\n        change [xv v] by (-0.3)\n    end\n    change [x v] by (10)\n    position\n    turn right (2) degrees\n    if <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>> then\n        change [direction v] by (1)\n    end\n    turn left (4) degrees\n    if <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>> then\n        change [direction v] by (-1)\n    end\n    turn right (2) degrees\n    turn right (10) degrees\n    if <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>> then\n        change [direction v] by (2)\n    end\n    turn left (20) degrees\n    if <not <<touching (ground v)?> or <<touching color (#e6af5e)?> or <<touching color (#b9b9b9)?> or <touching color (#ffffff)?>>>>> then\n        change [direction v] by (-2)\n    end\n    turn right (10) degrees\nend\n\n@Ghosts\n\ndefine find distance x1: (x1) x2: (x2) y1: (y1) y2: (y2)\nset [distance v] to ([sqrt v] of ((((x1) - (x2)) * ((x1) - (x2))) + (((y1) - (y2)) * ((y1) - (y2)))) )\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\ndelete this clone\n\nwhen I receive [start v]\nforever\n    set [x v] to (([x v] of [guy v]) + (pick random (200) to (300)))\n    set [y v] to (pick random (-30) to (160))\n    create clone of (_myself_ v)\n    wait (pick random (3) to (6)) seconds\nend\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: ((x) - (scroll x)) y: (y)\nset size to ((size) / (4)) %\nif <(round ((x) - (scroll x))) = (round (x position))> then\n    show\nelse\n    hide\nend\n\nwhen I start as a clone\nset size to (0) %\nset [ghost v] effect to (20)\nset [animate v] to [0]\nset [distance v] to [999]\nset rotation style [left-right v]\nrepeat until <<(distance) < [55]> or <(x) < ([x v] of [storm v])>>\n    change [animate v] by (3)\n    point towards (guy v)\n    if <touching (vacuum range v)?> then\n        change size by (((((distance) / (3)) - (10)) - (size)) / (4))\n        change [x v] by (([sin v] of (direction) ) * (7))\n        change [y v] by (([cos v] of (direction) ) * (7))\n    else\n        change size by (((50) - (size)) / (4))\n        if <<(loved?) = [true]> and <(faved?) = [true]>> then\n            switch costume to (ghost slow v)\n            change [x v] by (([sin v] of (direction) ) * (1))\n            change [y v] by ((([cos v] of (direction) ) * (1)) + (([sin v] of (animate) ) * (2)))\n        else\n            switch costume to (ghost v)\n            change [x v] by (([sin v] of (direction) ) * (2))\n            change [y v] by ((([cos v] of (direction) ) * (2)) + (([sin v] of (animate) ) * (3)))\n        end\n    end\n    find distance x1: (x) x2: ([x v] of [guy v]) y1: (y) y2: ([y v] of [guy v])\n    position\nend\nchange [score v] by (5)\ndelete this clone\n\nwhen I receive [green flag v]\nstop [other scripts in sprite v]\ndelete this clone\n\n@Vacuum Range\n\ndefine find distance x1: (x1) x2: (x2) y1: (y1) y2: (y2)\nset [distance v] to ([sqrt v] of ((((x1) - (x2)) * ((x1) - (x2))) + (((y1) - (y2)) * ((y1) - (y2)))) )\n\nwhen flag clicked\nhide\n\nwhen I receive [start v]\nset size to (60) %\nset [ghost v] effect to (100)\nshow\nforever\n    point towards (mouse-pointer v)\n    set [x v] to ([x v] of [guy v])\n    set [y v] to ([y v] of [guy v])\n    position\n    if <key (space v) pressed?> then\n        show\n    else\n        hide\n    end\nend\n\ndefine position\nset size to ((size) * (4)) %\ngo to x: ((x) - (scroll x)) y: (y)\nset size to ((size) / (4)) %\nif <(round ((x) - (scroll x))) = (round (x position))> then\n    show\nelse\n    hide\nend\n\nwhen I receive [green flag v]\nstop [other scripts in sprite v]\ndelete this clone\n\nwhen I receive [start v]\nforever\n    if <key (space v) pressed?> then\n        switch costume to (particle v)\n        create clone of (_myself_ v)\n        switch costume to (range v)\n        wait (0.2) seconds\n    end\nend\n\nwhen I start as a clone\nset [x v] to ([x v] of [guy v])\nset [y v] to ([y v] of [guy v])\npoint towards (mouse-pointer v)\nturn right (pick random (-10) to (10)) degrees\nchange [x v] by (([sin v] of (direction) ) * (70))\nchange [y v] by (([cos v] of (direction) ) * (70))\nset [ghost v] effect to (30)\nset size to (15) %\nshow\nset [distance v] to [999]\nset [range v] to [0]\nrepeat until <<(distance) < [20]> or <(range) > [10]>>\n    change [range v] by (1)\n    point towards (guy v)\n    change [x v] by (([sin v] of (direction) ) * (5))\n    change [y v] by (([cos v] of (direction) ) * (5))\n    find distance x1: (x) x2: ([x v] of [guy v]) y1: (y) y2: ([y v] of [guy v])\n    position\n    change [ghost v] effect by (1)\nend\ndelete this clone\n\n@Score\n\nwhen flag clicked\nset [score v] to [0]\nhide\n\nwhen I receive [green flag v]\nwait (0.01) seconds\nstop [other scripts in sprite v]\nset [clone id v] to [0]\nrepeat (4)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\nset [clone id v] to [5]\n\nwhen I start as a clone\ngo to x: ((-210) + (((clone id) - (1)) * (16))) y: (150)\nset size to (70) %\nset [brightness v] effect to (100)\nforever\n    go to [front v] layer\n    if <((clone id) - (1)) < (length of (score))> then\n        switch costume to (letter (clone id) of (score))\n        show\n    else\n        hide\n    end\nend\n\nwhen I receive [start v]\nset [score v] to [0]\nwait (1) seconds\nif <(clone id) = [5]> then\n    forever\n        change [score v] by (1)\n        wait (1) seconds\n    end\nend\n\nwhen I receive [green flag v]\ndelete this clone\n\n@Thumb\n\nwhen flag clicked\nhide\nforever\n    reset timer\nend\n\nwhen [timer v] > (0)\ngo to x: (0) y: (0)\nswitch costume to (dummy v)\nset size to (100) %\nswitch costume to (thumb v)\ngo to [front v] layer\nshow\n\n@detector\n\nwhen flag clicked\nhide\nswitch costume to (love v)\ncreate clone of (_myself_ v)\nswitch costume to (fav v)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(costume [name v]) = [love]> then\n    go to x: (-15) y: (0)\n    wait until <touching (mouse-pointer v)?>\n    set [loved? v] to [true]\nend\nif <(costume [name v]) = [fav]> then\n    go to x: (0) y: (0)\n    wait until <touching (mouse-pointer v)?>\n    set [faved? v] to [true]\nend\n\nset [loved? v] to [false]\nset [faved? v] to [false]\n\n
Play my multiplayer scrolling platformer: https://scratch.mit.edu/projects/463302065/\n\n--Instructions--\n[IMPORTANT] Double click green flag to reduce lag or else it's really hard to play\n\nWASD / arrow keys to move, space to suck ghosts\n\nYou get 5 points every time you suck a ghost\n\nThe rest kinda self explanatory\n\n--Updates--\nv1.1 - Minor UI changes