ESP Universal
Key RequiredUniversal

ESP Universal

Universal Scriptmiyeperezromiyeperezro 7.4K views 112 executesUpdated Jun 17, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•254 lines (9565 chars)
-- Services
local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local StarterGui = game:GetService("StarterGui")

local LocalPlayer = Players.LocalPlayer
local Camera = workspace.CurrentCamera

-- Create ScreenGui
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "MiguezxHubGui"
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = game.CoreGui

-- ========== Initial Rainbow Message ==========
local Notification = Instance.new("Frame")
Notification.Size = UDim2.new(0, 600, 0, 120)
Notification.Position = UDim2.new(0.5, -300, 0.15, 0)
Notification.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
Notification.BorderSizePixel = 0
Notification.Parent = ScreenGui
Notification.Active = true
Notification.Draggable = true

local NotificationText = Instance.new("TextLabel")
NotificationText.Size = UDim2.new(1, -50, 1, 0)
NotificationText.Position = UDim2.new(0, 10, 0, 0)
NotificationText.BackgroundTransparency = 1
NotificationText.Text = "I would appreciate if you joined my Discord\nBy the way this is alpha, I’ll add more stuff in future"
NotificationText.TextColor3 = Color3.new(1, 1, 1)
NotificationText.Font = Enum.Font.GothamBlack
NotificationText.TextSize = 28
NotificationText.TextWrapped = true
NotificationText.TextYAlignment = Enum.TextYAlignment.Center
NotificationText.Parent = Notification

-- Rainbow color update
spawn(function()
    while Notification and NotificationText.Parent do
        for hue = 0, 1, 0.02 do
            NotificationText.TextColor3 = Color3.fromHSV(hue, 1, 1)
            wait(0.03)
        end
    end
end)

local CloseNotificationBtn = Instance.new("TextButton")
CloseNotificationBtn.Size = UDim2.new(0, 40, 0, 40)
CloseNotificationBtn.Position = UDim2.new(1, -45, 0, 5)
CloseNotificationBtn.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
CloseNotificationBtn.Text = "X"
CloseNotificationBtn.Font = Enum.Font.GothamBold
CloseNotificationBtn.TextSize = 28
CloseNotificationBtn.TextColor3 = Color3.new(1, 1, 1)
CloseNotificationBtn.Parent = Notification
CloseNotificationBtn.AutoButtonColor = false

CloseNotificationBtn.MouseEnter:Connect(function()
    CloseNotificationBtn.BackgroundColor3 = Color3.fromRGB(200, 0, 0)
end)
CloseNotificationBtn.MouseLeave:Connect(function()
    CloseNotificationBtn.BackgroundColor3 = Color3.fromRGB(255, 50, 50)
end)

CloseNotificationBtn.MouseButton1Click:Connect(function()
    Notification:Destroy()
end)

-- ========== Main GUI Frame ==========
local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 350, 0, 250)
MainFrame.Position = UDim2.new(0.5, -175, 0.4, 0)
MainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true
MainFrame.Parent = ScreenGui

-- Top Bar
local TopBar = Instance.new("Frame")
TopBar.Size = UDim2.new(1, 0, 0, 40)
TopBar.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
TopBar.BorderSizePixel = 0
TopBar.Parent = MainFrame

-- Title
local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, -100, 1, 0)
Title.Position = UDim2.new(0, 10, 0, 0)
Title.BackgroundTransparency = 1
Title.Text = "Miguezx Hub"
Title.TextColor3 = Color3.new(1, 1, 1)
Title.TextSize = 24
Title.Font = Enum.Font.GothamBold
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Parent = TopBar

-- Minimize Button
local MinimizeBtn = Instance.new("TextButton")
MinimizeBtn.Size = UDim2.new(0, 40, 0, 30)
MinimizeBtn.Position = UDim2.new(1, -90, 0, 5)
MinimizeBtn.BackgroundColor3 = Color3.fromRGB(255, 170, 0)
MinimizeBtn.Text = "-"
MinimizeBtn.Font = Enum.Font.GothamBold
MinimizeBtn.TextSize = 24
MinimizeBtn.TextColor3 = Color3.new(1, 1, 1)
MinimizeBtn.Parent = TopBar
MinimizeBtn.AutoButtonColor = false

-- Close Button
local CloseBtn = Instance.new("TextButton")
CloseBtn.Size = UDim2.new(0, 40, 0, 30)
CloseBtn.Position = UDim2.new(1, -45, 0, 5)
CloseBtn.BackgroundColor3 = Color3.fromRGB(255, 70, 70)
CloseBtn.Text = "X"
CloseBtn.Font = Enum.Font.GothamBold
CloseBtn.TextSize = 24
CloseBtn.TextColor3 = Color3.new(1, 1, 1)
CloseBtn.Parent = TopBar
CloseBtn.AutoButtonColor = false

-- ESP Toggle Button
local ESPButton = Instance.new("TextButton")
ESPButton.Size = UDim2.new(0, 280, 0, 50)
ESPButton.Position = UDim2.new(0.5, -140, 0, 60)
ESPButton.BackgroundColor3 = Color3.fromRGB(40, 40, 255)
ESPButton.Text = "Enable ESP"
ESPButton.Font = Enum.Font.GothamBold
ESPButton.TextSize = 22
ESPButton.TextColor3 = Color3.new(1, 1, 1)
ESPButton.Parent = MainFrame

-- Discord Button
local DiscordBtn = Instance.new("TextButton")
DiscordBtn.Size = UDim2.new(0, 280, 0, 50)
DiscordBtn.Position = UDim2.new(0.5, -140, 0, 130)
DiscordBtn.BackgroundColor3 = Color3.fromRGB(88, 101, 242)
DiscordBtn.Text = "Join Discord"
DiscordBtn.Font = Enum.Font.GothamBold
DiscordBtn.TextSize = 22
DiscordBtn.TextColor3 = Color3.new(1, 1, 1)
DiscordBtn.Parent = MainFrame

-- ESP Logic
local ESPEnabled = false
local drawings = {}

local function ClearDrawings()
    for _, v in pairs(drawings) do
        for _, d in pairs(v) do
            d:Remove()
        end
    end
    drawings = {}
end

local function CreateESP()
    ClearDrawings()
    RunService:UnbindFromRenderStep("ESP")
    if not ESPEnabled then return end

    RunService:BindToRenderStep("ESP", Enum.RenderPriority.Last.Value, function()
        for _, player in pairs(Players:GetPlayers()) do
            if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") and player.Character:FindFirstChild("Humanoid") and player.Character:FindFirstChild("Head") then
                local hrp = player.Character.HumanoidRootPart
                local humanoid = player.Character.Humanoid
                local head = player.Character.Head

                if humanoid.Health > 0 then
                    local pos, visible = Camera:WorldToViewportPoint(hrp.Position)
                    if visible then
                        if not drawings[player] then
                            drawings[player] = {
                                Box = Drawing.new("Square"),
                                Name = Drawing.new("Text"),
                                Tracer = Drawing.new("Line")
                            }
                            drawings[player].Box.Color = Color3.new(1, 1, 1)
                            drawings[player].Box.Thickness = 1
                            drawings[player].Box.Filled = false
                            drawings[player].Name.Size = 14
                            drawings[player].Name.Color = Color3.new(1, 1, 1)
                            drawings[player].Name.Center = true
                            drawings[player].Tracer.Thickness = 1
                            drawings[player].Tracer.Color = Color3.new(1, 1, 1)
                        end

                        local scale = Camera:WorldToViewportPoint(hrp.Position + Vector3.new(0, 3, 0)).Y - Camera:WorldToViewportPoint(hrp.Position - Vector3.new(0, 2.5, 0)).Y
                        local width = scale / 2
                        local x = pos.X - width / 2
                        local y = pos.Y - scale / 2

                        drawings[player].Box.Position = Vector2.new(x, y)
                        drawings[player].Box.Size = Vector2.new(width, scale)
                        drawings[player].Box.Visible = true

                        drawings[player].Name.Position = Vector2.new(pos.X, y - 18)
                        drawings[player].Name.Text = player.Name
                        drawings[player].Name.Visible = true

                        drawings[player].Tracer.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y)
                        drawings[player].Tracer.To = Vector2.new(pos.X, pos.Y)
                        drawings[player].Tracer.Visible = true
                    else
                        for _, d in pairs(drawings[player]) do
                            d.Visible = false
                        end
                    end
                end
            end
        end
    end)
end

-- ESP Button toggle
ESPButton.MouseButton1Click:Connect(function()
    ESPEnabled = not ESPEnabled
    ESPButton.Text = ESPEnabled and "Disable ESP" or "Enable ESP"
    CreateESP()
end)

-- Discord Button functionality
DiscordBtn.MouseButton1Click:Connect(function()
    setclipboard("https://discord.gg/BMAzkqXzWR")
    StarterGui:SetCore("SendNotification", {
        Title = "Copied",
        Text = "Discord invite copied to clipboard!",
        Duration = 4
    })
end)

-- Minimize button functionality
MinimizeBtn.MouseButton1Click:Connect(function()
    if MainFrame.Size == UDim2.new(0, 350, 0, 250) then
        ESPButton.Visible = false
        DiscordBtn.Visible = false
        local tween = TweenService:Create(MainFrame, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(0, 350, 0, 40)})
        tween:Play()
    else
        ESPButton.Visible = true
        DiscordBtn.Visible = true
        local tween = TweenService:Create(MainFrame, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Size = UDim2.new(0, 350, 0, 250)})
        tween:Play()
    end
end)

-- Close button functionality
CloseBtn.MouseButton1Click:Connect(function()
    local tween = TweenService:Create(MainFrame, TweenInfo.new(0.4, Enum.EasingStyle.Quad, Enum.EasingDirection.Out), {Position = UDim2.new(0.5, 500, 0.4, 0)})
    tween:Play()
    tween.Completed:Wait()
    ScreenGui:Destroy()
end)

Features & Information

2D Box Tracers Name More features soon this is in alpha...
#ESP#Universal#Hub#Universal ESP

Community Comments (3)

miyeperezromiyeperezroJun 17, 2025

Very Good Script I enjo* that

illorsmillorsmJun 17, 2025

Looking forward to the updates

irapuzikirapuzikJun 21, 2025

a good esp script but i HATE the fact that the boxes stay on ur screen after u killed ur opponent

More Scripts for Universal Scripts