100% 3D Pen Platformer

Instructions:                              Pen Platformer\n\nPen platformer  is a 3D non-generic platformer, it doesn't supports mobile, also this a first person camera platformer . The Engine itself is 100% pen except for the win screen and thumbnail. \n\nBeta testers:\n@quicslives\n@bashibazouksbobo\n@ILikeAnimationz\n\n-----------------------l Instructions l------------------------\nPro tip: Jump at the very edge\n\nWASD to move.\nArrow keys or mousedown and drag your mouse to look around.\nSpace to jump.\n\nPlatform type:\nGreen = Platform\nRed = Lava\nYellow = Trampoline\nPurple = Portal\n

@Stage\n\nwhen flag clicked\nbroadcast (Start v)\n\nwhen I receive [start v]\nforever\n    play sound [TheFatRat - Windfall \(1\) v] until done\nend\n\nwhen I receive [start v]\nforever\n    if <(cam y) < [-200]> then\n        switch backdrop to (bellow v)\n    else\n        if <(cam y) > [800]> then\n            switch backdrop to (above v)\n        else\n            switch backdrop to (midle v)\n        end\n    end\nend\n\n@Blank\n\n@3D Engine\n\nwhen flag clicked\nhide\nstop [other scripts in sprite v]\n\nwhen I receive [start v]\nswitch costume to (blank v)\nset size to (9999999999999999999) %\nswitch costume to (size hack v)\nreset timer\nerase all\nset [level v] to [1]\nset [rot x v] to [0]\nset [rot y v] to [0]\nDraw Level\nReset\nforever\n    erase all\n    Turn and Move\n    if <<(Touching end) = [yes]> or <key (o v) pressed?>> then\n        wait until <not <key (o v) pressed?>>\n        change [level v] by (1)\n        Draw Level\n        Reset\n    end\nend\n\nwhen I receive [start v]\nforever\n    if <mouse down?> then\n        set [old mouse x v] to (mouse x)\n        set [old mouse y v] to (mouse y)\n        wait (0.000001) seconds\n        if <not <<<(mouse y) < [-80]> and <(mouse x) < [-140]>> and <(mouse y) < [-80]>>> then\n            change [rot y v] by (((mouse y) - (Old Mouse Y)) / (0.7))\n            change [rot x v] by (((Old Mouse X) - (mouse x)) / (0.7))\n        end\n    end\nend\n\ndefine Create Blocks (x1) (y1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\n\ndefine Set Screen Point 2 (x2) (y2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\n\ndefine Put Cube at (x) (y) (z) (platform type)\nVal\nSet Colour (platform type)\nset pen (transparency v) to (((10) - (item (ii) of [block distances v])) / (4))\nset pen size to (((1000) - (item (ii) of [block distances v])) / (100))\nset pen (brightness v) to (80)\nif <(((1000) - (item (ii) of [block distances v])) / (4)) > [10]> then\n    rect (x) (y) ((50) + (z))\n    Trace of block ((50) + (x)) ((50) + (y)) ((50) + (z)) to ((50) + (x)) ((50) + (y)) ((-50) + (z))\n    Trace of block ((50) + (x)) ((-50) + (y)) ((50) + (z)) to ((50) + (x)) ((-50) + (y)) ((-50) + (z))\n    Trace of block ((-50) + (x)) ((-50) + (y)) ((50) + (z)) to ((-50) + (x)) ((-50) + (y)) ((-50) + (z))\n    Trace of block ((-50) + (x)) ((50) + (y)) ((50) + (z)) to ((-50) + (x)) ((50) + (y)) ((-50) + (z))\n    rect (x) (y) ((-50) + (z))\nend\n\nlevel renderer [0] [3] [7] [Platform]\n\nlevel renderer [Left or Right] [Up or Down] [Front or back] [Block type]\n\nwhen I receive [start v]\nforever\n    if <(level) > [5]> then\n        erase all\n        hide\n        stop [other scripts in sprite v]\n        stop [this script v]\n    end\nend\n\ndefine Val\nset [sin x v] to ([sin v] of (rot Y) )\nset [cos x v] to ([cos v] of (rot Y) )\nset [sin y v] to ([sin v] of (rot X) )\nset [cos y v] to ([cos v] of (rot X) )\n\ndefine Z Clipping\nif <<(z1) < (near plane)> or <(z2) < (near plane)>> then\n    set [percent v] to (((near plane) - (z1)) / ((z2) - (z1)))\n    if <(z1) < (near plane)> then\n        Set Point 1 ((x1) + (((x2) - (x1)) * (percent))) ((y1) + (((y2) - (y1)) * (percent))) (near plane)\n    else\n        if <(z2) < (near plane)> then\n            Set Point 2 ((x1) + (((x2) - (x1)) * (percent))) ((y1) + (((y2) - (y1)) * (percent))) (near plane)\n        end\n    end\nend\n\ndefine Turn and Move\nif <key (up arrow v) pressed?> then\n    change [rot y v] by (4)\nend\nif <key (left arrow v) pressed?> then\n    change [rot x v] by (4)\nend\nif <key (right arrow v) pressed?> then\n    change [rot x v] by (-4)\nend\nif <key (down arrow v) pressed?> then\n    change [rot y v] by (-4)\nend\nif <key (w v) pressed?> then\n    change [zvel v] by ((2) * (cos Y))\n    change [xvel v] by ((-2) * (sin Y))\nend\nif <key (s v) pressed?> then\n    change [zvel v] by ((-2) * (cos Y))\n    change [xvel v] by ((2) * (sin Y))\nend\nif <key (a v) pressed?> then\n    change [zvel v] by ((-2) * (sin Y))\n    change [xvel v] by ((-2) * (cos Y))\nend\nif <key (d v) pressed?> then\n    change [zvel v] by ((2) * (sin Y))\n    change [xvel v] by ((2) * (cos Y))\nend\nif <(rot Y) < [-90]> then\n    set [rot y v] to [-90]\nend\nif <[90] < (rot Y)> then\n    set [rot y v] to [90]\nend\nPhysics\n\ndefine collision\nset [touching platform? v] to [no]\nset [touching end v] to [no]\nset [i v] to [0]\nrepeat (length of [cube x pos v])\n    change [i v] by (1)\n    if <<<not <(cam y) < ((item (i) of [cube y pos v]) - (90))>> and <not <(cam y) > ((item (i) of [cube y pos v]) + (130))>>> and <<<not <(cam z) < ((item (i) of [cube z pos v]) - (60))>> and <not <(cam z) > ((item (i) of [cube z pos v]) + (60))>>> and <<not <(cam x) < ((item (i) of [cube x pos v]) - (60))>> and <not <(cam x) > ((item (i) of [cube x pos v]) + (60))>>>>> then\n        if <(item (i) of [platform type v]) = [Platform]> then\n            set [touching platform? v] to [yes]\n        else\n            if <(item (i) of [platform type v]) = [Lava]> then\n                Reset\n            else\n                if <(item (i) of [platform type v]) = [Trampoline]> then\n                    set [y vel v] to [30]\n                    set [!touch trampoline v] to [1]\n                else\n                    set [touching end v] to [yes]\n                end\n            end\n        end\n        stop [this script v]\n    end\nend\n\ndefine Physics\nchange [falling? v] by (1)\nchange [y vel v] by (-1)\nchange [cam y v] by (Y vel)\ncollision\nif <(Touching platform?) = [yes]> then\n    Y collision (Y vel)\nend\nchange [cam z v] by (Zvel)\ncollision\nif <(Touching platform?) = [yes]> then\n    Z Collision (Zvel)\nend\nchange [cam x v] by (Xvel)\ncollision\nif <(Touching platform?) = [yes]> then\n    X Collisions (Xvel)\nend\nset [zvel v] to ((Zvel) * (0.7))\nset [xvel v] to ((Xvel) * (0.7))\nif <<key (space v) pressed?> and <(Falling?) < [5]>> then\n    set [y vel v] to [14]\nend\nif <(cam y) < [-500]> then\n    Reset\nend\nRender\n\ndefine Y collision (y)\nrepeat until <not <(Touching platform?) = [yes]>>\n    if <(y) > [0]> then\n        change [cam y v] by (-1)\n    else\n        change [cam y v] by (1)\n        set [falling? v] to [0]\n    end\n    set [y vel v] to [0]\n    collision\nend\n\ndefine Z Collision (z)\nrepeat until <not <(Touching platform?) = [yes]>>\n    if <(z) > [0]> then\n        change [cam z v] by (-1)\n    else\n        change [cam z v] by (1)\n    end\n    set [zvel v] to [0]\n    collision\nend\n\ndefine X Collisions (x)\nrepeat until <not <(Touching platform?) = [yes]>>\n    if <(x) > [0]> then\n        change [cam x v] by (-1)\n    else\n        change [cam x v] by (1)\n    end\n    set [xvel v] to [0]\n    collision\nend\n\ndefine Reset\nset [view factor v] to [150]\nset [cam speed v] to [6]\nset [cam x v] to [0]\nset [cam y v] to [150]\nset [cam z v] to [0]\nset [near plane v] to [1]\nset [y vel v] to [0]\nset [rot x v] to [0]\nset [rot y v] to [0]\n\ndefine Draw Level\ndelete all of [cube y pos v]\ndelete all of [cube x pos v]\ndelete all of [cube z pos v]\ndelete all of [platform type v]\nif <(level) = [1]> then\n    level renderer [-1] [0] [-1] [Platform]\n    level renderer [0] [0] [-1] [Platform]\n    level renderer [1] [0] [-1] [Platform]\n    level renderer [-1] [0] [0] [Platform]\n    level renderer [0] [0] [0] [Platform]\n    level renderer [1] [0] [0] [Platform]\n    level renderer [-1] [0] [1] [Platform]\n    level renderer [0] [0] [1] [Trampoline]\n    level renderer [1] [0] [1] [Platform]\n    level renderer [0] [0] [3] [Lava]\n    level renderer [0] [1] [4] [Platform]\n    level renderer [0] [1] [5] [Platform]\n    level renderer [1] [2] [7] [Lava]\n    level renderer [2] [2] [7] [Platform]\n    level renderer [3] [2] [7] [Platform]\n    level renderer [4] [2] [7] [Lava]\n    level renderer [5] [2] [7] [Platform]\n    level renderer [5] [3] [7] [Platform]\n    level renderer [6] [4] [7] [Platform]\n    level renderer [7] [5] [7] [Platform]\n    level renderer [11] [0] [7] [Platform]\n    level renderer [8] [0] [7] [Lava]\n    level renderer [9] [0] [7] [Lava]\n    level renderer [10] [0] [7] [Lava]\n    level renderer [11] [0] [7] [Platform]\n    level renderer [12] [0] [7] [Platform]\n    level renderer [13] [0] [7] [End]\nelse\n    if <(level) = [2]> then\n        level renderer [-1] [0] [-1] [Platform]\n        level renderer [0] [0] [-1] [Platform]\n        level renderer [1] [0] [-1] [Platform]\n        level renderer [-1] [0] [0] [Platform]\n        level renderer [0] [0] [0] [Platform]\n        level renderer [1] [0] [0] [Platform]\n        level renderer [-1] [0] [1] [Platform]\n        level renderer [0] [0] [1] [Platform]\n        level renderer [1] [0] [1] [Platform]\n        level renderer [0] [0] [3] [Lava]\n        level renderer [-2] [1] [3] [Platform]\n        level renderer [-2] [2] [1] [Platform]\n        level renderer [-2] [2] [0] [Trampoline]\n        level renderer [-1] [5] [-1] [Lava]\n        level renderer [0] [5] [-1] [Lava]\n        level renderer [1] [5] [-1] [Lava]\n        level renderer [-1] [5] [0] [Platform]\n        level renderer [0] [5] [0] [Lava]\n        level renderer [1] [5] [0] [Platform]\n        level renderer [-1] [5] [1] [Platform]\n        level renderer [0] [5] [1] [Platform]\n        level renderer [1] [5] [1] [Platform]\n        level renderer [0] [5] [3] [Platform]\n        level renderer [1] [5] [5] [Platform]\n        level renderer [-1] [5] [7] [Platform]\n        level renderer [1] [5] [9] [Platform]\n        level renderer [-1] [5] [11] [Lava]\n        level renderer [0] [5] [12] [Platform]\n        level renderer [0] [5] [13] [Lava]\n        level renderer [0] [5] [14] [Platform]\n        level renderer [0] [5] [15] [Lava]\n        level renderer [0] [5] [16] [Platform]\n        level renderer [0] [5] [17] [End]\n    else\n        if <(level) = [3]> then\n            level renderer [-1] [0] [-1] [Platform]\n            level renderer [0] [0] [-1] [Platform]\n            level renderer [1] [0] [-1] [Platform]\n            level renderer [-1] [0] [0] [Platform]\n            level renderer [0] [0] [0] [Platform]\n            level renderer [1] [0] [0] [Platform]\n            level renderer [-1] [0] [1] [Platform]\n            level renderer [0] [0] [1] [Platform]\n            level renderer [1] [0] [1] [Platform]\n            level renderer [0] [0] [2] [Trampoline]\n            level renderer [0] [5] [2] [Trampoline]\n            level renderer [0] [0] [7] [Platform]\n            level renderer [0] [0] [8] [Platform]\n            level renderer [0] [0] [9] [Platform]\n            level renderer [1] [0] [9] [Lava]\n            level renderer [2] [0] [9] [Trampoline]\n            level renderer [3] [0] [9] [Lava]\n            level renderer [4] [0] [9] [Trampoline]\n            level renderer [5] [0] [9] [Lava]\n            level renderer [6] [0] [9] [Trampoline]\n            level renderer [7] [0] [9] [End]\n        else\n            if <(level) = [4]> then\n                level renderer [-1] [0] [-1] [Platform]\n                level renderer [0] [0] [-1] [Platform]\n                level renderer [1] [0] [-1] [Platform]\n                level renderer [-1] [0] [0] [Platform]\n                level renderer [0] [0] [0] [Platform]\n                level renderer [1] [0] [0] [Platform]\n                level renderer [-1] [0] [1] [Platform]\n                level renderer [0] [0] [1] [Platform]\n                level renderer [1] [0] [1] [Platform]\n                level renderer [0] [0] [2] [Platform]\n                level renderer [0] [1] [3] [Platform]\n                level renderer [0] [2] [4] [Platform]\n                level renderer [0] [3] [5] [Platform]\n                level renderer [0] [3] [6] [Lava]\n                level renderer [0] [3] [7] [Platform]\n                level renderer [0] [0] [7] [Platform]\n                level renderer [0] [0] [6] [End]\n                level renderer [1] [3] [7] [Lava]\n                level renderer [1] [4] [7] [Lava]\n                level renderer [1] [5] [7] [Lava]\n                level renderer [0] [3] [8] [Lava]\n                level renderer [0] [4] [8] [Lava]\n                level renderer [0] [5] [8] [Lava]\n            else\n                if <(level) = [5]> then\n                    level renderer [-1] [0] [-1] [Platform]\n                    level renderer [0] [0] [-1] [Platform]\n                    level renderer [1] [0] [-1] [Platform]\n                    level renderer [-1] [0] [0] [Platform]\n                    level renderer [0] [0] [0] [Platform]\n                    level renderer [1] [0] [0] [Platform]\n                    level renderer [-1] [0] [1] [Platform]\n                    level renderer [0] [0] [1] [Platform]\n                    level renderer [1] [0] [1] [Platform]\n                    level renderer [0] [0] [3] [Lava]\n                    level renderer [0] [1] [5] [Lava]\n                    level renderer [0] [2] [7] [Lava]\n                    level renderer [0] [3] [9] [Lava]\n                    level renderer [0] [4] [11] [Lava]\n                    level renderer [0] [4] [12] [End]\n                    level renderer [2] [0] [0] [Lava]\n                    level renderer [3] [0] [0] [Platform]\n                    level renderer [4] [0] [0] [Lava]\n                    level renderer [5] [0] [0] [Platform]\n                    level renderer [6] [0] [0] [Trampoline]\n                    level renderer [6] [4] [1] [Platform]\n                    level renderer [6] [4] [3] [Platform]\n                    level renderer [6] [4] [5] [Platform]\n                    level renderer [6] [4] [6] [Lava]\n                    level renderer [6] [4] [7] [Platform]\n                    level renderer [6] [4] [8] [Platform]\n                    level renderer [6] [4] [9] [Platform]\n                    level renderer [6] [4] [11] [Trampoline]\n                    level renderer [6] [4] [12] [Lava]\n                    level renderer [3] [4] [12] [Platform]\n                end\n            end\n        end\n    end\nend\n\ndefine Render\ndistance\nSort Lists\nset [ii v] to [0]\nrepeat (length of [cube x pos v])\n    change [ii v] by (1)\n    if <(item (ii) of [block distances v]) < [1100]> then\n        Put Cube at (item (ii) of [cube x pos v]) (item (ii) of [cube y pos v]) (item (ii) of [cube z pos v]) (item (ii) of [platform type v])\n    end\nend\n\ndefine Set Colour (colour of)\nif <(colour of) = [Platform]> then\n    set pen color to (#3fff00)\nelse\n    if <(colour of) = [Lava]> then\n        set pen color to (#ff0000)\n    else\n        if <(colour of) = [Trampoline]> then\n            set pen color to (#ffe900)\n        else\n            set pen color to (#ca00e6)\n        end\n    end\nend\n\ndefine level renderer (x) (y) (z) (block type)\nadd ((x) * (100)) to [cube x pos v]\nadd ((y) * (100)) to [cube y pos v]\nadd ((z) * (100)) to [cube z pos v]\nadd (block type) to [platform type v]\n\ndefine rect (x) (y) (z)\nTrace of block ((50) + (x)) ((50) + (y)) (z) to ((50) + (x)) ((-50) + (y)) (z)\nTrace of block ((50) + (x)) ((-50) + (y)) (z) to ((-50) + (x)) ((-50) + (y)) (z)\nTrace of block ((-50) + (x)) ((-50) + (y)) (z) to ((-50) + (x)) ((50) + (y)) (z)\nTrace of block ((-50) + (x)) ((50) + (y)) (z) to ((50) + (x)) ((50) + (y)) (z)\n\nwhen [o v] key pressed\nset [!skip v] to [1]\n\nwhen [r v] key pressed\nReset\n\ndefine Sort Lists\nset [passes v] to [0]\nset [switches v] to [0]\nrepeat until <<(Passes) > [0]> and <(Switches) = [0]>>\n    set [list_item v] to [0]\n    change [passes v] by (1)\n    set [switches v] to [0]\n    repeat ((length of [block distances v]) - (1))\n        change [list_item v] by (1)\n        if <(item ((List_Item) + (1)) of [block distances v]) > (item (List_Item) of [block distances v])> then\n            set [value v] to (item ((List_Item) + (1)) of [block distances v])\n            replace item ((List_Item) + (1)) of [block distances v] with (item (List_Item) of [block distances v])\n            replace item (List_Item) of [block distances v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [cube y pos v])\n            replace item ((List_Item) + (1)) of [cube y pos v] with (item (List_Item) of [cube y pos v])\n            replace item (List_Item) of [cube y pos v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [cube x pos v])\n            replace item ((List_Item) + (1)) of [cube x pos v] with (item (List_Item) of [cube x pos v])\n            replace item (List_Item) of [cube x pos v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [cube z pos v])\n            replace item ((List_Item) + (1)) of [cube z pos v] with (item (List_Item) of [cube z pos v])\n            replace item (List_Item) of [cube z pos v] with (value)\n            set [value v] to (item ((List_Item) + (1)) of [platform type v])\n            replace item ((List_Item) + (1)) of [platform type v] with (item (List_Item) of [platform type v])\n            replace item (List_Item) of [platform type v] with (value)\n            change [switches v] by (1)\n        end\n    end\nend\n\ndefine distance\ndelete all of [block distances v]\nset [iii v] to [0]\nrepeat (length of [cube x pos v])\n    change [iii v] by (1)\n    add (round ([sqrt v] of ((((cam z) - (item (iii) of [cube z pos v])) * ((cam z) - (item (iii) of [cube z pos v]))) + ((((cam y) - (item (iii) of [cube y pos v])) * ((cam y) - (item (iii) of [cube y pos v]))) + (((cam x) - (item (iii) of [cube x pos v])) * ((cam x) - (item (iii) of [cube x pos v]))))) )) to [block distances v]\nend\n\ndefine Set Point 1 (x1) (y1) (z1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\nset [z1 v] to (z1)\n\ndefine Set Point 2 (x2) (y2) (z2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\nset [z2 v] to (z2)\n\ndefine Trace of block (x1) (y1) (z1) to (x2) (y2) (z2)\nSet Point 1 ((x1) - (cam x)) ((y1) - (cam y)) ((z1) - (cam z))\nSet Point 2 ((x2) - (cam x)) ((y2) - (cam y)) ((z2) - (cam z))\nSet Point 1 (((z1) * (sin Y)) + ((x1) * (cos Y))) (y1) (((z1) * (cos Y)) - ((x1) * (sin Y)))\nSet Point 2 (((z2) * (sin Y)) + ((x2) * (cos Y))) (y2) (((z2) * (cos Y)) - ((x2) * (sin Y)))\nSet Point 1 (x1) (((y1) * (cos X)) - ((z1) * (sin X))) (((y1) * (sin X)) + ((z1) * (cos X)))\nSet Point 2 (x2) (((y2) * (cos X)) - ((z2) * (sin X))) (((y2) * (sin X)) + ((z2) * (cos X)))\nif <not <<(z1) < (near plane)> and <(z2) < (near plane)>>> then\n    Z Clipping\n    Create Blocks ((view factor) * ((x1) / (z1))) ((view factor) * ((y1) / (z1)))\n    Set Screen Point 2 ((view factor) * ((x2) / (z2))) ((view factor) * ((y2) / (z2)))\n    go to x: (x1) y: (y1)\n    pen down\n    go to x: (x2) y: (y2)\n    pen up\nend\n\nlevel renderer [2] [0] [0] [Lava]\nlevel renderer [3] [0] [0] [Platform]\nlevel renderer [4] [0] [0] [Lava]\nlevel renderer [5] [0] [0] [Platform]\nlevel renderer [6] [0] [0] [Trampoline]\nlevel renderer [6] [4] [1] [Platform]\nlevel renderer [6] [4] [3] [Platform]\nlevel renderer [6] [4] [5] [Platform]\nlevel renderer [6] [4] [6] [Lava]\nlevel renderer [6] [4] [7] [Platform]\nlevel renderer [6] [4] [8] [Platform]\nlevel renderer [6] [4] [9] [Platform]\n\n@Thumbnail\n\nwhen flag clicked\ngo to x: (0) y: (5000)\nset [ghost v] effect to (100)\nshow\nforever\n    go to [front v] layer\nend\n\nwhen [timer v] > (Stop Timer)\nhide variable [level v]\nhide variable [fps v]\ngo to x: (0) y: (5000)\nshow\ngo to [front v] layer\nswitch costume to (thumb v)\nforever\n    change y by (((0) - (y position)) / (7))\nend\n\nwhen flag clicked\nset [stop timer v] to [0]\nforever\n    set [stop timer v] to ((timer) + (0.1))\nend\n\n@End screen 1\n\ndefine len (text)\nset [lentext v] to (text)\n\nwhen I receive [start v]\nshow variable [fps v]\nshow variable [level v]\npoint in direction (90)\nset [lentext v] to [0]\nlen [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*\(\)-+]\nswitch costume to (blank v)\nhide\ngo to [front v] layer\nwait (1) seconds\nforever\n    if <(level) > [5]> then\n        hide variable [fps v]\n        hide variable [level v]\n        Win\n        stop [this script v]\n    end\nend\n\nshow\nrepeat (10)\n    turn right ((([sin v] of ((timer) * (1)) ) * (1)) + (1)) degrees\nend\nrepeat (10)\n    turn right ((-1) * ((([sin v] of ((timer) * (1)) ) * (1)) + (1))) degrees\nend\n\nwhen flag clicked\nhide\nstop [other scripts in sprite v]\n\ndefine Win\nswitch costume to (win v)\ngo to [front v] layer\nclear graphic effects\nset size to (100) %\nshow\ngo to x: (0) y: (200)\nrepeat (10)\n    change y by (-20)\nend\nrepeat (10)\n    change [brightness v] effect by (1)\nend\nrepeat (10)\n    change [brightness v] effect by (-1)\nend\n\n@detector\n\nwhen flag clicked\npoint in direction (90)\nhide\nset [clone id #d v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id #d v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__ #D) = [1]> and <(FAVED___ #D) = [1]>>\nwait (0.5) seconds\nshow\ngo to x: (0) y: (-100)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\ngo [forward v] (2000) layers\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id #D) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ #d v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? #d v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [loved__ #d v] to [1]\n            end\n        end\n    end\nend\nif <(clone id #D) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ #d v] to [0]\n    forever\n        set [fav? #d v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [faved___ #d v] to [1]\n            end\n        end\n    end\nend\n\npoint in direction (90)\nhide\nset [clone id #d v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id #d v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__ #D) = [1]> and <(FAVED___ #D) = [1]>>\nwait (0.5) seconds\nshow\ngo to x: (0) y: (-100)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\ngo [forward v] (2000) layers\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen [timer v] > (Timer)\ndelete this clone\n\nwhen [timer v] > (Timer)\n\n