Pen Platformer || #Games
@Stage\n\nwhen [timer v] > (0)\nbroadcast (Reset v) and wait\nswitch backdrop to (backdrop1 v)\n\nwhen flag clicked\nset volume to (60) %\nforever\n    play sound [Popsicle v] until done\nend\n\n@blank\n\n@pen\n\ndefine Draw Rectangle from (x1) (y1) to (x2) (y2) (sz) <canfill?>\npen up\nset pen size to (sz)\nGo To (x1) (y1)\npen down\nset [fm v] to [0]\nif <canfill?> then\n    repeat ([floor v] of (([abs v] of ((x1) - (x2)) ) / (sz)) )\n        set pen (brightness v) to (60)\n        change [fm v] by (([abs v] of ((x1) - (x2)) ) / (([floor v] of ([abs v] of ((x1) - (x2)) ) ) / (sz)))\n        Go To ((x1) + (fm)) (y1)\n        Go To ((x1) + (fm)) (y2)\n    end\nend\npen up\nset pen (brightness v) to (30)\nGo To (x1) (y1)\npen down\nGo To (x1) (y2)\nGo To (x2) (y2)\nGo To (x2) (y1)\nGo To (x1) (y1)\npen up\n\nwhen flag clicked\nset [vox v] to [0]\nset [voy v] to [0]\nset [nbd v] to [0]\nset [nbe v] to [0]\nset [cam x v] to [0]\nset [cam y v] to [0]\nset [lvl v] to [1]\nswitch backdrop to (backdrop1 v)\nforever\n    reset timer\n    Draw\n    Update\n    Physics\n    if <<touching color (#4c4c4c)?> and <touching color (#999999)?>> then\n        change [lvl v] by (1)\n    end\nend\n\ndefine Go To (x) (y)\ngo to x: ((x) + (cam x)) y: ((y) + (cam y))\n\ndefine Scrolling\nchange [cam x v] by (() - (round ((nbd) / (10))))\nchange [nbd v] by (() - (round ((nbd) / (10))))\nchange [cam y v] by (() - (round ((nbe) / (10))))\nchange [nbe v] by (() - (round ((nbe) / (10))))\n\ndefine Update\ndelete all of [touching v]\nset [ind v] to [0]\nrepeat (length of [lx v])\n    change [ind v] by (1)\n    if <<<(nbd) < (((item (ind) of [lx v]) + (cam x)) + (item (ind) of [ll v]))> and <((nbd) + (20)) > ((item (ind) of [lx v]) + (cam x))>> and <<(nbe) < (((item (ind) of [ly v]) + (cam y)) + (item (ind) of [lh v]))> and <((nbe) + (20)) > ((item (ind) of [ly v]) + (cam y))>>> then\n        if <not <[touching v] contains (item (ind) of [lt v])?>> then\n            add (item (ind) of [lt v]) to [touching v]\n        end\n    end\nend\n\ndefine Draw\npen up\nerase all\nset pen size to (5)\nset [ind v] to [0]\nrepeat (length of [lx v])\n    change [ind v] by (1)\n    if <<<((cam y) + (((item (ind) of [ly v]) + (item (ind) of [lh v])) - (5))) > [-180]> and <((cam y) + ((item (ind) of [ly v]) + (5))) < [240]>> and <<((cam x) + (((item (ind) of [lx v]) + (item (ind) of [ll v])) - (5))) > [-240]> and <((cam x) + ((item (ind) of [lx v]) + (5))) < [240]>>> then\n        set pen color to (#000000)\n        if <(item (ind) of [lt v]) = [1]> then\n            set pen color to (#1647ed)\n        end\n        if <(item (ind) of [lt v]) = [2]> then\n            set pen color to (#fff600)\n        end\n        if <(item (ind) of [lt v]) = [3]> then\n            set pen color to (#ff0000)\n        end\n        if <(item (ind) of [lt v]) = [4]> then\n            set pen color to (#59ff00)\n        end\n        Draw Rectangle from ((item (ind) of [lx v]) + (5)) ((item (ind) of [ly v]) + (5)) to (((item (ind) of [lx v]) + (item (ind) of [ll v])) - (5)) (((item (ind) of [ly v]) + (item (ind) of [lh v])) - (5)) [10] \n    end\nend\nPlayer\n\ndefine add platform (x) (y) (length) (height) (type)\nadd (x) to [lx v]\nadd (y) to [ly v]\nadd (length) to [ll v]\nadd (height) to [lh v]\nadd (type) to [lt v]\n\ndefine Physics\nif <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n    change [vox v] by (1)\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [vox v] by (-1)\nend\nset [vox v] to ((vox) * (0.9))\nchange [nbd v] by (vox)\nCollision\n\ndefine Collision\nUpdate\nif <[touching v] contains [1]?> then\n    change [nbe v] by (1)\n    Update\n    if <[touching v] contains [1]?> then\n        change [nbe v] by (1)\n        Update\n        if <[touching v] contains [1]?> then\n            change [nbe v] by (1)\n            Update\n            if <[touching v] contains [1]?> then\n                change [nbe v] by (1)\n                Update\n                if <[touching v] contains [1]?> then\n                    change [nbe v] by (1)\n                    Update\n                    if <[touching v] contains [1]?> then\n                        change [nbd v] by ((vox) * (-1))\n                        change [nbe v] by (-5)\n                        \n                            if <(vox) > [0]> then\n                                set [vox v] to [-5]\n                            else\n                                set [vox v] to [5]\n                            end\n                            set [voy v] to [10]\n                        else\n                            set [vox v] to [0]\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nUpdate\nchange [voy v] by (-1)\nchange [nbe v] by (voy)\nUpdate\nif <[touching v] contains [1]?> then\n    change [nbe v] by ((voy) * (-1))\n    set [voy v] to [0]\nend\nUpdate\nchange [nbe v] by (-1)\nUpdate\nif <[touching v] contains [1]?> then\n    if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n        set [voy v] to [14]\n    end\nend\nUpdate\nif <[touching v] contains [2]?> then\n    set [voy v] to [17]\nend\nUpdate\nif <<[touching v] contains [3]?> or <(cam y) > [500]>> then\n    set [vox v] to [0]\n    set [voy v] to [0]\n    set [nbd v] to [0]\n    set [nbe v] to [0]\n    set [cam x v] to [0]\n    set [cam y v] to [0]\nend\nUpdate\nchange [nbe v] by (1)\nScrolling\n\ndefine Player\nset pen color to (#ee16bb)\nset pen size to (8)\nset pen (brightness v) to (20)\ngo to x: (nbd) y: (nbe)\npen down\ngo to x: (nbd) y: ((nbe) + (20))\ngo to x: ((nbd) + (20)) y: ((nbe) + (20))\ngo to x: ((nbd) + (20)) y: (nbe)\ngo to x: (nbd) y: (nbe)\npen up\nset pen size to (4)\nset pen (brightness v) to (50)\ngo to x: (nbd) y: (nbe)\npen down\ngo to x: (nbd) y: ((nbe) + (20))\ngo to x: ((nbd) + (20)) y: ((nbe) + (20))\ngo to x: ((nbd) + (20)) y: (nbe)\ngo to x: (nbd) y: (nbe)\npen up\n\nwhen I receive [startlevel3 v]\ndelete all of [lx v]\ndelete all of [ly v]\ndelete all of [ll v]\ndelete all of [lh v]\ndelete all of [lt v]\nif <(lvl) = [1]> then\n    add platform (-50) (-50) (100) (25) (1)\n    add platform (50) (-50) (100) (25) (2)\n    add platform (150) (-50) (100) (25) (3)\n    add platform (250) (-50) (100) (25) (1)\n    add platform (350) (-50) (100) (25) (1)\n    add platform (450) (-50) (100) (25) (2)\n    add platform (550) (-50) (75) (25) (3)\n    add platform (625) (-50) (75) (25) (1)\n    add platform (700) (-50) (75) (25) (3)\n    add platform (800) (-50) (75) (25) (2)\n    add platform (875) (-50) (75) (150) (1)\n    add platform (875) (100) (75) (25) (2)\n    add platform (1000) (100) (75) (25) (1)\n    add platform (1100) (100) (75) (25) (3)\n    add platform (1200) (100) (75) (25) (2)\n    add platform [1300] [100] [200] [25] [3]\n    add platform (1500) (100) (75) (25) (2)\n    add platform (1700) (100) (100) (100) (1)\n    add platform (1800) (100) (100) (100) (1)\n    add platform (1900) (100) (75) (25) (2)\n    add platform (2000) (10) (75) (25) (2)\n    add platform (2300) (10) (75) (25) (2)\n    add platform (2600) (10) (75) (25) (2)\n    add platform (2800) (100) (100) (60) (1)\n    add platform (2900) (100) (100) (60) (1)\n    add platform (3000) (100) (100) (60) (2)\n    add platform (3300) (100) (100) (60) (2)\n    add platform (3450) (200) (100) (60) (2)\n    add platform (3600) (300) (100) (60) (2)\n    add platform (3750) (400) (100) (60) (1)\n    add platform (3850) (400) (100) (60) (2)\n    add platform (4200) (400) (100) (60) (1)\n    add platform (4300) (400) (100) (25) (3)\n    add platform (4400) (400) (75) (25) (1)\n    add platform (4500) (400) (75) (25) (3)\n    add platform (4600) (400) (75) (25) (1)\n    add platform (4700) (400) (75) (25) (3)\n    add platform (4800) (400) (75) (25) (2)\n    add platform (4900) (400) (100) (80) (3)\n    add platform (5000) (400) (100) (25) (1)\n    add platform (5100) (300) (100) (25) (1)\n    add platform (5300) (200) (100) (25) (1)\n    add platform (5400) (200) (100) (25) (2)\n    add platform (5700) (200) (150) (25) (1)\n    add platform (5750) (200) (20) (25) (3)\n    add platform (5850) (100) (100) (25) (1)\n    add platform (6100) (100) (100) (25) (2)\n    add platform (6200) (100) (100) (60) (3)\n    add platform (6300) (100) (100) (25) (1)\n    add platform (6400) (100) (100) (25) (3)\n    add platform (6500) (100) (100) (25) (1)\n    add platform (6600) (100) (100) (25) (2)\n    add platform (6700) (200) (100) (25) (2)\n    add platform (6800) (300) (100) (25) (2)\n    add platform (7100) (300) (100) (25) (2)\n    add platform (7200) (300) (100) (25) (1)\n    add platform (7300) (300) (100) (25) (1)\n    add platform (7350) (300) (20) (25) (3)\n    add platform (7500) (300) (100) (25) (2)\n    add platform (7600) (400) (100) (25) (2)\n    add platform (7700) (500) (100) (25) (2)\n    add platform (7800) (600) (100) (25) (2)\n    add platform (7900) (600) (100) (70) (3)\n    add platform (8000) (600) (100) (25) (2)\n    add platform (8100) (600) (100) (25) (1)\n    add platform (8300) (600) (100) (25) (1)\n    add platform (8400) (600) (100) (25) (2)\n    add platform (8500) (700) (50) (25) (2)\n    add platform (8600) (800) (50) (25) (2)\n    add platform (8700) (900) (50) (25) (2)\n    add platform (8900) (900) (50) (25) (2)\n    add platform (9000) (900) (100) (25) (1)\n    add platform (9100) (900) (25) (25) (2)\n    add platform (9200) (1000) (300) (25) (1)\n    add platform (9270) (1050) (150) (50) (4)\nend\n\nwhen I receive [startlevel 1 v]\ndelete all of [lx v]\ndelete all of [ly v]\ndelete all of [ll v]\ndelete all of [lh v]\ndelete all of [lt v]\nif <(lvl) = [1]> then\n    add platform (-50) (-50) (100) (25) (1)\n    add platform (50) (-50) (100) (25) (1)\n    add platform (150) (-50) (100) (25) (1)\n    add platform (250) (-50) (100) (25) (3)\n    add platform (350) (-50) (100) (25) (1)\n    add platform (450) (-50) (100) (25) (3)\n    add platform (550) (-50) (100) (25) (1)\n    add platform (650) (-50) (100) (25) (2)\n    add platform (750) (-50) (200) (25) (3)\n    add platform (950) (-50) (100) (25) (2)\n    add platform (1050) (-50) (100) (100) (1)\n    add platform (1150) (-50) (100) (50) (3)\n    add platform (1250) (-50) (100) (100) (1)\n    add platform (1450) (150) (100) (100) (2)\n    add platform (1350) (-50) (100) (100) (2)\n    add platform (1450) (150) (100) (100) (2)\n    add platform (1550) (150) (100) (100) (1)\n    add platform (1650) (150) (100) (100) (3)\n    add platform (1750) (150) (100) (100) (2)\n    add platform (1900) (250) (100) (100) (2)\n    add platform (2000) (350) (100) (100) (2)\n    add platform (2100) (450) (100) (100) (2)\n    add platform (2200) (550) (100) (100) (2)\n    add platform (2300) (650) (100) (100) (2)\n    add platform (2400) (650) (100) (100) (1)\n    add platform (2500) (600) (100) (25) (1)\n    add platform (2600) (500) (100) (25) (1)\n    add platform (2700) (500) (100) (25) (1)\n    add platform (2800) (400) (250) (25) (1)\n    add platform (2850) (450) (250) (25) (1)\n    add platform (2900) (350) (250) (25) (1)\n    add platform (2800) (300) (250) (25) (1)\n    add platform (2900) (250) (250) (25) (1)\n    add platform (2800) (200) (400) (25) (1)\n    add platform (3200) (200) (100) (25) (3)\n    add platform (3300) (200) (100) (25) (1)\n    add platform (3400) (200) (100) (25) (3)\n    add platform (3500) (200) (100) (25) (1)\n    add platform (3600) (370) (500) (25) (3)\n    add platform (3600) (200) (100) (25) (2)\n    add platform (3700) (200) (100) (25) (1)\n    add platform (3800) (200) (100) (25) (2)\n    add platform (3900) (200) (100) (25) (1)\n    add platform (4000) (200) (100) (25) (2)\n    add platform (4100) (200) (100) (25) (1)\n    add platform (4200) (200) (100) (25) (2)\n    add platform (4300) (200) (100) (100) (3)\n    add platform (4400) (150) (100) (25) (1)\n    add platform (4500) (150) (100) (25) (1)\n    add platform (4600) (150) (100) (25) (3)\n    add platform (4700) (100) (100) (25) (1)\n    add platform (4800) (100) (100) (25) (3)\n    add platform (4900) (100) (100) (25) (1)\n    add platform (5000) (100) (100) (25) (2)\n    add platform (5100) (200) (100) (25) (2)\n    add platform (5200) (300) (100) (25) (2)\n    add platform (5300) (400) (100) (25) (2)\n    add platform (5400) (500) (100) (25) (2)\n    add platform (5500) (500) (100) (100) (3)\n    add platform (5600) (500) (100) (25) (2)\n    add platform (5700) (600) (100) (25) (2)\n    add platform (5800) (700) (100) (25) (2)\n    add platform (5900) (800) (100) (25) (2)\n    add platform (6100) (800) (200) (25) (1)\n    add platform (6300) (800) (100) (25) (3)\n    add platform (6400) (800) (100) (25) (2)\n    add platform (6500) (800) (100) (100) (3)\n    add platform (6600) (800) (100) (100) (2)\n    add platform (6700) (800) (100) (200) (3)\n    add platform (6800) (800) (200) (200) (1)\n    add platform (7000) (800) (100) (25) (1)\n    add platform (7100) (700) (100) (25) (1)\n    add platform (7200) (700) (100) (400) (1)\n    add platform (7000) (600) (100) (25) (1)\n    add platform (6900) (600) (100) (200) (1)\n    add platform (7100) (500) (100) (25) (1)\n    add platform (7200) (500) (100) (200) (1)\n    add platform (7000) (400) (100) (25) (1)\n    add platform (6900) (400) (100) (200) (1)\n    add platform (7100) (300) (100) (25) (1)\n    add platform (7200) (300) (100) (200) (1)\n    add platform (7000) (200) (400) (25) (1)\n    add platform (6900) (200) (100) (25) (3)\n    add platform (6800) (200) (100) (25) (2)\n    add platform (6700) (200) (100) (100) (3)\n    add platform (6600) (200) (100) (25) (1)\n    add platform (6400) (150) (100) (25) (1)\n    add platform (6300) (150) (100) (25) (3)\n    add platform (6200) (150) (100) (50) (2)\n    add platform (5900) (150) (100) (50) (1)\n    add platform (5600) (150) (300) (50) (1)\n    add platform (5600) (300) (300) (50) (4)\nend\n\nwhen I receive [startlevel2 v]\ndelete all of [lx v]\ndelete all of [ly v]\ndelete all of [ll v]\ndelete all of [lh v]\ndelete all of [lt v]\nif <(lvl) = [1]> then\n    add platform [-50] [-50] [100] [25] [1]\n    add platform [50] [-50] [100] [25] [2]\n    add platform [-70] [70] [100] [25] [2]\n    add platform [50] [180] [100] [25] [2]\n    add platform [150] [180] [50] [25] [1]\n    add platform [200] [180] [50] [25] [3]\n    add platform [250] [180] [50] [25] [1]\n    add platform [300] [180] [50] [25] [3]\n    add platform [350] [180] [50] [25] [1]\n    add platform [400] [180] [50] [25] [3]\n    add platform [450] [180] [50] [25] [1]\n    add platform [500] [180] [50] [25] [3]\n    add platform [550] [180] [50] [25] [1]\n    add platform [600] [180] [50] [25] [1]\n    add platform [700] [150] [100] [25] [2]\n    add platform [600] [350] [100] [25] [2]\n    add platform [800] [250] [100] [25] [1]\n    add platform [600] [450] [100] [25] [2]\n    add platform [600] [550] [100] [25] [2]\n    add platform [600] [650] [100] [25] [2]\n    add platform [700] [650] [100] [150] [1]\n    add platform [700] [650] [250] [25] [3]\n    add platform [950] [560] [100] [25] [2]\n    add platform [1050] [650] [1500] [25] [3]\n    add platform [1050] [680] [100] [25] [1]\n    add platform [1250] [680] [100] [25] [1]\n    add platform [1400] [680] [100] [25] [2]\n    add platform [1500] [680] [150] [150] [1]\n    add platform [1750] [670] [100] [25] [2]\n    add platform [2000] [670] [100] [25] [1]\n    add platform [2250] [670] [100] [25] [2]\n    add platform [2350] [670] [100] [100] [3]\n    add platform [2450] [670] [100] [25] [2]\n    add platform [2550] [800] [100] [25] [1]\n    add platform [2450] [850] [100] [25] [1]\n    add platform [2550] [900] [100] [25] [1]\n    add platform [2450] [950] [100] [25] [1]\n    add platform [2350] [1050] [100] [25] [2]\n    add platform [2450] [1150] [40] [25] [1]\n    add platform [2550] [1150] [40] [25] [1]\n    add platform [2650] [1150] [40] [25] [1]\n    add platform [2750] [1150] [40] [25] [1]\n    add platform [2790] [1150] [100] [25] [2]\n    add platform [2900] [1300] [100] [25] [2]\n    add platform [2700] [1300] [100] [25] [1]\n    add platform [2600] [1300] [100] [25] [2]\n    add platform [2500] [1300] [100] [100] [3]\n    add platform [2400] [1300] [100] [100] [2]\n    add platform [2300] [1300] [100] [200] [1]\n    add platform [2200] [1300] [100] [100] [3]\n    add platform [2100] [1300] [100] [200] [1]\n    add platform [2000] [1300] [100] [200] [2]\n    add platform [1900] [1300] [100] [250] [3]\n    add platform [1800] [1300] [100] [250] [1]\n    add platform [1700] [1300] [100] [300] [2]\n    add platform [1800] [1750] [100] [100] [2]\n    add platform [1900] [1800] [100] [25] [1]\n    add platform [1910] [1800] [10] [25] [3]\n    add platform [1950] [1800] [10] [25] [3]\n    add platform [2000] [1800] [100] [25] [1]\n    add platform [2010] [1800] [10] [25] [3]\n    add platform [2100] [1800] [100] [25] [2]\n    add platform [2000] [2000] [100] [25] [1]\n    add platform [2200] [1900] [100] [25] [2]\n    add platform [2030] [2000] [10] [25] [3]\n    add platform [1900] [2000] [50] [25] [1]\n    add platform [1850] [2000] [50] [25] [2]\n    add platform [1800] [2000] [50] [100] [3]\n    add platform [1750] [2000] [50] [100] [1]\n    add platform [1650] [2000] [50] [100] [1]\n    add platform [1500] [2000] [50] [100] [2]\n    add platform [1600] [2200] [100] [25] [1]\n    add platform [1650] [2200] [10] [25] [3]\n    add platform [1800] [2200] [100] [25] [1]\n    add platform [1900] [2200] [100] [25] [2]\n    add platform [1800] [2300] [100] [25] [1]\n    add platform [1850] [2300] [10] [25] [3]\n    add platform [1650] [2300] [40] [25] [1]\n    add platform [1500] [2300] [40] [25] [1]\n    add platform [1400] [2350] [40] [25] [1]\n    add platform [1250] [2300] [40] [25] [1]\n    add platform [1050] [2350] [100] [25] [1]\n    add platform [1090] [2350] [10] [25] [3]\n    add platform [950] [2400] [40] [25] [1]\n    add platform [1050] [2480] [40] [25] [1]\n    add platform [1150] [2480] [40] [25] [1]\n    add platform [1350] [2480] [100] [25] [1]\n    add platform [1360] [2480] [10] [25] [3]\n    add platform [1450] [2480] [100] [25] [2]\n    add platform [1600] [2580] [300] [25] [1]\n    add platform [1600] [2650] [300] [50] [4]\nelse\nend\n\nwhen flag clicked\nforever\n    Update\nend\n\n@Thumbnail\n\nwhen flag clicked\nswitch costume to (thumbnail v)\ngo to x: (0) y: (0)\ngo to [front v] layer\nrepeat (50)\n    change [ghost v] effect by (2)\nend\n\n@Title screen\n\ndefine Bounce (size)\nset [movement6 v] to (((Movement6) * (0.8)) + (((size) - (size)) * (0.2)))\nchange size by (Movement6)\n\nset y to (0)\n\nwhen flag clicked\nhide\nset [clone id v] to [BG]\ncreate clone of (_myself_ v)\nset [clone id v] to [Title]\ncreate clone of (_myself_ v)\nset [clone id v] to [level 1]\ncreate clone of (_myself_ v)\nset [clone id v] to [level 2]\ncreate clone of (_myself_ v)\nset [clone id v] to [level 3]\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\nbroadcast (Menu Setup v)\n\nwhen I start as a clone\nforever\n    if <(Clone ID) = [level 1]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (165) %\n            set [brightness v] effect to ((0.2) * ((45) - (Brightness)))\n            set [brightness v] to [0]\n        else\n            set size to (155) %\n            set [brightness v] effect to ((0.2) * ((0) - (Brightness)))\n            set [brightness v] to [45]\n        end\n        point in direction ((90) + (([sin v] of ((timer) * (125)) ) * (1.5)))\n    end\n    if <(Clone ID) = [level 2]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (165) %\n            set [brightness v] effect to ((0.2) * ((45) - (Brightness)))\n            set [brightness v] to [0]\n        else\n            set size to (155) %\n            set [brightness v] effect to ((0.2) * ((0) - (Brightness)))\n            set [brightness v] to [45]\n        end\n        point in direction ((90) + (([sin v] of ((timer) * (125)) ) * (1.5)))\n    end\n    if <(Clone ID) = [level 3]> then\n        if <touching (mouse-pointer v)?> then\n            set size to (165) %\n            set [brightness v] effect to ((0.2) * ((45) - (Brightness)))\n            set [brightness v] to [0]\n        else\n            set size to (155) %\n            set [brightness v] effect to ((0.2) * ((0) - (Brightness)))\n            set [brightness v] to [45]\n        end\n        point in direction ((90) + (([sin v] of ((timer) * (125)) ) * (1.5)))\n    end\nend\n\nwhen I start as a clone\nforever\n    if <(Clone ID) = [level 1]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set size to (145) %\n            broadcast (Move v) and wait\n            broadcast (Startlevel 1 v)\n        end\n    end\n    if <(Clone ID) = [level 2]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set size to (145) %\n            broadcast (Move v) and wait\n            broadcast (Startlevel2 v) and wait\n        end\n    end\n    if <(Clone ID) = [level 3]> then\n        if <<touching (mouse-pointer v)?> and <mouse down?>> then\n            set size to (145) %\n            broadcast (Move v) and wait\n            broadcast (Startlevel3 v) and wait\n        end\n    end\n    if <(Clone ID) = [title]> then\n        set size to (400) %\n        forever\n            change [sine v] by (1)\n            set y to ((120) + (([sin v] of ((sine) * (6)) ) * (6)))\n            point in direction (90)\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (2)\n                Bounce [100]\n            else\n                set [brightness v] effect to (0)\n                Bounce [90]\n            end\n        end\n    end\nend\n\nwhen I receive [move v]\nwait (0.3) seconds\nif <(Clone ID) = [level 1]> then\n    wait (0.2) seconds\n    set [speed v] to [0]\n    repeat (28)\n        change [speed v] by (1)\n        change x by (speed)\n    end\n    hide\nend\nif <(Clone ID) = [level 2]> then\n    wait (0.1) seconds\n    set [speed v] to [0]\n    repeat (28)\n        change [speed v] by (1)\n        change x by (speed)\n    end\n    hide\nend\nif <(Clone ID) = [level 3]> then\n    wait (0.3) seconds\n    set [speed v] to [0]\n    repeat (28)\n        change [speed v] by (1)\n        change x by (speed)\n    end\n    hide\nend\nif <(Clone ID) = [Title]> then\n    set [speed v] to [0]\n    repeat (28)\n        change [speed v] by (1)\n        change x by (speed)\n    end\n    hide\nend\n\nwhen flag clicked\nhide variable [brightness v]\nhide variable [speed v]\nhide variable [clone id v]\n\nwhen I receive [menu setup v]\nif <(Clone ID) = [Title]> then\n    switch costume to (title v)\n    show\n    go to x: (2000) y: (60)\n    set size to (300) %\n    repeat (28)\n        change x by ((0.2) * ((0) - (x position)))\n    end\nend\nif <(Clone ID) = [BG]> then\n    switch costume to (background v)\n    set size to (100) %\n    show\n    go to x: (0) y: (0)\nend\nif <(Clone ID) = [level 1]> then\n    wait (0.2) seconds\n    switch costume to (level 1 v)\n    show\n    go to x: (270) y: (-25)\n    set size to (155) %\n    repeat (28)\n        change x by ((0.2) * ((0) - (x position)))\n    end\nend\nif <(Clone ID) = [level 2]> then\n    wait (0.3) seconds\n    switch costume to (level 2 v)\n    show\n    go to x: (270) y: (-85)\n    set size to (155) %\n    repeat (28)\n        change x by ((0.2) * ((0) - (x position)))\n    end\nend\nif <(Clone ID) = [level 3]> then\n    wait (0.4) seconds\n    switch costume to (level 3 v)\n    show\n    go to x: (270) y: (-145)\n    set size to (155) %\n    repeat (28)\n        change x by ((0.2) * ((0) - (x position)))\n    end\nend\n\nwhen flag clicked\nforever\n    hide\nend\n\nwhen I receive [startlevel 1 v]\nif <(Clone ID) = [BG]> then\n    wait (0.2) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I receive [startlevel2 v]\nif <(Clone ID) = [BG]> then\n    wait (0.2) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\nwhen I receive [startlevel3 v]\nif <(Clone ID) = [BG]> then\n    wait (0.2) seconds\n    repeat (10)\n        change [ghost v] effect by (10)\n    end\nend\n\n
====Pen A Platformer====\n\nLag? https://turbowarp.org/840666899\nUse the arrow keys or WASD to move and jump.\nIf you see a green platform at the ending of the level, it means you passed the level.\n\nLevel names:\n\n-Level 1-\nUnderground\n-Level 2-\nClimb to the top\n-Level 3-\nMission (im)possible\n---------------------------------------------------\nI spend a lot of time making this project, so a love fav or follow makes my day better!!! :)\n#Platformer #Pen #PenPlatformer