ESP player and item
Key Required

ESP player and item

The ButtonRianzuerRianzuer 818 views 89 executesUpdated Apr 10, 2026
Unrated
00
Lua Script•245 lines (6100 chars)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer

-- ✅ ITEM LIST
local itemData = {
	Briefcase = "Utility",
	Adrenaline = "Medical",
	Bandage = "Medical",
	Medkit = "Medical",
	L106 = "Gun",
	M4A1 = "Gun",
	["As-Val"] = "Gun",
	["AK-74M"] = "Gun",
	Sledge = "Melee",
	Knife = "Melee",
	Shield = "Utility",
	Barricade = "Utility",
	Lock = "Utility",
	Vest = "Utility",
	Landmine = "Landmine",
	Tactical = "Utility",
	Katana = "Melee"
}

-- 🎨 COLORS
local colors = {
	Gun = Color3.fromRGB(255, 60, 60),
	Medical = Color3.fromRGB(60, 255, 100),
	Melee = Color3.fromRGB(255, 170, 0),
	Utility = Color3.fromRGB(255, 255, 0),
	Landmine = Color3.fromRGB(255, 0, 100)
}

local ESP_ENABLED = true

-- 📱 MOBILE UI (NO DRAG / NO REMOVE)
local function createMobileToggle()
	if not UserInputService.TouchEnabled then return end

	local gui = Instance.new("ScreenGui")
	gui.Name = "ESP_Toggle"
	gui.ResetOnSpawn = false
	gui.Parent = player:WaitForChild("PlayerGui")

	local frame = Instance.new("Frame")
	frame.Size = UDim2.new(0, 140, 0, 50)
	frame.Position = UDim2.new(0, 20, 0.8, 0)
	frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
	frame.Parent = gui

	local button = Instance.new("TextButton")
	button.Size = UDim2.new(1, 0, 1, 0)
	button.Text = "ESP: ON!"
	button.BackgroundTransparency = 1
	button.TextColor3 = Color3.new(1,1,1)
	button.Parent = frame

	button.MouseButton1Click:Connect(function()
		ESP_ENABLED = not ESP_ENABLED
		button.Text = ESP_ENABLED and "ESP: ON!" or "ESP: OFF"
	end)
end

createMobileToggle()

-- 🖥️ PC NOTIFICATION
if not UserInputService.TouchEnabled then
	game:GetService("StarterGui"):SetCore("SendNotification", {
		Title = "ESP",
		Text = "Press [E] to toggle ESP",
		Duration = 5
	})
end

-- 🖥️ PC TOGGLE
UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then return end
	if input.KeyCode == Enum.KeyCode.E then
		ESP_ENABLED = not ESP_ENABLED
	end
end)

-- 🔍 Check if inside player
local function isInPlayer(obj)
	local model = obj:FindFirstAncestorOfClass("Model")
	return model and Players:GetPlayerFromCharacter(model)
end

-- 💣 LANDMINE DETECTOR
local function isLandmine(part)
	if not part:IsA("BasePart") then return false end

	local minefield = workspace:FindFirstChild("Minefield")
	if not minefield or not part:IsDescendantOf(minefield) then return false end

	if string.find(string.lower(part.Name), "mine") then
		return true
	end

	if part.Size.Magnitude < 6 and part.Transparency > 0.5 then
		return true
	end

	if part:FindFirstAncestor("LandmineSpawner") then
		return true
	end

	return false
end

-- 💣 LANDMINE ESP
local function createLandmineESP(part)
	if part:FindFirstChild("ItemESP") then return end

	local billboard = Instance.new("BillboardGui")
	billboard.Name = "ItemESP"
	billboard.Size = UDim2.new(0, 140, 0, 35)
	billboard.AlwaysOnTop = true
	billboard.StudsOffset = Vector3.new(0, 1.5, 0)
	billboard.Parent = part

	local text = Instance.new("TextLabel")
	text.Size = UDim2.new(1, 0, 1, 0)
	text.BackgroundTransparency = 1
	text.TextScaled = true
	text.Font = Enum.Font.SourceSansBold
	text.TextStrokeTransparency = 0
	text.TextColor3 = colors.Landmine
	text.Text = "Landmine"
	text.Parent = billboard
end

-- 🏷️ NORMAL ESP
local function createESP(part, itemName)
	if part:FindFirstChild("ItemESP") then return end

	local typeName = itemData[itemName]
	if not typeName then return end

	local billboard = Instance.new("BillboardGui")
	billboard.Name = "ItemESP"
	billboard.Size = UDim2.new(0, 160, 0, 40)
	billboard.AlwaysOnTop = true
	billboard.StudsOffset = Vector3.new(0, 2.5, 0)
	billboard.Parent = part

	local text = Instance.new("TextLabel")
	text.Size = UDim2.new(1, 0, 1, 0)
	text.BackgroundTransparency = 1
	text.TextScaled = true
	text.Font = Enum.Font.SourceSansBold
	text.TextStrokeTransparency = 0
	text.TextColor3 = colors[typeName]
	text.Parent = billboard
end

-- 🔄 MAIN LOOP
RunService.RenderStepped:Connect(function()
	local char = player.Character
	if not char or not char:FindFirstChild("HumanoidRootPart") then return end

	local root = char.HumanoidRootPart.Position

	-- 💣 LANDMINES
	local minefield = workspace:FindFirstChild("Minefield")
	if minefield then
		for _, obj in pairs(minefield:GetDescendants()) do
			if isLandmine(obj) then
				createLandmineESP(obj)

				local esp = obj:FindFirstChild("ItemESP")
				if esp then
					esp.Enabled = ESP_ENABLED

					local dist = (root - obj.Position).Magnitude
					local label = esp:FindFirstChildOfClass("TextLabel")

					if label then
						label.Text = "Landmine [" .. math.floor(dist) .. "m]"
					end
				end
			end
		end
	end

	-- 📦 ITEMS
	for _, obj in pairs(workspace:GetDescendants()) do
		local itemType = itemData[obj.Name]
		if itemType and not isInPlayer(obj) then

			local part

			if obj:IsA("Tool") then
				part = obj:FindFirstChild("Handle") or obj:FindFirstChildWhichIsA("BasePart", true)
			elseif obj:IsA("BasePart") then
				part = obj
			elseif obj:IsA("Model") then
				part = obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart", true)
			end

			if part then
				createESP(part, obj.Name)

				local esp = part:FindFirstChild("ItemESP")
				if esp then
					esp.Enabled = ESP_ENABLED

					local dist = (root - part.Position).Magnitude
					local label = esp:FindFirstChildOfClass("TextLabel")

					if label then
						label.Text = obj.Name .. " [" .. math.floor(dist) .. "m]"
					end
				end
			end
		end
	end
end)

-- 🔁 NEW OBJECTS
workspace.DescendantAdded:Connect(function(obj)

	if isLandmine(obj) then
		createLandmineESP(obj)
	end

	if itemData[obj.Name] and not isInPlayer(obj) then
		local part

		if obj:IsA("Tool") then
			part = obj:FindFirstChild("Handle") or obj:FindFirstChildWhichIsA("BasePart", true)
		elseif obj:IsA("BasePart") then
			part = obj
		elseif obj:IsA("Model") then
			part = obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart", true)
		end

		if part then
			createESP(part, obj.Name)
		end
	end
end)

Features & Information

ESP PLAYER HEALTH AND ESP ITEM

Community Comments (1)

FSOCIETYHUBFSOCIETYHUBJun 28, 2026

holy ai💥

More Scripts for The Button