Advertisement
kill21_2

esp scripts

Jun 17th, 2025 (edited)
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.81 KB | None | 0 0
  1. local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))()
  2. local SaveManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/SaveManager.lua"))()
  3. local InterfaceManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/InterfaceManager.lua"))()
  4.  
  5. local Window = Fluent:CreateWindow({
  6. Title = "Esp",
  7. SubTitle = "by 1qlua v1",
  8. TabWidth = 160,
  9. Size = UDim2.fromOffset(580, 540),
  10. Acrylic = true,
  11. Theme = "Dark",
  12. MinimizeKey = Enum.KeyCode.LeftControl
  13. })
  14.  
  15. local Tabs = {
  16. Main = Window:AddTab({ Title = "Main", Icon = "users" }),
  17. Settings = Window:AddTab({ Title = "Settings", Icon = "settings" })
  18. }
  19.  
  20. local Options = Fluent.Options
  21.  
  22. -- Основные переменные
  23. local highlightParts = {"Head", "UpperTorso", "LowerTorso", "LeftUpperArm", "RightUpperArm", "LeftUpperLeg", "RightUpperLeg"}
  24. local highlightInstances = {}
  25. local nameTags = {}
  26. local healthBars = {}
  27. local objectHighlights = {}
  28. local rainbowMode = false
  29. local showNames = false
  30. local showHealth = false
  31. local highlightObjects = false
  32. local rainbowThread = nil
  33. local currentColor = Color3.fromRGB(0, 255, 0)
  34. local wallHackEnabled = true
  35. local espRadiusEnabled = false
  36. local espRadius = 100 -- Значение по умолчанию
  37. local localPlayer = game:GetService("Players").LocalPlayer
  38. local espRadiusThread = nil
  39.  
  40. -- Безопасное получение значения опции
  41. local function getOptionValue(option)
  42. return option and option.Value
  43. end
  44.  
  45. -- Функция для расчета расстояния между двумя точками
  46. local function getDistance(position1, position2)
  47. return (position1 - position2).Magnitude
  48. end
  49.  
  50. -- Проверка видимости игрока в зависимости от радиуса
  51. local function isPlayerInRadius(player)
  52. if not espRadiusEnabled then return true end
  53. if not localPlayer or not localPlayer.Character or not player or not player.Character then return false end
  54.  
  55. local localRoot = localPlayer.Character:FindFirstChild("HumanoidRootPart")
  56. local playerRoot = player.Character:FindFirstChild("HumanoidRootPart")
  57.  
  58. if not localRoot or not playerRoot then return false end
  59.  
  60. return getDistance(localRoot.Position, playerRoot.Position) <= espRadius
  61. end
  62.  
  63. -- Обновление видимости игроков в зависимости от радиуса
  64. local function updatePlayersVisibility()
  65. for player, highlights in pairs(highlightInstances) do
  66. local inRadius = isPlayerInRadius(player)
  67. for _, highlight in pairs(highlights) do
  68. if highlight then
  69. highlight.Enabled = inRadius
  70. end
  71. end
  72.  
  73. if nameTags[player] then
  74. nameTags[player].Enabled = showNames and inRadius
  75. end
  76.  
  77. if healthBars[player] then
  78. healthBars[player].Enabled = showHealth and inRadius
  79. end
  80. end
  81. end
  82.  
  83. -- Создание полосы здоровья
  84. local function createHealthBar(player)
  85. if not player or not player.Character then return end
  86.  
  87. local humanoid = player.Character:FindFirstChild("Humanoid")
  88. local head = player.Character:FindFirstChild("Head")
  89. if not humanoid or not head then return end
  90.  
  91. -- Удаляем старую полосу здоровья
  92. if healthBars[player] then
  93. healthBars[player]:Destroy()
  94. healthBars[player] = nil
  95. end
  96.  
  97. local billboard = Instance.new("BillboardGui")
  98. billboard.Name = "PlayerHealthBar"
  99. billboard.Adornee = head
  100. billboard.Size = UDim2.new(3, 0, 0.4, 0)
  101. billboard.StudsOffset = Vector3.new(0, 4.2, 0)
  102. billboard.AlwaysOnTop = true
  103. billboard.Enabled = showHealth and isPlayerInRadius(player)
  104.  
  105. local container = Instance.new("Frame")
  106. container.Size = UDim2.new(1, 0, 1, 0)
  107. container.BackgroundTransparency = 1
  108.  
  109. local background = Instance.new("Frame")
  110. background.Size = UDim2.new(1, 0, 0.5, 0)
  111. background.Position = UDim2.new(0, 0, 0.5, 0)
  112. background.BackgroundColor3 = Color3.new(0, 0, 0)
  113. background.BackgroundTransparency = 0.5
  114. background.BorderSizePixel = 0
  115.  
  116. local healthBar = Instance.new("Frame")
  117. healthBar.Size = UDim2.new(humanoid.Health / humanoid.MaxHealth, 0, 1, 0)
  118. healthBar.BackgroundColor3 = Color3.new(1, 0, 0)
  119. healthBar.BorderSizePixel = 0
  120. healthBar.Name = "HealthFill"
  121.  
  122. local healthText = Instance.new("TextLabel")
  123. healthText.Size = UDim2.new(1, 0, 1, 0)
  124. healthText.BackgroundTransparency = 1
  125. healthText.Text = math.floor(humanoid.Health).."/"..math.floor(humanoid.MaxHealth)
  126. healthText.TextColor3 = Color3.new(1, 1, 1)
  127. healthText.TextStrokeTransparency = 0.5
  128. healthText.TextStrokeColor3 = Color3.new(0, 0, 0)
  129. healthText.Font = Enum.Font.SourceSansBold
  130. healthText.TextSize = 14
  131.  
  132. healthBar.Parent = background
  133. background.Parent = container
  134. healthText.Parent = container
  135. container.Parent = billboard
  136. billboard.Parent = head
  137. healthBars[player] = billboard
  138.  
  139. humanoid.HealthChanged:Connect(function(health)
  140. if healthBars[player] and healthBars[player]:FindFirstChild("Frame") then
  141. local container = healthBars[player].Frame
  142. local fill = container.Frame.HealthFill
  143. local text = container.TextLabel
  144.  
  145. fill.Size = UDim2.new(health / humanoid.MaxHealth, 0, 1, 0)
  146.  
  147. local healthPercent = health / humanoid.MaxHealth
  148. if healthPercent > 0.6 then
  149. fill.BackgroundColor3 = Color3.new(1 - (healthPercent - 0.6) * 2.5, 1, 0)
  150. elseif healthPercent > 0.3 then
  151. fill.BackgroundColor3 = Color3.new(1, healthPercent * 2.5, 0)
  152. else
  153. fill.BackgroundColor3 = Color3.new(1, 0, 0)
  154. end
  155.  
  156. text.Text = math.floor(health).."/"..math.floor(humanoid.MaxHealth)
  157. end
  158. end)
  159. end
  160.  
  161. -- Создание ника игрока
  162. local function createNameTag(player)
  163. if not player or not player.Character then return end
  164.  
  165. local head = player.Character:FindFirstChild("Head")
  166. if not head then return end
  167.  
  168. if nameTags[player] then
  169. nameTags[player]:Destroy()
  170. nameTags[player] = nil
  171. end
  172.  
  173. local billboard = Instance.new("BillboardGui")
  174. billboard.Name = "PlayerNameTag"
  175. billboard.Adornee = head
  176. billboard.Size = UDim2.new(0, 100, 0, 40)
  177. billboard.StudsOffset = Vector3.new(0, 3, 0)
  178. billboard.AlwaysOnTop = true
  179. billboard.Enabled = showNames and isPlayerInRadius(player)
  180.  
  181. local textLabel = Instance.new("TextLabel")
  182. textLabel.Size = UDim2.new(1, 0, 1, 0)
  183. textLabel.BackgroundTransparency = 1
  184. textLabel.Text = player.Name
  185. textLabel.TextColor3 = currentColor
  186. textLabel.TextStrokeTransparency = 0
  187. textLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
  188. textLabel.Font = Enum.Font.SourceSansBold
  189. textLabel.TextSize = 18
  190. textLabel.Parent = billboard
  191. billboard.Parent = head
  192. nameTags[player] = billboard
  193. end
  194.  
  195. -- Подсветка объектов
  196. local function highlightPlayerObjects(playerName, color)
  197. if objectHighlights[playerName] then
  198. for _, highlight in pairs(objectHighlights[playerName]) do
  199. if highlight then highlight:Destroy() end
  200. end
  201. end
  202.  
  203. objectHighlights[playerName] = {}
  204.  
  205. local function searchObjects(instance)
  206. if instance:IsA("BasePart") and instance.Name:lower():find(playerName:lower()) then
  207. local highlight = Instance.new("BoxHandleAdornment")
  208. highlight.Name = "ObjectHighlight"
  209. highlight.Adornee = instance
  210. highlight.AlwaysOnTop = true
  211. highlight.ZIndex = 10
  212. highlight.Size = instance.Size + Vector3.new(0.2, 0.2, 0.2)
  213. highlight.Transparency = 0.5
  214. highlight.Color3 = color
  215. highlight.Parent = instance
  216. table.insert(objectHighlights[playerName], highlight)
  217. end
  218.  
  219. for _, child in ipairs(instance:GetChildren()) do
  220. searchObjects(child)
  221. end
  222. end
  223.  
  224. searchObjects(workspace)
  225. end
  226.  
  227. -- Основная функция подсветки игрока
  228. local function createHighlight(player, color)
  229. if not player or not player.Character then return end
  230.  
  231. if highlightInstances[player] then
  232. for _, part in pairs(highlightInstances[player]) do
  233. if part then part:Destroy() end
  234. end
  235. end
  236.  
  237. highlightInstances[player] = {}
  238.  
  239. local inRadius = isPlayerInRadius(player)
  240.  
  241. for _, partName in pairs(highlightParts) do
  242. local part = player.Character:FindFirstChild(partName)
  243. if part then
  244. local highlight = Instance.new("Highlight")
  245. highlight.Name = "PlayerHighlight"
  246. highlight.Adornee = part
  247. highlight.Enabled = inRadius
  248. highlight.DepthMode = wallHackEnabled and Enum.HighlightDepthMode.AlwaysOnTop or Enum.HighlightDepthMode.Occluded
  249. highlight.FillColor = color or Color3.fromRGB(0, 255, 0)
  250. highlight.FillTransparency = 0.5
  251. highlight.OutlineColor = color or Color3.fromRGB(255, 255, 255)
  252. highlight.OutlineTransparency = 0
  253. highlight.Parent = part
  254. table.insert(highlightInstances[player], highlight)
  255. end
  256. end
  257.  
  258. if showNames then createNameTag(player) end
  259. if showHealth then createHealthBar(player) end
  260. if highlightObjects then highlightPlayerObjects(player.Name, color) end
  261. end
  262.  
  263. -- Радужный эффект
  264. local function rainbowEffect()
  265. rainbowMode = true
  266. if rainbowThread then coroutine.close(rainbowThread) end
  267.  
  268. rainbowThread = coroutine.create(function()
  269. while rainbowMode and task.wait(0.1) do
  270. local hue = tick() % 5 / 5
  271. local color = Color3.fromHSV(hue, 1, 1)
  272. currentColor = color
  273.  
  274. for _, player in pairs(highlightInstances) do
  275. for _, highlight in pairs(player) do
  276. if highlight then
  277. highlight.FillColor = color
  278. highlight.OutlineColor = color
  279. end
  280. end
  281. end
  282.  
  283. for player, tag in pairs(nameTags) do
  284. if tag and tag:FindFirstChild("TextLabel") then
  285. tag.TextLabel.TextColor3 = color
  286. end
  287. end
  288.  
  289. for _, highlights in pairs(objectHighlights) do
  290. for _, highlight in pairs(highlights) do
  291. if highlight then highlight.Color3 = color end
  292. end
  293. end
  294. end
  295. end)
  296.  
  297. coroutine.resume(rainbowThread)
  298. end
  299.  
  300. -- Очистка всех эффектов
  301. local function clearHighlights()
  302. rainbowMode = false
  303. if rainbowThread then
  304. coroutine.close(rainbowThread)
  305. rainbowThread = nil
  306. end
  307.  
  308. if espRadiusThread then
  309. coroutine.close(espRadiusThread)
  310. espRadiusThread = nil
  311. end
  312.  
  313. for _, player in pairs(highlightInstances) do
  314. for _, highlight in pairs(player) do
  315. if highlight then highlight:Destroy() end
  316. end
  317. end
  318. highlightInstances = {}
  319.  
  320. for _, tag in pairs(nameTags) do
  321. if tag then tag:Destroy() end
  322. end
  323. nameTags = {}
  324.  
  325. for _, bar in pairs(healthBars) do
  326. if bar then bar:Destroy() end
  327. end
  328. healthBars = {}
  329.  
  330. for _, highlights in pairs(objectHighlights) do
  331. for _, highlight in pairs(highlights) do
  332. if highlight then highlight:Destroy() end
  333. end
  334. end
  335. objectHighlights = {}
  336. end
  337.  
  338. -- Поток для проверки расстояния
  339. local function startRadiusCheck()
  340. if espRadiusThread then coroutine.close(espRadiusThread) end
  341.  
  342. espRadiusThread = coroutine.create(function()
  343. while espRadiusEnabled and task.wait(0.5) do
  344. updatePlayersVisibility()
  345. end
  346. end)
  347.  
  348. coroutine.resume(espRadiusThread)
  349. end
  350.  
  351. -- Обработчики игроков
  352. local function setupPlayerEvents()
  353. game:GetService("Players").PlayerAdded:Connect(function(player)
  354. if getOptionValue(Options.HighlightEnabled) then
  355. if rainbowMode then
  356. rainbowEffect()
  357. else
  358. createHighlight(player, getOptionValue(Options.HighlightColor))
  359. end
  360. end
  361.  
  362. player.CharacterAdded:Connect(function(character)
  363. if getOptionValue(Options.HighlightEnabled) then
  364. if rainbowMode then
  365. rainbowEffect()
  366. else
  367. createHighlight(player, getOptionValue(Options.HighlightColor))
  368. end
  369. end
  370. end)
  371. end)
  372.  
  373. game:GetService("Players").PlayerRemoving:Connect(function(player)
  374. if highlightInstances[player] then
  375. for _, highlight in pairs(highlightInstances[player]) do
  376. if highlight then highlight:Destroy() end
  377. end
  378. highlightInstances[player] = nil
  379. end
  380.  
  381. if nameTags[player] then
  382. nameTags[player]:Destroy()
  383. nameTags[player] = nil
  384. end
  385.  
  386. if healthBars[player] then
  387. healthBars[player]:Destroy()
  388. healthBars[player] = nil
  389. end
  390.  
  391. if objectHighlights[player.Name] then
  392. for _, highlight in pairs(objectHighlights[player.Name]) do
  393. if highlight then highlight:Destroy() end
  394. end
  395. objectHighlights[player.Name] = nil
  396. end
  397. end)
  398.  
  399. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  400. if player.Character then
  401. if getOptionValue(Options.HighlightEnabled) then
  402. createHighlight(player, getOptionValue(Options.HighlightColor))
  403. end
  404. end
  405.  
  406. player.CharacterAdded:Connect(function(character)
  407. if getOptionValue(Options.HighlightEnabled) then
  408. createHighlight(player, getOptionValue(Options.HighlightColor))
  409. end
  410. end)
  411. end
  412. end
  413.  
  414. -- Элементы интерфейса
  415. Tabs.Main:AddToggle("HighlightEnabled", {
  416. Title = "Enable Player Highlight",
  417. Default = false,
  418. Callback = function(value)
  419. if value then
  420. if rainbowMode then
  421. rainbowEffect()
  422. else
  423. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  424. if player ~= game:GetService("Players").LocalPlayer then
  425. createHighlight(player, getOptionValue(Options.HighlightColor))
  426. end
  427. end
  428. end
  429. else
  430. clearHighlights()
  431. end
  432. end
  433. })
  434.  
  435. Tabs.Main:AddColorpicker("HighlightColor", {
  436. Title = "Highlight Color",
  437. Default = Color3.fromRGB(0, 255, 0),
  438. Callback = function(color)
  439. currentColor = color
  440. if getOptionValue(Options.HighlightEnabled) and not rainbowMode then
  441. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  442. if player ~= game:GetService("Players").LocalPlayer then
  443. createHighlight(player, color)
  444. end
  445. end
  446. end
  447. end
  448. })
  449.  
  450. Tabs.Main:AddButton({
  451. Title = "Toggle Rainbow",
  452. Description = "Enable/disable rainbow effect",
  453. Callback = function()
  454. if rainbowMode then
  455. rainbowMode = false
  456. if getOptionValue(Options.HighlightEnabled) then
  457. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  458. if player ~= game:GetService("Players").LocalPlayer then
  459. createHighlight(player, getOptionValue(Options.HighlightColor))
  460. end
  461. end
  462. end
  463. else
  464. if not getOptionValue(Options.HighlightEnabled) then
  465. Options.HighlightEnabled:SetValue(true)
  466. end
  467. rainbowEffect()
  468. end
  469. end
  470. })
  471.  
  472. Tabs.Main:AddToggle("ShowNames", {
  473. Title = "Show Player Names",
  474. Default = false,
  475. Callback = function(value)
  476. showNames = value
  477. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  478. if player ~= game:GetService("Players").LocalPlayer then
  479. if nameTags[player] then
  480. nameTags[player].Enabled = value and isPlayerInRadius(player)
  481. elseif value then
  482. createNameTag(player)
  483. end
  484. end
  485. end
  486. end
  487. })
  488.  
  489. Tabs.Main:AddToggle("ShowHealth", {
  490. Title = "Show Health Bars",
  491. Description = "Display health above players",
  492. Default = false,
  493. Callback = function(value)
  494. showHealth = value
  495. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  496. if player ~= game:GetService("Players").LocalPlayer then
  497. if healthBars[player] then
  498. healthBars[player].Enabled = value and isPlayerInRadius(player)
  499. elseif value then
  500. createHealthBar(player)
  501. end
  502. end
  503. end
  504. end
  505. })
  506.  
  507. Tabs.Main:AddToggle("HighlightObjects", {
  508. Title = "Highlight Player Objects",
  509. Description = "Highlight objects with player names",
  510. Default = false,
  511. Callback = function(value)
  512. highlightObjects = value
  513. if value then
  514. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  515. if player ~= game:GetService("Players").LocalPlayer then
  516. highlightPlayerObjects(player.Name, currentColor)
  517. end
  518. end
  519. else
  520. for _, highlights in pairs(objectHighlights) do
  521. for _, highlight in pairs(highlights) do
  522. if highlight then highlight:Destroy() end
  523. end
  524. end
  525. objectHighlights = {}
  526. end
  527. end
  528. })
  529.  
  530. Tabs.Main:AddToggle("WallHack", {
  531. Title = "Enable Wall Hack",
  532. Description = "See players through walls",
  533. Default = true,
  534. Callback = function(value)
  535. wallHackEnabled = value
  536. if getOptionValue(Options.HighlightEnabled) then
  537. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  538. if player ~= game:GetService("Players").LocalPlayer then
  539. createHighlight(player, getOptionValue(Options.HighlightColor))
  540. end
  541. end
  542. end
  543. end
  544. })
  545.  
  546. -- Добавляем элементы для радиуса ESP
  547. Tabs.Main:AddToggle("EspRadiusEnabled", {
  548. Title = "Enable ESP Radius",
  549. Description = "Only show players within specified radius",
  550. Default = false,
  551. Callback = function(value)
  552. espRadiusEnabled = value
  553. if value then
  554. startRadiusCheck()
  555. elseif espRadiusThread then
  556. coroutine.close(espRadiusThread)
  557. espRadiusThread = nil
  558. end
  559.  
  560. -- Обновляем видимость всех игроков
  561. if getOptionValue(Options.HighlightEnabled) then
  562. for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
  563. if player ~= game:GetService("Players").LocalPlayer then
  564. createHighlight(player, getOptionValue(Options.HighlightColor))
  565. end
  566. end
  567. end
  568. end
  569. })
  570.  
  571. Tabs.Main:AddSlider("EspRadiusSlider", {
  572. Title = "ESP Radius",
  573. Description = "Set the maximum distance to show players",
  574. Default = 100,
  575. Min = 10,
  576. Max = 500,
  577. Rounding = 0,
  578. Callback = function(value)
  579. espRadius = value
  580. if espRadiusEnabled then
  581. updatePlayersVisibility()
  582. end
  583. end
  584. })
  585.  
  586. -- Инициализация
  587. setupPlayerEvents()
  588.  
  589. -- Настройки сохранения
  590. SaveManager:SetLibrary(Fluent)
  591. InterfaceManager:SetLibrary(Fluent)
  592. SaveManager:IgnoreThemeSettings()
  593. SaveManager:SetIgnoreIndexes({})
  594. InterfaceManager:SetFolder("PlayerHighlighter")
  595. SaveManager:SetFolder("PlayerHighlighter/config")
  596. InterfaceManager:BuildInterfaceSection(Tabs.Settings)
  597. SaveManager:BuildConfigSection(Tabs.Settings)
  598.  
  599. Window:SelectTab(1)
  600.  
  601. Fluent:Notify({
  602. Title = "Player Highlighter ULTIMATE",
  603. Content = "Script loaded successfully!",
  604. Duration = 5
  605. })
  606.  
  607. SaveManager:LoadAutoloadConfig()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement