Universal Script πŸ“Œ
13.0k Views
783 Executions

Better Drawing

Universal Script πŸ“Œ
CatBoy
CatBoyPublished 50
1 year 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

What is Better-Drawing? Better-Drawing is a custom wrapper for Roblox's Drawing API that makes it way easier to work with visuals like ESPs, boxes, text, and more. The main benefit is that it automatically handles cleanup so you don’t have to manually remove elements or clear them every frame. Once you're done using a drawing (like when a player disappears), it gets deleted automatically. That means cleaner code and fewer performance issues. Credits to dementia enjoyer check out his GitHub here: https://github.com/dementiaenjoyer/Better-Drawing

View Raw
-- example ussage:
local BetterDrawing = loadstring(game:HttpGet("https://raw.githubusercontent.com/dementiaenjoyer/Better-Drawing/refs/heads/main/Main.lua"))();

local Players = game:GetService("Players");
local Workspace = game:GetService("Workspace");

local Camera = Workspace.CurrentCamera;
local LocalPlayer = Players.LocalPlayer;

local Round = math.round;

local function Update()
    for _, Player in Players:GetChildren() do
        local Character = Player.Character;
        local Root = Character and Character:FindFirstChild("HumanoidRootPart");

        if (not Root) or (Player == LocalPlayer) then
            continue;
        end

        local ScreenPosition, OnScreen = Camera:WorldToViewportPoint(Root.Position - Vector3.new(0, 0.5, 0));
        local Distance = ScreenPosition.Z;

        if (not OnScreen) then
            continue;
        end

        local Scale = (2 * Camera.ViewportSize.Y) / ((2 * Distance * math.tan(math.rad(Camera.FieldOfView) / 2)) * 1.5); -- Found this somewhere cant remember where

        local Width, Height = Round(3 * Scale), Round(4 * Scale);
        local Size = Vector2.new(Width, Height);

        local Position = Vector2.new(Round(ScreenPosition.X - (Width / 2)), Round(ScreenPosition.Y - (Height / 2)));

        local Outline = Drawing.new("Square");
        Outline.Visible = true;

        local Box = Drawing.new("Square");
        Box.Visible = true;
        


Comments

5
Log in to join the conversation. Login
gorillatagplayer555's profile picture
gorillatagplayer5551 year ago

@Onzabirr really?

2
Gojoahhahshahwh's profile picture
Gojoahhahshahwh11 months ago

It's for wich game

1
depso's profile picture
depsoAdmin
Admin Badge
Admin
Keyless Script Creator Badge
Keyless Script Creator
Verified Badge
Verified User
1 year ago

Gangalang

1
Onzabirr's profile picture
Onzabirr1 year ago

@gorillatagplayer555 Yes, Makes drawing simpler

1
Onzabirr's profile picture
Onzabirr1 year ago

This is cool

1

Tags

More universal scripts

See all
Script hub
29.5k
92.0k
2 weeks ago
Key System

Script hub

#7 this week

Verified script badgeArcane Hub | 125+ Games & 4000+ Features

Script hub
138.0k
417.6k
9 months ago
Key System

Script hub

Hall of Fame #6

Verified script badgeAcro Hub | Easy Key System

Script hub
3.9M
964.7k
1 year ago

Script hub

Hall of Fame #3

KeylessVerified script badge[KEYLESS] Moondiety Script | 20+ supported Games

Script hub
139
9
2 days ago
Key System
Paid
Script hub
3.0M
14.6M
3 years ago

Script hub

Hall of Fame #1

KeylessVerified script badgeYARHM - MM2, FTF, Forsaken, etc.

Script hub
441
132
2 days ago
Key System