Advertisement
Freshbloodb

Untitled

Dec 13th, 2024 (edited)
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.74 KB | None | 0 0
  1. -- Servicios
  2. local Players = game:GetService("Players")
  3. local RunService = game:GetService("RunService")
  4. local UserInputService = game:GetService("UserInputService")
  5. local TweenService = game:GetService("TweenService")
  6. local SoundService = game:GetService("SoundService")
  7.  
  8. -- Variables globales y configuraciones
  9. local Config = {
  10. BoxESP = false,
  11. HealthESP = false,
  12. NameESP = false,
  13. TracerESP = false,
  14. DistanceESP = false,
  15. HighlightESP = false,
  16. PerseguirUsuario = false,
  17. PerseguirIgnorando = false,
  18. FOLLOW_DISTANCE = 6,
  19. PREDICTION_TIME = 0.3,
  20. BoxESPColor = Color3.fromRGB(255, 0, 0),
  21. HealthESPColor = Color3.fromRGB(0, 255, 0),
  22. NameESPColor = Color3.fromRGB(255, 255, 255),
  23. TracerESPColor = Color3.fromRGB(255, 255, 0),
  24. DistanceESPColor = Color3.fromRGB(255, 255, 255),
  25. HighlightFillColor = Color3.fromRGB(255, 0, 0),
  26. HighlightOutlineColor = Color3.fromRGB(0, 0, 0),
  27. PerseguirHighlightColor = Color3.fromRGB(0, 255, 0),
  28. BoxESPOpacity = 1,
  29. HealthESPOpacity = 1,
  30. NameESPOpacity = 1,
  31. TracerESPOpacity = 1,
  32. DistanceESPOpacity = 1,
  33. HighlightESPOpacity = 0.5,
  34. UIOpacity = 0.9,
  35. ButtonOpacity = 1
  36. }
  37.  
  38. -- Paleta de colores predefinidos
  39. local ColorPalette = {
  40. Color3.fromRGB(255, 0, 0),
  41. Color3.fromRGB(0, 255, 0),
  42. Color3.fromRGB(0, 0, 255),
  43. Color3.fromRGB(255, 255, 0),
  44. Color3.fromRGB(255, 0, 255),
  45. Color3.fromRGB(0, 255, 255),
  46. Color3.fromRGB(255, 255, 255),
  47. Color3.fromRGB(0, 0, 0)
  48. }
  49.  
  50. -- Sonidos
  51. local function CreateSound(id)
  52. local sound = Instance.new("Sound")
  53. sound.SoundId = id
  54. sound.Volume = 0.5
  55. sound.Parent = SoundService
  56. return sound
  57. end
  58.  
  59. local toggleSound = CreateSound("rbxassetid://6895079853")
  60. local buttonClickSound = CreateSound("rbxassetid://6895079733")
  61. local valueChangeSound = CreateSound("rbxassetid://6895079981")
  62. local openMenuSound = CreateSound("rbxassetid://6895079981")
  63. local closeMenuSound = CreateSound("rbxassetid://6895079981")
  64. local changeSectionSound = CreateSound("rbxassetid://6895079981")
  65.  
  66. -- Crear la interfaz de usuario personalizada
  67. local PlayerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
  68. local ScreenGui = Instance.new("ScreenGui")
  69. ScreenGui.Name = "CustomESPGUI"
  70. ScreenGui.ResetOnSpawn = false
  71. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  72. ScreenGui.Parent = PlayerGui
  73.  
  74. -- Botón circular principal
  75. local CircleButton = Instance.new("ImageButton")
  76. CircleButton.Size = UDim2.new(0, 50, 0, 50)
  77. CircleButton.Position = UDim2.new(0, 20, 0.5, -25)
  78. CircleButton.AnchorPoint = Vector2.new(0, 0.5)
  79. CircleButton.Image = "rbxassetid://3926305904"
  80. CircleButton.ImageRectOffset = Vector2.new(204, 844)
  81. CircleButton.ImageRectSize = Vector2.new(36, 36)
  82. CircleButton.BackgroundTransparency = 1
  83. CircleButton.Parent = ScreenGui
  84.  
  85. -- Botón circular para activar/desactivar Perseguir
  86. local PerseguirToggleButton = Instance.new("ImageButton")
  87. PerseguirToggleButton.Size = UDim2.new(0, 40, 0, 40)
  88. PerseguirToggleButton.Position = UDim2.new(0, 20, 1, -20)
  89. PerseguirToggleButton.AnchorPoint = Vector2.new(0, 1)
  90. PerseguirToggleButton.Image = "rbxassetid://3926305904"
  91. PerseguirToggleButton.ImageRectOffset = Vector2.new(924, 724)
  92. PerseguirToggleButton.ImageRectSize = Vector2.new(36, 36)
  93. PerseguirToggleButton.BackgroundTransparency = 1
  94. PerseguirToggleButton.Visible = false
  95. PerseguirToggleButton.Parent = ScreenGui
  96.  
  97. -- Panel principal
  98. local MainPanel = Instance.new("Frame")
  99. MainPanel.Size = UDim2.new(0, 300, 0, 400)
  100. MainPanel.Position = UDim2.new(0.5, 0, 0.5, 0)
  101. MainPanel.AnchorPoint = Vector2.new(0.5, 0.5)
  102. MainPanel.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  103. MainPanel.BackgroundTransparency = 1 - Config.UIOpacity
  104. MainPanel.BorderSizePixel = 0
  105. MainPanel.Visible = false
  106. MainPanel.Parent = ScreenGui
  107.  
  108. -- Efecto de sombra
  109. local Shadow = Instance.new("ImageLabel")
  110. Shadow.Size = UDim2.new(1, 20, 1, 20)
  111. Shadow.Position = UDim2.new(0.5, 0, 0.5, 0)
  112. Shadow.AnchorPoint = Vector2.new(0.5, 0.5)
  113. Shadow.BackgroundTransparency = 1
  114. Shadow.Image = "rbxassetid://1316045217"
  115. Shadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
  116. Shadow.ImageTransparency = 0.8
  117. Shadow.ScaleType = Enum.ScaleType.Slice
  118. Shadow.SliceCenter = Rect.new(10, 10, 118, 118)
  119. Shadow.Parent = MainPanel
  120.  
  121. -- Título del panel
  122. local TitleLabel = Instance.new("TextLabel")
  123. TitleLabel.Size = UDim2.new(1, 0, 0, 40)
  124. TitleLabel.Text = "ESP Universal Personalizado"
  125. TitleLabel.TextColor3 = Color3.new(1, 1, 1)
  126. TitleLabel.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  127. TitleLabel.BorderSizePixel = 0
  128. TitleLabel.Font = Enum.Font.GothamBold
  129. TitleLabel.TextSize = 18
  130. TitleLabel.Parent = MainPanel
  131.  
  132. -- Botones de sección
  133. local ESPButton = Instance.new("TextButton")
  134. ESPButton.Size = UDim2.new(0.33, -5, 0, 30)
  135. ESPButton.Position = UDim2.new(0, 5, 0, 45)
  136. ESPButton.Text = "ESP"
  137. ESPButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  138. ESPButton.TextColor3 = Color3.new(1, 1, 1)
  139. ESPButton.Font = Enum.Font.GothamSemibold
  140. ESPButton.TextSize = 14
  141. ESPButton.BorderSizePixel = 0
  142. ESPButton.Parent = MainPanel
  143.  
  144. local PerseguirButton = Instance.new("TextButton")
  145. PerseguirButton.Size = UDim2.new(0.33, -5, 0, 30)
  146. PerseguirButton.Position = UDim2.new(0.33, 5, 0, 45)
  147. PerseguirButton.Text = "Perseguir"
  148. PerseguirButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  149. PerseguirButton.TextColor3 = Color3.new(1, 1, 1)
  150. PerseguirButton.Font = Enum.Font.GothamSemibold
  151. PerseguirButton.TextSize = 14
  152. PerseguirButton.BorderSizePixel = 0
  153. PerseguirButton.Parent = MainPanel
  154.  
  155. local OtrosButton = Instance.new("TextButton")
  156. OtrosButton.Size = UDim2.new(0.33, -5, 0, 30)
  157. OtrosButton.Position = UDim2.new(0.66, 5, 0, 45)
  158. OtrosButton.Text = "Otros"
  159. OtrosButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  160. OtrosButton.TextColor3 = Color3.new(1, 1, 1)
  161. OtrosButton.Font = Enum.Font.GothamSemibold
  162. OtrosButton.TextSize = 14
  163. OtrosButton.BorderSizePixel = 0
  164. OtrosButton.Parent = MainPanel
  165.  
  166. -- Frames de sección
  167. local ESPFrame = Instance.new("ScrollingFrame")
  168. ESPFrame.Size = UDim2.new(1, -20, 1, -90)
  169. ESPFrame.Position = UDim2.new(0, 10, 0, 80)
  170. ESPFrame.BackgroundTransparency = 1
  171. ESPFrame.ScrollBarThickness = 6
  172. ESPFrame.Visible = true
  173. ESPFrame.Parent = MainPanel
  174.  
  175. local PerseguirFrame = Instance.new("Frame")
  176. PerseguirFrame.Size = UDim2.new(1, -20, 1, -90)
  177. PerseguirFrame.Position = UDim2.new(0, 10, 0, 80)
  178. PerseguirFrame.BackgroundTransparency = 1
  179. PerseguirFrame.Visible = false
  180. PerseguirFrame.Parent = MainPanel
  181.  
  182. local OtrosFrame = Instance.new("ScrollingFrame")
  183. OtrosFrame.Size = UDim2.new(1, -20, 1, -90)
  184. OtrosFrame.Position = UDim2.new(0, 10, 0, 80)
  185. OtrosFrame.BackgroundTransparency = 1
  186. OtrosFrame.ScrollBarThickness = 6
  187. OtrosFrame.Visible = false
  188. OtrosFrame.Parent = MainPanel
  189.  
  190. -- Función para crear la paleta de colores
  191. local function CreateColorPalette(parent, callback)
  192. local ColorPaletteFrame = Instance.new("Frame")
  193. ColorPaletteFrame.Name = "ColorPalette"
  194. ColorPaletteFrame.Size = UDim2.new(0, 200, 0, 100)
  195. ColorPaletteFrame.Position = UDim2.new(0.5, -100, 0.5, -50)
  196. ColorPaletteFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  197. ColorPaletteFrame.BorderSizePixel = 0
  198. ColorPaletteFrame.Visible = false
  199. ColorPaletteFrame.Parent = parent
  200.  
  201. for i, color in ipairs(ColorPalette) do
  202. local ColorButton = Instance.new("TextButton")
  203. ColorButton.Size = UDim2.new(0.25, -5, 0.5, -5)
  204. ColorButton.Position = UDim2.new(0.25 * ((i-1) % 4), 5, 0.5 * math.floor((i-1) / 4), 5)
  205. ColorButton.BackgroundColor3 = color
  206. ColorButton.Text = ""
  207. ColorButton.Parent = ColorPaletteFrame
  208.  
  209. ColorButton.MouseButton1Click:Connect(function()
  210. buttonClickSound:Play()
  211. callback(color)
  212. ColorPaletteFrame.Visible = false
  213. end)
  214. end
  215.  
  216. return ColorPaletteFrame
  217. end
  218.  
  219. -- Función para crear un toggle
  220. local function CreateToggle(parent, name, icon, callback, colorCallback)
  221. local ToggleFrame = Instance.new("Frame")
  222. ToggleFrame.Size = UDim2.new(1, 0, 0, 30)
  223. ToggleFrame.BackgroundTransparency = 1
  224. ToggleFrame.Parent = parent
  225.  
  226. local IconImage = Instance.new("ImageLabel")
  227. IconImage.Size = UDim2.new(0, 20, 0, 20)
  228. IconImage.Position = UDim2.new(0, 5, 0, 5)
  229. IconImage.Image = icon
  230. IconImage.BackgroundTransparency = 1
  231. IconImage.Parent = ToggleFrame
  232.  
  233. local NameLabel = Instance.new("TextLabel")
  234. NameLabel.Size = UDim2.new(1, -110, 1, 0)
  235. NameLabel.Position = UDim2.new(0, 30, 0, 0)
  236. NameLabel.Text = name
  237. NameLabel.TextColor3 = Color3.new(1, 1, 1)
  238. NameLabel.TextXAlignment = Enum.TextXAlignment.Left
  239. NameLabel.BackgroundTransparency = 1
  240. NameLabel.Font = Enum.Font.Gotham
  241. NameLabel.TextSize = 14
  242. NameLabel.Parent = ToggleFrame
  243.  
  244. local ToggleButton = Instance.new("TextButton")
  245. ToggleButton.Size = UDim2.new(0, 40, 0, 20)
  246. ToggleButton.Position = UDim2.new(1, -45, 0, 5)
  247. ToggleButton.Text = ""
  248. ToggleButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0) -- Inicialmente rojo (desactivado)
  249. ToggleButton.BorderSizePixel = 0
  250. ToggleButton.Parent = ToggleFrame
  251.  
  252. local ToggleIndicator = Instance.new("Frame")
  253. ToggleIndicator.Size = UDim2.new(0, 16, 0, 16)
  254. ToggleIndicator.Position = UDim2.new(0, 2, 0, 2)
  255. ToggleIndicator.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  256. ToggleIndicator.BorderSizePixel = 0
  257. ToggleIndicator.Parent = ToggleButton
  258.  
  259. local isToggled = false
  260.  
  261. ToggleButton.MouseButton1Click:Connect(function()
  262. toggleSound:Play()
  263. isToggled = not isToggled
  264. local targetPosition = isToggled and UDim2.new(1, -18, 0, 2) or UDim2.new(0, 2, 0, 2)
  265. local targetColor = isToggled and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
  266.  
  267. TweenService:Create(ToggleIndicator, TweenInfo.new(0.2), {Position = targetPosition}):Play()
  268. TweenService:Create(ToggleButton, TweenInfo.new(0.2), {BackgroundColor3 = targetColor}):Play()
  269.  
  270. callback(isToggled)
  271.  
  272. -- Update PerseguirToggleButton visibility
  273. if name == "Perseguir Usuario" or name == "Perseguir Ignorando" then
  274. PerseguirToggleButton.Visible = Config.PerseguirUsuario or Config.PerseguirIgnorando
  275. if PerseguirToggleButton.Visible then
  276. PerseguirToggleButton.ImageColor3 = Color3.fromRGB(0, 255, 0) -- Set to green when visible
  277. end
  278. end
  279. end)
  280.  
  281. return ToggleFrame
  282. end
  283.  
  284. -- Crear toggles para ESP
  285. local espToggles = {
  286. {name = "ESP de Caja", icon = "rbxassetid://3926305904", callback = function(value) Config.BoxESP = value end},
  287. {name = "ESP de Salud", icon = "rbxassetid://3926307971", callback = function(value) Config.HealthESP = value end},
  288. {name = "ESP de Nombre", icon = "rbxassetid://3926305904", callback = function(value) Config.NameESP = value end},
  289. {name = "ESP de Trazador", icon = "rbxassetid://3926305904", callback = function(value) Config.TracerESP = value end},
  290. {name = "ESP de Distancia", icon = "rbxassetid://3926305904", callback = function(value) Config.DistanceESP = value end},
  291. {name = "ESP de Highlight", icon = "rbxassetid://3926305904", callback = function(value) Config.HighlightESP = value end},
  292. }
  293.  
  294. for i, toggle in ipairs(espToggles) do
  295. local toggleFrame = CreateToggle(ESPFrame, toggle.name, toggle.icon, toggle.callback)
  296. toggleFrame.Position = UDim2.new(0, 0, 0, (i-1) * 35)
  297. end
  298.  
  299. -- Crear toggles para Perseguir
  300. local perseguirToggles = {
  301. {name = "Perseguir Usuario", icon = "rbxassetid://3926307971", callback = function(value) Config.PerseguirUsuario = value end},
  302. {name = "Perseguir Ignorando", icon = "rbxassetid://3926307971", callback = function(value) Config.PerseguirIgnorando = value end},
  303. }
  304.  
  305. for i, toggle in ipairs(perseguirToggles) do
  306. local toggleFrame = CreateToggle(PerseguirFrame, toggle.name, toggle.icon, toggle.callback)
  307. toggleFrame.Position = UDim2.new(0, 0, 0, (i-1) * 35)
  308. end
  309.  
  310. -- Función para crear un campo de entrada de texto
  311. local function CreateTextInput(parent, name, defaultValue, callback)
  312. local InputFrame = Instance.new("Frame")
  313. InputFrame.Size = UDim2.new(1, 0, 0, 50)
  314. InputFrame.BackgroundTransparency = 1
  315. InputFrame.Parent = parent
  316.  
  317. local NameLabel = Instance.new("TextLabel")
  318. NameLabel.Size = UDim2.new(1, 0, 0, 20)
  319. NameLabel.Position = UDim2.new(0, 0, 0, 0)
  320. NameLabel.Text = name
  321. NameLabel.TextColor3 = Color3.new(1, 1, 1)
  322. NameLabel.TextXAlignment = Enum.TextXAlignment.Left
  323. NameLabel.BackgroundTransparency = 1
  324. NameLabel.Font = Enum.Font.Gotham
  325. NameLabel.TextSize = 14
  326. NameLabel.Parent = InputFrame
  327.  
  328. local InputBox = Instance.new("TextBox")
  329. InputBox.Size = UDim2.new(1, 0, 0, 30)
  330. InputBox.Position = UDim2.new(0, 0, 0, 20)
  331. InputBox.Text = tostring(defaultValue)
  332. InputBox.TextColor3 = Color3.new(1, 1, 1)
  333. InputBox.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  334. InputBox.BorderSizePixel = 0
  335. InputBox.Font = Enum.Font.Gotham
  336. InputBox.TextSize = 14
  337. InputBox.Parent = InputFrame
  338.  
  339. InputBox.FocusLost:Connect(function(enterPressed)
  340. if enterPressed then
  341. local value = tonumber(InputBox.Text)
  342. if value then
  343. callback(value)
  344. valueChangeSound:Play()
  345. else
  346. InputBox.Text = tostring(defaultValue)
  347. end
  348. end
  349. end)
  350.  
  351. return InputFrame
  352. end
  353.  
  354. -- Crear campos de entrada de texto para configuraciones de perseguir
  355. local followDistanceInput = CreateTextInput(PerseguirFrame, "Distancia de Seguimiento", Config.FOLLOW_DISTANCE, function(value)
  356. Config.FOLLOW_DISTANCE = value
  357. end)
  358. followDistanceInput.Position = UDim2.new(0, 0, 0, 70)
  359.  
  360. local predictionTimeInput = CreateTextInput(PerseguirFrame, "Tiempo de Predicción", Config.PREDICTION_TIME, function(value)
  361. Config.PREDICTION_TIME = value
  362. end)
  363. predictionTimeInput.Position = UDim2.new(0, 0, 0, 130)
  364.  
  365. -- Crear campos de entrada de texto para opacidad de ESP
  366. local espOpacityInputs = {
  367. {name = "Opacidad de Caja", callback = function(value) Config.BoxESPOpacity = value / 100 end},
  368. {name = "Opacidad de Salud", callback = function(value) Config.HealthESPOpacity = value / 100 end},
  369. {name = "Opacidad de Nombre", callback = function(value) Config.NameESPOpacity = value / 100 end},
  370. {name = "Opacidad de Trazador", callback = function(value) Config.TracerESPOpacity = value / 100 end},
  371. {name = "Opacidad de Distancia", callback = function(value) Config.DistanceESPOpacity = value / 100 end},
  372. {name = "Opacidad de Highlight", callback = function(value) Config.HighlightESPOpacity = value / 100 end},
  373. }
  374.  
  375. for i, input in ipairs(espOpacityInputs) do
  376. local inputFrame = CreateTextInput(OtrosFrame, input.name, 100, input.callback)
  377. inputFrame.Position = UDim2.new(0, 0, 0, (i-1) * 60)
  378. end
  379.  
  380. -- Función para crear un selector de color
  381. local function CreateColorPicker(parent, name, defaultColor, callback)
  382. local ColorPickerFrame = Instance.new("Frame")
  383. ColorPickerFrame.Size = UDim2.new(1, 0, 0, 30)
  384. ColorPickerFrame.BackgroundTransparency = 1
  385. ColorPickerFrame.Parent = parent
  386.  
  387. local NameLabel = Instance.new("TextLabel")
  388. NameLabel.Size = UDim2.new(1, -40, 1, 0)
  389. NameLabel.Position = UDim2.new(0, 0, 0, 0)
  390. NameLabel.Text = name
  391. NameLabel.TextColor3 = Color3.new(1, 1, 1)
  392. NameLabel.TextXAlignment = Enum.TextXAlignment.Left
  393. NameLabel.BackgroundTransparency = 1
  394. NameLabel.Font = Enum.Font.Gotham
  395. NameLabel.TextSize = 14
  396. NameLabel.Parent = ColorPickerFrame
  397.  
  398. local ColorButton = Instance.new("TextButton")
  399. ColorButton.Size = UDim2.new(0, 30, 0, 30)
  400. ColorButton.Position = UDim2.new(1, -30, 0, 0)
  401. ColorButton.Text = ""
  402. ColorButton.BackgroundColor3 = defaultColor
  403. ColorButton.BorderSizePixel = 0
  404. ColorButton.Parent = ColorPickerFrame
  405.  
  406. local colorPalette = CreateColorPalette(ScreenGui, function(color)
  407. ColorButton.BackgroundColor3 = color
  408. callback(color)
  409. end)
  410.  
  411. ColorButton.MouseButton1Click:Connect(function()
  412. buttonClickSound:Play()
  413. colorPalette.Visible = true
  414. end)
  415.  
  416. return ColorPickerFrame
  417. end
  418.  
  419. -- Crear selectores de color para la sección "Otros"
  420. local colorPickers = {
  421. {name = "Color de Botones", callback = function(color)
  422. ESPButton.BackgroundColor3 = color
  423. PerseguirButton.BackgroundColor3 = color
  424. OtrosButton.BackgroundColor3 = color
  425. end},
  426. {name = "Color de Texto", callback = function(color)
  427. ESPButton.TextColor3 = color
  428. PerseguirButton.TextColor3 = color
  429. OtrosButton.TextColor3 = color
  430. TitleLabel.TextColor3 = color
  431. end},
  432. {name = "Color de Fondo", callback = function(color)
  433. MainPanel.BackgroundColor3 = color
  434. end},
  435. {name = "Color de Interfaz", callback = function(color)
  436. for _, frame in ipairs({ESPFrame, PerseguirFrame, OtrosFrame}) do
  437. for _, child in ipairs(frame:GetChildren()) do
  438. if child:IsA("Frame") or child:IsA("TextBox") then
  439. child.BackgroundColor3 = color
  440. end
  441. end
  442. end
  443. end},
  444. {name = "Color de Botón Menú", callback = function(color)
  445. CircleButton.ImageColor3 = color
  446. end},
  447. {name = "Color de ESP Perseguir", callback = function(color)
  448. Config.PerseguirHighlightColor = color
  449. end},
  450. }
  451.  
  452. for i, picker in ipairs(colorPickers) do
  453. local pickerFrame = CreateColorPicker(OtrosFrame, picker.name, Color3.new(1, 1, 1), picker.callback)
  454. pickerFrame.Position = UDim2.new(0, 0, 0, 360 + (i-1) * 40)
  455. end
  456.  
  457. -- Crear campos de entrada de texto para opacidad de la interfaz
  458. local uiOpacityInputs = {
  459. {name = "Opacidad de Interfaz", callback = function(value)
  460. Config.UIOpacity = value / 100
  461. MainPanel.BackgroundTransparency = 1 - Config.UIOpacity
  462. end},
  463. {name = "Opacidad de Botón Menú", callback = function(value)
  464. Config.ButtonOpacity = value / 100
  465. CircleButton.ImageTransparency = 1 - Config.ButtonOpacity
  466. end},
  467. }
  468.  
  469. for i, input in ipairs(uiOpacityInputs) do
  470. local inputFrame = CreateTextInput(OtrosFrame, input.name, 100, input.callback)
  471. inputFrame.Position = UDim2.new(0, 0, 0, 560 + (i-1) * 60)
  472. end
  473.  
  474. -- Funcionalidad de los botones de sección
  475. ESPButton.MouseButton1Click:Connect(function()
  476. changeSectionSound:Play()
  477. ESPFrame.Visible = true
  478. PerseguirFrame.Visible = false
  479. OtrosFrame.Visible = false
  480. ESPButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  481. PerseguirButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  482. OtrosButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  483. end)
  484.  
  485. PerseguirButton.MouseButton1Click:Connect(function()
  486. changeSectionSound:Play()
  487. ESPFrame.Visible = false
  488. PerseguirFrame.Visible = true
  489. OtrosFrame.Visible = false
  490. ESPButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  491. PerseguirButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  492. OtrosButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  493. end)
  494.  
  495. OtrosButton.MouseButton1Click:Connect(function()
  496. changeSectionSound:Play()
  497. ESPFrame.Visible = false
  498. PerseguirFrame.Visible = false
  499. OtrosFrame.Visible = true
  500. ESPButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  501. PerseguirButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  502. OtrosButton.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  503. end)
  504.  
  505. -- Animación de apertura/cierre del panel
  506. CircleButton.MouseButton1Click:Connect(function()
  507. buttonClickSound:Play()
  508. MainPanel.Visible = not MainPanel.Visible
  509. if MainPanel.Visible then
  510. openMenuSound:Play()
  511. MainPanel:TweenSize(
  512. UDim2.new(0, 300, 0, 400),
  513. Enum.EasingDirection.Out,
  514. Enum.EasingStyle.Quad,
  515. 0.3,
  516. true
  517. )
  518. else
  519. closeMenuSound:Play()
  520. MainPanel:TweenSize(
  521. UDim2.new(0, 0, 0, 0),
  522. Enum.EasingDirection.In,
  523. Enum.EasingStyle.Quad,
  524. 0.3,
  525. true,
  526. function()
  527. MainPanel.Visible = false
  528. end
  529. )
  530. end
  531. end)
  532.  
  533. -- Funcionalidad del botón de activar/desactivar Perseguir
  534. local isPerseguirActive = false
  535. PerseguirToggleButton.MouseButton1Click:Connect(function()
  536. buttonClickSound:Play()
  537. isPerseguirActive = not isPerseguirActive
  538. if isPerseguirActive then
  539. TweenService:Create(PerseguirToggleButton, TweenInfo.new(0.2), {ImageColor3 = Color3.fromRGB(0, 255, 0)}):Play()
  540. if Config.PerseguirUsuario then
  541. Config.PerseguirUsuario = true
  542. Config.PerseguirIgnorando = false
  543. elseif Config.PerseguirIgnorando then
  544. Config.PerseguirUsuario = false
  545. Config.PerseguirIgnorando = true
  546. end
  547. else
  548. TweenService:Create(PerseguirToggleButton, TweenInfo.new(0.2), {ImageColor3 = Color3.fromRGB(255, 0, 0)}):Play()
  549. Config.PerseguirUsuario = false
  550. Config.PerseguirIgnorando = false
  551. end
  552. end)
  553.  
  554. -- Función para obtener el jugador más cercano
  555. local function getClosestPlayer()
  556. local player = game.Players.LocalPlayer
  557. local closestDistance = math.huge
  558. local closestPlayer = nil
  559.  
  560. for _, otherPlayer in pairs(game.Players:GetPlayers()) do
  561. if otherPlayer ~= player and otherPlayer.Character and otherPlayer.Character:FindFirstChild("HumanoidRootPart") and otherPlayer.Character:FindFirstChild("Humanoid") and otherPlayer.Character.Humanoid.Health > 0 then
  562. local distance = (player.Character.HumanoidRootPart.Position - otherPlayer.Character.HumanoidRootPart.Position).Magnitude
  563. if distance < closestDistance then
  564. closestDistance = distance
  565. closestPlayer = otherPlayer
  566. end
  567. end
  568. end
  569.  
  570. return closestPlayer
  571. end
  572.  
  573. -- Función para resaltar al jugador más cercano
  574. local function highlightPlayer(targetPlayer)
  575. if targetPlayer and targetPlayer.Character then
  576. -- Crear el Highlight si no existe
  577. local highlight = targetPlayer.Character:FindFirstChild("Highlight") or Instance.new("Highlight")
  578. highlight.Name = "Highlight"
  579. highlight.Parent = targetPlayer.Character
  580. highlight.Adornee = targetPlayer.Character
  581. highlight.FillColor = Config.PerseguirHighlightColor
  582. highlight.FillTransparency = 0.5
  583. highlight.OutlineColor = Color3.new(0, 0, 0)
  584. highlight.OutlineTransparency = 0
  585. end
  586. end
  587.  
  588. -- Loop para actualizar al jugador más cercano
  589. spawn(function()
  590. while wait(0.5) do
  591. local closestPlayer = getClosestPlayer()
  592.  
  593. -- Limpiar antiguos Highlight
  594. for _, otherPlayer in pairs(game.Players:GetPlayers()) do
  595. if otherPlayer.Character then
  596. local highlight = otherPlayer.Character:FindFirstChild("Highlight")
  597. if highlight and highlight ~= otherPlayer.Character:FindFirstChild("PlayerESPHighlight") then
  598. highlight:Destroy()
  599. end
  600. end
  601. end
  602.  
  603. -- Resaltar al jugador más cercano si Perseguir está activo
  604. if isPerseguirActive and (Config.PerseguirUsuario or Config.PerseguirIgnorando) then
  605. if closestPlayer then
  606. highlightPlayer(closestPlayer)
  607. end
  608. end
  609. end
  610. end)
  611.  
  612. -- Función para crear ESP
  613. local function CreateESP(player)
  614. local character = player.Character or player.CharacterAdded:Wait()
  615. local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
  616. local humanoid = character:WaitForChild("Humanoid")
  617.  
  618. -- Box ESP
  619. local boxESP = Drawing.new("Square")
  620. boxESP.Visible = false
  621. boxESP.Color = Config.BoxESPColor
  622. boxESP.Thickness = 1
  623. boxESP.Transparency = Config.BoxESPOpacity
  624. boxESP.Filled = false
  625.  
  626. -- Health ESP
  627. local healthESP = Drawing.new("Text")
  628. healthESP.Visible = false
  629. healthESP.Color = Config.HealthESPColor
  630. healthESP.Size = 14
  631. healthESP.Center = true
  632. healthESP.Outline = true
  633. healthESP.Transparency = Config.HealthESPOpacity
  634.  
  635. -- Name ESP
  636. local nameESP = Drawing.new("Text")
  637. nameESP.Visible = false
  638. nameESP.Color = Config.NameESPColor
  639. nameESP.Size = 18
  640. nameESP.Center = true
  641. nameESP.Outline = true
  642. nameESP.Transparency = Config.NameESPOpacity
  643.  
  644. -- Tracer ESP
  645. local tracerESP = Drawing.new("Line")
  646. tracerESP.Visible = false
  647. tracerESP.Color = Config.TracerESPColor
  648. tracerESP.Thickness = 1
  649. tracerESP.Transparency = Config.TracerESPOpacity
  650.  
  651. -- Distance ESP
  652. local distanceESP = Drawing.new("Text")
  653. distanceESP.Visible = false
  654. distanceESP.Color = Config.DistanceESPColor
  655. distanceESP.Size = 14
  656. distanceESP.Center = true
  657. distanceESP.Outline = true
  658. distanceESP.Transparency = Config.DistanceESPOpacity
  659.  
  660. -- Highlight ESP
  661. local highlight = Instance.new("Highlight")
  662. highlight.Name = "PlayerESPHighlight"
  663. highlight.FillColor = Config.HighlightFillColor
  664. highlight.OutlineColor = Config.HighlightOutlineColor
  665. highlight.FillTransparency = 1 - Config.HighlightESPOpacity
  666. highlight.OutlineTransparency = 0
  667. highlight.Adornee = character
  668. highlight.Parent = character
  669. highlight.Enabled = false
  670.  
  671. local function UpdateESP()
  672. if not character:IsDescendantOf(game.Workspace) then
  673. boxESP.Visible = false
  674. healthESP.Visible = false
  675. nameESP.Visible = false
  676. tracerESP.Visible = false
  677. distanceESP.Visible = false
  678. highlight.Enabled = false
  679. return
  680. end
  681.  
  682. local vector, onScreen = workspace.CurrentCamera:WorldToViewportPoint(humanoidRootPart.Position)
  683.  
  684. if onScreen then
  685. -- Update Box ESP
  686. if Config.BoxESP then
  687. local topLeft = workspace.CurrentCamera:WorldToViewportPoint((humanoidRootPart.CFrame * CFrame.new(-3, 3, 0)).Position)
  688. local topRight = workspace.CurrentCamera:WorldToViewportPoint((humanoidRootPart.CFrame * CFrame.new(3, 3, 0)).Position)
  689. local bottomLeft = workspace.CurrentCamera:WorldToViewportPoint((humanoidRootPart.CFrame * CFrame.new(-3, -3, 0)).Position)
  690. local bottomRight = workspace.CurrentCamera:WorldToViewportPoint((humanoidRootPart.CFrame * CFrame.new(3, -3, 0)).Position)
  691.  
  692. boxESP.PointA = Vector2.new(topLeft.X, topLeft.Y)
  693. boxESP.PointB = Vector2.new(topRight.X, topRight.Y)
  694. boxESP.PointC = Vector2.new(bottomRight.X, bottomRight.Y)
  695. boxESP.PointD = Vector2.new(bottomLeft.X, bottomLeft.Y)
  696. boxESP.Color = Config.BoxESPColor
  697. boxESP.Transparency = Config.BoxESPOpacity
  698. boxESP.Visible = true
  699. else
  700. boxESP.Visible = false
  701. end
  702.  
  703. -- Update Health ESP
  704. if Config.HealthESP then
  705. local health = math.floor(humanoid.Health)
  706. local maxHealth = math.floor(humanoid.MaxHealth)
  707. healthESP.Text = health .. "/" .. maxHealth
  708. healthESP.Position = Vector2.new(vector.X, vector.Y + 40)
  709. healthESP.Color = Config.HealthESPColor
  710. healthESP.Transparency = Config.HealthESPOpacity
  711. healthESP.Visible = true
  712. else
  713. healthESP.Visible = false
  714. end
  715.  
  716. -- Update Name ESP
  717. if Config.NameESP then
  718. nameESP.Text = player.Name
  719. nameESP.Position = Vector2.new(vector.X, vector.Y - 40)
  720. nameESP.Color = Config.NameESPColor
  721. nameESP.Transparency = Config.NameESPOpacity
  722. nameESP.Visible = true
  723. else
  724. nameESP.Visible = false
  725. end
  726.  
  727. -- Update Tracer ESP
  728. if Config.TracerESP then
  729. tracerESP.From = Vector2.new(workspace.CurrentCamera.ViewportSize.X / 2, workspace.CurrentCamera.ViewportSize.Y)
  730. tracerESP.To = Vector2.new(vector.X, vector.Y)
  731. tracerESP.Color = Config.TracerESPColor
  732. tracerESP.Transparency = Config.TracerESPOpacity
  733. tracerESP.Visible = true
  734. else
  735. tracerESP.Visible = false
  736. end
  737.  
  738. -- Update Distance ESP
  739. if Config.DistanceESP then
  740. local distance = math.floor((workspace.CurrentCamera.CFrame.Position - humanoidRootPart.Position).Magnitude)
  741. distanceESP.Text = tostring(distance) .. "m"
  742. distanceESP.Position = Vector2.new(vector.X, vector.Y + 60)
  743. distanceESP.Color = Config.DistanceESPColor
  744. distanceESP.Transparency = Config.DistanceESPOpacity
  745. distanceESP.Visible = true
  746. else
  747. distanceESP.Visible = false
  748. end
  749.  
  750. -- Update Highlight ESP
  751. if Config.HighlightESP then
  752. highlight.FillColor = Config.HighlightFillColor
  753. highlight.OutlineColor = Config.HighlightOutlineColor
  754. highlight.FillTransparency = 1 - Config.HighlightESPOpacity
  755. highlight.Enabled = true
  756. else
  757. highlight.Enabled = false
  758. end
  759.  
  760. -- Update Perseguir Highlight
  761. if isPerseguirActive and (Config.PerseguirUsuario or Config.PerseguirIgnorando) and player == getClosestPlayer() then
  762. highlight.FillColor = Config.PerseguirHighlightColor
  763. highlight.Enabled = true
  764. elseif Config.HighlightESP then
  765. highlight.FillColor = Config.HighlightFillColor
  766. else
  767. highlight.Enabled = false
  768. end
  769. else
  770. boxESP.Visible = false
  771. healthESP.Visible = false
  772. nameESP.Visible = false
  773. tracerESP.Visible = false
  774. distanceESP.Visible = false
  775. highlight.Enabled = false
  776. end
  777. end
  778.  
  779. RunService.RenderStepped:Connect(UpdateESP)
  780. end
  781.  
  782. -- Crear ESP para jugadores existentes
  783. for _, player in ipairs(Players:GetPlayers()) do
  784. if player ~= Players.LocalPlayer then
  785. CreateESP(player)
  786. end
  787. end
  788.  
  789. -- Crear ESP para nuevos jugadores
  790. Players.PlayerAdded:Connect(function(player)
  791. CreateESP(player)
  792. end)
  793.  
  794. -- Función para verificar usuarios sin ESP
  795. local function CheckPlayersWithoutESP()
  796. for _, player in ipairs(Players:GetPlayers()) do
  797. if player ~= Players.LocalPlayer then
  798. local character = player.Character
  799. if character then
  800. local hasESP = character:FindFirstChild("PlayerESPHighlight")
  801. if not hasESP then
  802. CreateESP(player)
  803. end
  804. end
  805. end
  806. end
  807. end
  808.  
  809. -- Verificar usuarios sin ESP cada 1.5 segundos
  810. spawn(function()
  811. while wait(1.5) do
  812. CheckPlayersWithoutESP()
  813. end
  814. end)
  815.  
  816. -- Función para verificar si un personaje tiene ítems
  817. local function DoesCharacterHaveItem(character)
  818. if not character then return false end
  819. for _, tool in ipairs(character:GetChildren()) do
  820. if tool:IsA("Tool") then
  821. return true
  822. end
  823. end
  824. return false
  825. end
  826.  
  827. -- Función para predecir la posición futura
  828. local function PredictPosition(player)
  829. local character = player.Character
  830. if not character then return nil end
  831.  
  832. local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
  833. if not humanoidRootPart then return nil end
  834.  
  835. local velocity = humanoidRootPart.Velocity
  836. return humanoidRootPart.Position + velocity * Config.PREDICTION_TIME
  837. end
  838.  
  839. -- Función principal de persecución
  840. local function PursueTarget()
  841. local character = Players.LocalPlayer.Character
  842. if not character or not DoesCharacterHaveItem(character) then return end
  843.  
  844. local closestPlayer = getClosestPlayer()
  845. if not closestPlayer then return end
  846.  
  847. if Config.PerseguirUsuario and isPerseguirActive then
  848. local humanoid = character:FindFirstChild("Humanoid")
  849. if humanoid then
  850. local targetPosition = closestPlayer.Character.HumanoidRootPart.Position
  851. humanoid:MoveTo(targetPosition)
  852. end
  853. elseif Config.PerseguirIgnorando and isPerseguirActive then
  854. local predictedPosition = PredictPosition(closestPlayer)
  855. if predictedPosition then
  856. local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
  857. if humanoidRootPart then
  858. local distance = (predictedPosition - humanoidRootPart.Position).Magnitude
  859. if distance > Config.FOLLOW_DISTANCE then
  860. local humanoid = character:FindFirstChild("Humanoid")
  861. if humanoid then
  862. humanoid:MoveTo(predictedPosition)
  863. end
  864. end
  865. end
  866. end
  867. end
  868. end
  869.  
  870. -- Conectar la función PursueTarget al bucle RunService
  871. RunService.Heartbeat:Connect(PursueTarget)
  872.  
  873. -- Función para actualizar los colores de los ESP
  874. local function UpdateESPColors()
  875. for _, player in ipairs(Players:GetPlayers()) do
  876. if player ~= Players.LocalPlayer then
  877. local character = player.Character
  878. if character then
  879. local highlight = character:FindFirstChild("PlayerESPHighlight")
  880. if highlight and highlight:IsA("Highlight") then
  881. highlight.FillColor = Config.HighlightFillColor
  882. highlight.OutlineColor = Config.HighlightOutlineColor
  883. highlight.FillTransparency = 1 - Config.HighlightESPOpacity
  884. end
  885. end
  886. end
  887. end
  888. end
  889.  
  890. -- Función para verificar highlights existentes
  891. local function CheckExistingHighlights()
  892. for _, player in ipairs(Players:GetPlayers()) do
  893. if player ~= Players.LocalPlayer then
  894. local character = player.Character
  895. if character then
  896. local existingHighlight = character:FindFirstChild("Highlight")
  897. local espHighlight = character:FindFirstChild("PlayerESPHighlight")
  898. if existingHighlight and espHighlight and existingHighlight ~= espHighlight then
  899. espHighlight.Enabled = false
  900. elseif not existingHighlight and espHighlight then
  901. espHighlight.Enabled = Config.HighlightESP
  902. end
  903. end
  904. end
  905. end
  906. end
  907.  
  908. -- Ejecutar la verificación de highlights cada 2 segundos
  909. spawn(function()
  910. while wait(2) do
  911. CheckExistingHighlights()
  912. end
  913. end)
  914.  
  915. -- Fin del script
  916.  
  917.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement