Drawing API
2D overlay primitives rendered by the external. Create objects with Drawing.new, update their properties, then set Visible = true.
type is one of "Line", "Text", "Circle", "Square", "Triangle", "Quad".
local box = Drawing.new("Square")
box.Position = Vector2.new(100, 100)
box.Size = Vector2.new(160, 220)
box.Color = Color3.fromRGB(120, 130, 255)
box.Thickness = 2
box.Visible = true
Font selector constants: UI (0), System (1), SystemBold (2), Minecraft (3), Monospace (4), Pixel (5), Fortnite (6), ProximaSoftBold (7).
local text = Drawing.new("Text")
text.Text = "Yuari"
text.Font = Drawing.Fonts.Monospace
text.Visible = true
Loads a .ttf/.otf file and returns an id for drawing.Font. size defaults to 14. smooth defaults to true and uses unhinted, supersampled glyphs.
local id = Drawing.loadfont("C:\\Windows\\Fonts\\arialbd.ttf", 18, true)
local text = Drawing.new("Text")
text.Text = "Custom font"
text.Font = id
text.Visible = true
Common properties (all types)
| Property | Type | Description |
|---|---|---|
Visible | boolean | Whether the object is drawn. |
Color | Color3 | Object color. |
Transparency | number | 0 = opaque, 1 = invisible. |
Thickness | number | Line weight. |
ZIndex | number | Draw order. |
:Remove() / :Destroy() | method | Deletes the object. |
Type-specific properties
| Type | Properties |
|---|---|
| Line | From (Vector2), To (Vector2) |
| Text | Text, Position (Vector2), Size/FontSize, Font, Center (bool), Outline (bool) |
| Circle | Position (Vector2), Radius, Filled (bool), NumSides (read-only, 64) |
| Square | Position (Vector2), Size (Vector2), Filled (bool), Corner/Rounding |
| Triangle | PointA, PointB, PointC (Vector2), Filled (bool), Thickness (outline only) |
| Quad | PointA, PointB, PointC, PointD (Vector2), Filled (bool), Thickness (outline only) |