Roll ↝ A 100% Pen Scrolling Platformer


@Stage\n\nwhen flag clicked\nforever\n    play sound [Disfigure - Blank.mp3 v] until done\nend\n\n@Pen\n\ndefine Fill Rectangle From: (x1) (y1) To: (x2) (y2)\nif <<(x2) < (x1)> and <(y1) < (y2)>> then\n    __fill rect__ (x2) (y1) (x1) (y2)\nelse\n    if <<(x1) < (x2)> and <(y2) < (y1)>> then\n        __fill rect__ (x1) (y2) (x2) (y1)\n    else\n        if <<(x1) < (x2)> and <(y1) < (y2)>> then\n            __fill rect__ (x1) (y1) (x2) (y2)\n        else\n            __fill rect__ (x2) (y2) (x1) (y1)\n        end\n    end\nend\n\ndefine __fill rect__ (x1) (y1) (x2) (y2)\nif <(((y2) - (y1)) / (2)) < (((x2) - (x1)) / (2))> then\n    set [res v] to ([ceiling v] of (((y2) - (y1)) / (14)) )\n    set pen size to ((y2) - (y1))\n    go to x: ((x1) + (((y2) - (y1)) / (2))) y: ((y1) + (((y2) - (y1)) / (2)))\n    pen down\n    go to x: ((x2) - (((y2) - (y1)) / (2))) y: ((y1) + (((y2) - (y1)) / (2)))\nelse\n    set [res v] to ([ceiling v] of (((x2) - (x1)) / (14)) )\n    set pen size to ((x2) - (x1))\n    go to x: ((x1) + (((x2) - (x1)) / (2))) y: ((y1) + (((x2) - (x1)) / (2)))\n    pen down\n    go to x: ((x1) + (((x2) - (x1)) / (2))) y: ((y2) - (((x2) - (x1)) / (2)))\nend\nrepeat until <([floor v] of (res) ) = [0]>\n    set pen size to ((res) * (2))\n    go to x: ((x1) + (res)) y: ((y1) + (res))\n    go to x: ((x1) + (res)) y: ((y2) - (res))\n    go to x: ((x2) - (res)) y: ((y2) - (res))\n    go to x: ((x2) - (res)) y: ((y1) + (res))\n    go to x: ((x1) + (res)) y: ((y1) + (res))\n    set [res v] to ((res) * (0.3))\nend\npen up\n\ndefine Ren_Tri at (ax) (ay) (bx) (by) (cx) (cy) resolution: (res)\nset [z_lena v] to ([sqrt v] of ((((bx) - (cx)) * ((bx) - (cx))) + (((by) - (cy)) * ((by) - (cy)))) )\nset [z_lenb v] to ([sqrt v] of ((((ax) - (cx)) * ((ax) - (cx))) + (((ay) - (cy)) * ((ay) - (cy)))) )\nset [z_lenc v] to ([sqrt v] of ((((ax) - (bx)) * ((ax) - (bx))) + (((ay) - (by)) * ((ay) - (by)))) )\nset [z_peri v] to ((1) / (((Z_lena) + (Z_lenb)) + (Z_lenc)))\nset [z_incx v] to (((((Z_lena) * (ax)) + ((Z_lenb) * (bx))) + ((Z_lenc) * (cx))) * (Z_peri))\nset [z_incy v] to (((((Z_lena) * (ay)) + ((Z_lenb) * (by))) + ((Z_lenc) * (cy))) * (Z_peri))\nset [z_ind v] to ([sqrt v] of ((((((Z_lenb) + (Z_lenc)) - (Z_lena)) * (((Z_lenc) + (Z_lena)) - (Z_lenb))) * (((Z_lena) + (Z_lenb)) - (Z_lenc))) * (Z_peri)) )\nset [z_aox v] to ((Z_incx) - (ax))\nset [z_aoy v] to ((Z_incy) - (ay))\nset [z_box v] to ((Z_incx) - (bx))\nset [z_boy v] to ((Z_incy) - (by))\nset [z_cox v] to ((Z_incx) - (cx))\nset [z_coy v] to ((Z_incy) - (cy))\nif <<(Z_lena) < (Z_lenb)> and <(Z_lena) < (Z_lenc)>> then\n    set [z_td v] to ([sqrt v] of (((Z_Aox) * (Z_Aox)) + ((Z_Aoy) * (Z_Aoy))) )\nelse\n    if <<(Z_lenb) > (Z_lena)> or <(Z_lenb) > (Z_lenc)>> then\n        set [z_td v] to ([sqrt v] of (((Z_Cox) * (Z_Cox)) + ((Z_Coy) * (Z_Coy))) )\n    else\n        set [z_td v] to ([sqrt v] of (((Z_Box) * (Z_Box)) + ((Z_Boy) * (Z_Boy))) )\n    end\nend\nset [z_rate v] to ((((Z_td) * (2)) - (Z_ind)) / ((Z_td) * (4)))\nset [z_td v] to ((1) + (0))\ngo to x: (round (Z_incx)) y: (round (Z_incy))\nset pen size to (Z_ind)\npen down\nrepeat ([ceiling v] of (([log v] of ((res) / (Z_ind)) ) / ([log v] of (Z_rate) )) )\n    set [z_td v] to ((Z_td) * (Z_rate))\n    set pen size to ((Z_ind) * (Z_td))\n    go to x: (((Z_Aox) * (Z_td)) + (ax)) y: (((Z_Aoy) * (Z_td)) + (ay))\n    go to x: (((Z_Box) * (Z_td)) + (bx)) y: (((Z_Boy) * (Z_td)) + (by))\n    go to x: (((Z_Cox) * (Z_td)) + (cx)) y: (((Z_Coy) * (Z_td)) + (cy))\n    go to x: (((Z_Aox) * (Z_td)) + (ax)) y: (((Z_Aoy) * (Z_td)) + (ay))\nend\nset pen size to (res)\ngo to x: (ax) y: (ay)\ngo to x: (bx) y: (by)\ngo to x: (cx) y: (cy)\ngo to x: (ax) y: (ay)\npen up\n\nwhen flag clicked\nforever\n    Main_Reset\n    repeat until <(@STATUS) > []>\n        Main_Graphics\n        Main_Physics\n    end\n    if <(@STATUS) = [Die]> then\n        wait (0.7) seconds\n    else\n        repeat (40)\n            change [@_x v] by (((item (1) of [portal v]) - (@_X)) / (10))\n            change [@_y v] by (((item (2) of [portal v]) - (@_Y)) / (10))\n            change [@_size v] by (((0) - (@_SIZE)) / (10))\n            Main_Graphics\n        end\n        stop [all v]\n    end\nend\n\ndefine Main_Graphics\nerase all\ndelete all of [lava v]\ndelete all of [trampolines v]\ndelete all of [spikes v]\ndelete all of [ground v]\ndelete all of [reverse v]\ndelete all of [portal v]\nRen_BG\nTile_Clouds\nTile_Spike at x,y [60] [-95] upside down? (0/1) [0]\nTile_Spike at x,y [90] [-95] upside down? (0/1) [0]\nTile_Spike at x,y [120] [-95] upside down? (0/1) [0]\nTile_Sign at x,y [0] [-70] left/right [right]\nTile_Ground at x1,y1,x2,y2 [-240] [-110] [240] [-180] top layer height [20]\nTile_Ground at x1,y1,x2,y2 [-240] [350] [-200] [-180] top layer height [20]\nTile_Trampoline at x,y [230] [-10]\nTile_Ground at x1,y1,x2,y2 [200] [-20] [260] [-180] top layer height [20]\nTile_Ground at x1,y1,x2,y2 [350] [180] [410] [-180] top layer height [20]\nTile_Ground at x1,y1,x2,y2 [500] [130] [560] [-180] top layer height [20]\nTile_Ground at x1,y1,x2,y2 [650] [80] [710] [-180] top layer height [20]\nTile_Ground at x1,y1,x2,y2 [800] [20] [860] [-180] top layer height [20]\nTile_Ground at x1,y1,x2,y2 [950] [-40] [1010] [-180] top layer height [20]\nTile_Ground at x1,y1,x2,y2 [1100] [-120] [1300] [-180] top layer height [20]\nTile_Reverse at x1,y1,x2,y2 [1250] [-100] [1300] [-140]\nTile_Lava at x1,x2 [1900] [2100] base y, height [140] [60] animation speed, animation range [50] [8] thickness [20]\nTile_Lava at x1,x2 [1575] [1840] base y, height [140] [60] animation speed, animation range [50] [8] thickness [20]\nTile_Sign at x,y [1400] [190] left/right [left]\nTile_Ground at x1,y1,x2,y2 [1100] [150] [2250] [80] top layer height [20]\nTile_Spike at x,y [1115] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1145] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1175] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1205] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1235] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1335] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1435] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1465] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1565] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1595] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1625] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1725] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1755] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1785] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1815] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1915] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1945] [64] upside down? (0/1) [1]\nTile_Spike at x,y [1975] [64] upside down? (0/1) [1]\nTile_Spike at x,y [2005] [64] upside down? (0/1) [1]\nTile_Spike at x,y [2035] [64] upside down? (0/1) [1]\nTile_Reverse at x1,y1,x2,y2 [2200] [100] [2250] [60]\nTile_Trampoline at x,y [2375] [-100]\nTile_Ground at x1,y1,x2,y2 [2100] [-110] [2400] [-180] top layer height [20]\nTile_Spike at x,y [2115] [-95] upside down? (0/1) [0]\nTile_Spike at x,y [2145] [-95] upside down? (0/1) [0]\nTile_Spike at x,y [2175] [-95] upside down? (0/1) [0]\nTile_Spike at x,y [2205] [-95] upside down? (0/1) [0]\nTile_Spike at x,y [2235] [-95] upside down? (0/1) [0]\nTile_Sign at x,y [2505] [130] left/right [left]\nTile_Ground at x1,y1,x2,y2 [2450] [90] [2550] [20] top layer height [20]\nTile_Ground at x1,y1,x2,y2 [2090] [250] [2150] [80] top layer height [20]\nTile_Trampoline at x,y [1860] [260]\nTile_Ground at x1,y1,x2,y2 [1830] [250] [1890] [80] top layer height [20]\nTile_Ground at x1,y1,x2,y2 [1515] [250] [1575] [80] top layer height [20]\nTile_Portal at x,y,size [1150] [210] [75]\nRen_Player at ((@_X) - (@_CAM X)) ((@_Y) - (@_CAM Y)) ((@_SIZE) - (2))\n\ndefine Main_Physics\nif <(@_GRAVITY MODE) = [0]> then\n    if <(@_YV) > [-20]> then\n        change [@_yv v] by (-1)\n    end\nelse\n    if <(@_YV) < [20]> then\n        change [@_yv v] by (1)\n    end\nend\nif <key (left arrow v) pressed?> then\n    change [@_xv v] by (-1)\n    if <(@_GRAVITY MODE) = [0]> then\n        change [@_dir v v] by (-1)\n    else\n        change [@_dir v v] by (1)\n    end\nend\nif <key (right arrow v) pressed?> then\n    change [@_xv v] by (1)\n    if <(@_GRAVITY MODE) = [0]> then\n        change [@_dir v v] by (1)\n    else\n        change [@_dir v v] by (-1)\n    end\nend\nset [@_xv v] to ((@_XV) * (0.9))\nset [@_dir v v] to ((@_DIR V) * (0.9))\nchange [@_dir v] by (@_DIR V)\nPhy_Change x by (@_XV)\nif <(@_GRAVITY MODE) = [0]> then\n    change [@_y v] by (-2)\n    Coll_Ground\n    if <<key (up arrow v) pressed?> and <(Coll_player/ground?) = [1]>> then\n        set [@_yv v] to [16]\n    end\n    change [@_y v] by (2)\nelse\n    change [@_y v] by (2)\n    Coll_Ground\n    if <<key (up arrow v) pressed?> and <(Coll_player/ground?) = [1]>> then\n        set [@_yv v] to [-16]\n    end\n    change [@_y v] by (-2)\nend\nPhy_Change y by (@_YV)\nchange [@_cam x v] by (((@_X) - (@_CAM X)) / (10))\nchange [@_cam y v] by (((@_Y) - (@_CAM Y)) / (10))\nif <(@_CAM X) < [0]> then\n    set [@_cam x v] to [0]\nend\nif <(@_CAM Y) < [0]> then\n    set [@_cam y v] to [0]\nend\nif <(@_Y) < [-180]> then\n    set [@status v] to [Die]\nend\nColl_Trampolines\nif <not <(Coll_player/trampolines?) = [0]>> then\n    set [@_yv v] to [20]\nend\nColl_Spikes\nif <(Coll_player/spikes?) = [1]> then\n    set [@status v] to [Die]\nend\nColl_Reverse\nif <(Coll_player/reverse?) = [1]> then\n    if <(@_GRAVITY MODE) = [0]> then\n        set [@_gravity mode v] to [1]\n        change [@_y v] by (20)\n    else\n        set [@_gravity mode v] to [0]\n        change [@_y v] by (-20)\n    end\nend\nColl_Lava\nif <(Coll_player/lava?) = [1]> then\n    set [@status v] to [Die]\nend\nColl_Portal\nif <(Coll_player/portal?) = [1]> then\n    set [@status v] to [Win]\nend\n\ndefine Coll_Rect/Rect (x1) (y1) (x2) (y2) (x3) (y3) (x4) (y4)\nset [coll_rect/rect? v] to [0]\nif <<<(x2) > (x3)> and <(x1) < (x4)>> and <<(y2) < (y3)> and <(y1) > (y4)>>> then\n    set [coll_rect/rect? v] to [1]\nend\n\ndefine Ren_Rect at (x1) (y1) (x2) (y2)\npen up\nFill Rectangle From: (x1) (y1) To: (x2) (y2)\n\ndefine Phy_Change x by (xv)\nchange [@_x v] by (xv)\nColl_Ground\nif <(Coll_player/ground?) = [1]> then\n    repeat (12)\n        change [@_y v] by (1)\n        Coll_Ground\n        if <(Coll_player/ground?) = [0]> then\n            stop [this script v]\n        end\n    end\n    change [@_y v] by (-12)\n    Coll_Ground\n    repeat until <(Coll_player/ground?) = [0]>\n        if <(@_XV) > [0]> then\n            change [@_x v] by (-1)\n        else\n            change [@_x v] by (1)\n        end\n        Coll_Ground\n    end\n    set [@_xv v] to [0]\nend\n\ndefine Coll_Ground\nset [coll_player/ground? v] to [0]\nset [_i v] to [1]\nPhy_Set Edge\nrepeat ((length of [ground v]) / (4))\n    Coll_Rect/Rect (item (_i) of [ground v]) (item ((_i) + (1)) of [ground v]) (item ((_i) + (2)) of [ground v]) (item ((_i) + (3)) of [ground v]) (@_X1EDGE) (@_Y1EDGE) (@_X2EDGE) (@_Y2EDGE)\n    if <(Coll_rect/rect?) = [1]> then\n        set [coll_player/ground? v] to [1]\n        stop [this script v]\n    end\n    change [_i v] by (4)\nend\n\ndefine Tile_Ground at x1,y1,x2,y2 (x1) (y1) (x2) (y2) top layer height (height)\nif <<<not <((x1) - (@_CAM X)) > [240]>> and <not <((x2) - (@_CAM X)) < [-240]>>> and <<not <((y1) - (@_CAM Y)) < [-180]>> and <not <((y2) - (@_CAM Y)) > [180]>>>> then\n    set pen color to (#d2b486)\n    Ren_Rect at ((x1) - (@_CAM X)) (((y1) - (height)) - (@_CAM Y)) ((x2) - (@_CAM X)) ((y2) - (@_CAM Y))\n    set pen color to (#60ef5c)\n    Ren_Rect at ((x1) - (@_CAM X)) ((y1) - (@_CAM Y)) ((x2) - (@_CAM X)) (((y1) - (height)) - (@_CAM Y))\n    add (x1) to [ground v]\n    add (y1) to [ground v]\n    add (x2) to [ground v]\n    add (y2) to [ground v]\nend\n\ndefine Phy_Set Edge\nset [@_x1edge v] to ((@_X) - ((@_SIZE) / (2)))\nset [@_y1edge v] to ((@_Y) + ((@_SIZE) / (2)))\nset [@_x2edge v] to ((@_X) + ((@_SIZE) / (2)))\nset [@_y2edge v] to ((@_Y) - ((@_SIZE) / (2)))\n\ndefine Phy_Change y by (yv)\nchange [@_y v] by (yv)\nColl_Ground\nif <(Coll_player/ground?) = [1]> then\n    Coll_Ground\n    repeat until <(Coll_player/ground?) = [0]>\n        if <(@_YV) > [0]> then\n            change [@_y v] by (-1)\n        else\n            change [@_y v] by (1)\n        end\n        Coll_Ground\n    end\n    set [@_yv v] to [0]\nend\n\ndefine Main_Reset\nswitch costume to (costume1 v)\nset size to (99999999999999999999999999999999999999999999999999999) %\nswitch costume to (costume2 v)\nset [@_gravity mode v] to [0]\nset [@_xv v] to [0]\nset [@_yv v] to [0]\nset [@_dir v v] to [0]\nset [@_x v] to [-150]\nset [@_y v] to [0]\nset [@_dir v] to [0]\nset [@_cam x v] to [-200]\nset [@_cam y v] to [0]\nset [@_size v] to [40]\nset [@status v] to []\nset [cloud_cooldowntarget v] to (pick random (140) to (160))\nset [cloud_cooldown v] to ((Cloud_CooldownTarget) - (1))\ndelete all of [clouds v]\n\ndefine Tile_Sign at x,y (x) (y) left/right (dir)\nset pen color to (#d3a65b)\nif <(dir) = [right]> then\n    Ren_Rect at (((x) - (45)) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) (((x) + (15)) - (@_CAM X)) (((y) - (15)) - (@_CAM Y))\n    Ren_Tri at (((x) + (15)) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) (((x) + (30)) - (@_CAM X)) ((y) - (@_CAM Y)) (((x) + (15)) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) resolution: [1]\n    Ren_Rect at (((x) - (15)) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) (((x) - (5)) - (@_CAM X)) (((y) - (40)) - (@_CAM Y))\nelse\n    Ren_Rect at (((x) - (30)) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) (((x) + (30)) - (@_CAM X)) (((y) - (15)) - (@_CAM Y))\n    Ren_Tri at (((x) - (30)) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) (((x) - (45)) - (@_CAM X)) ((y) - (@_CAM Y)) (((x) - (30)) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) resolution: [1]\n    Ren_Rect at (((x) - (5)) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) (((x) + (5)) - (@_CAM X)) (((y) - (40)) - (@_CAM Y))\nend\n\ndefine Tile_Trampoline at x,y (x) (y)\nset pen color to (#f7e746)\nRen_Rect at ((x) - (@_CAM X)) (((y) + (40)) - (@_CAM Y)) (((x) + (25)) - (@_CAM X)) (((y) + (20)) - (@_CAM Y))\nset pen color to (#ffea64)\nRen_Rect at (((x) - (25)) - (@_CAM X)) (((y) + (40)) - (@_CAM Y)) ((x) - (@_CAM X)) (((y) + (20)) - (@_CAM Y))\nset pen color to (#bdbdbd)\nRen_Rect at (((x) - (7)) - (@_CAM X)) (((y) + (20)) - (@_CAM Y)) (((x) + (7)) - (@_CAM X)) (((y) - (40)) - (@_CAM Y))\nadd ((x) - (7)) to [ground v]\nadd ((y) + (20)) to [ground v]\nadd ((x) + (7)) to [ground v]\nadd ((y) - (40)) to [ground v]\nadd ((x) - (25)) to [trampolines v]\nadd ((y) + (40)) to [trampolines v]\nadd ((x) + (25)) to [trampolines v]\nadd ((y) + (20)) to [trampolines v]\n\ndefine Coll_Trampolines\nset [coll_player/trampolines? v] to [0]\nset [_i v] to [1]\nPhy_Set Edge\nrepeat ((length of [trampolines v]) / (4))\n    Coll_Rect/Rect (item (_i) of [trampolines v]) (item ((_i) + (1)) of [trampolines v]) (item ((_i) + (2)) of [trampolines v]) (item ((_i) + (3)) of [trampolines v]) (@_X1EDGE) (@_Y1EDGE) (@_X2EDGE) (@_Y2EDGE)\n    if <(Coll_rect/rect?) = [1]> then\n        set [coll_player/trampolines? v] to [1]\n    end\n    change [_i v] by (4)\nend\n\ndefine Tile_Clouds\nset pen color to (#def7ff)\nchange [cloud_cooldown v] by (1)\nif <(Cloud_Cooldown) = (Cloud_CooldownTarget)> then\n    set [cloud_cooldown v] to [0]\n    set [cloud_cooldowntarget v] to (pick random (140) to (160))\n    add ((@_X) + (pick random (-170) to (240))) to [clouds v]\n    add ((@_Y) + (pick random (180) to (200))) to [clouds v]\n    add (pick random (20) to (50)) to [clouds v]\n    add (pick random (50) to (70)) to [clouds v]\n    add (pick random (120) to (140)) to [clouds v]\nend\nset [_i v] to [1]\nrepeat ((length of [clouds v]) / (5))\n    replace item (_i) of [clouds v] with ((item (_i) of [clouds v]) + (2))\n    replace item ((_i) + (4)) of [clouds v] with ((item ((_i) + (4)) of [clouds v]) - (1))\n    Ren_Line at (((item (_i) of [clouds v]) - ((item ((_i) + (3)) of [clouds v]) / (2))) - (@_CAM X)) ((item ((_i) + (1)) of [clouds v]) - (@_CAM Y)) (((item (_i) of [clouds v]) + ((item ((_i) + (3)) of [clouds v]) / (2))) - (@_CAM X)) ((item ((_i) + (1)) of [clouds v]) - (@_CAM Y)) (item ((_i) + (2)) of [clouds v])\n    if <(item ((_i) + (4)) of [clouds v]) < [1]> then\n        delete all of [clouds v]\n    else\n        change [_i v] by (6)\n    end\nend\n\ndefine Ren_Line at (x1) (y1) (x2) (y2) (thickness)\npen up\nset pen size to (thickness)\ngo to x: (x1) y: (y1)\npen down\ngo to x: (x2) y: (y2)\npen up\n\ndefine Ren_Cir at (x) (y) (size)\npen up\nset pen size to (size)\ngo to x: (x) y: (y)\npen down\npen up\n\ndefine Ren_Player at (x) (y) (size)\nset pen color to (#2b2b2b)\nif <(@_Y) > [4000]> then\n    set pen (transparency v) to (((@_Y) - (4000)) / (100))\nelse\n    set pen (transparency v) to (0)\nend\nRen_Cir at (x) (y) (size)\ngo to x: (0) y: (0)\npoint in direction (@_DIR)\nmove ((size) / (10)) steps\nset [@_xdata v] to (x position)\nset [@_ydata v] to (y position)\nset pen color to (#ffffff)\nif <(@_Y) > [4000]> then\n    set pen (transparency v) to (((@_Y) - (4000)) / (100))\nelse\n    set pen (transparency v) to (0)\nend\nRen_Cir at ((x) + (@_XDATA)) ((y) + (@_YDATA)) ((size) / (1.7))\ngo to x: (0) y: (0)\npoint in direction (@_DIR)\nmove ((size) / (6)) steps\nset [@_xdata v] to (x position)\nset [@_ydata v] to (y position)\nset pen color to (#2b2b2b)\nif <(@_Y) > [4000]> then\n    set pen (transparency v) to (((@_Y) - (4000)) / (100))\nelse\n    set pen (transparency v) to (0)\nend\nRen_Cir at ((x) + (@_XDATA)) ((y) + (@_YDATA)) ((size) / (4))\nset pen (transparency v) to (0)\n\ndefine Tile_Spike at x,y (x) (y) upside down? (0/1) (upside down?)\nif <(upside down?) = [1]> then\n    if <<<not <(((x) - (15)) - (@_CAM X)) > [240]>> and <not <(((x) + (15)) - (@_CAM X)) < [-240]>>> and <<not <(((y) + (15)) - (@_CAM Y)) < [-180]>> and <not <(((y) - (15)) - (@_CAM Y)) > [180]>>>> then\n        set pen color to (#d6d6d6)\n        Ren_Tri at (((x) - (15)) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) ((x) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) ((x) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) resolution: [1]\n        set pen color to (#cccccc)\n        Ren_Tri at ((x) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) ((x) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) (((x) + (15)) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) resolution: [1]\n        add ((x) - (15)) to [spikes v]\n        add ((y) - (15)) to [spikes v]\n        add (x) to [spikes v]\n        add ((y) + (15)) to [spikes v]\n        add ((x) + (15)) to [spikes v]\n        add ((y) - (15)) to [spikes v]\n    end\nelse\n    if <<<not <(((x) - (15)) - (@_CAM X)) > [240]>> and <not <(((x) + (15)) - (@_CAM X)) < [-240]>>> and <<not <(((y) + (15)) - (@_CAM Y)) < [-180]>> and <not <(((y) - (15)) - (@_CAM Y)) > [180]>>>> then\n        set pen color to (#d6d6d6)\n        Ren_Tri at (((x) - (15)) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) ((x) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) ((x) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) resolution: [1]\n        set pen color to (#cccccc)\n        Ren_Tri at ((x) - (@_CAM X)) (((y) + (15)) - (@_CAM Y)) ((x) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) (((x) + (15)) - (@_CAM X)) (((y) - (15)) - (@_CAM Y)) resolution: [1]\n        add ((x) - (15)) to [spikes v]\n        add ((y) + (15)) to [spikes v]\n        add (x) to [spikes v]\n        add ((y) - (15)) to [spikes v]\n        add ((x) + (15)) to [spikes v]\n        add ((y) + (15)) to [spikes v]\n    end\nend\n\ndefine Coll_Cir/Line (cx) (cy) (r) (x1) (y1) (x2) (y2)\nset [coll_cir/line? v] to [0]\nColl_P/Cir (x1) (y1) (cx) (cy) (r)\nif <(Coll_p/cir?) = [1]> then\n    set [coll_cir/line? v] to [1]\n    stop [this script v]\nend\nColl_P/Cir (x2) (y2) (cx) (cy) (r)\nif <(Coll_p/cir?) = [1]> then\n    set [coll_cir/line? v] to [1]\n    stop [this script v]\nend\ndelete all of [cir/line v]\nadd ((x1) - (x2)) to [cir/line v]\nadd ((y1) - (y2)) to [cir/line v]\nadd ([sqrt v] of (((item (1) of [cir/line v]) * (item (1) of [cir/line v])) + ((item (2) of [cir/line v]) * (item (2) of [cir/line v]))) ) to [cir/line v]\nadd (((((cx) - (x1)) * ((x2) - (x1))) + (((cy) - (y1)) * ((y2) - (y1)))) / ((item (3) of [cir/line v]) * (item (3) of [cir/line v]))) to [cir/line v]\nadd ((item (4) of [cir/line v]) * ((x2) - (x1))) to [cir/line v]\nadd ((item (4) of [cir/line v]) * ((y2) - (y1))) to [cir/line v]\nColl_Line/P (x1) (y1) (x2) (y2) (item (5) of [cir/line v]) (item (6) of [cir/line v])\nif <(Coll_line/p?) = [0]> then\n    stop [this script v]\nend\nadd ((item (5) of [cir/line v]) - (cx)) to [cir/line v]\nadd ((item (6) of [cir/line v]) - (cy)) to [cir/line v]\nadd ([sqrt v] of (((item (7) of [cir/line v]) * (item (7) of [cir/line v])) + ((item (8) of [cir/line v]) * (item (8) of [cir/line v]))) ) to [cir/line v]\nif <<(item (9) of [cir/line v]) < (r)> or <(item (9) of [cir/line v]) = (r)>> then\n    set [coll_cir/line? v] to [1]\nend\n\ndefine Coll_P/Cir (px) (py) (cx) (cy) (r)\nset [coll_p/cir? v] to [0]\ndelete all of [p/cir v]\nadd ((px) - (cx)) to [p/cir v]\nadd ((py) - (cy)) to [p/cir v]\nadd ([sqrt v] of (((item (1) of [p/cir v]) * (item (1) of [p/cir v])) + ((item (2) of [p/cir v]) * (item (2) of [p/cir v]))) ) to [p/cir v]\nif <<(item (3) of [p/cir v]) < (r)> or <(item (3) of [p/cir v]) = (r)>> then\n    set [coll_p/cir? v] to [1]\nend\n\ndefine Coll_Line/P (x1) (y1) (x2) (y2) (px) (py)\nset [coll_line/p? v] to [0]\ndelete all of [line/p v]\nadd ([sqrt v] of ((((x2) - (x1)) * ((x2) - (x1))) + (((y2) - (y1)) * ((y2) - (y1)))) ) to [line/p v]\nadd ([sqrt v] of ((((px) - (x1)) * ((px) - (x1))) + (((py) - (y1)) * ((py) - (y1)))) ) to [line/p v]\nadd ([sqrt v] of ((((px) - (x2)) * ((px) - (x2))) + (((py) - (y2)) * ((py) - (y2)))) ) to [line/p v]\nif <<<((item (2) of [line/p v]) + (item (3) of [line/p v])) > ((item (1) of [line/p v]) - (0.1))> or <((item (2) of [line/p v]) + (item (3) of [line/p v])) = ((item (1) of [line/p v]) - (0.1))>> and <<((item (2) of [line/p v]) + (item (3) of [line/p v])) < ((item (1) of [line/p v]) + (0.1))> or <((item (2) of [line/p v]) + (item (3) of [line/p v])) = ((item (1) of [line/p v]) + (0.1))>>> then\n    set [coll_line/p? v] to [1]\nend\n\ndefine Coll_Spikes\nset [coll_player/spikes? v] to [0]\nset [_i v] to [1]\nrepeat ((length of [spikes v]) / (6))\n    Coll_Cir/Line (@_X) (@_Y) ((@_SIZE) / (2.8)) (item (_i) of [spikes v]) (item ((_i) + (1)) of [spikes v]) (item ((_i) + (2)) of [spikes v]) (item ((_i) + (3)) of [spikes v])\n    if <(Coll_cir/line?) = [1]> then\n        set [coll_player/spikes? v] to [1]\n        stop [this script v]\n    end\n    Coll_Cir/Line (@_X) (@_Y) ((@_SIZE) / (70)) (item ((_i) + (2)) of [spikes v]) (item ((_i) + (3)) of [spikes v]) (item ((_i) + (4)) of [spikes v]) (item ((_i) + (5)) of [spikes v])\n    if <(Coll_cir/line?) = [1]> then\n        set [coll_player/spikes? v] to [1]\n        stop [this script v]\n    end\n    Coll_Cir/Line (@_X) (@_Y) ((@_SIZE) / (2.8)) (item ((_i) + (4)) of [spikes v]) (item ((_i) + (5)) of [spikes v]) (item (_i) of [spikes v]) (item ((_i) + (1)) of [spikes v])\n    if <(Coll_cir/line?) = [1]> then\n        set [coll_player/spikes? v] to [1]\n        stop [this script v]\n    end\n    change [_i v] by (6)\nend\n\ndefine Tile_Reverse at x1,y1,x2,y2 (x1) (y1) (x2) (y2)\nset pen color to (#37d6a1)\nRen_Rect at ((x1) - (@_CAM X)) ((y1) - (@_CAM Y)) ((x2) - (@_CAM X)) ((y2) - (@_CAM Y))\nadd (x1) to [reverse v]\nadd (y1) to [reverse v]\nadd (x2) to [reverse v]\nadd (y2) to [reverse v]\n\ndefine Coll_Reverse\nset [coll_player/reverse? v] to [0]\nset [_i v] to [1]\nPhy_Set Edge\nrepeat ((length of [reverse v]) / (4))\n    Coll_Rect/Rect (item (_i) of [reverse v]) (item ((_i) + (1)) of [reverse v]) (item ((_i) + (2)) of [reverse v]) (item ((_i) + (3)) of [reverse v]) (@_X1EDGE) (@_Y1EDGE) (@_X2EDGE) (@_Y2EDGE)\n    if <(Coll_rect/rect?) = [1]> then\n        set [coll_player/reverse? v] to [1]\n        stop [this script v]\n    end\n    change [_i v] by (4)\nend\n\ndefine Ren_BG\nset pen color to (#c3f3ff)\nRen_Cir at [0] [0] [1000]\n\ndefine Coll_Lava\nset [coll_player/lava? v] to [0]\nset [_i v] to [1]\nPhy_Set Edge\nrepeat ((length of [lava v]) / (4))\n    Coll_Rect/Rect (item (_i) of [lava v]) (item ((_i) + (1)) of [lava v]) (item ((_i) + (2)) of [lava v]) (item ((_i) + (3)) of [lava v]) (@_X1EDGE) (@_Y1EDGE) (@_X2EDGE) (@_Y2EDGE)\n    if <(Coll_rect/rect?) = [1]> then\n        set [coll_player/lava? v] to [1]\n        stop [this script v]\n    end\n    change [_i v] by (4)\nend\n\ndefine Tile_Portal at x,y,size (x) (y) (size)\nset pen color to (#74d7ff)\nset pen (transparency v) to (75)\nRen_Cir at ((x) - (@_CAM X)) ((y) - (@_CAM Y)) (size)\nchange pen (brightness v) by (-10)\nchange pen (color v) by (2)\nset pen (transparency v) to (65)\nRen_Cir at ((x) - (@_CAM X)) ((y) - (@_CAM Y)) ((size) - (5))\nchange pen (brightness v) by (-10)\nchange pen (color v) by (2)\nset pen (transparency v) to (55)\nRen_Cir at ((x) - (@_CAM X)) ((y) - (@_CAM Y)) ((size) - (10))\nchange pen (brightness v) by (-10)\nchange pen (color v) by (2)\nset pen (transparency v) to (45)\nRen_Cir at ((x) - (@_CAM X)) ((y) - (@_CAM Y)) ((size) - (15))\nchange pen (brightness v) by (-10)\nchange pen (color v) by (2)\nset pen (transparency v) to (35)\nRen_Cir at ((x) - (@_CAM X)) ((y) - (@_CAM Y)) ((size) - (20))\nadd (x) to [portal v]\nadd (y) to [portal v]\nadd ((size) - (20)) to [portal v]\n\ndefine Tile_Lava at x1,x2 (x1) (x2) base y, height (base y) (height) animation speed, animation range (speed) (range) thickness (thickness)\nset pen color to (#ff6464)\nset [lava_x v] to ((x1) - ((thickness) / (2)))\nset [_i v] to [1]\nrepeat (([floor v] of (((x2) - (x1)) / (thickness)) ) + (1))\n    Ren_Line at ((Lava_x) - (@_CAM X)) (((base y) + ((thickness) / (2))) - (@_CAM Y)) ((Lava_x) - (@_CAM X)) (((((base y) + ((thickness) / (2))) + (height)) + (([cos v] of ((((days since 2000) * (100000)) + (_i)) * (speed)) ) * (range))) - (@_CAM Y)) ((thickness) + (1))\n    change [lava_x v] by (thickness)\n    change [_i v] by (1)\n    add ((Lava_x) - ((thickness) / (2))) to [lava v]\n    add ((((base y) + ((thickness) / (2))) + (height)) + (([cos v] of ((((days since 2000) * (100000)) + (_i)) * (speed)) ) * (range))) to [lava v]\n    add ((Lava_x) + ((thickness) / (2))) to [lava v]\n    add ((base y) + ((thickness) / (2))) to [lava v]\nend\n\ndefine Coll_Portal\nset [coll_player/portal? v] to [0]\nset [_i v] to [1]\nrepeat ((length of [portal v]) / (3))\n    Coll_Cir/Cir (@_X) (@_Y) (@_SIZE) (item (_i) of [portal v]) (item ((_i) + (1)) of [portal v]) (item ((_i) + (2)) of [portal v])\n    if <(Coll_cir/cir?) = [1]> then\n        set [coll_player/portal? v] to [1]\n        stop [this script v]\n    end\n    change [_i v] by (3)\nend\n\ndefine Coll_Cir/Cir (c1x) (c1y) (c1r) (c2x) (c2y) (c2r)\nset [coll_cir/cir? v] to [0]\ndelete all of [cir/cir v]\nadd ((c1x) - (c2x)) to [cir/cir v]\nadd ((c1y) - (c2y)) to [cir/cir v]\nadd ([sqrt v] of (((item (1) of [cir/cir v]) * (item (1) of [cir/cir v])) + ((item (2) of [cir/cir v]) * (item (2) of [cir/cir v]))) ) to [cir/cir v]\nif <(c1r) > (c2r)> then\n    if <<(item (3) of [cir/cir v]) < (c1r)> or <(item (3) of [cir/cir v]) = (c1r)>> then\n        set [coll_cir/cir? v] to [1]\n    end\nelse\n    if <<(item (3) of [cir/cir v]) < (c2r)> or <(item (3) of [cir/cir v]) = (c2r)>> then\n        set [coll_cir/cir? v] to [1]\n    end\nend\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nswitch costume to (blank v)\nset size to (99999999999) %\ngo to x: (0) y: (-500)\nswitch costume to (roll blur v)\nset size to (100) %\nforever\n    go to [front v] layer\n    reset timer\nend\n\nwhen [timer v] > (0.1)\nrepeat (50)\n    change y by ((() - (y position)) / (6))\nend\n\n