Wings of Fire platformer
@Stage\n\nwhen flag clicked\nforever\n    play sound [1 v] until done\n    play sound [2 v] until done\nend\n\nwhen I receive [game tick v]\nset volume to (MUSIC) %\n\n@player\n\nwhen flag clicked\nset [player state v] to []\nset [level v] to [0]\nreset variables\nbroadcast (clone things v) and wait\nbroadcast (reset collectibles v) and wait\nintro\nforever\n    show\n    repeat until <(PLAYER STATE) > []>\n        Move Player\n        broadcast (GAME TICK v) and wait\n    end\n    if <(PLAYER STATE) = [d]> then\n        switch costume to (death v)\n        start sound [Crunch v]\n        repeat (3)\n            show\n            wait (.2) seconds\n            hide\n            wait (.2) seconds\n        end\n        wait (.5) seconds\n    else\n        start sound [Win v]\n        repeat (25)\n            point towards (flag v)\n            move ((distance to [flag v]) / (3)) steps\n            change [ghost v] effect by (4)\n        end\n        broadcast (trans v) and wait\n    end\n    reset variables\nend\n\ndefine Move Player\ndeath check\nswitch costume to (hitbox v)\ngo to [front v] layer\nif <not <(impulse x) = []>> then\n    change player x by (impulse x) slope steepness: [6]\n    set [impulse x v] to []\nend\nif <key (right arrow v) pressed?> then\n    point in direction (90)\n    change player x by [4] slope steepness: [6]\nend\nif <key (left arrow v) pressed?> then\n    point in direction (-90)\n    change player x by [-4] slope steepness: [6]\nend\nif <<<key (up arrow v) pressed?> and <(airtime) < [4]>> and <(JumpKeyPressed) < [4]>> then\n    set [sy v] to [9]\n    set [jumpkeypressed v] to [0]\nend\nif <<<key (up arrow v) pressed?> and <(airtime) = [0]>> and <(JumpKeyPressed) < [4]>> then\n    start sound [Jump v]\nend\nchange [sy v] by (-1)\nif <(sy) < [-12]> then\n    set [sy v] to [-12]\nend\nchange y by (sy)\nif <not <key (up arrow v) pressed?>> then\n    set [jumpkeypressed v] to [0]\nend\nchange [scroll x v] by (round (((x) - (SCROLL X)) / (7)))\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (7)))\nif <(SCROLL Y) < [-150]> then\n    set [scroll y v] to [-150]\nelse\nend\nposition\nchange [frames v] by (1)\nrender costumes\n\ndefine change player x by (sx) slope steepness: (steep)\nchange [x v] by (sx)\nposition\nif <touching (level v)?> then\n    repeat (steep)\n        change [y v] by (1)\n        position\n        if <not <touching (level v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by ((0) - (steep))\n    repeat until <not <touching (level v)?>>\n        change [x v] by ((([abs v] of (sx) ) / (sx)) * (-1))\n        position\n    end\nend\n\ndefine reset variables\nswitch costume to (idle v)\nclear graphic effects\nset [x v] to [0]\nset [y v] to [56]\nset [sx v] to [0]\nset [sy v] to [0]\nset [airtime v] to [0]\nset [frames v] to [0]\nset [jumpkeypressed v] to [0]\nset [impulse x v] to []\nset [bounce on enemy? v] to []\nif <(PLAYER STATE) = [d]> then\n    repeat until <<(round (SCROLL X)) = [0]> and <(round (SCROLL Y)) = [50]>>\n        change [scroll x v] by (((0) - (SCROLL X)) / (5))\n        change [scroll y v] by (((50) - (SCROLL Y)) / (5))\n        broadcast (GAME TICK v) and wait\n    end\nelse\n    set [scroll x v] to [0]\n    if <not <(LEVEL) = [0]>> then\n        set [scroll y v] to [0]\n    else\n        set [scroll y v] to [1200]\n    end\n    change [level v] by (1)\n    broadcast (reset v) and wait\n    broadcast (clone things v) and wait\nend\nbroadcast (reset collectibles v) and wait\nset [player state v] to []\nposition\n\ndefine change y by (sy)\nchange [y v] by (sy)\nchange [airtime v] by (1)\nchange [jumpkeypressed v] by (1)\nposition\nrepeat until <not <<touching (level v)?> or <touching (moving plats v)?>>>\n    change [y v] by ((([abs v] of (sy) ) / (sy)) * (-1))\n    if <(sy) < [0]> then\n        set [airtime v] to [0]\n    end\n    position\n    set [sy v] to [0]\nend\nif <touching (bounce v)?> then\n    set [sy v] to [15]\n    broadcast (bounce v)\nend\nif <(bounce on enemy?) > []> then\n    set [sy v] to [10]\n    set [bounce on enemy? v] to []\nend\n\ndefine position\nupdate position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine render costumes\nswitch costume to (idle v)\nif <<key (right arrow v) pressed?> or <key (left arrow v) pressed?>> then\n    switch costume to ((((frames) / (4)) mod (3)) + (2))\nend\nif <(airtime) > [4]> then\n    switch costume to (in air v)\nend\n\ndefine death check\nif <(y) < [-300]> then\n    set [player state v] to [d]\n    set [y v] to [-300]\nend\nif <<touching (spikes v)?> or <touching (enemies v)?>> then\n    set [player state v] to [d]\nend\nif <touching (flag v)?> then\n    set [player state v] to [ y]\nend\n\nwhen I receive [game tick v]\nset [positon v] to (join (round ((mouse x) + (SCROLL X))) (join [,] (round ((mouse y) + (SCROLL Y)))))\nset volume to (SFX) %\n\ndefine update 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\ndefine intro\npoint in direction (90)\nhide\nif <(LEVEL) = [1]> then\n    repeat until <(round (SCROLL Y)) = [56]>\n        change [scroll y v] by (((56) - (SCROLL Y)) / (12))\n        position\n        hide\n        broadcast (GAME TICK v) and wait\n    end\n    set [y v] to [55]\n    position\n    show\n    switch costume to (spawn 12 v)\n    repeat (11)\n        next costume\n        wait (0.05) seconds\n    end\nelse\n    set [scroll y v] to [56]\nend\n\n@level\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [game tick v]\nupdate position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine update 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 I receive [clone things v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (LEVEL)\nclone at x: [0] y: [0]\nset [x v] to [99999]\n\nwhen I receive [reset v]\ndelete this clone\n\n@spikes\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [game tick v]\nupdate position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine update 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 I receive [clone things v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (LEVEL)\nif <(LEVEL) > [2]> then\n    clone at x: [0] y: [0]\nend\nset [x v] to [99999]\n\nwhen I receive [reset v]\ndelete this clone\n\n@coins\n\ndefine clone at x: (x) y: (y) asset: (asset)\nset [x v] to (x)\nset [y v] to (y)\nchange [i v] by (1)\nswitch costume to (asset)\ncreate clone of (_myself_ v)\n\nwhen I receive [game tick v]\nupdate position ((x) - (SCROLL X)) (((y) + (round ([sin v] of (((timer) + (i)) * (300)) ))) - (SCROLL Y))\nif <touching (player v)?> then\n    start sound (costume [number v])\n    delete this clone\nend\nset volume to (SFX) %\n\ndefine update position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\ngo [forward v] (2) layers\n\nwhen I receive [reset collectibles v]\nif  then\n    delete this clone\nend\nset [x v] to [0]\nset [y v] to [0]\nset [i v] to [0]\nif <(LEVEL) = [1]> then\n    clone at x: [175] y: [57] asset: [coin]\n    clone at x: [200] y: [57] asset: [coin]\n    clone at x: [225] y: [57] asset: [coin]\nelse\n    if <(LEVEL) = [2]> then\n        clone at x: [140] y: [135] asset: [coin]\n        clone at x: [165] y: [135] asset: [coin]\n        clone at x: [190] y: [135] asset: [coin]\n        clone at x: [380] y: [98] asset: [gem]\n    else\n        if <(LEVEL) = [3]> then\n            clone at x: [60] y: [32] asset: [coin]\n            clone at x: [300] y: [32] asset: [coin]\n            clone at x: [420] y: [32] asset: [gem]\n        else\n            if <(LEVEL) = [4]> then\n                clone at x: [188] y: [15] asset: [coin]\n                clone at x: [210] y: [15] asset: [coin]\n                clone at x: [516] y: [-48] asset: [coin]\n                clone at x: [540] y: [-48] asset: [coin]\n                clone at x: [516] y: [-72] asset: [coin]\n                clone at x: [540] y: [-72] asset: [coin]\n                clone at x: [660] y: [-164] asset: [gem]\n            else\n                if <(LEVEL) = [5]> then\n                    clone at x: [255] y: [53] asset: [coin]\n                    clone at x: [280] y: [53] asset: [coin]\n                    clone at x: [305] y: [53] asset: [coin]\n                    clone at x: [440] y: [-70] asset: [coin]\n                    clone at x: [440] y: [-40] asset: [coin]\n                    clone at x: [440] y: [-10] asset: [coin]\n                    clone at x: [600] y: [-50] asset: [coin]\n                    clone at x: [775] y: [-50] asset: [coin]\n                    clone at x: [260] y: [-140] asset: [gem]\n                    clone at x: [235] y: [-140] asset: [gem]\n                else\n                    if <(LEVEL) = [6]> then\n                        clone at x: [-120] y: [-58] asset: [gem]\n                        clone at x: [-160] y: [-95] asset: [gem]\n                        clone at x: [392] y: [133] asset: [coin]\n                        clone at x: [392] y: [108] asset: [coin]\n                        clone at x: [525] y: [-24] asset: [coin]\n                        clone at x: [550] y: [-24] asset: [coin]\n                        clone at x: [575] y: [-24] asset: [coin]\n                    else\n                        if <(LEVEL) = [7]> then\n                            clone at x: [300] y: [50] asset: [coin]\n                            clone at x: [478] y: [50] asset: [coin]\n                            clone at x: [780] y: [20] asset: [gem]\n                            clone at x: [819] y: [60] asset: [gem]\n                            clone at x: [864] y: [-140] asset: [coin]\n                            clone at x: [864] y: [-100] asset: [coin]\n                            clone at x: [864] y: [-60] asset: [coin]\n                            clone at x: [864] y: [-20] asset: [coin]\n                            clone at x: [864] y: [20] asset: [coin]\n                            clone at x: [1028] y: [150] asset: [gem]\n                        else\n                            if <(LEVEL) = [8]> then\n                                clone at x: [-295] y: [25] asset: [gem]\n                                clone at x: [-295] y: [50] asset: [gem]\n                                clone at x: [300] y: [240] asset: [coin]\n                                clone at x: [458] y: [300] asset: [coin]\n                                clone at x: [768] y: [42] asset: [coin]\n                                clone at x: [870] y: [42] asset: [coin]\n                                clone at x: [70] y: [140] asset: [coin]\n                                clone at x: [45] y: [140] asset: [coin]\n                            else\n                                if <(LEVEL) = [9]> then\n                                    clone at x: [490] y: [40] asset: [coin]\n                                    clone at x: [490] y: [65] asset: [coin]\n                                    clone at x: [490] y: [90] asset: [coin]\n                                    clone at x: [-60] y: [50] asset: [coin]\n                                    clone at x: [-110] y: [50] asset: [coin]\n                                    clone at x: [-160] y: [50] asset: [coin]\n                                    clone at x: [-242] y: [145] asset: [gem]\n                                    clone at x: [300] y: [242] asset: [gem]\n                                else\n                                    if <(LEVEL) = [10]> then\n                                        clone at x: [-40] y: [-43] asset: [coin]\n                                        clone at x: [-40] y: [-68] asset: [coin]\n                                        clone at x: [-80] y: [-178] asset: [coin]\n                                        clone at x: [-380] y: [-178] asset: [coin]\n                                        clone at x: [-480] y: [155] asset: [gem]\n                                        clone at x: [-480] y: [180] asset: [gem]\n                                        clone at x: [200] y: [40] asset: [gem]\n                                        clone at x: [-622] y: [-100] asset: [gem]\n                                    else\n                                        if <(LEVEL) = [11]> then\n                                            clone at x: [-265] y: [40] asset: [coin]\n                                            clone at x: [-240] y: [40] asset: [coin]\n                                            clone at x: [-215] y: [40] asset: [coin]\n                                            clone at x: [-265] y: [65] asset: [coin]\n                                            clone at x: [-240] y: [65] asset: [coin]\n                                            clone at x: [-215] y: [65] asset: [coin]\n                                            clone at x: [265] y: [40] asset: [gem]\n                                            clone at x: [240] y: [40] asset: [gem]\n                                            clone at x: [215] y: [40] asset: [gem]\n                                            clone at x: [265] y: [65] asset: [gem]\n                                            clone at x: [240] y: [65] asset: [gem]\n                                            clone at x: [215] y: [65] asset: [gem]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nset [x v] to [99999]\n\nclone at x: [\(your x value here\)] y: [\(your y value here\)] asset: [\(either "coin" or "gem"\)]\n\n@parallax\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [game tick v]\nupdate position (((x) - (SCROLL X)) * (0.75)) (((y) - (SCROLL Y)) * (0.75))\n\ndefine update position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\n\nwhen I receive [clone things v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (LEVEL)\nclone at x: [0] y: [0]\nset [x v] to [99999]\n\nwhen I receive [reset v]\ndelete this clone\n\n@enemies\n\ndefine clone at x: (x) y: (y) range: (range)\nset [x v] to (x)\nset [y v] to (y)\nset [ox v] to (x)\nset [max dis v] to (range)\nset [dir v] to [1]\ncreate clone of (_myself_ v)\n\nwhen I receive [game tick v]\nupdate position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nchange [x v] by (dir)\npoint in direction ((dir) * (90))\nif <<([abs v] of ((ox) - (x)) ) = (max dis)> or <(x) = (ox)>> then\n    set [dir v] to ((0) - (dir))\nend\nswitch costume to (((timer) * (4.5)) mod (3))\nif <<(([y v] of [player v]) + (-10)) > (y)> and <touching (player v)?>> then\n    start sound [Pop v]\n    set [bounce on enemy? v] to [1]\n    delete this clone\nend\n\ndefine update position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen I receive [reset collectibles v]\nif  then\n    delete this clone\nend\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nif <(LEVEL) = [9]> then\n    clone at x: [190] y: [40] range: [250]\n    clone at x: [-130] y: [198] range: [285]\nelse\n    if <(LEVEL) = [10]> then\n        clone at x: [-40] y: [-141] range: [122]\n        clone at x: [-543] y: [-141] range: [122]\n    end\nend\nset [x v] to [99999]\n\nwhen I receive [reset v]\ndelete this clone\n\nclone at x: [\(x value\)] y: [\(y value\)] range: [\(the range the enemy AI can reach to\)]\n\n@bounce\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [game tick v]\nupdate position ((x) - (SCROLL X)) (((y) + (15)) - (SCROLL Y))\nset [touch v] to <touching (player v)?>\nupdate position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine update position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen I receive [clone things v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (1 v)\nif <(LEVEL) = [1]> then\nset [x v] to [99999]\n\nwhen I receive [reset v]\ndelete this clone\n\nwhen I receive [bounce v]\nif <(touch) = [true]> then\n    switch costume to (2 v)\n    wait (0.5) seconds\n    switch costume to (1 v)\nend\n\n@moving plats\n\ndefine clone at x: (x) y: (y) max distance: (max) inital dir: (dir)\nset [x v] to (x)\nset [y v] to (y)\nset [ox v] to (x)\nset [direction v] to (dir)\nset [max distance v] to (max)\nchange [i v] by (1)\ncreate clone of (_myself_ v)\n\nwhen I receive [game tick v]\ncheck impulse\nif <<([abs v] of ((ox) - (x)) ) = (max distance)> or <(x) = (ox)>> then\n    set [direction v] to ((0) - (direction))\nend\nchange [x v] by (direction)\nswitch costume to (((timer) * (4)) mod (2))\n\ndefine update position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen I receive [clone things v]\nset [x v] to [0]\nset [y v] to [0]\nset [i v] to [0]\nswitch costume to (1 v)\nif <(LEVEL) = [6]> then\n    clone at x: [106] y: [-58] max distance: [110] inital dir: [-1]\n    clone at x: [410] y: [-237] max distance: [58] inital dir: [-1]\nelse\n    if <(LEVEL) = [7]> then\n        clone at x: [180] y: [-57] max distance: [210] inital dir: [-1]\n        clone at x: [390] y: [-57] max distance: [210] inital dir: [-1]\n    else\n        if <(LEVEL) = [9]> then\n            clone at x: [-56] y: [-36] max distance: [215] inital dir: [1]\n        else\n            if <(LEVEL) = [10]> then\n                clone at x: [-138] y: [-215] max distance: [182] inital dir: [1]\n            end\n        end\n    end\nend\nset [x v] to [90000]\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine check impulse\nupdate position ((x) - (SCROLL X)) (((y) + (5)) - (SCROLL Y))\nif <touching (player v)?> then\n    set [impulse x v] to (direction)\nend\nupdate position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\n@Instruction Manual\n\nwhen I receive [instructions v]\nclear graphic effects\nshow\nif <(costume [number v]) = [1]> then\n    set [ghost v] effect to (50)\nend\nif <(costume [number v]) = [2]> then\n    wait (0) seconds\nend\ngo to [front v] layer\nwait until <key (space v) pressed?>\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\nwhen flag clicked\nswitch costume to (costume1 v)\ncreate clone of (_myself_ v)\nswitch costume to (costume2 v)\nhide\n\nwhen I start as a clone\nhide\n\n@flag\n\ndefine clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\nnext costume\n\nwhen I receive [game tick v]\nupdate position ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\ndefine update position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\nswitch costume to (((timer) * (2)) mod (2))\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen I receive [clone things v]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (flag v)\nif <(LEVEL) = [1]> then\n    clone at x: [385] y: [60]\nelse\n    if <(LEVEL) = [2]> then\n        clone at x: [655] y: [60]\n    else\n        if <(LEVEL) = [3]> then\n            clone at x: [405] y: [120]\n        else\n            if <(LEVEL) = [4]> then\n                clone at x: [643] y: [17]\n            else\n                if <(LEVEL) = [5]> then\n                    clone at x: [940] y: [-100]\n                else\n                    if <(LEVEL) = [6]> then\n                        clone at x: [335] y: [-200]\n                    else\n                        if <(LEVEL) = [7]> then\n                            clone at x: [780] y: [-262]\n                        else\n                            if <(LEVEL) = [8]> then\n                                clone at x: [965] y: [0]\n                            else\n                                if <(LEVEL) = [9]> then\n                                    clone at x: [450] y: [280]\n                                else\n                                    if <(LEVEL) = [10]> then\n                                        clone at x: [-698] y: [-63]\n                                    else\n                                        if <(LEVEL) = [11]> then\n                                            clone at x: [-698] y: [10000]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [reset v]\ndelete this clone\n\n@buttons\n\nwhen flag clicked\nset [music v] to [100]\nset [sfx v] to [100]\nclone buttons\n\ndefine clone buttons\nset [id v] to [1]\nswitch costume to (sfx on v)\nrepeat (3)\n    create clone of (_myself_ v)\n    change [id v] by (1)\n    next costume\nend\n\nwhen I receive [game tick v]\nif <(ID) < [4]> then\n    show\n    set y to ((160) + ([sin v] of (((timer) + (ID)) * (300)) ))\n    if <(ID) = [1]> then\n        set x to (220)\n    else\n        if <(ID) = [2]> then\n            set x to (192)\n        else\n            if <(ID) = [3]> then\n                set x to (-220)\n            end\n        end\n    end\n    set [brightness v] effect to (<touching (mouse-pointer v)?> * (10))\nelse\n    hide\nend\n\nwhen I receive [game tick v]\nif <not <mouse down?>> then\n    set [touching? v] to [n]\nend\nif <<<mouse down?> and <touching (mouse-pointer v)?>> and <(Touching?) = [n]>> then\n    set [touching? v] to [y]\n    start sound [Hi Na Tabla v]\n    if <(ID) = [1]> then\n        if <(costume [number v]) = [1]> then\n            switch costume to (sfx off v)\n            set [sfx v] to [0]\n        else\n            switch costume to (sfx on v)\n            set [sfx v] to [100]\n        end\n    else\n        if <(ID) = [2]> then\n            if <(costume [number v]) = [2]> then\n                switch costume to (music off v)\n                set [music v] to [0]\n            else\n                switch costume to (music on v)\n                set [music v] to [100]\n            end\n        else\n            if <(ID) = [3]> then\n                broadcast (Instructions v) and wait\n            end\n        end\n    end\nend\n\n@transition\n\nwhen flag clicked\nhide\n\nwhen I receive [trans v]\ntransist\nbroadcast (hide v)\n\ndefine transist\nclear graphic effects\nshow\ngo to [front v] layer\ngo to x: (0) y: (500)\nrepeat until <(round (y position)) = [0]>\n    change y by (((0) - (y position)) / (3))\n    go to [front v] layer\nend\n\nwhen I receive [hide v]\nrepeat (100)\n    go to [front v] layer\nend\nrepeat (10)\n    change [ghost v] effect by (10)\nend\nhide\n\n@TB\n\nwhen I receive [game tick v]\nset [ghost v] effect to (100)\ngo to [front v] layer\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to [front v] layer\n\n@Ending\n\nwhen I receive [game tick v]\ngo to x: (0) y: (0)\n\nif <(LEVEL) = [11]> then\n    show\nelse\n    hide\nend\n\n
Welcome to Infection! It's spooktober so it's time for a spooky platformer...\n\nA disastrous experiment caused this. Water was contaminated, things got tipped with poison, lots of it was flying in the air. You are the only one immune. You must find a safer place to live.