100% Pen Scrolling Platformer

Instructions: --------------------------------Español------------------------------\nTienes que pasarte el nivel (el nivel 3 es prácticamente infinito, no intentís llegar al fianl) con las teclas wad o con las flechas.\n\n---------------------------------English-----------------------------\nYou have to pass the level (level 3 is practically infinite, you do not try to reach the end) with the wad keys or with the arrows.

@Stage\n\n@blanco\n\n@Lápiz\n\nchange [player x v] by (((item (((Level) * (2)) - (1)) of [spawnpoints v]) - (Player X)) / (2))\nchange [player y v] by (((item ((Level) * (2)) of [spawnpoints v]) - (Player Y)) / (2))\n\ndefine CheckPoint (x) (y) <add?> (type) (fade)\nset [x 99 v] to (x)\nset [y 99 v] to (y)\nset pen size to (5)\nSet Color (type)\nset pen (transparency v) to (fade)\nif <add?> then\n    if <<((Player X) - (240)) < (x)> and <((Player X) + (240)) > (x)>> then\n        if <<((Player Y) - (180)) < ((y) + (50))> and <((Player Y) + (180)) > (y)>> then\n            Add 2 (x) (y) (x) ((y) + (50)) (type)\n        end\n    end\nend\nset pen color to (#ce5900)\npen up\ngo to x: ((x) - (Camera X)) y: (((y) + (5)) - (Camera Y))\npen down\ngo to x: ((x) - (Camera X)) y: (((y) + (50)) - (Camera Y))\nSet Color (type)\npen up\ngo to x: (((x) + (5)) - (Camera X)) y: (((y) + (30)) - (Camera Y))\npen down\ngo to x: (((x) + (30)) - (Camera X)) y: (((y) + (30)) - (Camera Y))\ngo to x: (((x) + (30)) - (Camera X)) y: (((y) + (50)) - (Camera Y))\ngo to x: (((x) + (5)) - (Camera X)) y: (((y) + (50)) - (Camera Y))\n\ndefine Add 2 (x1) (y1) (x2) (y2) (type)\nadd (type) to [touch v]\nif <<(y1) < (y2)> or <(x1) < (x2)>> then\n    add (x1) to [touch v]\n    add (y1) to [touch v]\n    add (x2) to [touch v]\n    add (y2) to [touch v]\nelse\n    add (x2) to [touch v]\n    add (y2) to [touch v]\n    add (x1) to [touch v]\n    add (y1) to [touch v]\nend\n\ndefine touching\nset [colision counter 2 v] to [0]\nrepeat until <(length of [collision list v]) = (colision counter 2)>\n    change [colision counter 2 v] by (5)\n    if <((Player X) - (12)) < ((item ((colision counter 2) - (1)) of [touch v]) - (0))> then\n        if <((Player X) + (12)) > ((item ((colision counter 2) - (3)) of [touch v]) + (0))> then\n            if <((Player Y) - (12)) < ((item ((colision counter 2) - (0)) of [touch v]) - (0))> then\n                if <((Player Y) + (12)) > ((item ((colision counter 2) - (2)) of [touch v]) + (0))> then\n                    set [color v] to [1]\n                end\n            end\n        end\n    end\nend\n\ndefine Level 3\nDraw Line From [-999999999999999999999999999999999999] [0] To [999999999999999999999999999999999999999999999999999] [0]  [1] [0]\n\ndefine Draw Line From (x) (y) To (x2) (y2) <add?> (type) (fade)\nset pen size to (5)\nSet Color (type)\nset pen (transparency v) to (fade)\nif <add?> then\n    if <<((Player X) - (240)) < (x2)> and <((Player X) + (240)) > (x)>> then\n        if <<((Player Y) - (180)) < (y2)> and <((Player Y) + (180)) > (y)>> then\n            Add (x) (y) (x2) (y2) (type)\n        end\n    end\nend\npen up\ngo to x: ((x) - (Camera X)) y: ((y) - (Camera Y))\npen down\ngo to x: ((x2) - (Camera X)) y: ((y2) - (Camera Y))\npen up\n\ndefine Render\nif <(Level) = [1]> then\n    Level 1\nelse\n    if <(Level) = [2]> then\n        Level 2\n    else\n        if <(Level) = [3]> then\n            Level 3\n        end\n    end\nend\n\ndefine Touch Y <colliding dangers?>\nTouching?\nif <<<(Touching?) = [1]> and <not <colliding dangers?>>> or <<colliding dangers?> and <not <(Touching?) = [0]>>>> then\n    if <not <(SY) > [0]>> then\n        set [player y v] to ((item ((Col Save) - (0)) of [collision list v]) + (12))\n    else\n        set [player y v] to ((item ((Col Save) - (2)) of [collision list v]) + (-12))\n    end\n    if <(SY) < [0]> then\n        set [jumping v] to [0]\n    end\n    set [sy v] to [0]\n    Touch Y <>\nend\n\ndefine Touch X <colliding dangers?>\nTouching?\nif <<<(Touching?) = [1]> and <not <colliding dangers?>>> or <<colliding dangers?> and <not <(Touching?) = [0]>>>> then\n    if <(SX) < [0]> then\n        set [player x v] to ((item ((Col Save) - (1)) of [collision list v]) + (12))\n    else\n        set [player x v] to ((item ((Col Save) - (3)) of [collision list v]) + (-12))\n    end\n    set [sx v] to [0]\n    Touch X <>\nend\n\ndefine Touching?\nset [collision counter v] to [0]\nset [touching? v] to [0]\nrepeat until <(length of [collision list v]) = (Collision Counter)>\n    change [collision counter v] by (5)\n    if <((Player X) - (12)) < ((item ((Collision Counter) - (1)) of [collision list v]) - (0))> then\n        if <((Player X) + (12)) > ((item ((Collision Counter) - (3)) of [collision list v]) + (0))> then\n            if <((Player Y) - (12)) < ((item ((Collision Counter) - (0)) of [collision list v]) - (0))> then\n                if <((Player Y) + (12)) > ((item ((Collision Counter) - (2)) of [collision list v]) + (0))> then\n                    if <(item ((Collision Counter) - (4)) of [collision list v]) > (Touching?)> then\n                        set [touching? v] to (item ((Collision Counter) - (4)) of [collision list v])\n                        set [col save v] to (Collision Counter)\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Background\nset pen size to (1000)\nset pen color to (#ffffff)\npen up\ngo to x: (0) y: (0)\npen down\npen up\nset pen color to (#e0e0e0)\nset pen size to (3)\ngo to x: ((-220) - (((Camera X) / (2)) mod (40))) y: (180)\nrepeat (13)\n    pen down\n    change y by (-360)\n    pen up\n    change y by (360)\n    change x by (40)\nend\ngo to x: (-240) y: ((160) + (((Camera Y) / (-2)) mod (40)))\nrepeat (10)\n    pen down\n    change x by (480)\n    pen up\n    change x by (-480)\n    change y by (-40)\nend\n\ndefine Set Camera <stationary?>\nif <not <stationary?>> then\n    change [camera x v] by (((Player X) - (Camera X)) / (4))\n    change [camera y v] by (((Player Y) - (Camera Y)) / (4))\n    if <(Camera Y) < [0]> then\n        set [camera y v] to [0]\n    end\n    if <(Camera X) < [0]> then\n        set [camera x v] to [0]\n    end\nend\n\ndefine Add (x1) (y1) (x2) (y2) (type)\nadd (type) to [collision list v]\nif <<(y1) < (y2)> or <(x1) < (x2)>> then\n    add (x1) to [collision list v]\n    add (y1) to [collision list v]\n    add (x2) to [collision list v]\n    add (y2) to [collision list v]\nelse\n    add (x2) to [collision list v]\n    add (y2) to [collision list v]\n    add (x1) to [collision list v]\n    add (y1) to [collision list v]\nend\n\ndefine Set Color (type)\nif <(type) = [0]> then\n    set pen color to (#2ed800)\nelse\n    if <(type) = [1]> then\n        set pen color to (#66c7ff)\n    else\n        if <(type) = [2]> then\n            set pen color to (#ff4747)\n        else\n            if <(type) = [3]> then\n                set pen color to (#ffdd00)\n            else\n                if <(type) = [4]> then\n                    set pen color to (#ff3bc0)\n                else\n                    if <(type) = [5]> then\n                        if <(color) = [0]> then\n                            set pen color to (#ff3a3a)\n                        else\n                            set pen color to (#3fff00)\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Respawn <x/y>\nif <x/y> then\n    Touch Y \nelse\n    Touch X \nend\nset [fade v] to [0]\nrepeat (10)\n    Frame (Fade)\n    change [fade v] by (10)\nend\nset [sx v] to [0]\nset [sy v] to [0]\nset [jumping v] to [1]\nrepeat (10)\n    Frame (Fade)\nend\nif <(color) = [1]> then\n    set [player x v] to (x 99)\n    set [player y v] to ((y 99) + (50))\nelse\n    set [player x v] to (item (((Level) * (2)) - (1)) of [spawnpoints v])\n    set [player y v] to [50]\nend\nrepeat (4)\n    Frame (Fade)\n    change [fade v] by (-25)\nend\n\ndefine Frame (fade)\ndelete all of [touch v]\ndelete all of [collision list v]\nBackground\nPlayer ([floor v] of (Player X) ) (Player Y) [8] (fade)\nRender\nSet Camera <>\n\ndefine Die Check <x/y>\nif <(Touching?) = [2]> then\n    if <x/y> then\n        Respawn \n    else\n        Respawn <>\n    end\nend\n\ndefine Level 1\nCheckPoint [725] [330]  [5] [0]\nDraw Line From [-100] [0] To [100] [0]  [1] [0]\nDraw Line From [150] [0] To [230] [0]  [1] [0]\nDraw Line From [280] [0] To [380] [0]  [1] [0]\nDraw Line From [100] [0] To [150] [0]  [2] [0]\nDraw Line From [230] [0] To [280] [0]  [2] [0]\nDraw Line From [380] [0] To [380] [70]  [1] [0]\nDraw Line From [380] [70] To [450] [70]  [1] [0]\nDraw Line From [450] [0] To [450] [70]  [1] [0]\nDraw Line From [450] [0] To [550] [0]  [1] [0]\nDraw Line From [415] [75] To [415] [100]  [2] [0]\nDraw Line From [600] [75] To [650] [75]  [1] [0]\nDraw Line From [700] [160] To [750] [160]  [1] [0]\nDraw Line From [600] [245] To [650] [245]  [1] [0]\nDraw Line From [700] [330] To [750] [330]  [1] [0]\nDraw Line From [800] [330] To [755] [330]  [3] [0]\nDraw Line From [800] [570] To [965] [570]  [1] [0]\nDraw Line From [905] [570] To [955] [570]  [3] [0]\nDraw Line From [970] [575] To [970] [800]  [2] [0]\nDraw Line From [975] [570] To [1050] [570]  [1] [0]\nDraw Line From [1055] [575] To [1055] [650]  [2] [0]\nDraw Line From [1060] [570] To [1100] [570]  [1] [0]\nDraw Line From [1105] [575] To [1105] [650]  [2] [0]\nDraw Line From [1110] [570] To [1200] [570]  [1] [0]\nDraw Line From [1205] [575] To [1205] [750]  [4] [0]\n\nDraw Line From [-100] [0] To [100] [0]  [1] [0]\nDraw Line From [-100] [-180] To [-100] [0]  [1] [0]\nDraw Line From [60] [-180] To [60] [-80]  [1] [0]\nDraw Line From [100] [-80] To [100] [0]  [1] [0]\nDraw Line From [60] [-80] To [100] [-80]  [1] [0]\nDraw Line From [0] [0] To [-50] [0]  [2] [0]\nDraw Line From [185] [30] To [260] [30]  [1] [0]\nDraw Line From [185] [30] To [185] [-30]  [1] [0]\nDraw Line From [185] [-30] To [350] [-30]  [1] [0]\nDraw Line From [260] [60] To [260] [30]  [1] [0]\nDraw Line From [260] [60] To [350] [60]  [3] [0]\nDraw Line From [350] [-30] To [350] [60]  [1] [0]\nDraw Line From [185] [30] To [185] [-30]  [1] [0]\nDraw Line From [185] [-30] To [350] [-30]  [1] [0]\nDraw Line From [383] [230] To [483] [230]  [1] [0]\nDraw Line From [383] [230] To [383] [190]  [1] [0]\nDraw Line From [483] [230] To [483] [190]  [1] [0]\nDraw Line From [383] [190] To [483] [190]  [1] [0]\nDraw Line From [503] [240] To [503] [340]  [4] [0]\n\ndefine Level 2\nCheckPoint [1270] [400]  [5] [0]\nDraw Line From [-100] [0] To [100] [0]  [1] [0]\nDraw Line From [200] [0] To [400] [0]  [1] [0]\nDraw Line From [150] [0] To [150] [75]  [2] [0]\nDraw Line From [175] [0] To [175] [37.5]  [2] [0]\nDraw Line From [125] [0] To [125] [37.5]  [2] [0]\nDraw Line From [105] [0] To [105] [18.75]  [2] [0]\nDraw Line From [195] [0] To [195] [18.75]  [2] [0]\nDraw Line From [400] [0] To [450] [0]  [3] [0]\nDraw Line From [450] [250] To [900] [250]  [1] [0]\nDraw Line From [520] [255] To [520] [310]  [2] [0]\nDraw Line From [570] [255] To [570] [310]  [2] [0]\nDraw Line From [620] [255] To [620] [310]  [2] [0]\nDraw Line From [670] [255] To [670] [310]  [2] [0]\nDraw Line From [720] [255] To [720] [310]  [2] [0]\nDraw Line From [900] [250] To [900] [300]  [1] [0]\nDraw Line From [900] [300] To [950] [300]  [1] [0]\nDraw Line From [950] [300] To [950] [350]  [1] [0]\nDraw Line From [950] [350] To [1000] [350]  [1] [0]\nDraw Line From [1000] [350] To [1000] [400]  [1] [0]\nDraw Line From [1000] [400] To [1300] [400]  [1] [0]\nDraw Line From [1000] [700] To [1300] [700]  [1] [0]\nDraw Line From [1050] [400] To [1100] [400]  [3] [0]\nDraw Line From [1130] [405] To [1130] [630]  [2] [0]\nDraw Line From [1180] [695] To [1180] [470]  [2] [0]\nDraw Line From [1400] [300] To [1500] [300]  [1] (Trasparencia)\nDraw Line From [1600] [250] To [1700] [250]  [1] (Trasparencia)\nDraw Line From [1800] [300] To [1850] [300]  [1] (Trasparencia)\nDraw Line From [1850] [350] To [1950] [350]  [1] (Trasparencia)\nDraw Line From [1850] [350] To [1850] [300]  [2] (Trasparencia)\nDraw Line From [1950] [350] To [2500] [350]  [1] [0]\nDraw Line From [2000] [350] To [2090] [350]  [3] [0]\nDraw Line From [2150] [350] To [2240] [350]  [3] [0]\nDraw Line From [2300] [350] To [2390] [350]  [3] [0]\nDraw Line From [1950] [550] To [2500] [550]  [2] [0]\nDraw Line From [2600] [300] To [2700] [300]  [1] (Trasparencia)\nDraw Line From [2650] [305] To [2650] [350]  [2] (Trasparencia)\nDraw Line From [2800] [300] To [2900] [300]  [1] [0]\nDraw Line From [2900] [305] To [2900] [400]  [4] [0]\n\ndefine Jump Check\nif <(Touching?) = [3]> then\n    Touch Y \n    set [sy v] to [23]\n    set [jumping v] to [1]\nend\n\ndefine Pass Level Check\nif <(Touching?) = [4]> then\n    set [color v] to [0]\n    Respawn <>\n    change [level v] by (1)\nend\n\ndefine Player (x) (y) (size) (fade)\nDraw Line From ((x) + (size)) ((y) + (size)) To ((x) + (size)) ((y) - (size)) <> [0] (fade)\nDraw Line From ((x) - (size)) ((y) - (size)) To ((x) + (size)) ((y) - (size)) <> [0] (fade)\nDraw Line From ((x) - (size)) ((y) + (size)) To ((x) - (size)) ((y) - (size)) <> [0] (fade)\nDraw Line From ((x) - (size)) ((y) + (size)) To ((x) + (size)) ((y) + (size)) <> [0] (fade)\n\nwhen I receive [y....  acción! v]\nset [color v] to [0]\nset pen size to (5)\nset pen color to (#000000)\nset [level v] to [1]\nset [player x v] to (item (((Level) * (2)) - (1)) of [spawnpoints v])\nset [player y v] to [50]\nset [camera x v] to (Player X)\nset [camera y v] to (Player Y)\nset [sx v] to [0]\nset [sy v] to [0]\nset [jumping v] to [1]\ndelete all of [collision list v]\ndelete all of [touch v]\nwait (2.5) seconds\nforever\n    erase all\n    change [sy v] by (-1)\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <<(Jumping) = [0]> and <(SY) > [-2]>>> then\n        set [sy v] to [13]\n        set [jumping v] to [1]\n    end\n    if <(Player Y) < [-200]> then\n        Respawn <>\n    end\n    if <<(Jumping) = [0]> and <(SY) > [-2]>> then\n        set [trasparencia v] to [0]\n    else\n        set [trasparencia v] to [100]\n    end\n    change [player y v] by (SY)\n    Touch Y <>\n    Die Check \n    change [sx v] by ((<<key (right arrow v) pressed?> or <key (d v) pressed?>> - <<key (left arrow v) pressed?> or <key (a v) pressed?>>) * (1.5))\n    set [sx v] to ((SX) * (0.8))\n    change [player x v] by (SX)\n    Touch X <>\n    Die Check <>\n    Jump Check\n    Pass Level Check\n    Frame []\n    touching\n    set [mouse x v] to (mouse x)\n    set [mouse y v] to (mouse y)\nend\n\nwhen I receive [y....  acción! v]\nforever\n    wait (2.5) seconds\n    play sound [City Lights v] until done\nend\n\n@miniatura\n\nwhen [timer v] > (0.00000000000001)\nerase all\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (costume1 v)\nset size to (150) %\nshow\nswitch costume to (disfraz1 v)\nset [ghost v] effect to (100)\nrepeat until <(size) < [100.3]>\n    switch costume to (costume1 v)\n    change size by (((100) - (size)) / (8))\n    switch costume to (disfraz1 v)\n    change [ghost v] effect by (-15)\nend\nset size to (100) %\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (costume1 v)\nset size to (150) %\nshow\nswitch costume to (disfraz1 v)\nset [ghost v] effect to (0)\nrepeat until <(size) < [100.3]>\n    switch costume to (costume1 v)\n    change size by (((100) - (size)) / (8))\n    switch costume to (disfraz1 v)\n    change [ghost v] effect by (5)\nend\nset size to (100) %\nhide\n\nwhen flag clicked\nforever\n    reset timer\nend\n\n@Intro\n\nwhen I start as a clone\nif <(Clone) = [Particles]> then\n    switch costume to (pick random (29) to (31))\n    set size to (pick random (50) to (150)) %\n    set [ghost v] effect to (pick random (0.) to (5.))\n    set [brightness v] effect to (pick random (-25.) to (100.))\n    go to x: (0) y: (0)\n    point in direction (pick random (-180) to (180))\n    set [x v] to (pick random (10.) to (12.))\n    set [i v] to (pick random (2.) to (9.))\n    go to [front v] layer\n    show\n    repeat until <touching (_edge_ v)?>\n        move (X) steps\n        change y by (I)\n        change [i v] by (-0.4)\n        set [x v] to ((X) * (0.95))\n    end\n    delete this clone\nend\n\ndefine Particles\nset [clone v] to [Particles]\nrepeat (50)\n    create clone of (_myself_ v)\nend\n\nwhen I start as a clone\nif <(Clone) = [Name]> then\n    switch costume to (name v)\n    set size to (50) %\n    clear graphic effects\n    go to [front v] layer\n    go to x: (0) y: (-100)\n    point in direction (0)\n    show\n    repeat (50)\n        go to [front v] layer\n        change size by (((130) - (size)) / (8))\n        change y by (((0) - (y position)) / (8))\n        turn right (((90) - (direction)) / (8)) degrees\n    end\n    set [i v] to [-1]\n    repeat (10)\n        go to [front v] layer\n        change size by (I)\n        change [i v] by (join [-] (([abs v] of (I) ) / (2)))\n        turn right (I) degrees\n    end\n    switch costume to (logo v)\n    repeat (40)\n        go to [front v] layer\n        change size by (((130) - (size)) / (8))\n        turn right (((90) - (direction)) / (8)) degrees\n    end\n    set [i v] to [-1]\n    repeat (20)\n        go to [front v] layer\n        change size by ((I) / (3))\n        change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n        turn right ((I) / (-3)) degrees\n    end\n    delete this clone\nend\n\nwhen flag clicked\nswitch costume to (disfraz1 v)\nshow\nreset timer\nstart sound [Prismo - Stronger v]\nset volume to (100) %\nclear graphic effects\nset size to (100) %\npoint in direction (90)\ngo to x: (0) y: (0)\nhide\nset [clone v] to [Square]\ncreate clone of (_myself_ v)\nwait (1) seconds\nset [clone v] to [Name]\ncreate clone of (_myself_ v)\nwait (0) seconds\nrepeat (2)\n    Spiral spline explosion\n    Particles\n    Rect\n    Spiral spline explosion\nend\nCircle\nrepeat (4)\n    Spiral spline explosion\n    Particles\n    Rect\n    Spiral spline explosion\nend\nCircle\nrepeat (2)\n    Spiral spline explosion\n    Rect\n    Spiral spline explosion\nend\nbroadcast (y....  acción! v)\n\nwhen I start as a clone\nif <(Clone) = [Square]> then\n    clear graphic effects\n    show\n    set size to (0) %\n    go to x: (0) y: (300)\n    point in direction (0)\n    switch costume to (square v)\n    repeat (20)\n        change size by (((100) - (size)) / (5))\n        turn right (((90) - (direction)) / (5)) degrees\n        change y by (((0) - (y position)) / (5))\n    end\n    point in direction (90)\n    repeat (12)\n        next costume\n    end\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((2000) - (size)) / (5))\n        switch costume to (square13 v)\n    end\n    wait (3) seconds\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((100) - (size)) / (5))\n        switch costume to (square13 v)\n    end\n    repeat (12)\n        switch costume to ((costume [number v]) - (1))\n        change size by (-5)\n    end\n    set [i v] to [-1]\n    repeat (20)\n        change size by ((I) / (3))\n        change [i v] by (join [-] (([abs v] of (I) ) / (4)))\n        turn right ((I) / (-3)) degrees\n        change y by ((I) / (3))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Bursts]> then\n    switch costume to (lineexplosion1 v)\n    clear graphic effects\n    go to [front v] layer\n    go [backward v] (1) layers\n    set [i v] to (pick random (1) to (3))\n    if <(I) = [1]> then\n        set [brightness v] effect to (100)\n    else\n        if <(I) = [2]> then\n            set [brightness v] effect to (25)\n        else\n            set [brightness v] effect to (-25)\n        end\n    end\n    show\n    set [i v] to [20]\n    Animate   x: [0] y: [0] size: [0] rotate: (pick random (-180) to (180)) speed: [1]\n    repeat (2)\n        set [i v] to ((I) * (0.9))\n        move (I) steps\n        Size: [100] speed: [5]\n    end\n    repeat (10)\n        set [i v] to ((I) * (0.9))\n        move (I) steps\n        Size: [100] speed: [5]\n        change [ghost v] effect by (10)\n        next costume\n    end\n    delete this clone\nend\n\ndefine Animate   x: (x) y: (y) size: (s) rotate: (r) speed: (s)\nchange x by (((round (x)) - (round (x position))) / (s))\nchange y by (((round (y)) - (round (y position))) / (s))\nchange size by (((round (s)) - (round (size))) / (s))\nturn right (((round (r)) - (round (direction))) / (s)) degrees\n\ndefine Spiral spline explosion\nset [clone v] to [Bursts]\nrepeat (5)\n    create clone of (_myself_ v)\nend\n\ndefine Size: (s) speed: (spd)\nchange size by (((round (s)) - (round (size))) / (spd))\n\ndefine Rect\nset [clone v] to [Rect]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Rect]> then\n    clear graphic effects\n    show\n    set size to (0) %\n    go to (random position v)\n    point in direction (90)\n    switch costume to (background rect v)\n    repeat until <(round (size)) = [300]>\n        change size by (((300) - (size)) / (15))\n        change [ghost v] effect by (4)\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(Clone) = [Circle]> then\n    clear graphic effects\n    set [brightness v] effect to (100)\n    go to [front v] layer\n    go [backward v] (2) layers\n    show\n    set size to (0) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (circle explosion 1 v)\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((300) - (size)) / (5))\n        switch costume to (circle explosion 1 v)\n    end\n    delete this clone\nend\n\ndefine Circle\nset [clone v] to [Circle]\ncreate clone of (_myself_ v)\nwait (0.1) seconds\nset [clone v] to [Circle 2]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nif <(Clone) = [Circle 2]> then\n    clear graphic effects\n    set [brightness v] effect to (0)\n    go to [front v] layer\n    go [backward v] (1) layers\n    show\n    set size to (0) %\n    go to x: (0) y: (0)\n    point in direction (90)\n    switch costume to (circle explosion 1 v)\n    repeat (20)\n        switch costume to (blank v)\n        change size by (((300) - (size)) / (5))\n        switch costume to (circle explosion 1 v)\n    end\n    delete this clone\nend\n\n