Ethereal || Pen Platformer


@Stage\n\nwhen flag clicked\nforever\n    play sound [Nebula v] until done\nend\n\nwhen I receive [ethereal win v]\nstop [other scripts in sprite v]\n\n@Sprite1\n\ndefine render\nerase all\ngo to x: (0) y: (0)\nset pen color to (#00006a)\nset pen size to (1000)\npen down\npen up\nset pen size to (5)\ndecor\nset [loops v] to [0]\nrepeat (length of [x v])\n    change [loops v] by (1)\n    if <<(item (loops) of [type v]) = [1]> or <(item (loops) of [type v]) = [2]>> then\n        if <(item (loops) of [type v]) = [2]> then\n            set pen color to (#9a0031)\n            Render Rectangle (((item (loops) of [x v]) - ((([cos v] of ((move) * (6)) ) * (5)) + (10))) - (camx)) (((item (loops) of [y v]) - ((([cos v] of ((move) * (6)) ) * (5)) + (10))) - (camy)) (((item (loops) of [x2 v]) + ((([cos v] of ((move) * (6)) ) * (5)) + (10))) - (camx)) (((item (loops) of [y2 v]) + ((([cos v] of ((move) * (6)) ) * (5)) + (10))) - (camy)) dir [0] precision [5]\n        end\n        if <(item (loops) of [type v]) = [1]> then\n            set pen color to (#000000)\n        end\n        if <(item (loops) of [type v]) = [2]> then\n            set pen color to (#d40000)\n        end\n        Render Rectangle ((item (loops) of [x v]) - (camx)) ((item (loops) of [y v]) - (camy)) ((item (loops) of [x2 v]) - (camx)) ((item (loops) of [y2 v]) - (camy)) dir [0] precision [5]\n    end\nend\nset pen color to (#000000)\nRender Rectangle (((x) - (20)) - (camx)) (((y) - (20)) - (camy)) (((x) + (20)) - (camx)) (((y) + (20)) - (camy)) dir [0] precision [2]\nset pen color to (#ffffff)\nset pen size to (5)\ngo to x: ((((x) + (xv)) - (-5)) - (camx)) y: (((y) + (10)) - (camy))\npen down\ngo to x: ((((x) + (xv)) - (-5)) - (camx)) y: (((y) - (0)) - (camy))\npen up\ngo to x: ((((x) + (xv)) - (5)) - (camx)) y: (((y) + (10)) - (camy))\npen down\ngo to x: ((((x) + (xv)) - (5)) - (camx)) y: (((y) - (0)) - (camy))\npen up\nset pen color to (#000000)\nset pen size to (5)\ngo to x: ((((x) + (xv)) - (-5)) - (camx)) y: (((y) + (7)) - (camy))\npen down\ngo to x: ((((x) + (xv)) - (-5)) - (camx)) y: (((y) + (4)) - (camy))\npen up\ngo to x: ((((x) + (xv)) - (5)) - (camx)) y: (((y) + (7)) - (camy))\npen down\ngo to x: ((((x) + (xv)) - (5)) - (camx)) y: (((y) + (4)) - (camy))\npen up\nset [loops v] to [0]\nrepeat (length of [waterx v])\n    change [loops v] by (1)\n    render water ((item (loops) of [waterx v]) - (camx)) ((item (loops) of [watery v]) - (camy)) ((item (loops) of [waterx2 v]) - (camx)) ((item (loops) of [watery2 v]) - (camy))\nend\nset [loops v] to [0]\nrepeat (length of [groundx v])\n    change [loops v] by (1)\n    set pen color to (#c35e00)\n    Render Rectangle ((item (loops) of [groundx v]) - (camx)) ((item (loops) of [groundy v]) - (camy)) ((item (loops) of [groundx2 v]) - (camx)) ((item (loops) of [groundy2 v]) - (camy))\n    set pen color to (#21f300)\n    if <(item (loops) of [groundseason v]) = [winter]> then\n        set pen color to (#ffffff)\n    end\n    if <(item (loops) of [groundseason v]) = [autumn]> then\n        set pen color to (#ff6100)\n    end\n    if <not <(item (loops) of [groundseason v]) = [none]>> then\n        set pen size to (20)\n        go to x: ((item (loops) of [groundx v]) - (camx)) y: (((item (loops) of [groundy2 v]) - (camy)) - (10))\n        pen down\n        go to x: ((item (loops) of [groundx2 v]) - (camx)) y: (((item (loops) of [groundy2 v]) - (camy)) - (10))\n        pen up\n    end\nend\nset pen size to (5)\ngrass\nparticles\n\ndefine get level\ndelete all of [!springsx v]\ndelete all of [!springsy v]\ndelete all of [.sqd v]\ndelete all of [.sqs v]\ndelete all of [.sqx v]\ndelete all of [.sqy v]\ndelete all of [x v]\ndelete all of [x2 v]\ndelete all of [y v]\ndelete all of [y2 v]\ndelete all of [type v]\nset [seedloops v] to [0]\nset [dir v] to [25]\nif <(level) = [1]> then\n    level 1\nend\nif <(level) = [2]> then\n    level 2\nend\nif <(level) = [3]> then\n    level 3\nend\nif <(level) = [4]> then\n    level 4\nend\nif <(level) = [5]> then\n    broadcast (ethereal win v)\nend\n\nif <not <(username) = [i8d]>> then\n\ndefine create rect (x) (y) (x2) (y2) (type)\nif <(x2) > (x)> then\n    add (x) to [x v]\n    add (x2) to [x2 v]\nelse\n    add (x2) to [x v]\n    add (x) to [x2 v]\nend\nif <(y2) > (y)> then\n    add (y) to [y v]\n    add (y2) to [y2 v]\nelse\n    add (y2) to [y v]\n    add (y) to [y2 v]\nend\nadd (type) to [type v]\n\ndefine get collision (x) (y) (x2) (y2)\ndelete all of [collisions v]\nset [loops v] to [0]\nrepeat (length of [x v])\n    change [loops v] by (1)\n    if <<<(item (loops) of [x v]) < (x2)> and <(x) < (item (loops) of [x2 v])>> and <<(item (loops) of [y v]) < (y2)> and <(y) < (item (loops) of [y2 v])>>> then\n        add (item (loops) of [type v]) to [collisions v]\n    end\nend\n\nwhen I receive [resume v]\nset [x v] to [0]\nset [y v] to [100]\nset [yv v] to [0]\nswitch costume to (costume2 v)\nset size to (50000000) %\nswitch costume to (costume1 v)\nhide\nforever\n    broadcast (tick v)\nend\n\nwhen I receive [tick v]\nget level\nrender\nphysics\nchange [camx v] by (((x) - (camx)) / (10))\nchange [camy v] by (((y) - (camy)) / (10))\nchange [move v] by (1)\n\ndefine special detection\nget collision ((x) - (15)) ((y) - (20)) ((x) + (15)) ((y) + (20))\nif <[collisions v] contains [2]?> then\n    broadcast (resume v)\nend\nif <[collisions v] contains [3]?> then\n    set [yv v] to [17]\nend\nif <(y) < [-1000]> then\n    broadcast (resume v)\nend\nif <[collisions v] contains [4]?> then\n    change [level v] by (1)\n    broadcast (resume v)\nend\n\ndefine left and right movement\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <[-50] > (mouse x)>>> then\n    change [xv v] by (-3)\nend\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > [50]>>> then\n    change [xv v] by (3)\nend\nset [xv v] to ((xv) * (0.8))\nchange [x v] by (xv)\n\ndefine wall detection\nchange [y v] by (1)\nget collision ((x) - (10)) ((y) - (15)) ((x) + (10)) ((y) + (10))\nrepeat (10)\n    if <[collisions v] contains [1]?> then\n        get collision ((x) - (10)) ((y) - (15)) ((x) + (10)) ((y) + (10))\n        change [y v] by (1)\n    end\nend\nif <[collisions v] contains [1]?> then\n    change [y v] by (-10)\n    change [x v] by ((xv) * (-1))\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > [50]>>> then\n        if <(xv) > [0]> then\n            set [xv v] to [-20]\n        else\n            set [xv v] to [20]\n        end\n        set [yv v] to [15]\n    else\n        set [xv v] to [0]\n    end\nend\n\ndefine physics\nleft and right movement\nwall detection\nup-down movement\nspecial detection\n\ndefine up-down movement\nchange [yv v] by (-0.5)\nchange [y v] by (yv)\nget collision ((x) - (10)) ((y) - (15)) ((x) + (10)) ((y) + (10))\nchange [y v] by (5)\nif <[collisions v] contains [1]?> then\n    repeat (20)\n        get collision ((x) - (10)) ((y) - (15)) ((x) + (10)) ((y) + (10))\n        if <[collisions v] contains [1]?> then\n            change [y v] by (-1)\n            set [yv v] to [-5]\n        end\n    end\n    if <[collisions v] contains [1]?> then\n        change [y v] by (10)\n    end\nend\nchange [y v] by (-7)\nget collision ((x) - (10)) ((y) - (15)) ((x) + (10)) ((y) + (10))\nif <[collisions v] contains [1]?> then\n    change [y v] by (() - (yv))\n    set [yv v] to [0]\n    repeat (30)\n        if <[collisions v] contains [1]?> then\n            change [y v] by (1)\n            get collision ((x) - (10)) ((y) - (15)) ((x) + (10)) ((y) + (10))\n        end\n    end\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <<mouse down?> and <(mouse y) > [50]>>> then\n        set [yv v] to [12]\n    end\nend\n\ndefine Render Rectangle (x) (y) (x2) (y2) dir (dir) precision (ye)\nif <not <<<(x2) < [-240]> or <(x) > [240]>> or <<(y2) < [-180]> or <(y) > [180]>>>> then\n    if <((x2) - (x)) > ((y2) - (y))> then\n        set [pen size v] to ((y2) - (y))\n    else\n        set [pen size v] to ((x2) - (x))\n    end\n    repeat (ye)\n        set pen size to (pen size)\n        set [pen size v] to ((pen size) / (2))\n        go to x: ((x) + (pen size)) y: ((y) + (pen size))\n        pen down\n        go to x: ((x) + (pen size)) y: ((y2) - (pen size))\n        go to x: ((x2) - (pen size)) y: ((y2) - (pen size))\n        go to x: ((x2) - (pen size)) y: ((y) + (pen size))\n        go to x: ((x) + (pen size)) y: ((y) + (pen size))\n        pen up\n    end\nend\n\nwhen flag clicked\nswitch costume to (costume2 v)\nset size to (100000) %\nswitch costume to (costume1 v)\n\ndefine level 1\ncreate rect [100] [-50] [200] ((([sin v] of ((move) * (3)) ) * (10)) + (30)) [2]\ncreate rect [200] [100] [250] [250] [2]\ncreate rect [50] [200] [100] [400] [2]\ncreate rect [200] [400] [250] [500] [2]\ncreate rect [250] [-40] [1700] ((([sin v] of ((move) * (3)) ) * (10)) + (10)) [2]\ncreate rect [600] [400] [650] [1000] [2]\nCreate Ground [-100] [-50] [100] [50]\nCreate Ground [200] [-50] [250] [100]\nCreate Ground [50] [100] [100] [200]\nCreate Ground [200] [250] [250] [400]\nCreate Ground [50] [400] [100] [600]\nCreate Ground [250] [450] [400] [500]\nCreate Ground ((([cos v] of ((move) * (2)) ) * (200)) + (600)) ((([cos v] of ((move) * (2)) ) * (-200)) + (250)) ((([cos v] of ((move) * (2)) ) * (200)) + (651)) ((([cos v] of ((move) * (2)) ) * (-200)) + (300))\nCreate Ground [850] [-50] [900] [50]\nCreate Ground [1050] [-50] [1100] [100]\nCreate Ground [1200] [-50] [1250] [30]\nCreate Ground [1400] [-50] [1450] [200]\nCreate Ground [1500] [-50] [1550] [100]\nCreate Ground [1700] [-50] [1900] [50]\nCreate portal [1850] [150]\n\ndefine decor\nif <((move) mod (10)) = [0]> then\n    add (pick random ((camx) - (600)) to ((camx) + (600))) to [circlesx v]\n    add (pick random ((camy) - (600)) to ((camy) + (600))) to [circlesy v]\n    add [0] to [circlessize v]\n    add (pick random (60) to (120)) to [circlescolor v]\nend\nif <((move) mod (10)) = [0]> then\n    add (pick random ((camx) - (600)) to ((camx) + (600))) to [squaresx v]\n    add (pick random ((camy) - (600)) to ((camy) + (600))) to [squaresy v]\n    add [0] to [squaressize v]\n    add (pick random (1) to (360)) to [squaresdir v]\n    add (pick random (60) to (120)) to [squarescolor v]\nend\nset [loops v] to [0]\nrepeat (length of [squarescolor v])\n    change [loops v] by (1)\n    set pen color to (#ff0000)\n    set pen (brightness v) to ((((190) - (item (loops) of [squaressize v])) / (1)) + (41))\n    set pen (saturation v) to (100)\n    set pen (color v) to ((item (loops) of [squarescolor v]) + (((66) - (item (loops) of [squarescolor v])) * ((item (loops) of [squaressize v]) / (190))))\n    Create square ((item (loops) of [squaresx v]) - (camx)) ((item (loops) of [squaresy v]) - (camy)) (item (loops) of [squaressize v]) (item (loops) of [squaresdir v])\n    if <(item (loops) of [squaressize v]) > [75]> then\n        set pen color to (#00006a)\n        Create square ((item (loops) of [squaresx v]) - (camx)) ((item (loops) of [squaresy v]) - (camy)) ((item (loops) of [squaressize v]) - (75)) (item (loops) of [squaresdir v])\n    end\n    replace item (loops) of [squaressize v] with ((((200) - (item (loops) of [squaressize v])) / (15)) + (item (loops) of [squaressize v]))\n    replace item (loops) of [squarescolor v] with ((item (loops) of [squarescolor v]) + (0.1))\n    if <(item (loops) of [squaressize v]) > [195]> then\n        delete (loops) of [squaresdir v]\n        delete (loops) of [squarescolor v]\n        delete (loops) of [squaressize v]\n        delete (loops) of [squaresx v]\n        delete (loops) of [squaresy v]\n        change [loops v] by (-1)\n    end\nend\nset [loops v] to [0]\nrepeat (length of [circlescolor v])\n    change [loops v] by (1)\n    go to x: ((item (loops) of [circlesx v]) - (camx)) y: ((item (loops) of [circlesy v]) - (camy))\n    set pen color to (#ff0000)\n    set pen (brightness v) to ((((390) - (item (loops) of [circlessize v])) / (0.5)) + (41))\n    set pen (saturation v) to (100)\n    set pen (color v) to ((item (loops) of [circlescolor v]) + (((66) - (item (loops) of [circlescolor v])) * ((item (loops) of [circlessize v]) / (390))))\n    set pen size to (item (loops) of [circlessize v])\n    pen down\n    pen up\n    set pen color to (#00006a)\n    change pen size by (-100)\n    pen down\n    pen up\n    replace item (loops) of [circlessize v] with ((((400) - (item (loops) of [circlessize v])) / (15)) + (item (loops) of [circlessize v]))\n    replace item (loops) of [circlescolor v] with ((item (loops) of [circlescolor v]) + (0.1))\n    if <(item (loops) of [circlessize v]) > [390]> then\n        delete (loops) of [circlescolor v]\n        delete (loops) of [circlessize v]\n        delete (loops) of [circlesx v]\n        delete (loops) of [circlesy v]\n        change [loops v] by (-1)\n    end\nend\nset pen color to (#000000)\nset [loops v] to [0]\nrepeat (length of [!springsx v])\n    change [loops v] by (1)\n    Render Spring ((item (loops) of [!springsx v]) - (camx)) ((item (loops) of [!springsy v]) - (camy))\nend\nset [loops v] to [0]\nrepeat (length of [.sqx v])\n    change [loops v] by (1)\n    Create square ((item (loops) of [.sqx v]) - (camx)) ((item (loops) of [.sqy v]) - (camy)) (item (loops) of [.sqs v]) (item (loops) of [.sqd v])\nend\nset pen color to (#009191)\nCreate square ((portalx) - (camx)) ((portaly) - (camy)) ((([sin v] of ((move) * (5)) ) * (3)) + (20)) ((move) * (-2))\nset pen color to (#00bebe)\nCreate square ((portalx) - (camx)) ((portaly) - (camy)) ((([cos v] of ((move) * (5)) ) * (3)) + (20)) (move)\n\ndefine Create square (x) (y) (size) (dir)\nif <not <<<(x) < ((-240) - (size))> or <(x) > ((240) + (size))>> or <<(y) < ((-180) - (size))> or <(y) > ((180) + (size))>>>> then\n    set [pen size v] to ((size) * (2))\n    repeat (5)\n        set pen size to (pen size)\n        set [pen size v] to ((pen size) / (2))\n        go to x: (((((() - (size)) + (pen size)) * ([cos v] of (dir) )) - (((() - (size)) + (pen size)) * ([sin v] of (dir) ))) + (x)) y: (((((() - (size)) + (pen size)) * ([cos v] of (dir) )) + (((() - (size)) + (pen size)) * ([sin v] of (dir) ))) + (y))\n        pen down\n        go to x: (((((() - (size)) + (pen size)) * ([cos v] of (dir) )) - (((size) - (pen size)) * ([sin v] of (dir) ))) + (x)) y: (((((size) - (pen size)) * ([cos v] of (dir) )) + (((() - (size)) + (pen size)) * ([sin v] of (dir) ))) + (y))\n        go to x: (((((size) - (pen size)) * ([cos v] of (dir) )) - (((size) - (pen size)) * ([sin v] of (dir) ))) + (x)) y: (((((size) - (pen size)) * ([cos v] of (dir) )) + (((size) - (pen size)) * ([sin v] of (dir) ))) + (y))\n        go to x: (((((size) - (pen size)) * ([cos v] of (dir) )) - (((() - (size)) + (pen size)) * ([sin v] of (dir) ))) + (x)) y: (((((() - (size)) + (pen size)) * ([cos v] of (dir) )) + (((size) - (pen size)) * ([sin v] of (dir) ))) + (y))\n        go to x: (((((() - (size)) + (pen size)) * ([cos v] of (dir) )) - (((() - (size)) + (pen size)) * ([sin v] of (dir) ))) + (x)) y: (((((() - (size)) + (pen size)) * ([cos v] of (dir) )) + (((() - (size)) + (pen size)) * ([sin v] of (dir) ))) + (y))\n        pen up\n    end\nend\n\ndefine Create Ground (x) (y) (x2) (y2)\nchange [seedloops v] by (1)\ncreate rect (x) (y) (x2) (y2) [1]\nif <((x2) - (x)) > ((y2) - (y))> then\n    set [loops v] to [0]\n    repeat (([ceiling v] of (((x2) - (x)) / (25)) ) - (1))\n        change [loops v] by (1)\n        if <(letter (loops) of (item (seedloops) of [seed v])) = [1]> then\n            add (dir) to [.sqd v]\n            add (((y2) - (y)) / (2)) to [.sqs v]\n            add ((x) + ((loops) * (25))) to [.sqx v]\n            add (((y) + (y2)) / (2)) to [.sqy v]\n            change [dir v] by ((item (seedloops) of [seed v]) / ((letter (loops) of (item (seedloops) of [seed v])) / (loops)))\n        end\n    end\nelse\n    set [loops v] to [0]\n    repeat (([ceiling v] of (((y2) - (y)) / (25)) ) - (1))\n        change [loops v] by (1)\n        if <(letter (loops) of (item (seedloops) of [seed v])) = [1]> then\n            add (dir) to [.sqd v]\n            add (((x2) - (x)) / (2)) to [.sqs v]\n            add (((x) + (x2)) / (2)) to [.sqx v]\n            add ((y) + ((loops) * (25))) to [.sqy v]\n            change [dir v] by ((item (seedloops) of [seed v]) / ((letter (loops) of (item (seedloops) of [seed v])) / (loops)))\n        end\n    end\nend\n\nwhen flag clicked\nseed\n\ndefine seed\ndelete all of [seed v]\nset [loops v] to [0]\nrepeat (100)\n    change [loops v] by (1)\n    add [] to [seed v]\n    repeat (100)\n        replace item (loops) of [seed v] with (join (item (loops) of [seed v]) (pick random (0) to (1)))\n    end\nend\n\ndefine Create portal (x) (y)\ncreate rect ((x) - (10)) ((y) - (10)) ((x) + (10)) ((y) + (10)) [4]\nset [portalx v] to (x)\nset [portaly v] to (y)\n\nwhen flag clicked\nbroadcast (Open Ethreal v)\n\nwhen I receive [open ethreal v]\nset [level v] to [1]\nbroadcast (resume v)\n\ndefine level 2\ncreate rect [410] [-50] [440] [300] [2]\ncreate rect [-290] [250] [-260] [700] [2]\nCreate Ground [-100] [-50] [100] [50]\nCreate Ground [-100] [250] [100] [300]\nCreate Ground [-100] [500] [100] [550]\nCreate Ground [400] [150] [450] [200]\nCreate Ground [-300] [400] [-250] [450]\nCreate Ground [200] [600] [300] [650]\nCreate Ground [-100] [700] [100] [750]\nCreate Ground [-500] [700] [-200] [750]\nCreate portal [-450] [850]\n\ndefine level 3\nCreate portal [1350] [650]\nCreate Spring [650] [50]\nCreate Spring [900] [250]\nCreate Spring [1000] [250]\nCreate Spring [1100] [250]\ncreate rect [50] ((([cos v] of ((move) * (5)) ) * (50)) + (100)) [100] ((([cos v] of ((move) * (5)) ) * (50)) + (150)) [2]\ncreate rect [125] ((([cos v] of (((move) * (5)) + (180)) ) * (50)) + (100)) [175] ((([cos v] of (((move) * (5)) + (180)) ) * (50)) + (150)) [2]\ncreate rect [200] ((([cos v] of ((move) * (5)) ) * (50)) + (100)) [250] ((([cos v] of ((move) * (5)) ) * (50)) + (150)) [2]\ncreate rect [275] ((([cos v] of (((move) * (5)) + (180)) ) * (50)) + (100)) [325] ((([cos v] of (((move) * (5)) + (180)) ) * (50)) + (150)) [2]\ncreate rect [350] ((([cos v] of ((move) * (5)) ) * (50)) + (100)) [400] ((([cos v] of ((move) * (5)) ) * (50)) + (150)) [2]\ncreate rect [800] [450] [1120] [500] [2]\nCreate Ground [-100] [-50] [750] [50]\nCreate Ground [800] [200] [1120] [250]\nCreate Ground [1200] [500] [1400] [550]\n\ndefine Create Spring (x) (y)\nadd (x) to [!springsx v]\nadd (y) to [!springsy v]\ncreate rect ((x) - (20)) (y) ((x) + (20)) ((y) + (40)) [3]\n\nwhen [space v] key pressed\nchange [level v] by (1)\nbroadcast (resume v)\n\ndefine Render Spring (x) (y)\ngo to x: ((x) + (15)) y: (y)\nset pen size to (5)\npen down\ngo to x: ((x) - (15)) y: ((y) + (20))\ngo to x: ((x) + (15)) y: ((y) + (40))\npen up\ngo to x: ((x) - (15)) y: (y)\nset pen size to (5)\npen down\ngo to x: ((x) + (15)) y: ((y) + (20))\ngo to x: ((x) - (15)) y: ((y) + (40))\npen up\nset pen size to (10)\npen down\ngo to x: ((x) - (20)) y: ((y) + (40))\ngo to x: ((x) + (20)) y: ((y) + (40))\npen up\n\ndefine level 4\nCreate portal [2400] [1200]\nCreate Spring [870] [50]\nCreate Spring [1070] [350]\ncreate rect [300] [50] [350] [100] [2]\ncreate rect [500] [50] [550] [100] [2]\ncreate rect [700] [50] [750] [100] [2]\ncreate rect [1400] [700] [1500] [750] [2]\ncreate rect [1400] [800] [1600] [850] [2]\ncreate rect [1500] [975] [1700] [1000] [2]\nCreate Ground [-100] [-50] [100] [50]\nCreate Ground (([abs v] of ((((move) * (5)) mod (1000)) - (500)) ) + (100)) [-50] (([abs v] of ((((move) * (5)) mod (1000)) - (500)) ) + (300)) [50]\nCreate Ground [800] [-50] [900] [50]\nCreate Ground [1000] [300] [1100] [350]\nCreate Ground [1200] [500] [1300] [550]\nCreate Ground [1800] [1000] [1900] [1050]\nCreate Ground [1400] (([abs v] of ((((move) * (5)) mod (1000)) - (500)) ) + (500)) [1700] (([abs v] of ((((move) * (5)) mod (1000)) - (500)) ) + (550))\nCreate Ground [2100] [1000] [2500] [1050]\n\ndefine level 5\nCreate Ground [-100] [-50] [100] [50]\n\nlevel 5\n\nwhen I receive [ethereal win v]\nstop [other scripts in sprite v]\n\nwhen flag clicked\nset [☁ i stalk you! >:d v] to [0]\n\n@Thumb\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\nwhen I receive [ethereal win v]\nrepeat (10)\n    change [ghost v] effect by (-10)\nend\n\n