uaae
Key RequiredUniversal

uaae

Universal Scriptpon1234dspon1234ds 2.4K views 66 executesUpdated Mar 29, 2025
5.0/ 5(1 votes)
10100% Positive
Lua Script•317 lines (10990 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local CoreGui = game:GetService("CoreGui")

_G.FriendColor = Color3.fromRGB(0, 0, 255)
_G.EnemyColor = Color3.fromRGB(255, 0, 0)
_G.UseTeamColor = true

local DEFAULT_FOV = 60
local DEFAULT_SMOOTHNESS = 0.3
local AIM_PARTS = {"Head", "Body"}
local currentAimPart = 1

local currentFOV = DEFAULT_FOV
local currentSmoothness = DEFAULT_SMOOTHNESS
local aimbotEnabled = true
local espEnabled = true
local running = true
local fovCircle

local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "FPSHelper"
ScreenGui.Parent = CoreGui

local MainFrame = Instance.new("Frame")
MainFrame.Size = UDim2.new(0, 250, 0, 300)
MainFrame.Position = UDim2.new(0.8, 0, 0.5, -150)
MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 40)
MainFrame.BorderSizePixel = 0
MainFrame.Active = true
MainFrame.Draggable = true
MainFrame.Parent = ScreenGui

local Header = Instance.new("TextLabel")
Header.Size = UDim2.new(1, 0, 0, 30)
Header.BackgroundColor3 = Color3.fromRGB(20, 20, 30)
Header.Text = "FPS Helper v2.6"
Header.TextColor3 = Color3.new(1, 1, 1)
Header.Font = Enum.Font.SourceSansBold
Header.TextSize = 18
Header.Parent = MainFrame

local CloseButton = Instance.new("TextButton")
CloseButton.Size = UDim2.new(0, 30, 0, 30)
CloseButton.Position = UDim2.new(1, -30, 0, 0)
CloseButton.Text = "X"
CloseButton.TextColor3 = Color3.new(1, 1, 1)
CloseButton.BackgroundColor3 = Color3.fromRGB(255, 60, 60)
CloseButton.Font = Enum.Font.GothamBold
CloseButton.TextSize = 18
CloseButton.Parent = Header

local Holder = Instance.new("Folder", CoreGui)
Holder.Name = "ESP"

local function ESP(target)
    if not espEnabled or target == Players.LocalPlayer then return end
    
    if target.Character then
        if not target.Character:FindFirstChild("ESP_Highlight") then
            local highlight = Instance.new("Highlight")
            highlight.Name = "ESP_Highlight"
            highlight.Adornee = target.Character
            highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
            highlight.FillColor = _G.UseTeamColor and target.TeamColor.Color or 
                                ((Players.LocalPlayer.TeamColor == target.TeamColor) and _G.FriendColor or _G.EnemyColor)
            highlight.OutlineColor = Color3.new(0, 0, 0)
            highlight.FillTransparency = 0.5
            highlight.OutlineTransparency = 0
            highlight.Parent = target.Character
        else
            target.Character.ESP_Highlight.FillColor = _G.UseTeamColor and target.TeamColor.Color or 
                                                     ((Players.LocalPlayer.TeamColor == target.TeamColor) and _G.FriendColor or _G.EnemyColor)
        end
    end
end

local function UpdateAllESP()
    if not espEnabled then return end
    
    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= Players.LocalPlayer then
            coroutine.wrap(ESP)(player)
        end
    end
end

local function UpdateFOV()
    if not fovCircle then
        fovCircle = Drawing.new("Circle")
        fovCircle.Visible = aimbotEnabled
        fovCircle.Thickness = 2
        fovCircle.Transparency = 1
        fovCircle.Color = Color3.new(1, 0, 0)
    end
    fovCircle.Radius = currentFOV
    fovCircle.Position = Vector2.new(workspace.CurrentCamera.ViewportSize.X/2, workspace.CurrentCamera.ViewportSize.Y/2)
end

local function FindTarget()
    local closest = {dist = math.huge}
    local center = Vector2.new(workspace.CurrentCamera.ViewportSize.X/2, workspace.CurrentCamera.ViewportSize.Y/2)
    local aimPartName = currentAimPart == 1 and "Head" or "HumanoidRootPart"
    
    for _, player in ipairs(Players:GetPlayers()) do
        if player ~= Players.LocalPlayer and player.Character then
            local part = player.Character:FindFirstChild(aimPartName)
            if part then
                local pos, vis = workspace.CurrentCamera:WorldToViewportPoint(part.Position)
                if vis then
                    local ray = Ray.new(
                        workspace.CurrentCamera.CFrame.Position,
                        (part.Position - workspace.CurrentCamera.CFrame.Position).Unit * 1000
                    )
                    local hit = workspace:FindPartOnRay(ray, Players.LocalPlayer.Character)
                    
                    if hit and hit:IsDescendantOf(player.Character) then
                        local dist = (Vector2.new(pos.X, pos.Y) - center).Magnitude
                        if dist < currentFOV and dist < closest.dist then
                            closest = {part = part, dist = dist}
                        end
                    end
                end
            end
        end
    end
    return closest.part
end

local function CreateToggle(text, ypos, state, callback)
    local button = Instance.new("TextButton")
    button.Size = UDim2.new(0.9, 0, 0, 30)
    button.Position = UDim2.new(0.05, 0, ypos/300, 0)
    button.Text = text..": "..(state and "ON" or "OFF")
    button.TextColor3 = Color3.new(1, 1, 1)
    button.BackgroundColor3 = state and Color3.fromRGB(60, 200, 60) or Color3.fromRGB(200, 60, 60)
    button.Font = Enum.Font.SourceSans
    button.TextSize = 16
    button.Parent = MainFrame
    
    button.MouseButton1Click:Connect(function()
        state = not state
        button.Text = text..": "..(state and "ON" or "OFF")
        button.BackgroundColor3 = state and Color3.fromRGB(60, 200, 60) or Color3.fromRGB(200, 60, 60)
        callback(state)
    end)
end

local function CreateSlider(text, ypos, min, max, step, value, callback)
    local container = Instance.new("Frame")
    container.Size = UDim2.new(0.9, 0, 0, 50)
    container.Position = UDim2.new(0.05, 0, ypos/300, 0)
    container.BackgroundTransparency = 1
    container.Parent = MainFrame

    local label = Instance.new("TextLabel")
    label.Size = UDim2.new(1, 0, 0, 20)
    label.Text = text..": "..value
    label.TextColor3 = Color3.new(1, 1, 1)
    label.BackgroundTransparency = 1
    label.Font = Enum.Font.SourceSans
    label.TextSize = 14
    label.Parent = container

    local track = Instance.new("Frame")
    track.Size = UDim2.new(1, 0, 0, 10)
    track.Position = UDim2.new(0, 0, 0, 25)
    track.BackgroundColor3 = Color3.fromRGB(60, 60, 70)
    track.BorderSizePixel = 0
    track.Parent = container

    local percentage = (value - min)/(max - min)
    local thumb = Instance.new("Frame")
    thumb.Size = UDim2.new(0, 15, 0, 20)
    thumb.Position = UDim2.new(percentage, -7.5, -0.5, 0)
    thumb.BackgroundColor3 = Color3.fromRGB(60, 200, 60)
    thumb.BorderSizePixel = 0
    thumb.Parent = track

    local dragging = false
    
    thumb.InputBegan:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = true
            MainFrame.Draggable = false
        end
    end)
    
    UserInputService.InputChanged:Connect(function(input)
        if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
            local mousePos = UserInputService:GetMouseLocation()
            local trackPos = track.AbsolutePosition
            local trackSize = track.AbsoluteSize
            
            local relX = math.clamp(mousePos.X - trackPos.X, 0, trackSize.X)
            local percent = relX/trackSize.X
            local value = math.floor((min + (max - min)*percent)/step + 0.5)*step
            value = math.clamp(value, min, max)
            
            thumb.Position = UDim2.new(percent, -7.5, -0.5, 0)
            label.Text = text..": "..value
            callback(value)
        end
    end)
    
    UserInputService.InputEnded:Connect(function(input)
        if input.UserInputType == Enum.UserInputType.MouseButton1 then
            dragging = false
            MainFrame.Draggable = true
        end
    end)
end

CreateToggle("Aimbot", 40, aimbotEnabled, function(state)
    aimbotEnabled = state
    if fovCircle then fovCircle.Visible = state end
end)

CreateToggle("ESP", 90, espEnabled, function(state)
    espEnabled = state
    if state then
        UpdateAllESP()
    else
        for _, player in ipairs(Players:GetPlayers()) do
            if player ~= Players.LocalPlayer and player.Character and player.Character:FindFirstChild("ESP_Highlight") then
                player.Character.ESP_Highlight:Destroy()
            end
        end
    end
end)

CreateSlider("FOV", 140, 10, 120, 1, currentFOV, function(value)
    currentFOV = value
    UpdateFOV()
end)

CreateSlider("Smoothness", 190, 0.1, 1, 0.1, currentSmoothness, function(value)
    currentSmoothness = value
end)

local aimPartButton = Instance.new("TextButton")
aimPartButton.Size = UDim2.new(0.9, 0, 0, 30)
aimPartButton.Position = UDim2.new(0.05, 0, 250/300, 0)
aimPartButton.Text = "Target: "..AIM_PARTS[currentAimPart]
aimPartButton.TextColor3 = Color3.new(1, 1, 1)
aimPartButton.BackgroundColor3 = Color3.fromRGB(80, 120, 200)
aimPartButton.Font = Enum.Font.SourceSans
aimPartButton.TextSize = 16
aimPartButton.Parent = MainFrame

aimPartButton.MouseButton1Click:Connect(function()
    currentAimPart = currentAimPart%#AIM_PARTS + 1
    aimPartButton.Text = "Target: "..AIM_PARTS[currentAimPart]
end)

RunService.RenderStepped:Connect(function()
    if not running then return end
    
    if espEnabled then
        for _, player in ipairs(Players:GetPlayers()) do
            if player ~= Players.LocalPlayer then
                coroutine.wrap(ESP)(player)
            end
        end
    end
    
    UpdateFOV()
    
    if aimbotEnabled then
        local target = FindTarget()
        if target then
            local camPos = workspace.CurrentCamera.CFrame.Position
            local newCF = CFrame.new(camPos, target.Position)
            workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame:Lerp(newCF, currentSmoothness)
        end
    end
end)

local function SetupPlayer(player)
    if player == Players.LocalPlayer then return end
    
    player.CharacterAdded:Connect(function(character)
        if espEnabled then
            task.wait(0.5)
            ESP(player)
        end
    end)
    
    if player.Character and espEnabled then
        ESP(player)
    end
end

for _, player in ipairs(Players:GetPlayers()) do
    SetupPlayer(player)
end

Players.PlayerAdded:Connect(SetupPlayer)

Players.PlayerRemoving:Connect(function(player)
    if player.Character and player.Character:FindFirstChild("ESP_Highlight") then
        player.Character.ESP_Highlight:Destroy()
    end
end)

CloseButton.MouseButton1Click:Connect(function()
    running = false
    ScreenGui:Destroy()
    Holder:Destroy()
    if fovCircle then fovCircle:Remove() end
    for _, player in ipairs(Players:GetPlayers()) do
        if player.Character and player.Character:FindFirstChild("ESP_Highlight") then
            player.Character.ESP_Highlight:Destroy()
        end
    end
end)

Features & Information

universal esp and aimbot

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts