--========================================================
-- 🎯 X-RAY ESP V13
-- Pour ton propre jeu Roblox
--========================================================
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local HttpService = game:GetService("HttpService")
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
--========================================================
-- CONFIG
--========================================================
local ESPEnabled = false
local ShowName = true
local ShowUsername = true
local ShowDistance = true
local ShowInventory = true
local ShowEquippedTool = true
local ShowHealth = true
local PlayerColor = Color3.fromRGB(255, 60, 60)
local OutlineColor = Color3.fromRGB(255, 255, 255)
local BlacklistColor = Color3.fromRGB(255, 170, 0)
local AlertDistance = 10
local Favorites = {}
local Blacklist = {}
local Highlights = {}
local InfoGuis = {}
local AlertCooldown = {}
local Spectating = false
local SpectatedPlayer = nil
local SpectateIndex = 1
local CurrentTheme = "Dark"
local SelectedPlayer = nil
local function GetPlatformName()
if UserInputService.TouchEnabled and not UserInputService.KeyboardEnabled then return "📱 Mobile" end
if UserInputService.GamepadEnabled and not UserInputService.KeyboardEnabled then return "🎮 Console" end
if UserInputService.KeyboardEnabled then return "🖥️ PC" end
return "❓ Inconnue"
end
local LocalPlatform = GetPlatformName()
-- Sauvegarde dans les attributs du joueur : valable pendant sa session.
-- Une sauvegarde entre deux sessions nécessite DataStore côté serveur.
local function SaveSettingsSession()
local data = {ESPEnabled=ESPEnabled,ShowName=ShowName,ShowUsername=ShowUsername,ShowDistance=ShowDistance,ShowInventory=ShowInventory,ShowEquippedTool=ShowEquippedTool,ShowHealth=ShowHealth,CurrentTheme=CurrentTheme,PlayerColor={PlayerColor.R,PlayerColor.G,PlayerColor.B},OutlineColor={OutlineColor.R,OutlineColor.G,OutlineColor.B}}
pcall(function() LocalPlayer:SetAttribute("XRayESP_Settings",HttpService:JSONEncode(data)) end)
end
--========================================================
-- THEMES
--========================================================
local Themes = {
Dark = {
Background = Color3.fromRGB(18, 18, 23),
Secondary = Color3.fromRGB(27, 27, 34),
Panel = Color3.fromRGB(35, 35, 44),
Button = Color3.fromRGB(48, 48, 59),
Hover = Color3.fromRGB(60, 60, 72),
Text = Color3.fromRGB(255, 255, 255),
SubText = Color3.fromRGB(180, 180, 190),
Accent = Color3.fromRGB(100, 120, 255),
Success = Color3.fromRGB(55, 180, 100),
Danger = Color3.fromRGB(210, 55, 55)
},
Blue = {
Background = Color3.fromRGB(12, 20, 32),
Secondary = Color3.fromRGB(18, 30, 48),
Panel = Color3.fromRGB(25, 42, 65),
Button = Color3.fromRGB(34, 58, 88),
Hover = Color3.fromRGB(45, 75, 110),
Text = Color3.fromRGB(245, 250, 255),
SubText = Color3.fromRGB(175, 195, 220),
Accent = Color3.fromRGB(55, 150, 255),
Success = Color3.fromRGB(55, 190, 120),
Danger = Color3.fromRGB(220, 70, 70)
},
Purple = {
Background = Color3.fromRGB(24, 16, 32),
Secondary = Color3.fromRGB(37, 24, 49),
Panel = Color3.fromRGB(50, 33, 65),
Button = Color3.fromRGB(64, 43, 82),
Hover = Color3.fromRGB(80, 54, 102),
Text = Color3.fromRGB(255, 250, 255),
SubText = Color3.fromRGB(205, 180, 215),
Accent = Color3.fromRGB(175, 90, 255),
Success = Color3.fromRGB(70, 190, 120),
Danger = Color3.fromRGB(220, 65, 85)
},
Light = {
Background = Color3.fromRGB(235, 237, 242),
Secondary = Color3.fromRGB(248, 248, 250),
Panel = Color3.fromRGB(255, 255, 255),
Button = Color3.fromRGB(225, 228, 235),
Hover = Color3.fromRGB(210, 214, 225),
Text = Color3.fromRGB(25, 25, 30),
SubText = Color3.fromRGB(90, 90, 100),
Accent = Color3.fromRGB(65, 105, 220),
Success = Color3.fromRGB(40, 160, 90),
Danger = Color3.fromRGB(200, 50, 50)
}
}
local Theme = Themes[CurrentTheme]
pcall(function()
local raw = LocalPlayer:GetAttribute("XRayESP_Settings")
if raw then
local data = HttpService:JSONDecode(raw)
if type(data) == "table" then
if type(data.ESPEnabled) == "boolean" then ESPEnabled = data.ESPEnabled end
if type(data.ShowName) == "boolean" then ShowName = data.ShowName end
if type(data.ShowUsername) == "boolean" then ShowUsername = data.ShowUsername end
if type(data.ShowDistance) == "boolean" then ShowDistance = data.ShowDistance end
if type(data.ShowInventory) == "boolean" then ShowInventory = data.ShowInventory end
if type(data.ShowEquippedTool) == "boolean" then ShowEquippedTool = data.ShowEquippedTool end
if type(data.ShowHealth) == "boolean" then ShowHealth = data.ShowHealth end
if type(data.CurrentTheme) == "string" and Themes[data.CurrentTheme] then CurrentTheme = data.CurrentTheme end
end
end
end)
Theme = Themes[CurrentTheme]
--========================================================
-- GUI
--========================================================
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "XRayESP"
ScreenGui.ResetOnSpawn = false
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ScreenGui.Parent = PlayerGui
--========================================================
-- BOUTON FLOTTANT
--========================================================
local OpenButton = Instance.new("TextButton")
OpenButton.Size = UDim2.fromOffset(58, 58)
OpenButton.Position = UDim2.new(0, 20, 0.5, -29)
OpenButton.BackgroundColor3 = Theme.Secondary
OpenButton.Text = "🎯"
OpenButton.TextSize = 28
OpenButton.TextColor3 = Theme.Text
OpenButton.Font = Enum.Font.GothamBold
OpenButton.BorderSizePixel = 0
OpenButton.Parent = ScreenGui
local OpenCorner = Instance.new("UICorner")
OpenCorner.CornerRadius = UDim.new(0, 15)
OpenCorner.Parent = OpenButton
local OpenStroke = Instance.new("UIStroke")
OpenStroke.Color = Theme.Accent
OpenStroke.Thickness = 1.5
OpenStroke.Parent = OpenButton
--========================================================
-- FENÊTRE
--========================================================
local Window = Instance.new("Frame")
Window.Size = UDim2.fromOffset(460, 570)
Window.Position = UDim2.new(0.5, -230, 0.5, -285)
Window.BackgroundColor3 = Theme.Background
Window.BorderSizePixel = 0
Window.Visible = false
Window.Parent = ScreenGui
local WindowCorner = Instance.new("UICorner")
WindowCorner.CornerRadius = UDim.new(0, 14)
WindowCorner.Parent = Window
--========================================================
-- HEADER
--========================================================
local TopBar = Instance.new("Frame")
TopBar.Size = UDim2.new(1, 0, 0, 58)
TopBar.BackgroundColor3 = Theme.Secondary
TopBar.BorderSizePixel = 0
TopBar.Parent = Window
local TopCorner = Instance.new("UICorner")
TopCorner.CornerRadius = UDim.new(0, 14)
TopCorner.Parent = TopBar
local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, -150, 0, 30)
Title.Position = UDim2.fromOffset(18, 7)
Title.BackgroundTransparency = 1
Title.Text = "🎯 X-Ray ESP"
Title.TextColor3 = Theme.Text
Title.TextSize = 19
Title.Font = Enum.Font.GothamBold
Title.TextXAlignment = Enum.TextXAlignment.Left
Title.Parent = TopBar
local Subtitle = Instance.new("TextLabel")
Subtitle.Size = UDim2.new(1, -150, 0, 18)
Subtitle.Position = UDim2.fromOffset(19, 33)
Subtitle.BackgroundTransparency = 1
Subtitle.Text = "Simple • Professional"
Subtitle.TextColor3 = Theme.SubText
Subtitle.TextSize = 11
Subtitle.Font = Enum.Font.Gotham
Subtitle.TextXAlignment = Enum.TextXAlignment.Left
Subtitle.Parent = TopBar
local PlayerCounter = Instance.new("TextLabel")
PlayerCounter.Size = UDim2.fromOffset(75, 35)
PlayerCounter.Position = UDim2.new(1, -120, 0, 11)
PlayerCounter.BackgroundColor3 = Theme.Button
PlayerCounter.TextColor3 = Theme.Text
PlayerCounter.TextSize = 13
PlayerCounter.Font = Enum.Font.GothamBold
PlayerCounter.Text = "👥 0"
PlayerCounter.Parent = TopBar
local CounterCorner = Instance.new("UICorner")
CounterCorner.CornerRadius = UDim.new(0, 9)
CounterCorner.Parent = PlayerCounter
local PlatformLabel = Instance.new("TextLabel")
PlatformLabel.Size = UDim2.fromOffset(95,25)
PlatformLabel.Position = UDim2.new(1,-225,0,16)
PlatformLabel.BackgroundTransparency = 1
PlatformLabel.Text = LocalPlatform
PlatformLabel.TextColor3 = Theme.SubText
PlatformLabel.TextSize = 11
PlatformLabel.Font = Enum.Font.GothamBold
PlatformLabel.TextXAlignment = Enum.TextXAlignment.Right
PlatformLabel.Parent = TopBar
local CloseButton = Instance.new("TextButton")
CloseButton.Size = UDim2.fromOffset(38, 38)
CloseButton.Position = UDim2.new(1, -43, 0, 8)
CloseButton.BackgroundTransparency = 1
CloseButton.Text = "×"
CloseButton.TextColor3 = Theme.Text
CloseButton.TextSize = 27
CloseButton.Font = Enum.Font.GothamBold
CloseButton.Parent = TopBar
local SelectedLabel = Instance.new("TextLabel")
SelectedLabel.Size = UDim2.new(1,-36,0,25)
SelectedLabel.Position = UDim2.fromOffset(18,60)
SelectedLabel.BackgroundTransparency = 1
SelectedLabel.Text = "🎯 Aucun joueur sélectionné"
SelectedLabel.TextColor3 = Theme.SubText
SelectedLabel.TextSize = 12
SelectedLabel.Font = Enum.Font.GothamBold
SelectedLabel.TextXAlignment = Enum.TextXAlignment.Left
SelectedLabel.Visible = false
SelectedLabel.Parent = Window
--========================================================
-- CONTENU
--========================================================
local Content = Instance.new("ScrollingFrame")
Content.Size = UDim2.new(1, -24, 1, -95)
Content.Position = UDim2.fromOffset(12, 90)
Content.BackgroundTransparency = 1
Content.BorderSizePixel = 0
Content.ScrollBarThickness = 4
Content.CanvasSize = UDim2.new()
Content.Parent = Window
local ContentLayout = Instance.new("UIListLayout")
ContentLayout.Padding = UDim.new(0, 8)
ContentLayout.Parent = Content
ContentLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
Content.CanvasSize = UDim2.fromOffset(
0,
ContentLayout.AbsoluteContentSize.Y + 10
)
end)
--========================================================
-- SECTIONS
--========================================================
local function Section(text)
local Label = Instance.new("TextLabel")
Label.Size = UDim2.new(1, -5, 0, 27)
Label.BackgroundTransparency = 1
Label.Text = text
Label.TextColor3 = Theme.SubText
Label.TextSize = 12
Label.Font = Enum.Font.GothamBold
Label.TextXAlignment = Enum.TextXAlignment.Left
Label.Parent = Content
return Label
end
local function Button(text, callback)
local B = Instance.new("TextButton")
B.Size = UDim2.new(1, -5, 0, 44)
B.BackgroundColor3 = Theme.Button
B.BorderSizePixel = 0
B.Text = text
B.TextColor3 = Theme.Text
B.TextSize = 14
B.Font = Enum.Font.GothamBold
B.Parent = Content
local C = Instance.new("UICorner")
C.CornerRadius = UDim.new(0, 9)
C.Parent = B
B.MouseEnter:Connect(function()
B.BackgroundColor3 = Theme.Hover
end)
B.MouseLeave:Connect(function()
B.BackgroundColor3 = Theme.Button
end)
B.MouseButton1Click:Connect(function()
callback(B)
end)
return B
end
--========================================================
-- ESP
--========================================================
local ESPButton
local function IsIgnored(player)
return Favorites[player] == true
end
local function IsBlacklisted(player)
return Blacklist[player] == true
end
local function RemoveESP(player)
if Highlights[player] then
Highlights[player]:Destroy()
Highlights[player] = nil
end
if InfoGuis[player] then
InfoGuis[player]:Destroy()
InfoGuis[player] = nil
end
end
local function AddESP(player)
if player == LocalPlayer then
return
end
-- ⭐ Favori = aucun ESP
if IsIgnored(player) then
RemoveESP(player)
return
end
local Character = player.Character
if not Character then
return
end
local Highlight = Highlights[player]
if not Highlight then
Highlight = Instance.new("Highlight")
Highlight.Name = "ESPHighlight"
Highlight.Parent = Character
Highlights[player] = Highlight
end
Highlight.Adornee = Character
if IsBlacklisted(player) then
Highlight.FillColor = BlacklistColor
Highlight.OutlineColor = BlacklistColor
else
Highlight.FillColor = PlayerColor
Highlight.OutlineColor = OutlineColor
end
Highlight.FillTransparency = 0.35
Highlight.OutlineTransparency = 0
Highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
end
--========================================================
-- INFOS
--========================================================
local function RemoveInfo(player)
if InfoGuis[player] then
InfoGuis[player]:Destroy()
InfoGuis[player] = nil
end
end
local function CreateInfo(player)
if player == LocalPlayer or IsIgnored(player) then
return
end
local Character = player.Character
if not Character then return end
local Head = Character:FindFirstChild("Head")
if not Head then return end
RemoveInfo(player)
local Billboard = Instance.new("BillboardGui")
Billboard.Name = "ESPInfo"
Billboard.Adornee = Head
Billboard.Size = UDim2.fromOffset(300, 160)
Billboard.StudsOffset = Vector3.new(0, 3.5, 0)
Billboard.AlwaysOnTop = true
Billboard.MaxDistance = 10000
Billboard.Parent = Head
local Label = Instance.new("TextLabel")
Label.Size = UDim2.fromScale(1, 1)
Label.BackgroundTransparency = 1
Label.TextColor3 = Theme.Text
Label.TextStrokeTransparency = 0
Label.TextStrokeColor3 = Color3.new(0, 0, 0)
Label.TextSize = 14
Label.Font = Enum.Font.GothamBold
Label.TextWrapped = true
Label.Parent = Billboard
InfoGuis[player] = Billboard
return Label
end
local function UpdateInfo(player)
if not ESPEnabled then return end
if player == LocalPlayer then return end
if IsIgnored(player) then
RemoveInfo(player)
return
end
local Character = player.Character
if not Character then
RemoveInfo(player)
return
end
local Label
if InfoGuis[player] then
Label = InfoGuis[player]:FindFirstChildOfClass("TextLabel")
end
if not Label then
Label = CreateInfo(player)
end
if not Label then return end
local Lines = {}
if ShowName then
table.insert(Lines, "👤 " .. player.DisplayName)
end
if ShowUsername then
table.insert(Lines, "🏷️ @" .. player.Name)
end
if ShowHealth then
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
table.insert(
Lines,
"❤️ " ..
math.floor(Humanoid.Health) ..
" / " ..
math.floor(Humanoid.MaxHealth)
)
end
end
if ShowDistance then
local MyCharacter = LocalPlayer.Character
local MyRoot =
MyCharacter and
MyCharacter:FindFirstChild("HumanoidRootPart")
local TargetRoot =
Character:FindFirstChild("HumanoidRootPart")
if MyRoot and TargetRoot then
local Distance =
(MyRoot.Position - TargetRoot.Position).Magnitude
table.insert(
Lines,
"📏 " .. math.floor(Distance) .. " studs"
)
end
end
if ShowInventory then
local Backpack =
player:FindFirstChildOfClass("Backpack")
if Backpack then
local Tools = {}
for _, Object in ipairs(Backpack:GetChildren()) do
if Object:IsA("Tool") then
table.insert(Tools, Object.Name)
end
end
if #Tools > 0 then
table.insert(
Lines,
"🎒 " .. table.concat(Tools, ", ")
)
end
end
end
if ShowEquippedTool then
local Tool =
Character:FindFirstChildOfClass("Tool")
if Tool then
table.insert(Lines, "✋ " .. Tool.Name)
end
end
Label.Text = table.concat(Lines, "\n")
end
--========================================================
-- ESP ON/OFF
--========================================================
local function EnableESP()
ESPEnabled = true
SaveSettingsSession()
ESPButton.Text = "👁️ ESP • ON"
ESPButton.BackgroundColor3 = Theme.Success
for _, Player in ipairs(Players:GetPlayers()) do
if Player ~= LocalPlayer then
AddESP(Player)
if not IsIgnored(Player) then
CreateInfo(Player)
end
end
end
end
local function DisableESP()
ESPEnabled = false
SaveSettingsSession()
ESPButton.Text = "👁️ ESP • OFF"
ESPButton.BackgroundColor3 = Theme.Button
for Player in pairs(Highlights) do
RemoveESP(Player)
end
end
Section("👁️ ESP")
ESPButton = Button(
"👁️ ESP • OFF",
function()
if ESPEnabled then
DisableESP()
else
EnableESP()
end
end
)
Button("👤 Pseudo • ON", function(B)
ShowName = not ShowName
SaveSettingsSession()
B.Text = ShowName and "👤 Pseudo • ON" or "👤 Pseudo • OFF"
end)
Button("@ Username • ON", function(B)
ShowUsername = not ShowUsername
SaveSettingsSession()
B.Text = ShowUsername and "@ Username • ON" or "@ Username • OFF"
end)
Button("❤️ Vie • ON", function(B)
ShowHealth = not ShowHealth
SaveSettingsSession()
B.Text = ShowHealth and "❤️ Vie • ON" or "❤️ Vie • OFF"
end)
Button("📏 Distance • ON", function(B)
ShowDistance = not ShowDistance
SaveSettingsSession()
B.Text = ShowDistance and "📏 Distance • ON" or "📏 Distance • OFF"
end)
Button("🎒 Inventaire • ON", function(B)
ShowInventory = not ShowInventory
SaveSettingsSession()
B.Text = ShowInventory and "🎒 Inventaire • ON" or "🎒 Inventaire • OFF"
end)
Button("✋ Tool en main • ON", function(B)
ShowEquippedTool = not ShowEquippedTool
SaveSettingsSession()
B.Text = ShowEquippedTool and "✋ Tool en main • ON" or "✋ Tool en main • OFF"
end)
--========================================================
-- FENÊTRES FAVORIS / LISTE NOIRE
-- Sélection directe parmi les joueurs actuellement en ligne
--========================================================
local function CreatePlayerListWindow(title, icon, isBlacklist)
local Frame = Instance.new("Frame")
Frame.Size = UDim2.fromOffset(400, 480)
Frame.Position = UDim2.new(0.5, -200, 0.5, -240)
Frame.BackgroundColor3 = Theme.Background
Frame.BorderSizePixel = 0
Frame.Visible = false
Frame.ZIndex = 50
Frame.Parent = ScreenGui
local Corner = Instance.new("UICorner")
Corner.CornerRadius = UDim.new(0, 13)
Corner.Parent = Frame
local Header = Instance.new("Frame")
Header.Size = UDim2.new(1, 0, 0, 55)
Header.BackgroundColor3 = Theme.Secondary
Header.BorderSizePixel = 0
Header.ZIndex = 51
Header.Parent = Frame
local HCorner = Instance.new("UICorner")
HCorner.CornerRadius = UDim.new(0, 13)
HCorner.Parent = Header
local Label = Instance.new("TextLabel")
Label.Size = UDim2.new(1, -55, 1, 0)
Label.Position = UDim2.fromOffset(15, 0)
Label.BackgroundTransparency = 1
Label.Text = icon .. " " .. title
Label.TextColor3 = Theme.Text
Label.TextSize = 17
Label.Font = Enum.Font.GothamBold
Label.TextXAlignment = Enum.TextXAlignment.Left
Label.ZIndex = 52
Label.Parent = Header
local Close = Instance.new("TextButton")
Close.Size = UDim2.fromOffset(40, 40)
Close.Position = UDim2.new(1, -45, 0, 7)
Close.BackgroundTransparency = 1
Close.Text = "×"
Close.TextColor3 = Theme.Text
Close.TextSize = 26
Close.ZIndex = 52
Close.Parent = Header
local Hint = Instance.new("TextLabel")
Hint.Size = UDim2.new(1, -30, 0, 38)
Hint.Position = UDim2.fromOffset(15, 63)
Hint.BackgroundTransparency = 1
Hint.Text = isBlacklist
and "Sélectionne un joueur pour l'ajouter à la liste noire."
or "Sélectionne un joueur pour l'ajouter aux favoris."
Hint.TextColor3 = Theme.SubText
Hint.TextSize = 12
Hint.Font = Enum.Font.Gotham
Hint.TextWrapped = true
Hint.TextXAlignment = Enum.TextXAlignment.Left
Hint.ZIndex = 51
Hint.Parent = Frame
local List = Instance.new("ScrollingFrame")
List.Size = UDim2.new(1, -30, 1, -115)
List.Position = UDim2.fromOffset(15, 105)
List.BackgroundTransparency = 1
List.BorderSizePixel = 0
List.ScrollBarThickness = 4
List.ZIndex = 51
List.Parent = Frame
local Layout = Instance.new("UIListLayout")
Layout.Padding = UDim.new(0, 7)
Layout.Parent = List
Close.MouseButton1Click:Connect(function()
Frame.Visible = false
Window.Visible = true
end)
return Frame, List, Layout
end
--========================================================
-- CRÉATION DES FENÊTRES
--========================================================
local FavoriteWindow, FavoriteList, FavoriteLayout =
CreatePlayerListWindow("Favoris", "⭐", false)
local BlacklistWindow, BlacklistList, BlacklistLayout =
CreatePlayerListWindow("Liste noire", "🚫", true)
--========================================================
-- BOUTON JOUEUR
--========================================================
local function CreatePlayerButton(Player, List, Layout, isBlacklist)
if Player == LocalPlayer then
return
end
local B = Instance.new("TextButton")
B.Size = UDim2.new(1, -5, 0, 58)
B.BackgroundColor3 =
isBlacklist and BlacklistColor or Theme.Button
B.BorderSizePixel = 0
B.Text = ""
B.ZIndex = 52
B.Parent = List
local C = Instance.new("UICorner")
C.CornerRadius = UDim.new(0, 9)
C.Parent = B
local Avatar = Instance.new("ImageLabel")
Avatar.Size = UDim2.fromOffset(42, 42)
Avatar.Position = UDim2.fromOffset(8, 8)
Avatar.BackgroundColor3 = Theme.Secondary
Avatar.BackgroundTransparency = 0
Avatar.BorderSizePixel = 0
Avatar.ZIndex = 53
Avatar.Parent = B
local AvatarCorner = Instance.new("UICorner")
AvatarCorner.CornerRadius = UDim.new(1, 0)
AvatarCorner.Parent = Avatar
task.spawn(function()
local Success, Image =
pcall(function()
return Players:GetUserThumbnailAsync(
Player.UserId,
Enum.ThumbnailType.HeadShot,
Enum.ThumbnailSize.Size100x100
)
end)
if Success and Avatar.Parent then
Avatar.Image = Image
end
end)
local Name = Instance.new("TextLabel")
Name.Size = UDim2.new(1, -145, 0, 22)
Name.Position = UDim2.fromOffset(60, 7)
Name.BackgroundTransparency = 1
Name.Text = Player.DisplayName
Name.TextColor3 = Theme.Text
Name.TextSize = 14
Name.Font = Enum.Font.GothamBold
Name.TextXAlignment = Enum.TextXAlignment.Left
Name.ZIndex = 53
Name.Parent = B
local Username = Instance.new("TextLabel")
Username.Size = UDim2.new(1, -145, 0, 20)
Username.Position = UDim2.fromOffset(60, 29)
Username.BackgroundTransparency = 1
Username.Text = "@" .. Player.Name
Username.TextColor3 = Theme.SubText
Username.TextSize = 11
Username.Font = Enum.Font.Gotham
Username.TextXAlignment = Enum.TextXAlignment.Left
Username.ZIndex = 53
Username.Parent = B
local Action = Instance.new("TextButton")
Action.Size = UDim2.fromOffset(72, 30)
Action.Position = UDim2.new(1, -82, 0.5, -15)
Action.BackgroundColor3 =
isBlacklist and Theme.Danger or Theme.Accent
Action.TextColor3 = Color3.new(1, 1, 1)
Action.TextSize = 11
Action.Font = Enum.Font.GothamBold
Action.Text = isBlacklist and "🚫 Ajouter" or "⭐ Ajouter"
Action.ZIndex = 53
Action.Parent = B
local ActionCorner = Instance.new("UICorner")
ActionCorner.CornerRadius = UDim.new(0, 7)
ActionCorner.Parent = Action
B.MouseEnter:Connect(function()
if not isBlacklist then
B.BackgroundColor3 = Theme.Hover
end
end)
B.MouseLeave:Connect(function()
if not isBlacklist then
B.BackgroundColor3 = Theme.Button
end
end)
B.MouseButton1Click:Connect(function()
SelectedPlayer = Player
SelectedLabel.Text = "🎯 Sélectionné : " .. Player.DisplayName .. " • @" .. Player.Name
SelectedLabel.Visible = true
end)
Action.MouseButton1Click:Connect(function()
if isBlacklist then
if Blacklist[Player] then
Blacklist[Player] = nil
AlertCooldown[Player] = nil
else
Blacklist[Player] = true
Favorites[Player] = nil
end
if ESPEnabled then
AddESP(Player)
if not IsIgnored(Player) then
CreateInfo(Player)
end
end
else
if Favorites[Player] then
Favorites[Player] = nil
if ESPEnabled then
AddESP(Player)
CreateInfo(Player)
end
else
Favorites[Player] = true
Blacklist[Player] = nil
RemoveESP(Player)
end
end
-- Actualise immédiatement les deux fenêtres si elles sont ouvertes.
RefreshFavorites()
RefreshBlacklist()
SaveSettingsSession()
end)
end
--========================================================
-- FAVORIS : JOUEURS EN LIGNE
--========================================================
function RefreshFavorites()
for _, Child in ipairs(FavoriteList:GetChildren()) do
if Child:IsA("TextButton") then
Child:Destroy()
end
end
local Count = 0
for _, Player in ipairs(Players:GetPlayers()) do
if Player ~= LocalPlayer then
Count += 1
CreatePlayerButton(
Player,
FavoriteList,
FavoriteLayout,
false
)
end
end
if Count == 0 then
local Empty = Instance.new("TextLabel")
Empty.Size = UDim2.new(1, -5, 0, 50)
Empty.BackgroundTransparency = 1
Empty.Text = "👥 Aucun autre joueur en ligne."
Empty.TextColor3 = Theme.SubText
Empty.TextSize = 13
Empty.Font = Enum.Font.Gotham
Empty.ZIndex = 52
Empty.Parent = FavoriteList
end
FavoriteList.CanvasSize = UDim2.fromOffset(
0,
FavoriteLayout.AbsoluteContentSize.Y + 10
)
end
--========================================================
-- LISTE NOIRE : JOUEURS EN LIGNE
--========================================================
function RefreshBlacklist()
for _, Child in ipairs(BlacklistList:GetChildren()) do
if Child:IsA("TextButton") or Child:IsA("TextLabel") then
Child:Destroy()
end
end
local Count = 0
for _, Player in ipairs(Players:GetPlayers()) do
if Player ~= LocalPlayer then
Count += 1
CreatePlayerButton(
Player,
BlacklistList,
BlacklistLayout,
true
)
end
end
if Count == 0 then
local Empty = Instance.new("TextLabel")
Empty.Size = UDim2.new(1, -5, 0, 50)
Empty.BackgroundTransparency = 1
Empty.Text = "👥 Aucun autre joueur en ligne."
Empty.TextColor3 = Theme.SubText
Empty.TextSize = 13
Empty.Font = Enum.Font.Gotham
Empty.ZIndex = 52
Empty.Parent = BlacklistList
end
BlacklistList.CanvasSize = UDim2.fromOffset(
0,
BlacklistLayout.AbsoluteContentSize.Y + 10
)
end
--========================================================
-- OUVERTURE FAVORIS
--========================================================
Button("⭐ Gérer mes favoris", function()
RefreshFavorites()
FavoriteWindow.Visible = true
Window.Visible = false
end)
--========================================================
-- OUVERTURE LISTE NOIRE
--========================================================
Button("🚫 Gérer la liste noire", function()
RefreshBlacklist()
BlacklistWindow.Visible = true
Window.Visible = false
end)
--========================================================
-- MISE À JOUR AUTOMATIQUE DES LISTES
--========================================================
Players.PlayerAdded:Connect(function()
task.wait(0.15)
if FavoriteWindow.Visible then
RefreshFavorites()
end
if BlacklistWindow.Visible then
RefreshBlacklist()
end
end)
Players.PlayerRemoving:Connect(function()
task.wait(0.05)
if FavoriteWindow.Visible then
RefreshFavorites()
end
if BlacklistWindow.Visible then
RefreshBlacklist()
end
end)
--========================================================
-- CLIC DIRECT SUR UN JOUEUR
--========================================================
local Mouse = LocalPlayer:GetMouse()
Mouse.Button1Down:Connect(function()
local Target = Mouse.Target
if not Target then return end
local Character = Target:FindFirstAncestorOfClass("Model")
if not Character then return end
local Player = Players:GetPlayerFromCharacter(Character)
if not Player or Player == LocalPlayer then return end
SelectedPlayer = Player
SelectedLabel.Text = "🎯 Sélectionné : " .. Player.DisplayName .. " • @" .. Player.Name
SelectedLabel.Visible = true
end)
--========================================================
-- SÉLECTION D'UN JOUEUR
--========================================================
Section("🎯 Sélection")
Button("🎯 Sélectionner le joueur cliqué", function()
if SelectedPlayer and SelectedPlayer.Parent == Players then
local Platform = SelectedPlayer:GetAttribute("Platform") or "❓ Plateforme inconnue"
SelectedLabel.Text = "🎯 " .. SelectedPlayer.DisplayName .. " • @" .. SelectedPlayer.Name .. " • " .. tostring(Platform)
SelectedLabel.Visible = true
else
SelectedLabel.Text = "🎯 Aucun joueur sélectionné"
SelectedLabel.Visible = true
end
end)
Button("❌ Effacer la sélection", function()
SelectedPlayer = nil
SelectedLabel.Text = "🎯 Aucun joueur sélectionné"
SelectedLabel.Visible = false
end)
--========================================================
-- SPECTATEUR
--========================================================
local SpectateWindow = Instance.new("Frame")
SpectateWindow.Size = UDim2.fromOffset(350, 155)
SpectateWindow.Position = UDim2.new(0.5, -175, 1, -185)
SpectateWindow.BackgroundColor3 = Theme.Background
SpectateWindow.BorderSizePixel = 0
SpectateWindow.Visible = false
SpectateWindow.ZIndex = 70
SpectateWindow.Parent = ScreenGui
local SC = Instance.new("UICorner")
SC.CornerRadius = UDim.new(0, 13)
SC.Parent = SpectateWindow
local ST = Instance.new("TextLabel")
ST.Size = UDim2.new(1, 0, 0, 35)
ST.BackgroundTransparency = 1
ST.Text = "🎥 MODE SPECTATEUR"
ST.TextColor3 = Theme.Text
ST.TextSize = 15
ST.Font = Enum.Font.GothamBold
ST.ZIndex = 71
ST.Parent = SpectateWindow
local SN = Instance.new("TextLabel")
SN.Size = UDim2.new(1, 0, 0, 25)
SN.Position = UDim2.fromOffset(0, 38)
SN.BackgroundTransparency = 1
SN.Text = "Aucun joueur"
SN.TextColor3 = Theme.SubText
SN.TextSize = 13
SN.Font = Enum.Font.Gotham
SN.ZIndex = 71
SN.Parent = SpectateWindow
local Prev = Instance.new("TextButton")
Prev.Size = UDim2.fromOffset(65, 40)
Prev.Position = UDim2.fromOffset(12, 85)
Prev.BackgroundColor3 = Theme.Button
Prev.Text = "◀"
Prev.TextColor3 = Theme.Text
Prev.TextSize = 18
Prev.ZIndex = 71
Prev.Parent = SpectateWindow
local Stop = Instance.new("TextButton")
Stop.Size = UDim2.fromOffset(130, 40)
Stop.Position = UDim2.new(0.5, -65, 0, 85)
Stop.BackgroundColor3 = Theme.Danger
Stop.Text = "✕ Arrêter"
Stop.TextColor3 = Color3.new(1, 1, 1)
Stop.Font = Enum.Font.GothamBold
Stop.ZIndex = 71
Stop.Parent = SpectateWindow
local Next = Instance.new("TextButton")
Next.Size = UDim2.fromOffset(65, 40)
Next.Position = UDim2.new(1, -77, 0, 85)
Next.BackgroundColor3 = Theme.Button
Next.Text = "▶"
Next.TextColor3 = Theme.Text
Next.TextSize = 18
Next.ZIndex = 71
Next.Parent = SpectateWindow
local function SpectatePlayers()
local List = {}
for _, Player in ipairs(Players:GetPlayers()) do
if Player ~= LocalPlayer
and not IsIgnored(Player) then
local Character = Player.Character
local Humanoid =
Character and
Character:FindFirstChildOfClass("Humanoid")
if Humanoid and Humanoid.Health > 0 then
table.insert(List, Player)
end
end
end
return List
end
local function UpdateSpectator()
local List = SpectatePlayers()
if #List == 0 then
SN.Text = "Aucun joueur"
return
end
if SpectateIndex < 1 then
SpectateIndex = #List
end
if SpectateIndex > #List then
SpectateIndex = 1
end
SpectatedPlayer = List[SpectateIndex]
local Character = SpectatedPlayer.Character
local Humanoid =
Character and
Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
workspace.CurrentCamera.CameraType =
Enum.CameraType.Custom
workspace.CurrentCamera.CameraSubject =
Humanoid
SN.Text =
"👤 @" .. SpectatedPlayer.Name
end
end
local function StartSpectate()
if #SpectatePlayers() == 0 then
return
end
Spectating = true
SpectateIndex = 1
Window.Visible = false
SpectateWindow.Visible = true
UpdateSpectator()
end
local function StopSpectate()
Spectating = false
SpectatedPlayer = nil
SpectateWindow.Visible = false
local Character = LocalPlayer.Character
local Humanoid =
Character and
Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
workspace.CurrentCamera.CameraSubject = Humanoid
end
end
Prev.MouseButton1Click:Connect(function()
if Spectating then
SpectateIndex -= 1
UpdateSpectator()
end
end)
Next.MouseButton1Click:Connect(function()
if Spectating then
SpectateIndex += 1
UpdateSpectator()
end
end)
Stop.MouseButton1Click:Connect(StopSpectate)
Section("🎥 Spectateur")
Button("🎥 Ouvrir le mode spectateur", function()
StartSpectate()
end)
--========================================================
-- THEMES
--========================================================
local ThemeWindow = Instance.new("Frame")
ThemeWindow.Size = UDim2.fromOffset(350, 310)
ThemeWindow.Position = UDim2.new(0.5, -175, 0.5, -155)
ThemeWindow.BackgroundColor3 = Theme.Background
ThemeWindow.BorderSizePixel = 0
ThemeWindow.Visible = false
ThemeWindow.ZIndex = 80
ThemeWindow.Parent = ScreenGui
local TC = Instance.new("UICorner")
TC.CornerRadius = UDim.new(0, 13)
TC.Parent = ThemeWindow
local TT = Instance.new("TextLabel")
TT.Size = UDim2.new(1, -55, 0, 50)
TT.Position = UDim2.fromOffset(15, 0)
TT.BackgroundTransparency = 1
TT.Text = "🎨 Thèmes"
TT.TextColor3 = Theme.Text
TT.TextSize = 18
TT.Font = Enum.Font.GothamBold
TT.TextXAlignment = Enum.TextXAlignment.Left
TT.ZIndex = 81
TT.Parent = ThemeWindow
local ThemeClose = Instance.new("TextButton")
ThemeClose.Size = UDim2.fromOffset(40, 40)
ThemeClose.Position = UDim2.new(1, -45, 0, 5)
ThemeClose.BackgroundTransparency = 1
ThemeClose.Text = "×"
ThemeClose.TextColor3 = Theme.Text
ThemeClose.TextSize = 26
ThemeClose.ZIndex = 81
ThemeClose.Parent = ThemeWindow
local ThemeList = Instance.new("Frame")
ThemeList.Size = UDim2.new(1, -30, 1, -65)
ThemeList.Position = UDim2.fromOffset(15, 55)
ThemeList.BackgroundTransparency = 1
ThemeList.ZIndex = 81
ThemeList.Parent = ThemeWindow
local ThemeLayout = Instance.new("UIListLayout")
ThemeLayout.Padding = UDim.new(0, 8)
ThemeLayout.Parent = ThemeList
local function ApplyTheme()
Theme = Themes[CurrentTheme]
Window.BackgroundColor3 = Theme.Background
TopBar.BackgroundColor3 = Theme.Secondary
OpenButton.BackgroundColor3 = Theme.Secondary
OpenButton.TextColor3 = Theme.Text
OpenStroke.Color = Theme.Accent
Title.TextColor3 = Theme.Text
Subtitle.TextColor3 = Theme.SubText
PlayerCounter.BackgroundColor3 = Theme.Button
PlayerCounter.TextColor3 = Theme.Text
CloseButton.TextColor3 = Theme.Text
PlatformLabel.TextColor3 = Theme.SubText
SelectedLabel.TextColor3 = Theme.SubText
end
for Name, Data in pairs(Themes) do
local B = Instance.new("TextButton")
B.Size = UDim2.new(1, 0, 0, 42)
B.BackgroundColor3 = Data.Button
B.Text = Name
B.TextColor3 = Data.Text
B.TextSize = 14
B.Font = Enum.Font.GothamBold
B.ZIndex = 82
B.Parent = ThemeList
local C = Instance.new("UICorner")
C.CornerRadius = UDim.new(0, 8)
C.Parent = B
B.MouseButton1Click:Connect(function()
CurrentTheme = Name
SaveSettingsSession()
ApplyTheme()
end)
end
ThemeClose.MouseButton1Click:Connect(function()
ThemeWindow.Visible = false
Window.Visible = true
end)
Section("🎨 Interface")
Button("🎨 Choisir le thème", function()
ThemeWindow.Visible = true
Window.Visible = false
end)
--========================================================
-- JOUEURS
--========================================================
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function()
task.wait(0.5)
if ESPEnabled then
AddESP(Player)
if not IsIgnored(Player) then
CreateInfo(Player)
end
end
end)
end)
Players.PlayerRemoving:Connect(function(Player)
RemoveESP(Player)
Favorites[Player] = nil
Blacklist[Player] = nil
AlertCooldown[Player] = nil
if SpectatedPlayer == Player then
UpdateSpectator()
end
end)
--========================================================
-- COMPTEUR
--========================================================
local function UpdateCounter()
PlayerCounter.Text =
"👥 " .. #Players:GetPlayers()
end
Players.PlayerAdded:Connect(UpdateCounter)
Players.PlayerRemoving:Connect(UpdateCounter)
UpdateCounter()
--========================================================
-- ⚠️ ALERTE LISTE NOIRE
--========================================================
local function BlacklistAlert(Player, Distance)
local Now = tick()
if AlertCooldown[Player]
and Now - AlertCooldown[Player] < 3 then
return
end
AlertCooldown[Player] = Now
local Alert = Instance.new("TextLabel")
Alert.Size = UDim2.fromOffset(390, 55)
Alert.Position = UDim2.new(0.5, -195, 0, 25)
Alert.BackgroundColor3 = Theme.Danger
Alert.TextColor3 = Color3.new(1, 1, 1)
Alert.Text =
"⚠️ @" ..
Player.Name ..
" est à " ..
math.floor(Distance) ..
" studs !"
Alert.TextSize = 15
Alert.Font = Enum.Font.GothamBold
Alert.ZIndex = 100
Alert.Parent = ScreenGui
local Corner = Instance.new("UICorner")
Corner.CornerRadius = UDim.new(0, 10)
Corner.Parent = Alert
task.delay(2.5, function()
if Alert then
Alert:Destroy()
end
end)
end
--========================================================
-- UPDATE
--========================================================
RunService.RenderStepped:Connect(function()
if ESPEnabled then
for _, Player in ipairs(Players:GetPlayers()) do
if Player ~= LocalPlayer then
AddESP(Player)
UpdateInfo(Player)
-- 🚫 Vérification distance
if IsBlacklisted(Player) then
local MyCharacter = LocalPlayer.Character
local TargetCharacter = Player.Character
local MyRoot =
MyCharacter and
MyCharacter:FindFirstChild("HumanoidRootPart")
local TargetRoot =
TargetCharacter and
TargetCharacter:FindFirstChild("HumanoidRootPart")
if MyRoot and TargetRoot then
local Distance =
(MyRoot.Position - TargetRoot.Position).Magnitude
if Distance <= AlertDistance then
BlacklistAlert(Player, Distance)
end
end
end
end
end
end
if Spectating and SpectatedPlayer then
local Character = SpectatedPlayer.Character
local Humanoid =
Character and
Character:FindFirstChildOfClass("Humanoid")
if Humanoid and Humanoid.Health > 0 then
workspace.CurrentCamera.CameraSubject =
Humanoid
else
UpdateSpectator()
end
end
end)
--========================================================
-- DRAG WINDOWS
--========================================================
local function MakeDraggable(Frame, Bar)
local Dragging = false
local Start
local Position
Bar.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Dragging = true
Start = Input.Position
Position = Frame.Position
end
end)
Bar.InputEnded:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Dragging = false
end
end)
UserInputService.InputChanged:Connect(function(Input)
if Dragging
and Input.UserInputType == Enum.UserInputType.MouseMovement then
local Delta = Input.Position - Start
Frame.Position = UDim2.new(
Position.X.Scale,
Position.X.Offset + Delta.X,
Position.Y.Scale,
Position.Y.Offset + Delta.Y
)
end
end)
end
MakeDraggable(Window, TopBar)
MakeDraggable(FavoriteWindow, FavoriteWindow)
MakeDraggable(BlacklistWindow, BlacklistWindow)
MakeDraggable(ThemeWindow, ThemeWindow)
--========================================================
-- BOUTON FLOTTANT DÉPLAÇABLE
--========================================================
local Dragging = false
local DragStart
local ButtonStart
OpenButton.InputBegan:Connect(function(Input)
if Input.UserInputType == Enum.UserInputType.MouseButton1 then
Dragging = false
DragStart = Input.Position
ButtonStart = OpenButton.Position
local Connection
Connection = UserInputService.InputChanged:Connect(function(Move)
if Move.UserInputType == Enum.UserInputType.MouseMovement then
local Delta =
Move.Position - DragStart
if math.abs(Delta.X) > 5
or math.abs(Delta.Y) > 5 then
Dragging = true
end
OpenButton.Position = UDim2.new(
ButtonStart.X.Scale,
ButtonStart.X.Offset + Delta.X,
ButtonStart.Y.Scale,
ButtonStart.Y.Offset + Delta.Y
)
end
end)
Input.Changed:Connect(function()
if Input.UserInputState == Enum.UserInputState.End then
if Connection then
Connection:Disconnect()
end
task.delay(0.05, function()
Dragging = false
end)
end
end)
end
end)
--========================================================
-- OUVERTURE
--========================================================
OpenButton.MouseButton1Click:Connect(function()
if not Dragging then
Window.Visible = not Window.Visible
end
end)
CloseButton.MouseButton1Click:Connect(function()
Window.Visible = false
end)
--========================================================
-- FIN 🎯
--========================================================