Category
Drawing
2D drawing objects, 3D drawing, the camera helper, ESP and toasts.
Pages in this category
- Render3D: lines, boxes, rings and glows in the world
- Camera and overlays:
Camera,ESP,Notify
2D drawing: Drawing
Drawing.new(kind) creates an object that is drawn on top of the game every frame until you remove it.
Kinds: "Square", "Text", "Line", "Circle", "Triangle". Any other name raises an error. There can be at most 2000 live objects.
local box = Drawing.new("Square")
box.Position = Vector2.new(100, 100)
box.Size = Vector2.new(200, 80)
box.Color = Color3.fromRGB(255, 80, 80)
box.Filled = true
box.Visible = true
Objects start hidden. Set Visible = true to show them.
Properties
Set a property by assigning to it. Reading returns the value you last set.
| Property | Type | Used by | Notes |
|---|---|---|---|
Visible | boolean | all | Default false |
Color | Color3 | all | Default white |
Transparency | number | all | 1 is fully visible, 0 is invisible. Default 1 |
ZIndex | number | all | Higher draws on top. Default 0 |
Position | Vector2 | Square, Text, Circle | Top-left for squares and text |
From, PointA | Vector2 | Line, Triangle | Same as Position |
To, PointB | Vector2 | Line, Triangle | End point |
PointC | Vector2 | Triangle | Third point |
Size | Vector2 or number | Square (Vector2), Text (number) | For text, the font size. Default 18 if invalid |
Thickness | number | Square, Line, Circle, Triangle | Outline width. Default 1 |
Filled | boolean | Square, Circle, Triangle | Default false |
Radius | number | Circle | Default 8 if invalid |
Text | string | Text | |
Center | boolean | Text | Centre the text on Position |
Outline | boolean | Text | Draw a dark outline around the text |
Properties that do not apply to a kind are stored but have no effect.
Drawing.Fontsexists (UI,System,Plex,Monospace) but setting aFontproperty currently has no effect.
Methods
object:Remove()
Deletes the object. Alias: object:Destroy(). After removal, assignments are ignored.
Global helpers
cleardrawcache()
Removes every Drawing object.
isrenderobj(obj)
Returns true if obj is a Drawing object.
Example: draw every frame
local label = Drawing.new("Text")
label.Size = 16
label.Outline = true
label.Visible = true
RunService.RenderStepped:Connect(function()
local p = mc.getPlayer()
if p then
label.Position = Vector2.new(10, 10)
label.Text = string.format("%.1f %.1f %.1f", p.x, p.y, p.z)
end
end)