Aimbot and Esp Beta
Key RequiredUniversal

Aimbot and Esp Beta

Universal Scriptmaxwellmaniac87maxwellmaniac87 2.2K views 18 executesUpdated May 30, 2025
3.8/ 5(4 votes)
3175% Positive
Lua Script•464 lines (14241 chars)
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local Camera = workspace.CurrentCamera

-- UI Setup
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "ModMenu"
screenGui.Parent = game.CoreGui

local gui = Instance.new("Frame")
gui.Size = UDim2.new(0, 360, 0, 400)
gui.Position = UDim2.new(0.5, -180, 0.3, -200)
gui.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
gui.BorderSizePixel = 0
gui.Parent = screenGui
Instance.new("UICorner", gui).CornerRadius = UDim.new(0, 8)

-- Dragging
local dragging, dragInput, dragStart, startPos
gui.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		dragging = true
		dragStart = input.Position
		startPos = gui.Position
		input.Changed:Connect(function()
			if input.UserInputState == Enum.UserInputState.End then
				dragging = false
			end
		end)
	end
end)
gui.InputChanged:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseMovement then
		dragInput = input
	end
end)
UserInputService.InputChanged:Connect(function(input)
	if input == dragInput and dragging then
		local delta = input.Position - dragStart
		gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
	end
end)

-- Title
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 0, 32)
title.BackgroundTransparency = 1
title.Text = "Mod Menu"
title.Font = Enum.Font.SourceSansSemibold
title.TextColor3 = Color3.new(1,1,1)
title.TextSize = 18
title.Parent = gui

-- Tabs container
local tabsFrame = Instance.new("Frame")
tabsFrame.Size = UDim2.new(1, 0, 0, 32)
tabsFrame.Position = UDim2.new(0, 0, 0, 32)
tabsFrame.BackgroundTransparency = 1
tabsFrame.Parent = gui

local tabNames = {"Aimbot", "Highlight ESP", "Misc", "Settings"}
local tabButtons = {}
local pages = {}

local selectedTab = 1

local function createTab(name, index)
	local btn = Instance.new("TextButton")
	btn.Size = UDim2.new(0, 90, 1, 0)
	btn.Position = UDim2.new(0, (index-1)*90, 0, 0)
	btn.BackgroundColor3 = Color3.fromRGB(40,40,40)
	btn.BorderSizePixel = 0
	btn.Font = Enum.Font.SourceSansSemibold
	btn.Text = name
	btn.TextColor3 = Color3.fromRGB(180,180,180)
	btn.TextSize = 14
	btn.Parent = tabsFrame
	Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6)

	btn.MouseButton1Click:Connect(function()
		for i, b in ipairs(tabButtons) do
			b.BackgroundColor3 = Color3.fromRGB(40,40,40)
			b.TextColor3 = Color3.fromRGB(180,180,180)
			pages[i].Visible = false
		end
		btn.BackgroundColor3 = Color3.fromRGB(70,70,70)
		btn.TextColor3 = Color3.new(1,1,1)
		pages[index].Visible = true
		selectedTab = index
	end)

	return btn
end

local function createPage()
	local page = Instance.new("Frame")
	page.Size = UDim2.new(1, -20, 1, -64)
	page.Position = UDim2.new(0, 10, 0, 64)
	page.BackgroundTransparency = 1
	page.Visible = false
	page.Parent = gui

	local layout = Instance.new("UIListLayout")
	layout.Padding = UDim.new(0, 8)
	layout.SortOrder = Enum.SortOrder.LayoutOrder
	layout.Parent = page

	return page
end

for i, name in ipairs(tabNames) do
	tabButtons[i] = createTab(name, i)
	pages[i] = createPage()
end
tabButtons[1].BackgroundColor3 = Color3.fromRGB(70,70,70)
tabButtons[1].TextColor3 = Color3.new(1,1,1)
pages[1].Visible = true

-- Utility UI functions
local function createToggleButton(text, parent, default, callback)
	local frame = Instance.new("Frame")
	frame.Size = UDim2.new(1, 0, 0, 32)
	frame.BackgroundTransparency = 1
	frame.Parent = parent

	local label = Instance.new("TextLabel")
	label.Size = UDim2.new(0.7, 0, 1, 0)
	label.BackgroundTransparency = 1
	label.Text = text
	label.TextColor3 = Color3.new(1,1,1)
	label.Font = Enum.Font.SourceSansSemibold
	label.TextSize = 14
	label.TextXAlignment = Enum.TextXAlignment.Left
	label.Parent = frame

	local btn = Instance.new("TextButton")
	btn.Size = UDim2.new(0, 40, 0, 24)
	btn.Position = UDim2.new(0.75, 0, 0.15, 0)
	btn.BackgroundColor3 = default and Color3.fromRGB(60, 180, 75) or Color3.fromRGB(70, 70, 70)
	btn.BorderSizePixel = 0
	btn.Text = default and "ON" or "OFF"
	btn.TextColor3 = Color3.new(1,1,1)
	btn.Font = Enum.Font.SourceSansSemibold
	btn.TextSize = 14
	btn.AutoButtonColor = false
	Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6)
	btn.Parent = frame

	local toggled = default

	btn.MouseButton1Click:Connect(function()
		toggled = not toggled
		btn.BackgroundColor3 = toggled and Color3.fromRGB(60, 180, 75) or Color3.fromRGB(70, 70, 70)
		btn.Text = toggled and "ON" or "OFF"
		callback(toggled)
	end)

	return btn
end

local function createSlider(text, parent, min, max, default, callback)
	local frame = Instance.new("Frame")
	frame.Size = UDim2.new(1, 0, 0, 32)
	frame.BackgroundTransparency = 1
	frame.Parent = parent

	local label = Instance.new("TextLabel")
	label.Size = UDim2.new(0.5, 0, 1, 0)
	label.BackgroundTransparency = 1
	label.Text = text .. ": " .. tostring(default)
	label.TextColor3 = Color3.new(1,1,1)
	label.Font = Enum.Font.SourceSansSemibold
	label.TextSize = 14
	label.TextXAlignment = Enum.TextXAlignment.Left
	label.Parent = frame

	local sliderFrame = Instance.new("Frame")
	sliderFrame.Size = UDim2.new(0.4, 0, 0.4, 0)
	sliderFrame.Position = UDim2.new(0.55, 0, 0.3, 0)
	sliderFrame.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
	sliderFrame.BorderSizePixel = 0
	sliderFrame.Parent = frame
	Instance.new("UICorner", sliderFrame).CornerRadius = UDim.new(0, 6)

	local sliderFill = Instance.new("Frame")
	sliderFill.Size = UDim2.new((default - min) / (max - min), 0, 1, 0)
	sliderFill.BackgroundColor3 = Color3.fromRGB(70, 130, 230)
	sliderFill.BorderSizePixel = 0
	sliderFill.Parent = sliderFrame
	Instance.new("UICorner", sliderFill).CornerRadius = UDim.new(0, 6)

	local dragging = false

	local function updateSlider(inputPosX)
		local relativeX = math.clamp(inputPosX - sliderFrame.AbsolutePosition.X, 0, sliderFrame.AbsoluteSize.X)
		local percent = relativeX / sliderFrame.AbsoluteSize.X
		local value = min + (max - min) * percent
		value = math.floor(value*100)/100
		sliderFill.Size = UDim2.new(percent, 0, 1, 0)
		label.Text = text .. ": " .. tostring(value)
		callback(value)
	end

	sliderFrame.InputBegan:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			dragging = true
			updateSlider(input.Position.X)
		end
	end)
	sliderFrame.InputEnded:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			dragging = false
		end
	end)
	sliderFrame.InputChanged:Connect(function(input)
		if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
			updateSlider(input.Position.X)
		end
	end)

	return frame
end

local function createColorButton(color, parent, callback)
	local btn = Instance.new("TextButton")
	btn.Size = UDim2.new(0, 32, 0, 32)
	btn.BackgroundColor3 = color
	btn.BorderSizePixel = 0
	btn.AutoButtonColor = false
	btn.Parent = parent
	Instance.new("UICorner", btn).CornerRadius = UDim.new(0, 6)

	btn.MouseButton1Click:Connect(function()
		callback(color)
	end)
	return btn
end

-- Variables
local highlightEnabled = false
local highlightOutlineColor = Color3.new(0, 1, 0)
local highlightFillColor = Color3.new(0, 1, 0)
local highlightObjects = {}

local aimbotEnabled = false
local fovRadius = 100
local smoothFactor = 0.3
local aiming = false

-- Highlight ESP logic
local function createHighlight(player)
	local hl = Instance.new("Highlight")
	hl.Name = "HighlightESP"
	hl.FillColor = highlightFillColor
	hl.OutlineColor = highlightOutlineColor
	hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
	hl.Parent = player.Character
	return hl
end

local function updateHighlights()
	-- Remove highlights for players that left or disabled
	for plr, hl in pairs(highlightObjects) do
		if not highlightEnabled or not plr.Character or not plr.Character:FindFirstChild("HumanoidRootPart") then
			hl:Destroy()
			highlightObjects[plr] = nil
		end
	end
	-- Add highlights
	if highlightEnabled then
		for _, player in pairs(Players:GetPlayers()) do
			if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
				if not highlightObjects[player] then
					highlightObjects[player] = createHighlight(player)
				end
				local hl = highlightObjects[player]
				hl.FillColor = highlightFillColor
				hl.OutlineColor = highlightOutlineColor
			end
		end
	end
end

Players.PlayerRemoving:Connect(function(player)
	if highlightObjects[player] then
		highlightObjects[player]:Destroy()
		highlightObjects[player] = nil
	end
end)

-- Aimbot functions
local function getClosestTarget()
	local mousePos = UserInputService:GetMouseLocation()
	local closestPlayer = nil
	local closestDistance = fovRadius
	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.Humanoid.Health > 0 then
			local pos, onScreen = Camera:WorldToViewportPoint(player.Character.HumanoidRootPart.Position)
			if onScreen then
				local screenPos = Vector2.new(pos.X, pos.Y)
				local dist = (screenPos - Vector2.new(mousePos.X, mousePos.Y)).Magnitude
				if dist < closestDistance then
					closestDistance = dist
					closestPlayer = player
				end
			end
		end
	end
	return closestPlayer
end

-- UI Elements for Aimbot tab
local aimbotToggle = createToggleButton("Enable Aimbot", pages[1], false, function(state)
	aimbotEnabled = state
end)

local fovSlider = createSlider("FOV Radius", pages[1], 50, 300, 100, function(value)
	fovRadius = value
end)

local smoothSlider = createSlider("Smoothness", pages[1], 0.01, 1, 0.3, function(value)
	smoothFactor = value
end)

-- FOV circle
local fovCircle = Instance.new("Frame")
fovCircle.Size = UDim2.new(0, fovRadius * 2, 0, fovRadius * 2)
fovCircle.AnchorPoint = Vector2.new(0.5, 0.5)
fovCircle.BackgroundColor3 = Color3.fromRGB(70, 130, 230)
fovCircle.BackgroundTransparency = 0.7
fovCircle.BorderSizePixel = 0
fovCircle.Visible = false
fovCircle.Parent = screenGui
Instance.new("UICorner", fovCircle).CornerRadius = UDim.new(1, 0)

UserInputService.InputBegan:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton2 then -- RMB down
		if aimbotEnabled then aiming = true end
	end
end)
UserInputService.InputEnded:Connect(function(input)
	if input.UserInputType == Enum.UserInputType.MouseButton2 then -- RMB up
		aiming = false
	end
end)

-- Highlight ESP UI
local espToggle = createToggleButton("Highlight ESP", pages[2], false, function(state)
	highlightEnabled = state
	if not state then
		for _, hl in pairs(highlightObjects) do
			hl:Destroy()
		end
		highlightObjects = {}
	else
		updateHighlights()
	end
end)

local outlineColorLabel = Instance.new("TextLabel")
outlineColorLabel.Size = UDim2.new(1, 0, 0, 18)
outlineColorLabel.BackgroundTransparency = 1
outlineColorLabel.Text = "Outline Color:"
outlineColorLabel.TextColor3 = Color3.new(1,1,1)
outlineColorLabel.Font = Enum.Font.SourceSansSemibold
outlineColorLabel.TextSize = 14
outlineColorLabel.TextXAlignment = Enum.TextXAlignment.Left
outlineColorLabel.Parent = pages[2]

local outlineColors = {
	Color3.fromRGB(0, 255, 0),
	Color3.fromRGB(255, 0, 0),
	Color3.fromRGB(0, 0, 255),
	Color3.fromRGB(255, 255, 0),
	Color3.fromRGB(255, 165, 0),
}

local outlineColorButtons = Instance.new("Frame")
outlineColorButtons.Size = UDim2.new(1, 0, 0, 40)
outlineColorButtons.BackgroundTransparency = 1
outlineColorButtons.Parent = pages[2]

for i, color in ipairs(outlineColors) do
	local btn = createColorButton(color, outlineColorButtons, function(c)
		highlightOutlineColor = c
		updateHighlights()
	end)
	btn.Position = UDim2.new(0, (i-1)*38, 0, 0)
end

local fillColorLabel = Instance.new("TextLabel")
fillColorLabel.Size = UDim2.new(1, 0, 0, 18)
fillColorLabel.BackgroundTransparency = 1
fillColorLabel.Text = "Fill Color:"
fillColorLabel.TextColor3 = Color3.new(1,1,1)
fillColorLabel.Font = Enum.Font.SourceSansSemibold
fillColorLabel.TextSize = 14
fillColorLabel.TextXAlignment = Enum.TextXAlignment.Left
fillColorLabel.Parent = pages[2]

local fillColors = {
	Color3.fromRGB(0, 255, 0),
	Color3.fromRGB(255, 0, 0),
	Color3.fromRGB(0, 0, 255),
	Color3.fromRGB(255, 255, 0),
	Color3.fromRGB(255, 165, 0),
}

local fillColorButtons = Instance.new("Frame")
fillColorButtons.Size = UDim2.new(1, 0, 0, 40)
fillColorButtons.BackgroundTransparency = 1
fillColorButtons.Parent = pages[2]

for i, color in ipairs(fillColors) do
	local btn = createColorButton(color, fillColorButtons, function(c)
		highlightFillColor = c
		updateHighlights()
	end)
	btn.Position = UDim2.new(0, (i-1)*38, 0, 0)
end

-- Misc tab example (empty)
local miscLabel = Instance.new("TextLabel")
miscLabel.Size = UDim2.new(1, 0, 0, 30)
miscLabel.BackgroundTransparency = 1
miscLabel.Text = "Misc tab content here."
miscLabel.TextColor3 = Color3.new(1,1,1)
miscLabel.Font = Enum.Font.SourceSansSemibold
miscLabel.TextSize = 16
miscLabel.Parent = pages[3]

-- Settings tab example (empty)
local settingsLabel = Instance.new("TextLabel")
settingsLabel.Size = UDim2.new(1, 0, 0, 30)
settingsLabel.BackgroundTransparency = 1
settingsLabel.Text = "Settings tab content here."
settingsLabel.TextColor3 = Color3.new(1,1,1)
settingsLabel.Font = Enum.Font.SourceSansSemibold
settingsLabel.TextSize = 16
settingsLabel.Parent = pages[4]

-- Main loop
RunService.RenderStepped:Connect(function()
	if aimbotEnabled and aiming then
		local target = getClosestTarget()
		if target and target.Character and target.Character:FindFirstChild("Head") then
			local headPos = target.Character.Head.Position
			local cameraCFrame = Camera.CFrame
			local desiredCFrame = CFrame.new(cameraCFrame.Position, headPos)
			Camera.CFrame = cameraCFrame:Lerp(desiredCFrame, smoothFactor)
		end
	end

	if fovCircle then
		local mousePos = UserInputService:GetMouseLocation()
		fovCircle.Position = UDim2.new(0, mousePos.X, 0, mousePos.Y)
		fovCircle.Size = UDim2.new(0, fovRadius * 2, 0, fovRadius * 2)
		fovCircle.Visible = aimbotEnabled
	end

	updateHighlights()
end)

Features & Information

Esp and aimbot Rate 1-10 pls
#Esp#Aimbot

Community Comments (3)

ibanezryancollinsibanezryancollinsMay 30, 2025

nice one man

SY_DarknessSY_DarknessMay 30, 2025

local script?

iyreiyreMay 30, 2025

scriptblox should really start banning AI generated slop like this

More Scripts for Universal Scripts