FE Player Tracker GUI
Key RequiredUniversal

FE Player Tracker GUI

Universal Scriptddorredoreddorredore 1.6K views 311 executesUpdated Mar 27, 2026
Unrated
00
Lua Script•478 lines (14093 chars)
--// Player Tracker GUI
--// Put this LocalScript in StarterPlayerScripts or StarterGui
--// Local-only tracker GUI

local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local player = Players.LocalPlayer

--========================
-- EDIT HERE
--========================
local guiTitle = "Player Tracker"
local trackButtonText = "Track Nearest"
local smallButtonText = "Open"
local listTitleText = "Players:"
local updateRate = 0.15 -- lower = faster refresh
--========================

local tracking = false
local selectedPlayer = nil
local selectedCharacter = nil
local selectedRoot = nil

local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

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

local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 320, 0, 360)
mainFrame.Position = UDim2.new(0.5, -160, 0.5, -180)
mainFrame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
mainFrame.BorderSizePixel = 0
mainFrame.Active = true
mainFrame.ClipsDescendants = true
mainFrame.Parent = screenGui

local mainCorner = Instance.new("UICorner")
mainCorner.CornerRadius = UDim.new(0, 12)
mainCorner.Parent = mainFrame

local titleBar = Instance.new("TextLabel")
titleBar.Size = UDim2.new(1, 0, 0, 35)
titleBar.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
titleBar.BorderSizePixel = 0
titleBar.Text = guiTitle
titleBar.TextColor3 = Color3.fromRGB(255, 255, 255)
titleBar.TextScaled = true
titleBar.Font = Enum.Font.GothamBold
titleBar.Parent = mainFrame

local titleCorner = Instance.new("UICorner")
titleCorner.CornerRadius = UDim.new(0, 12)
titleCorner.Parent = titleBar

local hideButton = Instance.new("TextButton")
hideButton.Size = UDim2.new(0, 60, 0, 25)
hideButton.Position = UDim2.new(1, -65, 0, 5)
hideButton.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
hideButton.Text = "Hide"
hideButton.TextColor3 = Color3.fromRGB(255, 255, 255)
hideButton.TextScaled = true
hideButton.Font = Enum.Font.Gotham
hideButton.BorderSizePixel = 0
hideButton.Parent = mainFrame

local hideCorner = Instance.new("UICorner")
hideCorner.CornerRadius = UDim.new(0, 8)
hideCorner.Parent = hideButton

local closeButton = Instance.new("TextButton")
closeButton.Size = UDim2.new(0, 25, 0, 25)
closeButton.Position = UDim2.new(1, -30, 0, 5)
closeButton.BackgroundColor3 = Color3.fromRGB(170, 50, 50)
closeButton.Text = "X"
closeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
closeButton.TextScaled = true
closeButton.Font = Enum.Font.GothamBold
closeButton.BorderSizePixel = 0
closeButton.Parent = mainFrame

local closeCorner = Instance.new("UICorner")
closeCorner.CornerRadius = UDim.new(0, 8)
closeCorner.Parent = closeButton

local infoLabel = Instance.new("TextLabel")
infoLabel.Size = UDim2.new(1, -20, 0, 28)
infoLabel.Position = UDim2.new(0, 10, 0, 45)
infoLabel.BackgroundTransparency = 1
infoLabel.Text = "Target: None"
infoLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
infoLabel.TextScaled = true
infoLabel.Font = Enum.Font.GothamBold
infoLabel.Parent = mainFrame

local distanceLabel = Instance.new("TextLabel")
distanceLabel.Size = UDim2.new(1, -20, 0, 24)
distanceLabel.Position = UDim2.new(0, 10, 0, 75)
distanceLabel.BackgroundTransparency = 1
distanceLabel.Text = "Distance: --"
distanceLabel.TextColor3 = Color3.fromRGB(220, 220, 220)
distanceLabel.TextScaled = true
distanceLabel.Font = Enum.Font.Gotham
distanceLabel.Parent = mainFrame

local directionLabel = Instance.new("TextLabel")
directionLabel.Size = UDim2.new(1, -20, 0, 24)
directionLabel.Position = UDim2.new(0, 10, 0, 100)
directionLabel.BackgroundTransparency = 1
directionLabel.Text = "Direction: --"
directionLabel.TextColor3 = Color3.fromRGB(220, 220, 220)
directionLabel.TextScaled = true
directionLabel.Font = Enum.Font.Gotham
directionLabel.Parent = mainFrame

local statusLabel = Instance.new("TextLabel")
statusLabel.Size = UDim2.new(1, -20, 0, 24)
statusLabel.Position = UDim2.new(0, 10, 0, 125)
statusLabel.BackgroundTransparency = 1
statusLabel.Text = "Status: Idle"
statusLabel.TextColor3 = Color3.fromRGB(180, 180, 180)
statusLabel.TextScaled = true
statusLabel.Font = Enum.Font.Gotham
statusLabel.Parent = mainFrame

local trackButton = Instance.new("TextButton")
trackButton.Size = UDim2.new(1, -20, 0, 32)
trackButton.Position = UDim2.new(0, 10, 0, 155)
trackButton.BackgroundColor3 = Color3.fromRGB(50, 120, 50)
trackButton.Text = trackButtonText
trackButton.TextColor3 = Color3.fromRGB(255, 255, 255)
trackButton.TextScaled = true
trackButton.Font = Enum.Font.GothamBold
trackButton.BorderSizePixel = 0
trackButton.Parent = mainFrame

local trackCorner = Instance.new("UICorner")
trackCorner.CornerRadius = UDim.new(0, 10)
trackCorner.Parent = trackButton

local nearestButton = Instance.new("TextButton")
nearestButton.Size = UDim2.new(0.5, -15, 0, 28)
nearestButton.Position = UDim2.new(0, 10, 0, 193)
nearestButton.BackgroundColor3 = Color3.fromRGB(80, 80, 150)
nearestButton.Text = "Select Nearest"
nearestButton.TextColor3 = Color3.fromRGB(255, 255, 255)
nearestButton.TextScaled = true
nearestButton.Font = Enum.Font.GothamBold
nearestButton.BorderSizePixel = 0
nearestButton.Parent = mainFrame

local nearestCorner = Instance.new("UICorner")
nearestCorner.CornerRadius = UDim.new(0, 10)
nearestCorner.Parent = nearestButton

local clearButton = Instance.new("TextButton")
clearButton.Size = UDim2.new(0.5, -15, 0, 28)
clearButton.Position = UDim2.new(0.5, 5, 0, 193)
clearButton.BackgroundColor3 = Color3.fromRGB(120, 80, 40)
clearButton.Text = "Clear Target"
clearButton.TextColor3 = Color3.fromRGB(255, 255, 255)
clearButton.TextScaled = true
clearButton.Font = Enum.Font.GothamBold
clearButton.BorderSizePixel = 0
clearButton.Parent = mainFrame

local clearCorner = Instance.new("UICorner")
clearCorner.CornerRadius = UDim.new(0, 10)
clearCorner.Parent = clearButton

local listHeader = Instance.new("TextLabel")
listHeader.Size = UDim2.new(1, -20, 0, 22)
listHeader.Position = UDim2.new(0, 10, 0, 228)
listHeader.BackgroundTransparency = 1
listHeader.Text = listTitleText
listHeader.TextColor3 = Color3.fromRGB(255, 255, 255)
listHeader.TextScaled = true
listHeader.Font = Enum.Font.GothamBold
listHeader.Parent = mainFrame

local listFrame = Instance.new("ScrollingFrame")
listFrame.Size = UDim2.new(1, -20, 0, 95)
listFrame.Position = UDim2.new(0, 10, 0, 252)
listFrame.BackgroundColor3 = Color3.fromRGB(32, 32, 32)
listFrame.BorderSizePixel = 0
listFrame.ScrollBarThickness = 5
listFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
listFrame.Parent = mainFrame

local listCorner = Instance.new("UICorner")
listCorner.CornerRadius = UDim.new(0, 10)
listCorner.Parent = listFrame

local listLayout = Instance.new("UIListLayout")
listLayout.Padding = UDim.new(0, 4)
listLayout.SortOrder = Enum.SortOrder.LayoutOrder
listLayout.Parent = listFrame

local listPadding = Instance.new("UIPadding")
listPadding.PaddingTop = UDim.new(0, 6)
listPadding.PaddingBottom = UDim.new(0, 6)
listPadding.PaddingLeft = UDim.new(0, 6)
listPadding.PaddingRight = UDim.new(0, 6)
listPadding.Parent = listFrame

local smallButton = Instance.new("TextButton")
smallButton.Size = UDim2.new(0, 70, 0, 30)
smallButton.Position = UDim2.new(0, 10, 0.5, -15)
smallButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
smallButton.Text = smallButtonText
smallButton.TextColor3 = Color3.fromRGB(255, 255, 255)
smallButton.TextScaled = true
smallButton.Font = Enum.Font.GothamBold
smallButton.BorderSizePixel = 0
smallButton.Visible = false
smallButton.Active = true
smallButton.Parent = screenGui

local smallCorner = Instance.new("UICorner")
smallCorner.CornerRadius = UDim.new(0, 10)
smallCorner.Parent = smallButton

local function updateCharacter()
	character = player.Character or player.CharacterAdded:Wait()
	humanoidRootPart = character:WaitForChild("HumanoidRootPart")
end

player.CharacterAdded:Connect(function()
	task.wait(1)
	updateCharacter()
end)

local function getRootFromPlayer(plr)
	if plr and plr.Character then
		return plr.Character:FindFirstChild("HumanoidRootPart")
	end
	return nil
end

local function getNearestPlayer()
	if not humanoidRootPart then return nil end

	local nearest = nil
	local nearestDistance = math.huge

	for _, plr in ipairs(Players:GetPlayers()) do
		if plr ~= player and plr.Character then
			local root = plr.Character:FindFirstChild("HumanoidRootPart")
			local hum = plr.Character:FindFirstChildOfClass("Humanoid")
			if root and hum and hum.Health > 0 then
				local dist = (root.Position - humanoidRootPart.Position).Magnitude
				if dist < nearestDistance then
					nearestDistance = dist
					nearest = plr
				end
			end
		end
	end

	return nearest, nearestDistance
end

local function clearPlayerList()
	for _, child in ipairs(listFrame:GetChildren()) do
		if child:IsA("TextButton") then
			child:Destroy()
		end
	end
end

local function rebuildPlayerList()
	clearPlayerList()

	local y = 0
	for _, plr in ipairs(Players:GetPlayers()) do
		if plr ~= player then
			local btn = Instance.new("TextButton")
			btn.Size = UDim2.new(1, 0, 0, 28)
			btn.Position = UDim2.new(0, 0, 0, y)
			btn.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
			btn.TextColor3 = Color3.fromRGB(255, 255, 255)
			btn.TextScaled = true
			btn.Font = Enum.Font.Gotham
			btn.BorderSizePixel = 0
			btn.Text = plr.Name
			btn.Parent = listFrame

			local c = Instance.new("UICorner")
			c.CornerRadius = UDim.new(0, 8)
			c.Parent = btn

			btn.MouseButton1Click:Connect(function()
				selectedPlayer = plr
				selectedRoot = getRootFromPlayer(plr)
				infoLabel.Text = "Target: " .. plr.Name
				statusLabel.Text = "Status: Tracking selected player"
			end)

			y += 32
		end
	end

	listFrame.CanvasSize = UDim2.new(0, 0, 0, y)
end

local function setTrackingState(on)
	tracking = on
	if tracking then
		trackButton.Text = "Stop Tracking"
		trackButton.BackgroundColor3 = Color3.fromRGB(150, 60, 60)
		statusLabel.Text = "Status: Tracking..."
	else
		trackButton.Text = trackButtonText
		trackButton.BackgroundColor3 = Color3.fromRGB(50, 120, 50)
		statusLabel.Text = "Status: Idle"
	end
end

local function getDirectionText(targetPos)
	if not humanoidRootPart then
		return "--"
	end

	local delta = targetPos - humanoidRootPart.Position
	local x = delta.X
	local z = delta.Z

	if math.abs(x) < 2 and math.abs(z) < 2 then
		return "Very Close"
	end

	if math.abs(x) > math.abs(z) then
		return x > 0 and "Right" or "Left"
	else
		return z > 0 and "Forward" or "Back"
	end
end

trackButton.MouseButton1Click:Connect(function()
	setTrackingState(not tracking)
end)

nearestButton.MouseButton1Click:Connect(function()
	local nearest = getNearestPlayer()
	if nearest then
		selectedPlayer = nearest
		selectedRoot = getRootFromPlayer(nearest)
		infoLabel.Text = "Target: " .. nearest.Name
		statusLabel.Text = "Status: Selected nearest player"
	else
		selectedPlayer = nil
		selectedRoot = nil
		infoLabel.Text = "Target: None"
		statusLabel.Text = "Status: No players found"
	end
end)

clearButton.MouseButton1Click:Connect(function()
	selectedPlayer = nil
	selectedRoot = nil
	infoLabel.Text = "Target: None"
	distanceLabel.Text = "Distance: --"
	directionLabel.Text = "Direction: --"
	statusLabel.Text = "Status: Idle"
end)

hideButton.MouseButton1Click:Connect(function()
	mainFrame.Visible = false
	smallButton.Visible = true
end)

smallButton.MouseButton1Click:Connect(function()
	mainFrame.Visible = true
	smallButton.Visible = false
end)

closeButton.MouseButton1Click:Connect(function()
	screenGui:Destroy()
end)

Players.PlayerAdded:Connect(function()
	task.wait(0.2)
	rebuildPlayerList()
end)

Players.PlayerRemoving:Connect(function(plr)
	if selectedPlayer == plr then
		selectedPlayer = nil
		selectedRoot = nil
	end
	task.wait(0.2)
	rebuildPlayerList()
end)

task.spawn(function()
	while screenGui.Parent do
		updateCharacter()

		if tracking then
			if not selectedPlayer or not selectedPlayer.Parent then
				local nearest = getNearestPlayer()
				if nearest then
					selectedPlayer = nearest
					selectedRoot = getRootFromPlayer(nearest)
				end
			else
				selectedRoot = getRootFromPlayer(selectedPlayer)
			end

			if selectedPlayer and selectedRoot and humanoidRootPart then
				local dist = (selectedRoot.Position - humanoidRootPart.Position).Magnitude
				infoLabel.Text = "Target: " .. selectedPlayer.Name
				distanceLabel.Text = "Distance: " .. string.format("%.1f", dist)
				directionLabel.Text = "Direction: " .. getDirectionText(selectedRoot.Position)
				statusLabel.Text = "Status: Tracking " .. selectedPlayer.Name
			else
				infoLabel.Text = "Target: None"
				distanceLabel.Text = "Distance: --"
				directionLabel.Text = "Direction: --"
				statusLabel.Text = "Status: Waiting for target..."
			end
		end

		task.wait(updateRate)
	end
end)

rebuildPlayerList()

-- Draggable for mobile and PC
local function makeDraggable(guiObject)
	local dragging = false
	local dragInput
	local dragStart
	local startPos

	guiObject.InputBegan:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseButton1
			or input.UserInputType == Enum.UserInputType.Touch then
			dragging = true
			dragStart = input.Position
			startPos = guiObject.Position

			input.Changed:Connect(function()
				if input.UserInputState == Enum.UserInputState.End then
					dragging = false
				end
			end)
		end
	end)

	guiObject.InputChanged:Connect(function(input)
		if input.UserInputType == Enum.UserInputType.MouseMovement
			or input.UserInputType == Enum.UserInputType.Touch then
			dragInput = input
		end
	end)

	UserInputService.InputChanged:Connect(function(input)
		if input == dragInput and dragging then
			local delta = input.Position - dragStart
			guiObject.Position = UDim2.new(
				startPos.X.Scale,
				startPos.X.Offset + delta.X,
				startPos.Y.Scale,
				startPos.Y.Offset + delta.Y
			)
		end
	end)
end

makeDraggable(mainFrame)
makeDraggable(smallButton)

Features & Information

-- Player Tracker GUI | Open Source -- Local-only tracker GUI for Roblox -- Created by: Me -- Mobile & PC friendly, draggable GUI -- Features: -- • Track nearest player -- • Select & clear target -- • Shows distance & direction -- • Live player list -- • Hide & show GUI -- • Fully open-source, credit required

Community Comments (1)

fastlivefastliveJul 20, 2026

holy ai

More Scripts for Universal Scripts