Christmas Rescue | Pen Platformer #all #games #art #platformer #trending

Instructions: ------------❤️ and ⭐️ this project for more games-----------\n\n░░░░░░░░░░░Christmas Rescue░░░░░░░░░░░\n\n80% Pen platformer\n\nInstructions:\n❯❯ Arrow keys, WSAD, or mobile controls.\n❯❯ Love and Fave for more Games.\n\n-STORY-\nYou are Santa's good friend. Santa always loses his things and calls you to find them after Christmas. But this year he lost his Reindeer! It's an emergency! Will you be able to save Christmas in time?\n\n\nGoals:\n100 views   ✓\n500 views    \n1000 views   \n2000 views     \n\n50 loves    ✓\n100 loves    \n200 loves    \n\n50 favs      \n100 favs     \n200 favs     

@Stage\n\n@Blank\n\n@Blank2\n\n@Pen\n\nwhen flag clicked\nsetup\n\ndefine render\nif <not <(Level) = [1]>> then\n    sim snow\nend\n\ndefine sim snow\nset pen color to (#ffffff)\nset pen size to (pick random (5) to (5.5))\nadd (pick random (-1.5) to (-0.5)) to [snow movement v]\nadd (pick random (-240) to (240)) to [snow x v]\nadd [180] to [snow y v]\nset [snow # v] to [1]\nrepeat (length of [snow movement v])\n    if <(item (snow #) of [snow y v]) < (y end)> then\n    else\n        pen up\n        go to x: (item (snow #) of [snow x v]) y: (item (snow #) of [snow y v])\n        replace item (snow #) of [snow y v] with ((item (snow #) of [snow y v]) + (item (snow #) of [snow movement v]))\n        pen down\n    end\n    change [snow # v] by (5)\nend\n\ndefine setup\ndelete all of [snow movement v]\ndelete all of [snow x v]\ndelete all of [snow y v]\nset [y end v] to [-165]\nrepeat (pick random (50) to (100))\n    add (pick random (-1.5) to (-0.5)) to [snow movement v]\n    add (pick random (-240) to (240)) to [snow x v]\n    add [180] to [snow y v]\nend\n\ndefine Draw From: (x) (y) To: (x2) (y2) Size (size) Colour (c) Saturation (s) Brightness (b)\npen up\nset pen (color v) to (c)\nset pen (saturation v) to (s)\nset pen (brightness v) to (b)\nset pen size to (size)\ngo to x: (x) y: (y)\npen down\ngo to x: (x2) y: (y2)\n\nwhen flag clicked\nset [ghost v] effect to (100)\n\ndefine Level 2\nSpikes: [0] [-95] Diagonal Line [-20] [-95] Flip: [2] [-95] DL2: [22] [-95]\nSpikes: [130] [-95] Diagonal Line [110] [-95] Flip: [132] [-95] DL2: [152] [-95]\nGround\n\ndefine Background\nDraw From: [-240] [0] To: [240] [0] Size [1000] Colour [52] Saturation [75] Brightness [99]\n\ndefine Draw Square: (xs) (ys) Colour (cs) Saturation (ss) Brightness (bs) Size (sizes) Change: (xc) (yc) To: (xc2) (yc2)\npen up\nset pen (color v) to (cs)\nset pen (saturation v) to (ss)\nset pen (brightness v) to (bs)\nset pen size to (sizes)\ngo to x: (xs) y: (ys)\npen down\nchange y by (yc)\nchange x by (xc)\nchange y by (yc2)\nchange x by (xc2)\n\ndefine Level 1\nGround\n\ndefine Ground\nDraw From: [-240] [-155] To: [240] [-155] Size [80] Colour [11] Saturation [74] Brightness [80]\nDraw From: [-240] [-110] To: [240] [-110] Size [12] Colour [11] Saturation [74] Brightness [69]\nDraw From: [-240] [-100] To: [240] [-100] Size [20] Colour [55] Saturation [75] Brightness [100]\n\ndefine Lava (x) Change: (x2) (y2) To: (x3) (y3) (y)\nDraw Square: (x) (y) Colour [0] Saturation [97] Brightness [100] Size [5] Change: (x2) (y2) To: (x3) (y3)\nFill\n\ndefine Fill\npen up\nset pen color to (#fd2020)\nset pen size to (40)\nset [x~pos v] to [-70]\nset [y~pos v] to ((([cos v] of ((timer) * (170)) ) * (5)) - (100))\ngo to x: (X~pos) y: (Y~pos)\nrepeat (63)\n    pen down\n    change x by (140)\n    pen up\n    change y by (2)\n    set x to (X~pos)\nend\n\nwhen I receive [tick v]\nBackground\nrender\nif <(Level) = [1]> then\n    Level 1\nelse\n    if <(Level) = [2]> then\n        Level 2\n    else\n        if <(Level) = [3]> then\n            Level 3\n        else\n            if <(Level) = [4]> then\n                Level 4\n            else\n                if <(Level) = [5]> then\n                    Level 5\n                else\n                    if <(Level) = [6]> then\n                        Level 6\n                    else\n                        if <(Level) = [7]> then\n                            Level 7\n                        else\n                            if <(Level) = [8]> then\n                                Level 8\n                            else\n                                if <(Level) = [9]> then\n                                    Level 9\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Spikes: (x) (y) Diagonal Line (xd) (yd) Flip: (x2) (y2) DL2: (xd2) (yd2)\npen up\nset pen size to (5)\nset pen color to (#c02828)\ngo to x: (x) y: (y)\npen down\nchange y by (40)\ngo to x: (xd) y: (yd)\npen up\ngo to x: ((x) - (3)) y: (y)\npen down\nchange y by (30)\ngo to x: ((xd) + (5)) y: (yd)\npen up\ngo to x: ((x) - (6)) y: (y)\npen down\nchange y by (20)\ngo to x: ((xd) + (10)) y: (yd)\nsay []\npen up\nset pen size to (5)\nset pen color to (#f91212)\ngo to x: (x2) y: (y2)\npen down\nchange y by (40)\ngo to x: (xd2) y: (yd2)\npen up\ngo to x: ((x2) + (3)) y: (y2)\npen down\nchange y by (30)\ngo to x: ((xd2) - (5)) y: (yd2)\npen up\ngo to x: ((x2) + (6)) y: (y2)\npen down\nchange y by (20)\ngo to x: ((xd2) - (10)) y: (yd2)\n\ndefine Level 3\nLava [-100] Change: [190] [-150] To: [-190] [150] ((([cos v] of ((timer) * (170)) ) * (5)) + (45))\nDraw Square: [-120] [-100] Colour [11] Saturation [74] Brightness [80] Size [5] Change: [40] [160] To: [-40] [-160]\nDraw From: [-100] [-100] To: [-100] [50] Size [40] Colour [11] Saturation [74] Brightness [80]\nDraw Square: [-121] [53] Colour [11] Saturation [74] Brightness [69] Size [3] Change: [41] [2.4] To: [-41] [-2.4]\nDraw Square: [-120] [60] Colour [55] Saturation [75] Brightness [100] Size [5] Change: [40] [20] To: [-40] [-20]\nDraw From: [-110] [70] To: [-90] [70] Size [24] Colour [55] Saturation [75] Brightness [100]\nDraw Square: [70] [-100] Colour [11] Saturation [74] Brightness [80] Size [5] Change: [40] [160] To: [-40] [-160]\nDraw From: [90] [-100] To: [90] [50] Size [40] Colour [11] Saturation [74] Brightness [80]\nDraw Square: [69] [53] Colour [11] Saturation [74] Brightness [69] Size [3] Change: [41] [2.4] To: [-41] [-2.4]\nDraw Square: [70] [60] Colour [55] Saturation [75] Brightness [99] Size [5] Change: [40] [20] To: [-40] [-20]\nDraw From: [80] [70] To: [100] [70] Size [24] Colour [55] Saturation [75] Brightness [99]\nGround\n\nDraw Square: [69] [53] Colour [11] Saturation [74] Brightness [69] Size [3] Change: [41] [2.4] To: [-41] [-2.4]\n\ndefine Level 4\nSpikes: [-55] [-95] Diagonal Line [-75] [-95] Flip: [-53] [-95] DL2: [-33] [-95]\nSpikes: [-15] [-95] Diagonal Line [-35] [-95] Flip: [-13] [-95] DL2: [8] [-95]\nSpikes: [28] [-95] Diagonal Line [8] [-95] Flip: [30] [-95] DL2: [50] [-95]\nDraw Square: [-120] [-100] Colour [11] Saturation [74] Brightness [80] Size [5] Change: [40] [160] To: [-40] [-160]\nDraw From: [-100] [-100] To: [-100] [50] Size [40] Colour [11] Saturation [74] Brightness [80]\nDraw Square: [-121] [53] Colour [11] Saturation [74] Brightness [69] Size [3] Change: [41] [2.4] To: [-41] [-2.4]\nDraw Square: [-120] [60] Colour [55] Saturation [75] Brightness [100] Size [5] Change: [40] [20] To: [-40] [-20]\nDraw From: [-110] [70] To: [-90] [70] Size [24] Colour [55] Saturation [75] Brightness [100]\nGround\n\ndefine Level 5\nSpikes: [-105] [-95] Diagonal Line [-125] [-95] Flip: [-103] [-95] DL2: [-83] [-95]\nSpikes: [-147] [-95] Diagonal Line [-167] [-95] Flip: [-145] [-95] DL2: [-125] [-95]\nDraw Square: [-80] [-100] Colour [11] Saturation [74] Brightness [80] Size [5] Change: [40] [160] To: [-40] [-160]\nDraw From: [-60] [-100] To: [-60] [50] Size [40] Colour [11] Saturation [74] Brightness [80]\nDraw Square: [-81] [53] Colour [11] Saturation [74] Brightness [69] Size [3] Change: [41] [2.4] To: [-41] [-2.4]\nDraw Square: [-80] [60] Colour [55] Saturation [75] Brightness [100] Size [5] Change: [40] [20] To: [-40] [-20]\nDraw From: [-70] [70] To: [-50] [70] Size [24] Colour [55] Saturation [75] Brightness [100]\nGround\n\ndefine Level 6\nSpikes: [-50] [-95] Diagonal Line [-70] [-95] Flip: [-48] [-95] DL2: [-28] [-95]\nSpikes: [-10] [-95] Diagonal Line [-30] [-95] Flip: [-8] [-95] DL2: [12] [-95]\nSpikes: [75] [-95] Diagonal Line [55] [-95] Flip: [77] [-95] DL2: [97] [-95]\nSpikes: [120] [-95] Diagonal Line [100] [-95] Flip: [122] [-95] DL2: [142] [-95]\nGround\n\ndefine Level 7\nSpikes: [-50] [-95] Diagonal Line [-70] [-95] Flip: [-48] [-95] DL2: [-28] [-95]\nSpikes: [-10] [-95] Diagonal Line [-30] [-95] Flip: [-8] [-95] DL2: [12] [-95]\nSpikes: [33] [-95] Diagonal Line [13] [-95] Flip: [35] [-95] DL2: [55] [-95]\nSpikes: [75] [-95] Diagonal Line [55] [-95] Flip: [77] [-95] DL2: [97] [-95]\nSpikes: [120] [-95] Diagonal Line [100] [-95] Flip: [122] [-95] DL2: [142] [-95]\nDraw Square: [-120] [-100] Colour [11] Saturation [74] Brightness [80] Size [5] Change: [40] [160] To: [-40] [-160]\nDraw From: [-100] [-100] To: [-100] [50] Size [40] Colour [11] Saturation [74] Brightness [80]\nDraw Square: [-121] [53] Colour [11] Saturation [74] Brightness [69] Size [3] Change: [41] [2.4] To: [-41] [-2.4]\nDraw Square: [-120] [60] Colour [55] Saturation [75] Brightness [100] Size [5] Change: [40] [20] To: [-40] [-20]\nDraw From: [-110] [70] To: [-90] [70] Size [24] Colour [55] Saturation [75] Brightness [100]\nDraw Square: [130] [-100] Colour [11] Saturation [74] Brightness [80] Size [5] Change: [40] [160] To: [-40] [-160]\nDraw From: [150] [-100] To: [150] [50] Size [40] Colour [11] Saturation [74] Brightness [80]\nDraw Square: [129] [53] Colour [11] Saturation [74] Brightness [69] Size [3] Change: [41] [2.4] To: [-41] [-2.4]\nDraw Square: [130] [60] Colour [55] Saturation [75] Brightness [99] Size [5] Change: [40] [20] To: [-40] [-20]\nDraw From: [140] [70] To: [160] [70] Size [24] Colour [55] Saturation [75] Brightness [99]\nGround\n\ndefine Level 8\nGround\n\ndefine Level 9\nDraw From: [240] [180] To: [240] [-180] Size [80] Colour [11] Saturation [74] Brightness [80]\nDraw From: [220] [180] To: [220] [-180] Size [12] Colour [11] Saturation [74] Brightness [69]\nDraw From: [210] [180] To: [210] [-180] Size [20] Colour [55] Saturation [75] Brightness [100]\nGround\n\n@Player\n\ndefine Looks\nif <<mouse down?> or <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n    if <<<mouse down?> and <(mouse y) > (y position)>> or <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<key (right arrow v) pressed?> or <key (d v) pressed?>>> and <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            switch costume to (jumpright v)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            switch costume to (jumpleft v)\n        end\n    else\n        if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n            switch costume to (right v)\n        end\n        if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n            switch costume to (left v)\n        end\n        if <<<mouse down?> and <(mouse y) > (y position)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n            switch costume to (jump v)\n        end\n    end\nelse\n    switch costume to (still v)\nend\n\ndefine Platform (jump height) (gravity) (friction) (running speed)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n    change [x velocity v] by (running speed)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> then\n    change [x velocity v] by ((running speed) * (-1))\nend\nset [x velocity v] to ((X Velocity) * (friction))\nchange x by (X Velocity)\nif <<touching color (#3fc5ff)?> or <<touching color (#cc9835)?> or <touching color (#af832d)?>>> then\n    set [slope v] to [0]\n    repeat until <<(Slope) = [8]> or <not <<touching color (#3fc5ff)?> or <<touching color (#cc9835)?> or <touching color (#af832d)?>>>>>\n        change [slope v] by (1)\n        change y by (1)\n    end\n    if <<touching color (#3fc5ff)?> or <<touching color (#cc9835)?> or <touching color (#af832d)?>>> then\n        change y by ((Slope) * (-1))\n        repeat ([ceiling v] of ([abs v] of (X Velocity) ) )\n            if <<touching color (#3fc5ff)?> or <<touching color (#cc9835)?> or <touching color (#af832d)?>>> then\n                change x by ((([abs v] of (X Velocity) ) / (X Velocity)) * (-1))\n            end\n        end\n    end\n    if <<<mouse down?> and <(mouse y) > (y position)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>> then\n        if <(x position) > [-215]> then\n            set [y velocity v] to [10]\n            if <(X Velocity) > [0]> then\n                set [x velocity v] to [-15]\n            else\n                set [x velocity v] to [15]\n            end\n        else\n            set [x velocity v] to [0]\n        end\n    end\nend\nchange y by (Y Velocity)\nif <<touching color (#3fc5ff)?> or <<touching color (#cc9835)?> or <touching color (#af832d)?>>> then\n    repeat ([ceiling v] of ([abs v] of (Y Velocity) ) )\n        if <<touching color (#3fc5ff)?> or <<touching color (#cc9835)?> or <touching color (#af832d)?>>> then\n            change y by ((([abs v] of (Y Velocity) ) / (Y Velocity)) * (-1))\n        end\n    end\n    if <<(([abs v] of (Y Velocity) ) / (Y Velocity)) = [-1]> and <<<mouse down?> and <(mouse y) > (y position)>> or <<key (up arrow v) pressed?> or <key (w v) pressed?>>>> then\n        set [y velocity v] to (jump height)\n    else\n        set [y velocity v] to [0]\n    end\nelse\n    change [y velocity v] by (-1)\nend\nif <(x position) > [230]> then\n    change [level v] by (1)\n    Next Level\n    broadcast (Player - Level Placement v)\n    broadcast (LF v)\nend\nif <<touching color (#fd1f1f)?> or <<touching color (#f91212)?> or <touching color (#c02828)?>>> then\n    broadcast (Dead v)\nend\n\nwhen flag clicked\nSetup\nforever\n    broadcast (TICk v)\n    broadcast (TEXT v)\n    if <(SRS) = [no]> then\n        Platform (11) (-1) (0.7) (2.5)\n    end\nend\n\nwhen I receive [tick v]\nif <not <(Level) = [9]>> then\n    Looks\nelse\n    stop [this script v]\nend\n\nwhen I receive [player - level placement v]\ngo to x: (-213) y: (45)\n\ndefine Setup\nset size to (75) %\nbroadcast (Player - Level Placement v)\nset [id v] to [0]\nset [level v] to [1]\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [srs v] to [no]\n\nwhen I receive [dead v]\nDead\n\ndefine Dead\nset [srs v] to [yes]\nbroadcast (Player - Level Placement v)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [srs v] to [no]\n\ndefine Next Level\nset [srs v] to [yes]\nbroadcast (Player - Level Placement v)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nset [srs v] to [no]\n\nwhen I receive [lf v]\nif <(Level) = [9]> then\n    set [id v] to [1]\n    switch costume to (love and fave v)\n    create clone of (_myself_ v)\nend\nswitch costume to (still v)\nset size to (75) %\n\nwhen I start as a clone\nforever\n    if <(ID) = [1]> then\n        switch costume to (love and fave v)\n        set size to (150) %\n        glide (0.3) secs to x: (-10) y: ((([cos v] of ((timer) * (200)) ) * (20)) + (50))\n    end\nend\n\n@PTE Lite+\n\nwhen I receive [text v]\nPrint | Pos (-225) (-160) Size (13) Width (1) RGB (1) (1) (1) Weight (1.5) CSpace (1) Align [l] Text (join [Level ] (Level))\nif <(Level) = [1]> then\n    if <(username) = []> then\n        Print | Pos (-225) (135) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text (join (join [Hi ] [person with no account]) [, Merry Christmas!])\n    else\n        Print | Pos (-225) (135) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text (join (join [Hi ] (join [@] (username))) [, Merry Christmas!])\n    end\nelse\n    if <(Level) = [2]> then\n        Print | Pos (-225) (135) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [It started to snow :D \(Watch out for spikes\)]\n    else\n        if <(Level) = [3]> then\n            Print | Pos (-225) (135) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [Who is messaging you? It's Santa! One of his]\n            Print | Pos (-225) (110) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [Reindeer got lost!]\n        else\n            if <(Level) = [4]> then\n                Print | Pos (-225) (135) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [Let's help Santa! The Reindeer mustn't be far]\n                Print | Pos (-225) (110) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [from his house!]\n            else\n                if <(Level) = [5]> then\n                    Print | Pos (-225) (135) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [We gotta go faster! ]\n                else\n                    if <(Level) = [6]> then\n                        Print | Pos (-225) (135) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [I'll get a map to get to his house. \(BTW Santa]\n                        Print | Pos (-225) (110) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [is your friend for a long time\)]\n                    else\n                        if <(Level) = [7]> then\n                            Print | Pos (-225) (135) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [Ugh... Santa always loses one thing or the other]\n                            Print | Pos (-225) (110) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [every year.]\n                        else\n                            if <(Level) = [8]> then\n                                Print | Pos (-225) (135) Size (12.5) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [l] Text [If not us finding those things every year!]\n                            else\n                                if <(Level) = [9]> then\n                                    Print | Pos (-20) (135) Size (16) Width (1) RGB (1) (1) (1) Weight (1.3) CSpace (1) Align [c] Text [Love, Fave And Follow for Part 2]\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Print | Pos (x) (y) Size (size) Width (width) RGB (r) (g) (b) Weight (w) CSpace (cspace) Align (align) Text (text)\nSlow Print | Pos (x) (y) Size (size) Width (width) RGB (r) (g) (b) Weight (w) CSpace (cspace) Align (align) Text (text)\n\ndefine Slow Print | Pos (x) (y) Size (size) Width (width) RGB (r) (g) (b) Weight (w) CSpace (cspace) Align (align) Text (text)\npen up\nset pen color to ((((65536) * (round (r))) + ((256) * (round (g)))) + (round (b)))\nset [_x v] to (x)\nset [_i0 v] to ((0.01) * (size))\nset [_i1 v] to ([abs v] of ((0.125) * ((w) * (size))) )\nif <<(size) = (round (size))> and <not <(w) < [0]>>> then\n    if <<((round (_i1)) mod (2)) = [0]> and <not <(_i1) < [0.5]>>> then\n        set [_y v] to (round (y))\n    else\n        set [_y v] to (([floor v] of (y) ) + (0.5))\n    end\nelse\n    set [_y v] to (y)\nend\nif <(w) < [0]> then\n    set [_i2 v] to ((0.125) * (size))\nelse\n    set [_i2 v] to (_i1)\nend\nINTERNAL | printText (text) (_y) (_i0) ((width) * (_i0)) (((cspace) * ((0.475) * ((size) / ([log v] of (((size) + (1.01)) * ((size) + (1.01))) )))) + (_i2)) (align) (_i1) ((_i1) + (1))\n\ndefine INTERNAL | printText (text) (y) (height) (width) (space) (align) (weight) (dotweight)\nif <<(align) = [c]> or <(align) = [r]>> then\n    delete all of [_temp0 v]\n    set [_i0 v] to [1]\n    set [_i1 v] to [0]\n    repeat (length of (text))\n        set [_i2 v] to (letter (_i0) of (text))\n        if < [abcdefghijklmnopqrstuvwxyz] contains (_i2)?> then\n            switch costume to (_i2)\n            change [_i1 v] by (((width) * (item (costume [number v]) of [_charwidths v])) + (space))\n            add (costume [number v]) to [_temp0 v]\n        else\n            set [_i2 v] to (item # of (_i2) in [_chars v])\n            if <not <(_i2) = [0]>> then\n                change [_i1 v] by (((width) * (item (_i2) of [_charwidths v])) + (space))\n                add (_i2) to [_temp0 v]\n            end\n        end\n        change [_i0 v] by (1)\n    end\n    if <(align) = [c]> then\n        change [_x v] by ((-0.5) * ((_i1) - (space)))\n    else\n        change [_x v] by ((-1) * ((_i1) - (space)))\n    end\n    set [_i0 v] to [1]\n    repeat (length of [_temp0 v])\n        INTERNAL | printChar (item (_i0) of [_temp0 v]) (height) (width) (_x) (y) (weight) (dotweight)\n        change [_x v] by (space)\n        change [_i0 v] by (1)\n    end\nelse\n    set [_i0 v] to [1]\n    repeat (length of (text))\n        set [_i7 v] to (letter (_i0) of (text))\n        if < [abcdefghijklmnopqrstuvwxyz] contains (_i7)?> then\n            switch costume to (_i7)\n            INTERNAL | printChar (costume [number v]) (height) (width) (_x) (y) (weight) (dotweight)\n            change [_x v] by (space)\n        else\n            set [_i7 v] to (item # of (_i7) in [_chars v])\n            if <not <(_i7) = [0]>> then\n                INTERNAL | printChar (_i7) (height) (width) (_x) (y) (weight) (dotweight)\n                change [_x v] by (space)\n            end\n        end\n        change [_i0 v] by (1)\n    end\nend\n\ndefine INTERNAL | loadFont (font)\nset [_i0 v] to [1]\nrepeat until <(_i0) > (length of (font))>\n    set [_i1 v] to (letter (_i0) of (font))\n    if <[_chars v] contains (_i1)?> then\n        if < [abcdefghijklmnopqrstuvwxyz] contains (_i1)?> then\n            switch costume to (_i1)\n            set [_i4 v] to (costume [number v])\n        else\n            set [_i4 v] to (item # of (_i1) in [_chars v])\n        end\n        if < [abcdefghijklmnopqrstuvwxyz] contains (_i1)?> then\n            switch costume to (_i1)\n            if <(costume [number v]) > [27]> then\n                set [_i2 v] to (item # of (join [_] (_i1)) in [_chardata v])\n                set [_i5 v] to (item (_i2) of [_chardata v])\n                replace item (_i2) of [_chardata v] with []\n                set [_i3 v] to ((item # of (join [_] (_i1)) in [_chardata v]) + (1))\n                replace item (_i2) of [_chardata v] with (_i5)\n            else\n                set [_i3 v] to ((item # of (join [_] (_i1)) in [_chardata v]) + (1))\n            end\n        else\n            set [_i3 v] to ((item # of (join [_] (_i1)) in [_chardata v]) + (1))\n        end\n    else\n        add (_i1) to [_chars v]\n        add [0] to [_charids v]\n        add [0] to [_charwidths v]\n        add (join [_] (_i1)) to [_chardata v]\n        set [_i3 v] to ((length of [_chardata v]) + (1))\n        set [_i4 v] to (length of [_chars v])\n    end\n    add [_] to [_chardata v]\n    change [_i0 v] by (2)\n    set [_i2 v] to []\n    repeat until <(letter (_i0) of (font)) = [ ]>\n        set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n        change [_i0 v] by (1)\n    end\n    change [_i0 v] by (1)\n    replace item (_i4) of [_charwidths v] with ((1) * (_i2))\n    set [_i2 v] to []\n    repeat until <(letter (_i0) of (font)) = [ ]>\n        set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n        change [_i0 v] by (1)\n    end\n    change [_i0 v] by (1)\n    if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n        insert (round (_i2)) at (_i3) of [_chardata v] \n    else\n        replace item (_i3) of [_chardata v] with (round (_i2))\n    end\n    change [_i3 v] by (1)\n    repeat (round (_i2))\n        repeat (2)\n            set [_i2 v] to []\n            repeat until <(letter (_i0) of (font)) = [ ]>\n                set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n                change [_i0 v] by (1)\n            end\n            change [_i0 v] by (1)\n            if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n                insert ((1) * (_i2)) at (_i3) of [_chardata v] \n            else\n                replace item (_i3) of [_chardata v] with ((1) * (_i2))\n            end\n            change [_i3 v] by (1)\n        end\n        set [_i2 v] to []\n        repeat until <(letter (_i0) of (font)) = [ ]>\n            set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n            change [_i0 v] by (1)\n        end\n        change [_i0 v] by (1)\n        if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n            insert (round (_i2)) at (_i3) of [_chardata v] \n        else\n            replace item (_i3) of [_chardata v] with (round (_i2))\n        end\n        change [_i3 v] by (1)\n        repeat (round (_i2))\n            repeat (2)\n                set [_i2 v] to []\n                repeat until <(letter (_i0) of (font)) = [ ]>\n                    set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n                    change [_i0 v] by (1)\n                end\n                change [_i0 v] by (1)\n                if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n                    insert ((1) * (_i2)) at (_i3) of [_chardata v] \n                else\n                    replace item (_i3) of [_chardata v] with ((1) * (_i2))\n                end\n                change [_i3 v] by (1)\n            end\n        end\n    end\n    set [_i2 v] to []\n    repeat until <(letter (_i0) of (font)) = [ ]>\n        set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n        change [_i0 v] by (1)\n    end\n    change [_i0 v] by (1)\n    if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n        insert (round (_i2)) at (_i3) of [_chardata v] \n    else\n        replace item (_i3) of [_chardata v] with (round (_i2))\n    end\n    change [_i3 v] by (1)\n    repeat (round (_i2))\n        repeat (2)\n            set [_i2 v] to []\n            repeat until <(letter (_i0) of (font)) = [ ]>\n                set [_i2 v] to (join (_i2) (letter (_i0) of (font)))\n                change [_i0 v] by (1)\n            end\n            change [_i0 v] by (1)\n            if <(letter (1) of (item (_i3) of [_chardata v])) = [_]> then\n                insert ((1) * (_i2)) at (_i3) of [_chardata v] \n            else\n                replace item (_i3) of [_chardata v] with ((1) * (_i2))\n            end\n            change [_i3 v] by (1)\n        end\n    end\n    delete (last) of [_chardata v]\nend\nset [_i0 v] to [1]\nrepeat (length of [_chars v])\n    set [_i1 v] to (item (_i0) of [_chars v])\n    if < [abcdefghijklmnopqrstuvwxyz] contains (_i1)?> then\n        switch costume to (_i1)\n        if <(costume [number v]) > [27]> then\n            set [_i2 v] to (item # of (join [_] (_i1)) in [_chardata v])\n            set [_i3 v] to (item (_i2) of [_chardata v])\n            replace item (_i2) of [_chardata v] with []\n            replace item (_i0) of [_charids v] with ((item # of (join [_] (_i1)) in [_chardata v]) + (2))\n            replace item (_i2) of [_chardata v] with (_i3)\n        else\n            replace item (_i0) of [_charids v] with ((item # of (join [_] (_i1)) in [_chardata v]) + (2))\n        end\n    else\n        replace item (_i0) of [_charids v] with ((item # of (join [_] (_i1)) in [_chardata v]) + (2))\n    end\n    change [_i0 v] by (1)\nend\n\ndefine Load Font | Name (font)\nset [_i0 v] to (item # of (font) in [_fonts v])\nif <((_i0) mod (2)) = [1]> then\n    INTERNAL | loadFont (item ((_i0) + (1)) of [_fonts v])\nend\n\ndefine INTERNAL | printChar (num) (height) (width) (x) (y) (weight) (dotweight)\nchange [_x v] by ((width) * (item (num) of [_charwidths v]))\nset [_i3 v] to (item (num) of [_charids v])\nset pen size to (weight)\nrepeat (item ((_i3) - (1)) of [_chardata v])\n    go to x: ((x) + ((width) * (item (_i3) of [_chardata v]))) y: ((y) + ((height) * (item ((_i3) + (1)) of [_chardata v])))\n    pen down\n    change [_i3 v] by (3)\n    repeat (item ((_i3) - (1)) of [_chardata v])\n        go to x: ((x) + ((width) * (item (_i3) of [_chardata v]))) y: ((y) + ((height) * (item ((_i3) + (1)) of [_chardata v])))\n        change [_i3 v] by (2)\n    end\n    pen up\nend\nset pen size to (dotweight)\nchange [_i3 v] by (1)\nrepeat (item ((_i3) - (1)) of [_chardata v])\n    go to x: ((x) + ((width) * (item (_i3) of [_chardata v]))) y: ((y) + ((height) * (item ((_i3) + (1)) of [_chardata v])))\n    pen down\n    pen up\n    change [_i3 v] by (2)\nend\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nswitch costume to (sizebypass v)\nset size to (50000) %\nswitch costume to (pte lite+ v)\n\n@TN\n\nwhen flag clicked\nhide\n\n