Universal Script 📌
4.0k Views
24 Executions

Drawing dot new line module script

Universal Script 📌
asyran310810
asyran310810First script
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Replicates Drawing.new("Line") Purly with no unc reqiured needs to have Drawing:Update() do update drawing if you put new value

Updates

  1. Script edited: Create script

View Raw
local Drawing = {}
Drawing.__index = Drawing

function Drawing.new(type)
	if type == "Line" then
		local self = setmetatable({}, Drawing)

		-- Create UI frame for the line
		self.Instance = Instance.new("Frame")
		self.Instance.AnchorPoint = Vector2.new(0.5, 0.5)
		self.Instance.BorderSizePixel = 0
		self.Instance.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui"):FindFirstChild("ScreenGui") or Instance.new("ScreenGui", game.Players.LocalPlayer:WaitForChild("PlayerGui"))

		-- Default values
		self.From = Vector2.new(0, 0)
		self.To = Vector2.new(100, 100)
		self.Thickness = 5
		self.Color = Color3.new(1, 1, 1)
		self.Visible = true

		-- Apply initial properties
		self:Update()

		return self
	else
		error("Invalid Drawing type: " .. type)
	end
end

function Drawing:Update()
	if not self.Instance then return end
	if not self.Visible then
		self.Instance.Visible = false
		return
	end

	local distance = (self.To - self.From).Magnitude
	local direction = (self.To - self.From).Unit
	local angle = math.deg(math.atan2(direction.Y, direction.X))



Comments

1
Log in to join the conversation. Login
Wesd's profile picture
Wesd2 years ago(edited)

dtc

1

Tags

More universal scripts

See all
Script hub
3.0M
18.5M
Bumped 3 hours ago

Script hub

Hall of Fame #1

KeylessVerified script badgeYARHM Hub KEYLESS 2026

Script hub
119.5k
193.9k
Bumped 8 hours ago
Key System
Script hub
180.9k
1.8M
Bumped 9 hours ago
Key System
Universal Script 📌
1.2k
2.6k
Bumped 9 hours ago
Script hub
60.2k
244.1k
Bumped 9 hours ago
Key System
Universal Script 📌
6.2k
53.5k
Bumped 12 hours ago