Nevzyn

Untitled

Nov 3rd, 2025
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 69.64 KB | None | 0 0
  1. --[[
  2. ╔═══════════════════════════════════════════════════════════╗
  3. ║ 🦖 PRÉ-HISTÓRIA - AUTO FARM COMPLETO 🦖 ║
  4. ║ By: NickZScripts ║
  5. ║ Interface: WindUI + Auto-Otimização ║
  6. ║ Versão: v5.0.0 ULTIMATE ║
  7. ╚═══════════════════════════════════════════════════════════╝
  8. ]]
  9.  
  10. --// ========== SERVICES ========== //
  11. local Players = game:GetService("Players")
  12. local RunService = game:GetService("RunService")
  13. local HttpService = game:GetService("HttpService")
  14. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  15. local Teams = game:GetService("Teams")
  16. local TweenService = game:GetService("TweenService")
  17. local UserInputService = game:GetService("UserInputService")
  18. local Workspace = game:GetService("Workspace")
  19. local CoreGui = game:GetService("CoreGui")
  20.  
  21. --// ========== VARIÁVEIS GLOBAIS ========== //
  22. local LocalPlayer = Players.LocalPlayer
  23. local ScriptVersion = "v5.0.0"
  24. local Camera = Workspace.CurrentCamera
  25. local Mouse = LocalPlayer:GetMouse()
  26.  
  27. --// ========== SISTEMA DE AUTO-OTIMIZAÇÃO ========== //
  28. local PerformanceManager = {
  29. FPS = 0,
  30. LastFPSUpdate = 0,
  31. FrameTimes = {},
  32. MaxFrameTimes = 30,
  33. OptimizationLevel = 1, -- 1 = Normal, 2 = Médio, 3 = Agressivo
  34.  
  35. Thresholds = {
  36. Normal = 55,
  37. Medium = 40,
  38. Aggressive = 25
  39. },
  40.  
  41. Settings = {
  42. [1] = { -- Normal
  43. ESPUpdateRate = 0.1,
  44. MaxESPDistance = 999999,
  45. PlayerProcessPerFrame = 2,
  46. MeatScanInterval = 10,
  47. DinoLevelUpdateInterval = 2
  48. },
  49. [2] = { -- Médio
  50. ESPUpdateRate = 0.15,
  51. MaxESPDistance = 5000,
  52. PlayerProcessPerFrame = 1,
  53. MeatScanInterval = 15,
  54. DinoLevelUpdateInterval = 3
  55. },
  56. [3] = { -- Agressivo
  57. ESPUpdateRate = 0.25,
  58. MaxESPDistance = 2500,
  59. PlayerProcessPerFrame = 1,
  60. MeatScanInterval = 20,
  61. DinoLevelUpdateInterval = 4
  62. }
  63. }
  64. }
  65.  
  66. function PerformanceManager:UpdateFPS()
  67. local currentTime = tick()
  68.  
  69. table.insert(self.FrameTimes, currentTime)
  70.  
  71. while #self.FrameTimes > self.MaxFrameTimes do
  72. table.remove(self.FrameTimes, 1)
  73. end
  74.  
  75. if #self.FrameTimes >= 2 then
  76. local totalTime = self.FrameTimes[#self.FrameTimes] - self.FrameTimes[1]
  77. local frameCount = #self.FrameTimes - 1
  78. self.FPS = math.floor(frameCount / totalTime)
  79. end
  80.  
  81. if currentTime - self.LastFPSUpdate > 2 then
  82. self:OptimizeBasedOnFPS()
  83. self.LastFPSUpdate = currentTime
  84. end
  85. end
  86.  
  87. function PerformanceManager:OptimizeBasedOnFPS()
  88. local oldLevel = self.OptimizationLevel
  89.  
  90. if self.FPS >= self.Thresholds.Normal then
  91. self.OptimizationLevel = 1
  92. elseif self.FPS >= self.Thresholds.Medium then
  93. self.OptimizationLevel = 2
  94. elseif self.FPS >= self.Thresholds.Aggressive then
  95. self.OptimizationLevel = 3
  96. end
  97.  
  98. if oldLevel ~= self.OptimizationLevel then
  99. self:ApplyOptimizations()
  100. end
  101. end
  102.  
  103. function PerformanceManager:ApplyOptimizations()
  104. local settings = self.Settings[self.OptimizationLevel]
  105.  
  106. -- Aplicar configurações aos módulos
  107. if MeatESPModule then
  108. MeatESPModule.UpdateRate = settings.ESPUpdateRate
  109. MeatESPModule.ScanInterval = settings.MeatScanInterval
  110. end
  111.  
  112. if PlayerESPModule then
  113. PlayerESPModule.MaxPlayersPerFrame = settings.PlayerProcessPerFrame
  114. PlayerESPModule.UpdateInterval = settings.ESPUpdateRate
  115. end
  116.  
  117. if DinoLevelModule then
  118. DinoLevelModule.UpdateInterval = settings.DinoLevelUpdateInterval
  119. end
  120.  
  121. local levelNames = {"Normal", "Médio", "Agressivo"}
  122. print("🔧 Otimização: " .. levelNames[self.OptimizationLevel] .. " | FPS: " .. self.FPS)
  123. end
  124.  
  125. function PerformanceManager:GetCurrentSettings()
  126. return self.Settings[self.OptimizationLevel]
  127. end
  128.  
  129. function PerformanceManager:Init()
  130. RunService.Heartbeat:Connect(function()
  131. self:UpdateFPS()
  132. end)
  133. print("✅ Sistema de Auto-Otimização inicializado")
  134. end
  135.  
  136. --// ========== CONFIGURAÇÕES GLOBAIS ========== //
  137. local Config = {
  138. -- Auto Farm
  139. AutoFarm = false,
  140. AutoColeta = false,
  141.  
  142. -- Farm Settings
  143. CheckDelay = 0.3,
  144. DelayBetweenCrystals = 0.1,
  145. MaxDinoLevel = 60,
  146.  
  147. -- Coleta Settings
  148. raioDeColeta = 25,
  149. delayEntreTentativas = 0.25,
  150. podeExecutar = true,
  151.  
  152. -- ESP Settings
  153. EspMeatActive = false,
  154. PlayerESP = false,
  155. PlayerESP_ShowHP = false,
  156. PlayerESP_TeamCheck = false,
  157.  
  158. -- Click Teleport
  159. ClickTeleportEnabled = false,
  160.  
  161. -- Teleports
  162. SavedTeleports = {},
  163. LastSpawnPosition = nil,
  164.  
  165. -- Patrulha
  166. PatrulhaPontos = {
  167. CFrame.new(0, 30, 0),
  168. CFrame.new(800, 30, 400),
  169. CFrame.new(-750, 30, -600),
  170. CFrame.new(450, 30, -1000),
  171. CFrame.new(-900, 30, 700),
  172. CFrame.new(0, 30, 1000),
  173. }
  174. }
  175.  
  176. --// ========== MÓDULO: UTILIDADES ========== //
  177. local UtilityModule = {}
  178.  
  179. function UtilityModule.getCharacter()
  180. return LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  181. end
  182.  
  183. function UtilityModule.getHumanoidRootPart()
  184. local char = UtilityModule.getCharacter()
  185. return char and char:FindFirstChild("HumanoidRootPart")
  186. end
  187.  
  188. function UtilityModule.getHumanoid()
  189. local char = UtilityModule.getCharacter()
  190. return char and char:FindFirstChildOfClass("Humanoid")
  191. end
  192.  
  193. function UtilityModule.isValidCharacter(char)
  194. if not char or not char.Parent then return false end
  195. return char:FindFirstChild("Humanoid") and char:FindFirstChild("HumanoidRootPart")
  196. end
  197.  
  198. function UtilityModule.SafePcall(func)
  199. local success, result = pcall(func)
  200. if not success then
  201. warn("⚠️ Erro capturado:", result)
  202. end
  203. return success, result
  204. end
  205.  
  206. function UtilityModule.CleanupConnections(connections)
  207. for _, conn in ipairs(connections) do
  208. if conn and conn.Connected then
  209. UtilityModule.SafePcall(function()
  210. conn:Disconnect()
  211. end)
  212. end
  213. end
  214. end
  215.  
  216. print("✅ Módulo de Utilidades carregado")
  217.  
  218. --// ========== MÓDULO: NÍVEL DO DINO ========== //
  219. local DinoLevelModule = {
  220. CurrentLevel = 0,
  221. LastUpdate = 0,
  222. UpdateInterval = 2,
  223. Label = nil
  224. }
  225.  
  226. function DinoLevelModule:GetLevel()
  227. local now = tick()
  228.  
  229. if (now - self.LastUpdate) < self.UpdateInterval then
  230. return self.CurrentLevel
  231. end
  232.  
  233. -- 1. Verificar leaderstats
  234. local leaderstats = LocalPlayer:FindFirstChild("leaderstats")
  235. if leaderstats then
  236. for _, stat in ipairs(leaderstats:GetChildren()) do
  237. local name = stat.Name:lower()
  238. if name:find("level") or name:find("lvl") or name:find("nivel") then
  239. if stat:IsA("IntValue") or stat:IsA("NumberValue") then
  240. local val = tonumber(stat.Value) or 0
  241. if val > 0 then
  242. self.CurrentLevel = val
  243. self.LastUpdate = now
  244. return val
  245. end
  246. end
  247. end
  248. end
  249. end
  250.  
  251. -- 2. Verificar PlayerGui
  252. local playerGui = LocalPlayer:FindFirstChild("PlayerGui")
  253. if playerGui then
  254. for _, gui in ipairs(playerGui:GetDescendants()) do
  255. if gui:IsA("TextLabel") or gui:IsA("TextBox") then
  256. local text = gui.Text:lower()
  257.  
  258. if text:find("level") or text:find("lvl") or text:find("nivel") then
  259. local number = text:match("%d+")
  260. if number then
  261. local val = tonumber(number)
  262. if val and val > 0 and val <= 100 then
  263. self.CurrentLevel = val
  264. self.LastUpdate = now
  265. return val
  266. end
  267. end
  268. end
  269. end
  270. end
  271. end
  272.  
  273. -- 3. Verificar Character
  274. local char = LocalPlayer.Character
  275. if char then
  276. for _, obj in ipairs(char:GetDescendants()) do
  277. if obj:IsA("IntValue") or obj:IsA("NumberValue") then
  278. local name = obj.Name:lower()
  279. if name:find("level") or name:find("lvl") or name:find("nivel") then
  280. local val = tonumber(obj.Value) or 0
  281. if val > 0 then
  282. self.CurrentLevel = val
  283. self.LastUpdate = now
  284. return val
  285. end
  286. end
  287. end
  288. end
  289. end
  290.  
  291. -- 4. Verificar Workspace folders
  292. local possibleFolders = {
  293. Workspace:FindFirstChild("Dinosaurs"),
  294. Workspace:FindFirstChild("Pets"),
  295. Workspace:FindFirstChild("NPCs"),
  296. Workspace:FindFirstChild("Creatures"),
  297. Workspace:FindFirstChild("Animals")
  298. }
  299.  
  300. for _, folder in ipairs(possibleFolders) do
  301. if folder then
  302. for _, dino in ipairs(folder:GetChildren()) do
  303. local owner = dino:FindFirstChild("Owner") or dino:FindFirstChild("Player")
  304.  
  305. if owner and owner:IsA("ObjectValue") and owner.Value == LocalPlayer then
  306. for _, obj in ipairs(dino:GetDescendants()) do
  307. if obj:IsA("IntValue") or obj:IsA("NumberValue") then
  308. local name = obj.Name:lower()
  309. if name:find("level") or name:find("lvl") or name:find("nivel") then
  310. local val = tonumber(obj.Value) or 0
  311. if val > 0 then
  312. self.CurrentLevel = val
  313. self.LastUpdate = now
  314. return val
  315. end
  316. end
  317. end
  318. end
  319. end
  320. end
  321. end
  322. end
  323.  
  324. self.LastUpdate = now
  325. return self.CurrentLevel
  326. end
  327.  
  328. function DinoLevelModule:StartAutoUpdate()
  329. task.spawn(function()
  330. while true do
  331. task.wait(self.UpdateInterval)
  332. local level = self:GetLevel()
  333.  
  334. if self.Label then
  335. self.Label:Set(string.format("🦖 Nível do Dino: %d/%d", level, Config.MaxDinoLevel))
  336. end
  337. end
  338. end)
  339. end
  340.  
  341. function DinoLevelModule:DebugSearch()
  342. print("\n╔════════════════════════════════════════╗")
  343. print("║ INICIANDO BUSCA DE NÍVEL DO DINO ║")
  344. print("╚════════════════════════════════════════╝\n")
  345.  
  346. local function printValues(parent, prefix)
  347. prefix = prefix or ""
  348. for _, child in ipairs(parent:GetChildren()) do
  349. if child:IsA("IntValue") or child:IsA("NumberValue") or child:IsA("StringValue") then
  350. print(prefix .. "├─ " .. child.ClassName .. ": " .. child.Name .. " = " .. tostring(child.Value))
  351. end
  352. if #child:GetChildren() > 0 then
  353. print(prefix .. "└─ Folder: " .. child.Name)
  354. printValues(child, prefix .. " ")
  355. end
  356. end
  357. end
  358.  
  359. print("[1] Verificando leaderstats...")
  360. local leaderstats = LocalPlayer:FindFirstChild("leaderstats")
  361. if leaderstats then
  362. print("✓ leaderstats encontrado!")
  363. printValues(leaderstats, " ")
  364. else
  365. print("✗ leaderstats não encontrado")
  366. end
  367.  
  368. print("\n[2] Verificando PlayerGui...")
  369. local playerGui = LocalPlayer:FindFirstChild("PlayerGui")
  370. if playerGui then
  371. print("✓ PlayerGui encontrado!")
  372. for _, gui in ipairs(playerGui:GetDescendants()) do
  373. if gui:IsA("TextLabel") or gui:IsA("TextBox") then
  374. local text = gui.Text:lower()
  375. if text:find("level") or text:find("lvl") or text:find("nivel") then
  376. print(" └─ Texto: " .. gui.Text)
  377. end
  378. end
  379. end
  380. end
  381.  
  382. print("\n╔════════════════════════════════════════╗")
  383. print("║ Nível encontrado: " .. self:GetLevel())
  384. print("╚════════════════════════════════════════╝\n")
  385.  
  386. return self.CurrentLevel
  387. end
  388.  
  389. print("✅ Módulo de Nível do Dino carregado")
  390.  
  391. --// ========== MÓDULO: SISTEMA DE CRISTAIS ========== //
  392. local CrystalModule = {
  393. PriorityMap = {
  394. legendary = 1,
  395. epic = 2,
  396. rare = 3,
  397. crystal = 4
  398. }
  399. }
  400.  
  401. function CrystalModule:GetRank(name)
  402. name = name:lower()
  403. for key, rank in pairs(self.PriorityMap) do
  404. if name:find(key) then
  405. return rank
  406. end
  407. end
  408. return 5
  409. end
  410.  
  411. function CrystalModule:GetSortedCrystals()
  412. local found = {}
  413.  
  414. for _, obj in ipairs(Workspace:GetDescendants()) do
  415. if obj:IsA("BasePart") and obj.Parent and obj.Parent:IsA("Model") then
  416. local rank = self:GetRank(obj.Parent.Name)
  417. if rank < 5 then
  418. table.insert(found, {part = obj, rank = rank})
  419. end
  420. end
  421. end
  422.  
  423. table.sort(found, function(a, b)
  424. return a.rank < b.rank
  425. end)
  426.  
  427. local parts = {}
  428. for _, entry in ipairs(found) do
  429. table.insert(parts, entry.part)
  430. end
  431.  
  432. return parts
  433. end
  434.  
  435. print("✅ Módulo de Cristais carregado")
  436.  
  437. --// ========== MÓDULO: SISTEMA DE TELEPORTE ========== //
  438. local TeleportModule = {
  439. ActiveConnection = nil
  440. }
  441.  
  442. function TeleportModule:SafeTeleport(targetCFrame, locationName, notificationWindow)
  443. if self.ActiveConnection then
  444. self.ActiveConnection:Disconnect()
  445. self.ActiveConnection = nil
  446. end
  447.  
  448. local char = UtilityModule.getCharacter()
  449. local root = UtilityModule.getHumanoidRootPart()
  450. local humanoid = UtilityModule.getHumanoid()
  451.  
  452. if not root or not humanoid then
  453. if notificationWindow then
  454. notificationWindow:Notify({
  455. Title = "Erro",
  456. Content = "Personagem não encontrado!",
  457. Duration = 1
  458. })
  459. end
  460. return false
  461. end
  462.  
  463. if notificationWindow then
  464. notificationWindow:Notify({
  465. Title = "Teleportando",
  466. Content = "Indo para: " .. locationName,
  467. Duration = 0.5
  468. })
  469. end
  470.  
  471. root.CFrame = targetCFrame
  472.  
  473. task.spawn(function()
  474. task.wait(0.05)
  475.  
  476. local rayParams = RaycastParams.new()
  477. rayParams.FilterType = Enum.RaycastFilterType.Blacklist
  478. rayParams.FilterDescendantsInstances = {char}
  479.  
  480. local rayResult = Workspace:Raycast(
  481. root.Position,
  482. Vector3.new(0, -100, 0),
  483. rayParams
  484. )
  485.  
  486. if rayResult then
  487. root.CFrame = CFrame.new(rayResult.Position + Vector3.new(0, 3, 0))
  488. end
  489. end)
  490.  
  491. local teleportStartTime = tick()
  492. local maxWaitTime = 1.2
  493. local minWaitTime = 0.2
  494.  
  495. self.ActiveConnection = RunService.Heartbeat:Connect(function()
  496. if not char or not char.Parent or not root or not root.Parent or not humanoid then
  497. if self.ActiveConnection then
  498. self.ActiveConnection:Disconnect()
  499. self.ActiveConnection = nil
  500. end
  501. return
  502. end
  503.  
  504. local elapsedTime = tick() - teleportStartTime
  505. local floorMaterial = humanoid.FloorMaterial
  506. local isOnGround = floorMaterial ~= Enum.Material.Air
  507. local velocity = root.AssemblyLinearVelocity
  508. local isStationary = velocity.Magnitude < 2
  509. local humanoidState = humanoid:GetState()
  510. local isLanded = humanoidState == Enum.HumanoidStateType.Landed or
  511. humanoidState == Enum.HumanoidStateType.Running or
  512. humanoidState == Enum.HumanoidStateType.RunningNoPhysics
  513.  
  514. if (elapsedTime > minWaitTime and (isOnGround or (isStationary and isLanded))) or elapsedTime > maxWaitTime then
  515. if self.ActiveConnection then
  516. self.ActiveConnection:Disconnect()
  517. self.ActiveConnection = nil
  518. end
  519.  
  520. if not isOnGround and not isLanded then
  521. local rayParams = RaycastParams.new()
  522. rayParams.FilterType = Enum.RaycastFilterType.Blacklist
  523. rayParams.FilterDescendantsInstances = {char}
  524.  
  525. local rayResult = Workspace:Raycast(
  526. root.Position,
  527. Vector3.new(0, -200, 0),
  528. rayParams
  529. )
  530.  
  531. if rayResult then
  532. root.CFrame = CFrame.new(rayResult.Position + Vector3.new(0, 3, 0))
  533. end
  534. end
  535.  
  536. if notificationWindow then
  537. notificationWindow:Notify({
  538. Title = "Chegou",
  539. Content = locationName,
  540. Duration = 0.5
  541. })
  542. end
  543.  
  544. return
  545. end
  546. end)
  547.  
  548. return true
  549. end
  550.  
  551. function TeleportModule:TeleportToCrystal(crystal)
  552. local root = UtilityModule.getHumanoidRootPart()
  553. if root and crystal then
  554. local char = UtilityModule.getCharacter()
  555. if char and char.PrimaryPart then
  556. char:SetPrimaryPartCFrame(CFrame.new(crystal.Position + Vector3.new(0, 4.5, 0)))
  557. end
  558. end
  559. end
  560.  
  561. function TeleportModule:TeleportTo(cf)
  562. local root = UtilityModule.getHumanoidRootPart()
  563. if root and root.Parent then
  564. local char = UtilityModule.getCharacter()
  565. if char and char.PrimaryPart then
  566. char:SetPrimaryPartCFrame(cf)
  567. end
  568. end
  569. end
  570.  
  571. print("✅ Módulo de Teleporte carregado")
  572.  
  573. --// ========== MÓDULO: ESP DE CARNES ========== //
  574. local MeatESPModule = {
  575. ActiveESPs = {},
  576. UpdateLoop = nil,
  577. ScanLoop = nil,
  578. UpdateRate = 0.1,
  579. ScanInterval = 10,
  580.  
  581. ESP_MIN_SIZE = 35,
  582. ESP_MAX_SIZE = 65,
  583. MAX_VISIBLE_DISTANCE = 999999
  584. }
  585.  
  586. function MeatESPModule:IsMeatObject(obj)
  587. if not obj then return false, nil end
  588.  
  589. -- Verificar ProximityPrompt
  590. if obj:IsA("ProximityPrompt") and obj.Enabled then
  591. local action = (obj.ActionText or ""):lower()
  592. local objText = (obj.ObjectText or ""):lower()
  593.  
  594. local foodActions = {"coma", "eat", "pegar", "pick", "grab", "take"}
  595.  
  596. for _, foodAction in ipairs(foodActions) do
  597. if action:find(foodAction) then
  598. local fullText = action .. " " .. objText
  599. local excludeWords = {"plant", "fish", "berry", "fruit", "vegetable", "seed"}
  600.  
  601. local isExcluded = false
  602. for _, word in ipairs(excludeWords) do
  603. if fullText:find(word) then
  604. isExcluded = true
  605. break
  606. end
  607. end
  608.  
  609. if not isExcluded then
  610. local parent = obj.Parent
  611. if parent and parent:IsA("BasePart") then
  612. -- Verificar se não está no personagem de algum jogador
  613. for _, player in ipairs(Players:GetPlayers()) do
  614. if player.Character and parent:IsDescendantOf(player.Character) then
  615. return false, nil
  616. end
  617. end
  618. return true, parent
  619. end
  620. end
  621. end
  622. end
  623. end
  624.  
  625. -- Verificar pelo nome
  626. if obj:IsA("Model") or obj:IsA("BasePart") then
  627. local name = (obj.Name or ""):lower()
  628.  
  629. local meatWords = {
  630. "meat", "carne", "beef", "steak", "chicken",
  631. "frango", "pork", "porco", "bacon", "ham"
  632. }
  633.  
  634. for _, word in ipairs(meatWords) do
  635. if name:find(word) then
  636. -- Verificar se não está no personagem
  637. for _, player in ipairs(Players:GetPlayers()) do
  638. if player.Character and obj:IsDescendantOf(player.Character) then
  639. return false, nil
  640. end
  641. end
  642.  
  643. if obj:IsA("Model") then
  644. local part = obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart")
  645. return part ~= nil, part
  646. else
  647. return true, obj
  648. end
  649. end
  650. end
  651. end
  652.  
  653. return false, nil
  654. end
  655.  
  656. function MeatESPModule:FindNearest()
  657. local root = UtilityModule.getHumanoidRootPart()
  658. if not root then return nil, math.huge end
  659.  
  660. local nearestMeat = nil
  661. local nearestDistance = math.huge
  662.  
  663. for _, obj in ipairs(Workspace:GetDescendants()) do
  664. local isMeat, part = self:IsMeatObject(obj)
  665. if isMeat and part and part.Parent then
  666. local distance = (part.Position - root.Position).Magnitude
  667. if distance < nearestDistance then
  668. nearestDistance = distance
  669. nearestMeat = part
  670. end
  671. end
  672. end
  673.  
  674. return nearestMeat, nearestDistance
  675. end
  676.  
  677. function MeatESPModule:CreateESP(part)
  678. if not part or not part:IsA("BasePart") or not part.Parent then return end
  679.  
  680. local id = tostring(part:GetDebugId())
  681. if self.ActiveESPs[id] then return end
  682.  
  683. local esp = Instance.new("BillboardGui")
  684. esp.Name = "MeatESP_" .. id
  685. esp.Adornee = part
  686. esp.Size = UDim2.new(0, self.ESP_MAX_SIZE, 0, self.ESP_MAX_SIZE * 0.4)
  687. esp.StudsOffset = Vector3.new(0, 3, 0)
  688. esp.AlwaysOnTop = true
  689. esp.LightInfluence = 0
  690. esp.MaxDistance = self.MAX_VISIBLE_DISTANCE
  691. esp.Parent = Workspace
  692. esp.Enabled = true
  693.  
  694. local frame = Instance.new("Frame", esp)
  695. frame.Size = UDim2.new(1, 0, 1, 0)
  696. frame.BackgroundColor3 = Color3.fromRGB(255, 80, 80)
  697. frame.BackgroundTransparency = 0.4
  698. frame.BorderSizePixel = 1
  699. frame.BorderColor3 = Color3.fromRGB(255, 200, 0)
  700.  
  701. local corner = Instance.new("UICorner", frame)
  702. corner.CornerRadius = UDim.new(0, 6)
  703.  
  704. local iconLabel = Instance.new("TextLabel", frame)
  705. iconLabel.Size = UDim2.new(0.3, 0, 0.9, 0)
  706. iconLabel.Position = UDim2.new(0, 2, 0.05, 0)
  707. iconLabel.BackgroundTransparency = 1
  708. iconLabel.Text = "🥩"
  709. iconLabel.TextScaled = true
  710. iconLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  711. iconLabel.Font = Enum.Font.SourceSansBold
  712. iconLabel.TextStrokeTransparency = 0.5
  713.  
  714. local distLabel = Instance.new("TextLabel", frame)
  715. distLabel.Name = "Distance"
  716. distLabel.Size = UDim2.new(0.7, -4, 0.9, 0)
  717. distLabel.Position = UDim2.new(0.3, 2, 0.05, 0)
  718. distLabel.BackgroundTransparency = 1
  719. distLabel.Text = "0m"
  720. distLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  721. distLabel.TextStrokeTransparency = 0.3
  722. distLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
  723. distLabel.Font = Enum.Font.GothamBold
  724. distLabel.TextScaled = true
  725.  
  726. self.ActiveESPs[id] = {
  727. gui = esp,
  728. part = part,
  729. distLabel = distLabel,
  730. frame = frame,
  731. iconLabel = iconLabel
  732. }
  733.  
  734. return true
  735. end
  736.  
  737. function MeatESPModule:Scan()
  738. if not Config.EspMeatActive then return end
  739.  
  740. for id, data in pairs(self.ActiveESPs) do
  741. if data.gui then
  742. UtilityModule.SafePcall(function() data.gui:Destroy() end)
  743. end
  744. end
  745. self.ActiveESPs = {}
  746.  
  747. local meatCount = 0
  748. local checkedCount = 0
  749.  
  750. for _, obj in ipairs(Workspace:GetDescendants()) do
  751. checkedCount = checkedCount + 1
  752.  
  753. if checkedCount % 300 == 0 then
  754. task.wait()
  755. if not Config.EspMeatActive then return end
  756. end
  757.  
  758. local isMeat, part = self:IsMeatObject(obj)
  759. if isMeat and part and part.Parent then
  760. if self:CreateESP(part) then
  761. meatCount = meatCount + 1
  762. end
  763. end
  764. end
  765.  
  766. print("🥩 ESP Carnes: " .. meatCount .. " encontradas")
  767. end
  768.  
  769. function MeatESPModule:UpdateInfo()
  770. if not Config.EspMeatActive then return end
  771.  
  772. local root = UtilityModule.getHumanoidRootPart()
  773. if not root then return end
  774.  
  775. for id, data in pairs(self.ActiveESPs) do
  776. if data.part and data.part.Parent and data.gui and data.gui.Parent then
  777. local distance = (data.part.Position - root.Position).Magnitude
  778.  
  779. data.gui.Enabled = true
  780.  
  781. -- Atualizar distância
  782. if data.distLabel then
  783. if distance < 100 then
  784. data.distLabel.Text = string.format("%.0fm", distance)
  785. elseif distance < 1000 then
  786. data.distLabel.Text = string.format("%.0fm", distance)
  787. else
  788. data.distLabel.Text = string.format("%.1fkm", distance / 1000)
  789. end
  790. end
  791.  
  792. -- Atualizar tamanho baseado na distância
  793. local scaleFactor
  794. if distance <= 50 then scaleFactor = 1.0
  795. elseif distance <= 200 then scaleFactor = 0.75
  796. elseif distance <= 500 then scaleFactor = 0.6
  797. elseif distance <= 1000 then scaleFactor = 0.5
  798. elseif distance <= 2000 then scaleFactor = 0.4
  799. elseif distance <= 3000 then scaleFactor = 0.35
  800. elseif distance <= 5000 then scaleFactor = 0.3
  801. elseif distance <= 10000 then scaleFactor = 0.25
  802. else scaleFactor = 0.2 end
  803.  
  804. local newSize = self.ESP_MIN_SIZE + ((self.ESP_MAX_SIZE - self.ESP_MIN_SIZE) * scaleFactor)
  805. data.gui.Size = UDim2.new(0, newSize, 0, newSize * 0.4)
  806.  
  807. -- Atualizar transparência
  808. if data.frame then
  809. local transparency
  810. if distance < 300 then transparency = 0.3
  811. elseif distance < 1000 then transparency = 0.5
  812. elseif distance < 2500 then transparency = 0.65
  813. elseif distance < 5000 then transparency = 0.75
  814. elseif distance < 10000 then transparency = 0.8
  815. else transparency = 0.85 end
  816. data.frame.BackgroundTransparency = transparency
  817. end
  818.  
  819. -- Atualizar cor baseada na distância
  820. if distance < 100 then
  821. data.frame.BackgroundColor3 = Color3.fromRGB(100, 255, 100)
  822. data.frame.BorderColor3 = Color3.fromRGB(200, 255, 200)
  823. elseif distance < 500 then
  824. data.frame.BackgroundColor3 = Color3.fromRGB(255, 255, 100)
  825. data.frame.BorderColor3 = Color3.fromRGB(255, 255, 150)
  826. elseif distance < 1500 then
  827. data.frame.BackgroundColor3 = Color3.fromRGB(255, 180, 100)
  828. data.frame.BorderColor3 = Color3.fromRGB(255, 200, 150)
  829. elseif distance < 3000 then
  830. data.frame.BackgroundColor3 = Color3.fromRGB(255, 120, 120)
  831. data.frame.BorderColor3 = Color3.fromRGB(255, 150, 150)
  832. elseif distance < 5000 then
  833. data.frame.BackgroundColor3 = Color3.fromRGB(200, 150, 255)
  834. data.frame.BorderColor3 = Color3.fromRGB(220, 180, 255)
  835. elseif distance < 10000 then
  836. data.frame.BackgroundColor3 = Color3.fromRGB(180, 180, 255)
  837. data.frame.BorderColor3 = Color3.fromRGB(200, 200, 255)
  838. else
  839. data.frame.BackgroundColor3 = Color3.fromRGB(150, 150, 150)
  840. data.frame.BorderColor3 = Color3.fromRGB(180, 180, 180)
  841. end
  842. else
  843. if data.gui then
  844. UtilityModule.SafePcall(function() data.gui:Destroy() end)
  845. end
  846. self.ActiveESPs[id] = nil
  847. end
  848. end
  849. end
  850.  
  851. function MeatESPModule:Start()
  852. if self.UpdateLoop then return end
  853.  
  854. self:Scan()
  855.  
  856. self.UpdateLoop = RunService.Heartbeat:Connect(function()
  857. self:UpdateInfo()
  858. end)
  859.  
  860. self.ScanLoop = task.spawn(function()
  861. while Config.EspMeatActive do
  862. task.wait(self.ScanInterval)
  863. if Config.EspMeatActive then
  864. -- Adicionar novos ESPs
  865. for _, obj in ipairs(Workspace:GetDescendants()) do
  866. if not Config.EspMeatActive then break end
  867.  
  868. local isMeat, part = self:IsMeatObject(obj)
  869. if isMeat and part then
  870. local id = tostring(part:GetDebugId())
  871. if not self.ActiveESPs[id] then
  872. self:CreateESP(part)
  873. end
  874. end
  875. end
  876.  
  877. -- Remover ESPs inválidos
  878. for id, data in pairs(self.ActiveESPs) do
  879. if not data.part or not data.part.Parent then
  880. if data.gui then
  881. UtilityModule.SafePcall(function() data.gui:Destroy() end)
  882. end
  883. self.ActiveESPs[id] = nil
  884. end
  885. end
  886. end
  887. end
  888. end)
  889.  
  890. -- Detectar novos objetos
  891. Workspace.DescendantAdded:Connect(function(obj)
  892. if not Config.EspMeatActive then return end
  893.  
  894. task.wait(0.1)
  895. local isMeat, part = self:IsMeatObject(obj)
  896. if isMeat and part then
  897. local id = tostring(part:GetDebugId())
  898. if not self.ActiveESPs[id] then
  899. self:CreateESP(part)
  900. end
  901. end
  902. end)
  903.  
  904. print("✅ ESP de Carnes iniciado")
  905. end
  906.  
  907. function MeatESPModule:Stop()
  908. if self.UpdateLoop then
  909. self.UpdateLoop:Disconnect()
  910. self.UpdateLoop = nil
  911. end
  912.  
  913. if self.ScanLoop then
  914. task.cancel(self.ScanLoop)
  915. self.ScanLoop = nil
  916. end
  917.  
  918. for id, data in pairs(self.ActiveESPs) do
  919. if data.gui then
  920. UtilityModule.SafePcall(function() data.gui:Destroy() end)
  921. end
  922. end
  923. self.ActiveESPs = {}
  924.  
  925. print("🛑 ESP de Carnes parado")
  926. end
  927.  
  928. print("✅ Módulo ESP de Carnes carregado")
  929.  
  930. --// ========== MÓDULO: ESP DE JOGADORES ========== //
  931. local PlayerESPModule = {
  932. Data = {},
  933. ProcessQueue = {},
  934. UpdateInterval = 0.5,
  935. MaxPlayersPerFrame = 2,
  936.  
  937. HPBarMaxDistance = 4000,
  938. HPBarSize = UDim2.new(0, 50, 0, 5),
  939. HPBarYOffset = 0.5,
  940. HighlightFillTransparency = 0.85,
  941. OutlineTransparency = 0.15,
  942.  
  943. TeamColorMap = {},
  944. UsedHues = {},
  945. NextHueIndex = 0,
  946.  
  947. COLOR_ENEMY = Color3.fromRGB(255, 85, 85),
  948. COLOR_FRIEND = Color3.fromRGB(85, 255, 85),
  949. COLOR_NEUTRAL = Color3.fromRGB(240, 240, 240)
  950. }
  951.  
  952. function PlayerESPModule:GenerateUniqueTeamColor()
  953. local goldenRatio = 0.618033988749895
  954. local hue = (self.NextHueIndex * goldenRatio) % 1
  955.  
  956. -- Evitar tons de verde (aliados)
  957. if hue >= 0.25 and hue <= 0.45 then
  958. hue = (hue + 0.35) % 1
  959. end
  960.  
  961. local minDistance = 0.15
  962. for _, usedHue in pairs(self.UsedHues) do
  963. local distance = math.abs(hue - usedHue)
  964. if distance < minDistance or distance > (1 - minDistance) then
  965. self.NextHueIndex = self.NextHueIndex + 1
  966. return self:GenerateUniqueTeamColor()
  967. end
  968. end
  969.  
  970. table.insert(self.UsedHues, hue)
  971. self.NextHueIndex = self.NextHueIndex + 1
  972.  
  973. local sat = 0.8 + (math.random() * 0.2)
  974. local val = 0.9 + (math.random() * 0.1)
  975.  
  976. return Color3.fromHSV(hue, sat, val)
  977. end
  978.  
  979. function PlayerESPModule:IsNeutralPlayer(p)
  980. return p.Team == nil
  981. end
  982.  
  983. function PlayerESPModule:IsAllyPlayer(p)
  984. return LocalPlayer.Team and p.Team == LocalPlayer.Team
  985. end
  986.  
  987. function PlayerESPModule:GetColorForPlayer(p)
  988. if self:IsNeutralPlayer(p) then
  989. return self.COLOR_NEUTRAL
  990. end
  991.  
  992. if self:IsAllyPlayer(p) then
  993. return self.COLOR_FRIEND
  994. end
  995.  
  996. if p.Team and not self.TeamColorMap[p.Team] then
  997. self.TeamColorMap[p.Team] = self:GenerateUniqueTeamColor()
  998. end
  999.  
  1000. return self.TeamColorMap[p.Team] or self.COLOR_ENEMY
  1001. end
  1002.  
  1003. function PlayerESPModule:ShouldShowESP(p)
  1004. if not Config.PlayerESP then return false end
  1005. if Config.PlayerESP_TeamCheck then return not self:IsAllyPlayer(p) end
  1006. return true
  1007. end
  1008.  
  1009. function PlayerESPModule:ShouldShowHP(p)
  1010. if not Config.PlayerESP_ShowHP then return false end
  1011. if Config.PlayerESP_TeamCheck then return not self:IsAllyPlayer(p) end
  1012. return true
  1013. end
  1014.  
  1015. function PlayerESPModule:ClearConnections(pack)
  1016. if not pack or not pack.conns then return end
  1017. UtilityModule.CleanupConnections(pack.conns)
  1018. pack.conns = {}
  1019. end
  1020.  
  1021. function PlayerESPModule:Detach(plr)
  1022. local pack = self.Data[plr]
  1023. if not pack then return end
  1024.  
  1025. self:ClearConnections(pack)
  1026.  
  1027. if pack.highlight then
  1028. UtilityModule.SafePcall(function() pack.highlight:Destroy() end)
  1029. pack.highlight = nil
  1030. end
  1031.  
  1032. if pack.hpGui then
  1033. UtilityModule.SafePcall(function() pack.hpGui:Destroy() end)
  1034. pack.hpGui = nil
  1035. end
  1036.  
  1037. self.Data[plr] = nil
  1038. end
  1039.  
  1040. function PlayerESPModule:EnsureHighlight(plr, char)
  1041. local pack = self.Data[plr]
  1042. if not pack or not UtilityModule.isValidCharacter(char) then return end
  1043.  
  1044. if not pack.highlight or not pack.highlight.Parent then
  1045. -- Remover highlights antigos
  1046. for _, obj in ipairs(char:GetChildren()) do
  1047. if obj:IsA("Highlight") and obj.Name == "PlayerESP_Highlight" then
  1048. UtilityModule.SafePcall(function() obj:Destroy() end)
  1049. end
  1050. end
  1051.  
  1052. local hi = Instance.new("Highlight")
  1053. hi.Name = "PlayerESP_Highlight"
  1054. hi.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  1055. hi.FillTransparency = self.HighlightFillTransparency
  1056. hi.OutlineTransparency = self.OutlineTransparency
  1057. hi.Adornee = char
  1058. hi.Parent = char
  1059. pack.highlight = hi
  1060. end
  1061.  
  1062. local col = self:GetColorForPlayer(plr)
  1063. pack.highlight.FillColor = col
  1064. pack.highlight.OutlineColor = col
  1065. pack.highlight.Adornee = char
  1066. pack.highlight.Enabled = self:ShouldShowESP(plr)
  1067. end
  1068.  
  1069. function PlayerESPModule:EnsureHPGui(plr, char)
  1070. local pack = self.Data[plr]
  1071. if not pack or not UtilityModule.isValidCharacter(char) then return end
  1072.  
  1073. local hum = char:FindFirstChildOfClass("Humanoid")
  1074. local head = char:FindFirstChild("Head")
  1075. local root = char:FindFirstChild("HumanoidRootPart")
  1076.  
  1077. if not hum or not root then
  1078. if pack.hpGui then
  1079. pack.hpGui.Enabled = false
  1080. end
  1081. return
  1082. end
  1083.  
  1084. pack.hum = hum
  1085. pack.head = head
  1086. pack.root = root
  1087.  
  1088. if not pack.hpGui or not pack.hpGui.Parent then
  1089. -- Remover GUIs antigas
  1090. for _, obj in ipairs(char:GetChildren()) do
  1091. if obj:IsA("BillboardGui") and obj.Name == "PlayerESP_HP" then
  1092. UtilityModule.SafePcall(function() obj:Destroy() end)
  1093. end
  1094. end
  1095.  
  1096. local bill = Instance.new("BillboardGui")
  1097. bill.Name = "PlayerESP_HP"
  1098. bill.AlwaysOnTop = true
  1099. bill.LightInfluence = 0
  1100. bill.Size = self.HPBarSize
  1101. bill.MaxDistance = self.HPBarMaxDistance
  1102. bill.Parent = char
  1103.  
  1104. local bg = Instance.new("Frame")
  1105. bg.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  1106. bg.BackgroundTransparency = 0.2
  1107. bg.BorderSizePixel = 0
  1108. bg.Size = UDim2.fromScale(1, 1)
  1109. bg.Parent = bill
  1110.  
  1111. local stroke = Instance.new("UIStroke")
  1112. stroke.Color = Color3.fromRGB(0, 0, 0)
  1113. stroke.Thickness = 1.5
  1114. stroke.Parent = bg
  1115.  
  1116. local corner1 = Instance.new("UICorner")
  1117. corner1.CornerRadius = UDim.new(0, 2)
  1118. corner1.Parent = bg
  1119.  
  1120. local fill = Instance.new("Frame")
  1121. fill.BackgroundColor3 = self.COLOR_FRIEND
  1122. fill.BorderSizePixel = 0
  1123. fill.Size = UDim2.fromScale(1, 1)
  1124. fill.Parent = bg
  1125.  
  1126. local corner2 = Instance.new("UICorner")
  1127. corner2.CornerRadius = UDim.new(0, 2)
  1128. corner2.Parent = fill
  1129.  
  1130. pack.hpGui = bill
  1131. pack.hpFill = fill
  1132. end
  1133.  
  1134. if head then
  1135. pack.hpGui.Adornee = head
  1136. local headSize = head.Size.Y
  1137. pack.hpGui.StudsOffset = Vector3.new(0, headSize/2 + self.HPBarYOffset, 0)
  1138. else
  1139. pack.hpGui.Adornee = root
  1140. pack.hpGui.StudsOffset = Vector3.new(0, 2.5 + self.HPBarYOffset, 0)
  1141. end
  1142.  
  1143. pack.hpGui.Enabled = self:ShouldShowHP(plr)
  1144. end
  1145.  
  1146. function PlayerESPModule:UpdateHPBar(plr)
  1147. local pack = self.Data[plr]
  1148. if not pack or not pack.hpGui or not pack.hpFill or not pack.hum then return end
  1149.  
  1150. local h = pack.hum.Health
  1151. local m = pack.hum.MaxHealth
  1152. if m <= 0 then m = 100 end
  1153.  
  1154. local ratio = math.clamp(h / m, 0, 1)
  1155. pack.hpFill.Size = UDim2.new(ratio, 0, 1, 0)
  1156.  
  1157. local r, g, b
  1158. if ratio > 0.5 then
  1159. r = (1 - ratio) * 2 * 255
  1160. g = 255
  1161. b = 0
  1162. else
  1163. r = 255
  1164. g = ratio * 2 * 255
  1165. b = 0
  1166. end
  1167.  
  1168. pack.hpFill.BackgroundColor3 = Color3.fromRGB(r, g, b)
  1169. pack.hpGui.Enabled = self:ShouldShowHP(plr) and (h > 0)
  1170. end
  1171.  
  1172. function PlayerESPModule:Setup(plr, char)
  1173. if plr == LocalPlayer or not UtilityModule.isValidCharacter(char) then return end
  1174.  
  1175. local pack = self.Data[plr] or {conns = {}}
  1176. self.Data[plr] = pack
  1177.  
  1178. if pack.char and pack.char ~= char then
  1179. self:ClearConnections(pack)
  1180. if pack.highlight then UtilityModule.SafePcall(function() pack.highlight:Destroy() end) end
  1181. if pack.hpGui then UtilityModule.SafePcall(function() pack.hpGui:Destroy() end) end
  1182. pack.char = nil
  1183. pack.highlight = nil
  1184. pack.hpGui = nil
  1185. pack.hpFill = nil
  1186. pack.hum = nil
  1187. pack.head = nil
  1188. end
  1189.  
  1190. pack.char = char
  1191. local hum = char:FindFirstChildOfClass("Humanoid")
  1192.  
  1193. if not hum then return end
  1194.  
  1195. pack.hum = hum
  1196. hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
  1197.  
  1198. task.wait(0.1)
  1199. self:EnsureHighlight(plr, char)
  1200. self:EnsureHPGui(plr, char)
  1201. self:UpdateHPBar(plr)
  1202.  
  1203. table.insert(pack.conns, hum.HealthChanged:Connect(function()
  1204. self:UpdateHPBar(plr)
  1205. end))
  1206.  
  1207. table.insert(pack.conns, plr:GetPropertyChangedSignal("Team"):Connect(function()
  1208. task.spawn(function()
  1209. self:EnsureHighlight(plr, char)
  1210. self:UpdateHPBar(plr)
  1211. end)
  1212. end))
  1213.  
  1214. pack.initialized = true
  1215. end
  1216.  
  1217. function PlayerESPModule:Hook(plr)
  1218. if plr == LocalPlayer then return end
  1219. table.insert(self.ProcessQueue, plr)
  1220. end
  1221.  
  1222. function PlayerESPModule:ReinitializeAll()
  1223. for plr, _ in pairs(self.Data) do
  1224. self:Detach(plr)
  1225. end
  1226.  
  1227. self.ProcessQueue = {}
  1228.  
  1229. task.wait(0.1)
  1230.  
  1231. for _, p in ipairs(Players:GetPlayers()) do
  1232. if p ~= LocalPlayer then
  1233. self:Hook(p)
  1234. end
  1235. end
  1236. end
  1237.  
  1238. function PlayerESPModule:StartProcessQueue()
  1239. task.spawn(function()
  1240. while true do
  1241. task.wait(0.2)
  1242.  
  1243. if #self.ProcessQueue > 0 and Config.PlayerESP then
  1244. local plr = table.remove(self.ProcessQueue, 1)
  1245.  
  1246. if plr and plr.Parent then
  1247. self:Detach(plr)
  1248. self.Data[plr] = {conns = {}}
  1249.  
  1250. if plr.Character then
  1251. task.spawn(function()
  1252. self:Setup(plr, plr.Character)
  1253. end)
  1254. end
  1255.  
  1256. table.insert(self.Data[plr].conns, plr.CharacterAdded:Connect(function(char)
  1257. task.wait(0.5)
  1258. self:Setup(plr, char)
  1259. end))
  1260.  
  1261. table.insert(self.Data[plr].conns, plr.CharacterRemoving:Connect(function()
  1262. local pack = self.Data[plr]
  1263. if pack then
  1264. if pack.hpGui then
  1265. UtilityModule.SafePcall(function() pack.hpGui:Destroy() end)
  1266. pack.hpGui = nil
  1267. end
  1268. if pack.highlight then
  1269. UtilityModule.SafePcall(function() pack.highlight:Destroy() end)
  1270. pack.highlight = nil
  1271. end
  1272. pack.hum = nil
  1273. pack.head = nil
  1274. pack.initialized = false
  1275. end
  1276. end))
  1277. end
  1278. end
  1279. end
  1280. end)
  1281. end
  1282.  
  1283. function PlayerESPModule:StartUpdateLoop()
  1284. task.spawn(function()
  1285. while true do
  1286. task.wait(self.UpdateInterval)
  1287.  
  1288. if not Config.PlayerESP then
  1289. task.wait(1)
  1290. continue
  1291. end
  1292.  
  1293. local processed = 0
  1294. for plr, pack in pairs(self.Data) do
  1295. if processed >= self.MaxPlayersPerFrame then
  1296. task.wait()
  1297. processed = 0
  1298. end
  1299.  
  1300. if plr and plr.Parent and plr ~= LocalPlayer then
  1301. local char = plr.Character
  1302. if char and UtilityModule.isValidCharacter(char) then
  1303. if not pack.initialized or pack.char ~= char then
  1304. self:Setup(plr, char)
  1305. else
  1306. if not pack.highlight or not pack.highlight.Parent then
  1307. self:EnsureHighlight(plr, char)
  1308. end
  1309. if not pack.hpGui or not pack.hpGui.Parent then
  1310. self:EnsureHPGui(plr, char)
  1311. end
  1312. if pack.highlight then
  1313. pack.highlight.Enabled = self:ShouldShowESP(plr)
  1314. end
  1315. if pack.hpGui then
  1316. pack.hpGui.Enabled = self:ShouldShowHP(plr) and pack.hum and pack.hum.Health > 0
  1317. end
  1318. self:UpdateHPBar(plr)
  1319. end
  1320. end
  1321. end
  1322. processed = processed + 1
  1323. end
  1324. end
  1325. end)
  1326. end
  1327.  
  1328. function PlayerESPModule:Init()
  1329. -- Conectar eventos de jogadores
  1330. task.spawn(function()
  1331. task.wait(2)
  1332.  
  1333. Players.PlayerAdded:Connect(function(p)
  1334. task.wait(0.5)
  1335. self:Hook(p)
  1336. end)
  1337.  
  1338. Players.PlayerRemoving:Connect(function(p)
  1339. self:Detach(p)
  1340. end)
  1341. end)
  1342.  
  1343. self:StartProcessQueue()
  1344. self:StartUpdateLoop()
  1345.  
  1346. print("✅ Módulo ESP de Jogadores inicializado")
  1347. end
  1348.  
  1349. print("✅ Módulo ESP de Jogadores carregado")
  1350.  
  1351. --// ========== MÓDULO: CLICK TELEPORT ========== //
  1352. local ClickTeleportModule = {
  1353. Enabled = false,
  1354. UIVisible = false,
  1355. ScreenGui = nil,
  1356. MainFrame = nil,
  1357. MinimizedBtn = nil,
  1358. Connections = {},
  1359.  
  1360. ClickState = {
  1361. StartTime = 0,
  1362. StartPosition = nil,
  1363. IsValid = false
  1364. },
  1365.  
  1366. Config = {
  1367. MaxClickTime = 0.3,
  1368. MaxDragDistance = 10,
  1369. RaycastDistance = 10000,
  1370. TeleportOffset = 3
  1371. },
  1372.  
  1373. Theme = {
  1374. Background = Color3.fromRGB(25, 25, 35),
  1375. Secondary = Color3.fromRGB(35, 35, 45),
  1376. Accent = Color3.fromRGB(90, 170, 255),
  1377. Success = Color3.fromRGB(90, 255, 140),
  1378. Danger = Color3.fromRGB(255, 90, 90),
  1379. Text = Color3.fromRGB(255, 255, 255),
  1380. TextDim = Color3.fromRGB(180, 180, 200)
  1381. }
  1382. }
  1383.  
  1384. function ClickTeleportModule:GetMouseHit()
  1385. local unitRay = Camera:ScreenPointToRay(Mouse.X, Mouse.Y)
  1386.  
  1387. local raycastParams = RaycastParams.new()
  1388. raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
  1389. raycastParams.FilterDescendantsInstances = {LocalPlayer.Character}
  1390. raycastParams.IgnoreWater = false
  1391.  
  1392. local raycastResult = Workspace:Raycast(
  1393. unitRay.Origin,
  1394. unitRay.Direction * self.Config.RaycastDistance,
  1395. raycastParams
  1396. )
  1397.  
  1398. return raycastResult
  1399. end
  1400.  
  1401. function ClickTeleportModule:TeleportToPosition(position)
  1402. local root = UtilityModule.getHumanoidRootPart()
  1403. if not root then return false end
  1404.  
  1405. local currentPosition = root.Position
  1406. local teleportPos = position + Vector3.new(0, self.Config.TeleportOffset, 0)
  1407. local directionVector = (position - currentPosition)
  1408. local horizontalDirection = Vector3.new(directionVector.X, 0, directionVector.Z)
  1409. local lookDirection = horizontalDirection.Unit
  1410. local targetCFrame = CFrame.new(teleportPos, teleportPos + lookDirection)
  1411.  
  1412. root.CFrame = targetCFrame
  1413.  
  1414. return true
  1415. end
  1416.  
  1417. function ClickTeleportModule:IsValidClick(startPos, endPos, duration)
  1418. if duration > self.Config.MaxClickTime then return false end
  1419.  
  1420. local dragDistance = (endPos - startPos).Magnitude
  1421. if dragDistance > self.Config.MaxDragDistance then return false end
  1422.  
  1423. return true
  1424. end
  1425.  
  1426. function ClickTeleportModule:UpdateStatusLabel(text, color)
  1427. if self.MainFrame then
  1428. local statusLabel = self.MainFrame:FindFirstChild("Container"):FindFirstChild("StatusLabel")
  1429. if statusLabel then
  1430. statusLabel.Text = text
  1431. statusLabel.TextColor3 = color
  1432. end
  1433. end
  1434. end
  1435.  
  1436. function ClickTeleportModule:EnableClickDetection()
  1437. UtilityModule.CleanupConnections(self.Connections)
  1438. self.Connections = {}
  1439.  
  1440. table.insert(self.Connections, UserInputService.InputBegan:Connect(function(input, gameProcessed)
  1441. if gameProcessed then return end
  1442. if not self.Enabled then return end
  1443.  
  1444. if input.UserInputType == Enum.UserInputType.MouseButton1 or
  1445. input.UserInputType == Enum.UserInputType.Touch then
  1446. self.ClickState.StartTime = tick()
  1447. self.ClickState.StartPosition = Vector2.new(Mouse.X, Mouse.Y)
  1448. self.ClickState.IsValid = true
  1449. end
  1450. end))
  1451.  
  1452. table.insert(self.Connections, UserInputService.InputEnded:Connect(function(input, gameProcessed)
  1453. if gameProcessed then return end
  1454. if not self.Enabled then return end
  1455. if not self.ClickState.IsValid then return end
  1456.  
  1457. if input.UserInputType == Enum.UserInputType.MouseButton1 or
  1458. input.UserInputType == Enum.UserInputType.Touch then
  1459.  
  1460. local clickDuration = tick() - self.ClickState.StartTime
  1461. local endPosition = Vector2.new(Mouse.X, Mouse.Y)
  1462.  
  1463. if self:IsValidClick(self.ClickState.StartPosition, endPosition, clickDuration) then
  1464. local raycastResult = self:GetMouseHit()
  1465.  
  1466. if raycastResult then
  1467. if self:TeleportToPosition(raycastResult.Position) then
  1468. self:UpdateStatusLabel("✅ Teleportado!", self.Theme.Success)
  1469.  
  1470. task.wait(1)
  1471. self:UpdateStatusLabel("Clique em qualquer lugar para teleportar", self.Theme.TextDim)
  1472. end
  1473. else
  1474. self:UpdateStatusLabel("❌ Não é possível teleportar para o céu", self.Theme.Danger)
  1475.  
  1476. task.wait(1.5)
  1477. self:UpdateStatusLabel("Clique em qualquer lugar para teleportar", self.Theme.TextDim)
  1478. end
  1479. end
  1480.  
  1481. self.ClickState.IsValid = false
  1482. end
  1483. end))
  1484. end
  1485.  
  1486. function ClickTeleportModule:DisableClickDetection()
  1487. UtilityModule.CleanupConnections(self.Connections)
  1488. self.Connections = {}
  1489. end
  1490.  
  1491. function ClickTeleportModule:MinimizeUI()
  1492. if self.MainFrame then
  1493. self.MainFrame.Visible = false
  1494. end
  1495. if self.MinimizedBtn then
  1496. self.MinimizedBtn.Visible = true
  1497.  
  1498. self.MinimizedBtn.Size = UDim2.new(0, 0, 0, 0)
  1499. TweenService:Create(self.MinimizedBtn, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
  1500. Size = UDim2.new(0, 50, 0, 50)
  1501. }):Play()
  1502. end
  1503. end
  1504.  
  1505. function ClickTeleportModule:MaximizeUI()
  1506. if self.MinimizedBtn then
  1507. TweenService:Create(self.MinimizedBtn, TweenInfo.new(0.2, Enum.EasingStyle.Back, Enum.EasingDirection.In), {
  1508. Size = UDim2.new(0, 0, 0, 0)
  1509. }):Play()
  1510.  
  1511. task.wait(0.2)
  1512. self.MinimizedBtn.Visible = false
  1513. end
  1514. if self.MainFrame then
  1515. self.MainFrame.Visible = true
  1516.  
  1517. self.MainFrame.Size = UDim2.new(0, 0, 0, 0)
  1518. TweenService:Create(self.MainFrame, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {
  1519. Size = UDim2.new(0, 260, 0, 180)
  1520. }):Play()
  1521. end
  1522. end
  1523.  
  1524. function ClickTeleportModule:CreateUI()
  1525. if self.ScreenGui then
  1526. UtilityModule.SafePcall(function() self.ScreenGui:Destroy() end)
  1527. self.ScreenGui = nil
  1528. end
  1529.  
  1530. self.ScreenGui = Instance.new("ScreenGui")
  1531. self.ScreenGui.Name = "ClickTeleportUI_PreHistoria"
  1532. self.ScreenGui.ResetOnSpawn = false
  1533. self.ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  1534. self.ScreenGui.Parent = CoreGui
  1535.  
  1536. self.MainFrame = Instance.new("Frame")
  1537. self.MainFrame.Name = "MainFrame"
  1538. self.MainFrame.Size = UDim2.new(0, 260, 0, 180)
  1539. self.MainFrame.Position = UDim2.new(0.5, -130, 0.5, -90)
  1540. self.MainFrame.BackgroundColor3 = self.Theme.Background
  1541. self.MainFrame.BackgroundTransparency = 0.05
  1542. self.MainFrame.BorderSizePixel = 0
  1543. self.MainFrame.Active = true
  1544. self.MainFrame.Draggable = true
  1545. self.MainFrame.Parent = self.ScreenGui
  1546.  
  1547. local mainCorner = Instance.new("UICorner")
  1548. mainCorner.CornerRadius = UDim.new(0, 12)
  1549. mainCorner.Parent = self.MainFrame
  1550.  
  1551. local mainStroke = Instance.new("UIStroke")
  1552. mainStroke.Color = self.Theme.Accent
  1553. mainStroke.Thickness = 2
  1554. mainStroke.Transparency = 0.3
  1555. mainStroke.Parent = self.MainFrame
  1556.  
  1557. local bgGradient = Instance.new("UIGradient")
  1558. bgGradient.Color = ColorSequence.new{
  1559. ColorSequenceKeypoint.new(0, Color3.fromRGB(30, 30, 40)),
  1560. ColorSequenceKeypoint.new(1, Color3.fromRGB(20, 20, 30))
  1561. }
  1562. bgGradient.Rotation = 45
  1563. bgGradient.Parent = self.MainFrame
  1564.  
  1565. local header = Instance.new("Frame")
  1566. header.Size = UDim2.new(1, 0, 0, 50)
  1567. header.BackgroundColor3 = self.Theme.Secondary
  1568. header.BackgroundTransparency = 0.2
  1569. header.BorderSizePixel = 0
  1570. header.Parent = self.MainFrame
  1571.  
  1572. local headerCorner = Instance.new("UICorner")
  1573. headerCorner.CornerRadius = UDim.new(0, 12)
  1574. headerCorner.Parent = header
  1575.  
  1576. local headerFix = Instance.new("Frame")
  1577. headerFix.Size = UDim2.new(1, 0, 0, 12)
  1578. headerFix.Position = UDim2.new(0, 0, 1, -12)
  1579. headerFix.BackgroundColor3 = self.Theme.Secondary
  1580. headerFix.BackgroundTransparency = 0.2
  1581. headerFix.BorderSizePixel = 0
  1582. headerFix.Parent = header
  1583.  
  1584. local title = Instance.new("TextLabel")
  1585. title.Size = UDim2.new(1, -85, 1, 0)
  1586. title.Position = UDim2.new(0, 15, 0, 0)
  1587. title.BackgroundTransparency = 1
  1588. title.Text = "🎯 Click Teleport"
  1589. title.TextColor3 = self.Theme.Text
  1590. title.TextSize = 17
  1591. title.Font = Enum.Font.GothamBold
  1592. title.TextXAlignment = Enum.TextXAlignment.Left
  1593. title.Parent = header
  1594.  
  1595. local minimizeBtn = Instance.new("TextButton")
  1596. minimizeBtn.Size = UDim2.new(0, 35, 0, 35)
  1597. minimizeBtn.Position = UDim2.new(1, -78, 0.5, -17.5)
  1598. minimizeBtn.BackgroundColor3 = Color3.fromRGB(255, 200, 100)
  1599. minimizeBtn.BackgroundTransparency = 0.2
  1600. minimizeBtn.Text = "➖"
  1601. minimizeBtn.TextColor3 = self.Theme.Text
  1602. minimizeBtn.TextSize = 18
  1603. minimizeBtn.Font = Enum.Font.GothamBold
  1604. minimizeBtn.AutoButtonColor = false
  1605. minimizeBtn.Parent = header
  1606.  
  1607. local minimizeCorner = Instance.new("UICorner")
  1608. minimizeCorner.CornerRadius = UDim.new(0, 8)
  1609. minimizeCorner.Parent = minimizeBtn
  1610.  
  1611. local closeBtn = Instance.new("TextButton")
  1612. closeBtn.Size = UDim2.new(0, 35, 0, 35)
  1613. closeBtn.Position = UDim2.new(1, -38, 0.5, -17.5)
  1614. closeBtn.BackgroundColor3 = self.Theme.Danger
  1615. closeBtn.BackgroundTransparency = 0.2
  1616. closeBtn.Text = "✕"
  1617. closeBtn.TextColor3 = self.Theme.Text
  1618. closeBtn.TextSize = 20
  1619. closeBtn.Font = Enum.Font.GothamBold
  1620. closeBtn.AutoButtonColor = false
  1621. closeBtn.Parent = header
  1622.  
  1623. local closeCorner = Instance.new("UICorner")
  1624. closeCorner.CornerRadius = UDim.new(0, 8)
  1625. closeCorner.Parent = closeBtn
  1626.  
  1627. local container = Instance.new("Frame")
  1628. container.Name = "Container"
  1629. container.Size = UDim2.new(1, -20, 1, -60)
  1630. container.Position = UDim2.new(0, 10, 0, 55)
  1631. container.BackgroundTransparency = 1
  1632. container.Parent = self.MainFrame
  1633.  
  1634. local toggleBtn = Instance.new("TextButton")
  1635. toggleBtn.Name = "ToggleBtn"
  1636. toggleBtn.Size = UDim2.new(1, 0, 0, 55)
  1637. toggleBtn.Position = UDim2.new(0, 0, 0, 0)
  1638. toggleBtn.BackgroundColor3 = self.Theme.Danger
  1639. toggleBtn.BackgroundTransparency = 0.1
  1640. toggleBtn.Text = "🔴 DESATIVADO"
  1641. toggleBtn.TextColor3 = self.Theme.Text
  1642. toggleBtn.TextSize = 16
  1643. toggleBtn.Font = Enum.Font.GothamBold
  1644. toggleBtn.AutoButtonColor = false
  1645. toggleBtn.Parent = container
  1646.  
  1647. local toggleCorner = Instance.new("UICorner")
  1648. toggleCorner.CornerRadius = UDim.new(0, 10)
  1649. toggleCorner.Parent = toggleBtn
  1650.  
  1651. local toggleStroke = Instance.new("UIStroke")
  1652. toggleStroke.Name = "Stroke"
  1653. toggleStroke.Color = self.Theme.Danger
  1654. toggleStroke.Thickness = 2
  1655. toggleStroke.Transparency = 0.3
  1656. toggleStroke.Parent = toggleBtn
  1657.  
  1658. local statusLabel = Instance.new("TextLabel")
  1659. statusLabel.Name = "StatusLabel"
  1660. statusLabel.Size = UDim2.new(1, 0, 0, 25)
  1661. statusLabel.Position = UDim2.new(0, 0, 0, 65)
  1662. statusLabel.BackgroundTransparency = 1
  1663. statusLabel.Text = "Clique em qualquer lugar para teleportar"
  1664. statusLabel.TextColor3 = self.Theme.TextDim
  1665. statusLabel.TextSize = 12
  1666. statusLabel.Font = Enum.Font.Gotham
  1667. statusLabel.TextWrapped = true
  1668. statusLabel.Parent = container
  1669.  
  1670. local infoLabel = Instance.new("TextLabel")
  1671. infoLabel.Size = UDim2.new(1, 0, 0, 20)
  1672. infoLabel.Position = UDim2.new(0, 0, 0, 92)
  1673. infoLabel.BackgroundTransparency = 1
  1674. infoLabel.Text = "⚡ Teleporte limpo e instantâneo"
  1675. infoLabel.TextColor3 = self.Theme.Success
  1676. infoLabel.TextSize = 11
  1677. infoLabel.Font = Enum.Font.Gotham
  1678. infoLabel.Parent = container
  1679.  
  1680. self.MinimizedBtn = Instance.new("TextButton")
  1681. self.MinimizedBtn.Name = "MinimizedBtn"
  1682. self.MinimizedBtn.Size = UDim2.new(0, 50, 0, 50)
  1683. self.MinimizedBtn.Position = UDim2.new(1, -60, 0, 10)
  1684. self.MinimizedBtn.BackgroundColor3 = self.Theme.Accent
  1685. self.MinimizedBtn.BackgroundTransparency = 0.1
  1686. self.MinimizedBtn.Text = "🎯"
  1687. self.MinimizedBtn.TextColor3 = self.Theme.Text
  1688. self.MinimizedBtn.TextSize = 24
  1689. self.MinimizedBtn.Font = Enum.Font.GothamBold
  1690. self.MinimizedBtn.AutoButtonColor = false
  1691. self.MinimizedBtn.Visible = false
  1692. self.MinimizedBtn.Active = true
  1693. self.MinimizedBtn.Draggable = true
  1694. self.MinimizedBtn.Parent = self.ScreenGui
  1695.  
  1696. local minimizedCorner = Instance.new("UICorner")
  1697. minimizedCorner.CornerRadius = UDim.new(0, 12)
  1698. minimizedCorner.Parent = self.MinimizedBtn
  1699.  
  1700. local minimizedStroke = Instance.new("UIStroke")
  1701. minimizedStroke.Color = self.Theme.Accent
  1702. minimizedStroke.Thickness = 2
  1703. minimizedStroke.Parent = self.MinimizedBtn
  1704.  
  1705. local minimizedGradient = Instance.new("UIGradient")
  1706. minimizedGradient.Color = ColorSequence.new{
  1707. ColorSequenceKeypoint.new(0, Color3.fromRGB(100, 180, 255)),
  1708. ColorSequenceKeypoint.new(1, Color3.fromRGB(70, 140, 255))
  1709. }
  1710. minimizedGradient.Rotation = 90
  1711. minimizedGradient.Parent = self.MinimizedBtn
  1712.  
  1713. -- Eventos
  1714. toggleBtn.MouseButton1Click:Connect(function()
  1715. self.Enabled = not self.Enabled
  1716.  
  1717. if self.Enabled then
  1718. toggleBtn.Text = "🟢 ATIVADO"
  1719. toggleBtn.BackgroundColor3 = self.Theme.Success
  1720. toggleStroke.Color = self.Theme.Success
  1721. statusLabel.Text = "Clique em qualquer lugar para teleportar"
  1722. self:EnableClickDetection()
  1723. else
  1724. toggleBtn.Text = "🔴 DESATIVADO"
  1725. toggleBtn.BackgroundColor3 = self.Theme.Danger
  1726. toggleStroke.Color = self.Theme.Danger
  1727. statusLabel.Text = "Teleporte desativado"
  1728. self:DisableClickDetection()
  1729. end
  1730. end)
  1731.  
  1732. minimizeBtn.MouseButton1Click:Connect(function()
  1733. self:MinimizeUI()
  1734. end)
  1735.  
  1736. self.MinimizedBtn.MouseButton1Click:Connect(function()
  1737. self:MaximizeUI()
  1738. end)
  1739.  
  1740. closeBtn.MouseButton1Click:Connect(function()
  1741. self:Toggle(false, nil)
  1742. end)
  1743.  
  1744. -- Hover effects
  1745. local function addHoverEffect(button, normalTrans)
  1746. button.MouseEnter:Connect(function()
  1747. TweenService:Create(button, TweenInfo.new(0.2), {
  1748. BackgroundTransparency = 0
  1749. }):Play()
  1750. end)
  1751.  
  1752. button.MouseLeave:Connect(function()
  1753. TweenService:Create(button, TweenInfo.new(0.2), {
  1754. BackgroundTransparency = normalTrans or 0.1
  1755. }):Play()
  1756. end)
  1757. end
  1758.  
  1759. addHoverEffect(toggleBtn, 0.1)
  1760. addHoverEffect(minimizeBtn, 0.2)
  1761. addHoverEffect(closeBtn, 0.2)
  1762. addHoverEffect(self.MinimizedBtn, 0.1)
  1763.  
  1764. self.UIVisible = true
  1765. end
  1766.  
  1767. function ClickTeleportModule:Toggle(state, notificationWindow)
  1768. Config.ClickTeleportEnabled = state
  1769.  
  1770. if state then
  1771. if not self.UIVisible then
  1772. self:CreateUI()
  1773.  
  1774. if notificationWindow then
  1775. notificationWindow:Notify({
  1776. Title = "Click Teleport",
  1777. Content = "Interface aberta!",
  1778. Duration = 1
  1779. })
  1780. end
  1781. end
  1782. else
  1783. self.Enabled = false
  1784. self:DisableClickDetection()
  1785.  
  1786. if self.ScreenGui then
  1787. UtilityModule.SafePcall(function() self.ScreenGui:Destroy() end)
  1788. self.ScreenGui = nil
  1789. self.MainFrame = nil
  1790. self.MinimizedBtn = nil
  1791. end
  1792.  
  1793. self.UIVisible = false
  1794.  
  1795. if notificationWindow then
  1796. notificationWindow:Notify({
  1797. Title = "Click Teleport",
  1798. Content = "Desativado",
  1799. Duration = 1
  1800. })
  1801. end
  1802. end
  1803. end
  1804.  
  1805. function ClickTeleportModule:Cleanup()
  1806. self.Enabled = false
  1807. self:DisableClickDetection()
  1808.  
  1809. if self.ScreenGui then
  1810. UtilityModule.SafePcall(function() self.ScreenGui:Destroy() end)
  1811. self.ScreenGui = nil
  1812. self.MainFrame = nil
  1813. self.MinimizedBtn = nil
  1814. end
  1815.  
  1816. self.UIVisible = false
  1817. print("🧹 Click Teleport limpo")
  1818. end
  1819.  
  1820. print("✅ Módulo Click Teleport carregado")
  1821.  
  1822. --// ========== MÓDULO: AUTO COLETA ========== //
  1823. local AutoColetaModule = {}
  1824.  
  1825. function AutoColetaModule:Start()
  1826. RunService.Heartbeat:Connect(function()
  1827. if not (Config.AutoFarm or Config.AutoColeta) then return end
  1828.  
  1829. if not Config.podeExecutar then return end
  1830. Config.podeExecutar = false
  1831.  
  1832. local root = UtilityModule.getHumanoidRootPart()
  1833. if root then
  1834. for _, obj in ipairs(Workspace:GetDescendants()) do
  1835. if obj:IsA("ProximityPrompt") and obj.Parent and obj.Parent:IsA("BasePart") then
  1836. if obj.Enabled and (obj.Parent.Position - root.Position).Magnitude <= Config.raioDeColeta then
  1837. UtilityModule.SafePcall(function()
  1838. fireproximityprompt(obj)
  1839. end)
  1840. end
  1841. end
  1842. end
  1843. end
  1844.  
  1845. task.delay(Config.delayEntreTentativas, function()
  1846. Config.podeExecutar = true
  1847. end)
  1848. end)
  1849.  
  1850. print("✅ Módulo Auto Coleta inicializado")
  1851. end
  1852.  
  1853. print("✅ Módulo Auto Coleta carregado")
  1854.  
  1855. --// ========== MÓDULO: AUTO FARM ========== //
  1856. local AutoFarmModule = {
  1857. Running = false,
  1858. CurrentIndex = 1
  1859. }
  1860.  
  1861. function AutoFarmModule:Start()
  1862. if self.Running then return end
  1863. self.Running = true
  1864.  
  1865. task.spawn(function()
  1866. while true do
  1867. task.wait(Config.CheckDelay)
  1868.  
  1869. if Config.AutoFarm then
  1870. local currentLevel = DinoLevelModule:GetLevel()
  1871.  
  1872. if currentLevel >= Config.MaxDinoLevel then
  1873. Config.AutoFarm = false
  1874. self.Running = false
  1875.  
  1876. if AutoFarmToggle then
  1877. AutoFarmToggle:Set(false)
  1878. end
  1879.  
  1880. if AutoFarmStatusLabel then
  1881. AutoFarmStatusLabel:Set("💎 Auto Farm - Desligado")
  1882. end
  1883.  
  1884. if Window then
  1885. Window:Notify({
  1886. Title = "Completo",
  1887. Content = "Nível " .. Config.MaxDinoLevel .. " atingido!",
  1888. Duration = 2
  1889. })
  1890. end
  1891.  
  1892. break
  1893. else
  1894. local crystals = CrystalModule:GetSortedCrystals()
  1895.  
  1896. if #crystals > 0 then
  1897. for _, c in ipairs(crystals) do
  1898. if not Config.AutoFarm or not c or not c.Parent then break end
  1899.  
  1900. TeleportModule:TeleportToCrystal(c)
  1901.  
  1902. local fixarConexao = RunService.Heartbeat:Connect(function()
  1903. if Config.AutoFarm and c and c:IsDescendantOf(Workspace) then
  1904. local char = UtilityModule.getCharacter()
  1905. if char and char.PrimaryPart then
  1906. char:SetPrimaryPartCFrame(CFrame.new(c.Position + Vector3.new(0, 4.5, 0)))
  1907. end
  1908. end
  1909. end)
  1910.  
  1911. local elapsed = 0
  1912. while c:IsDescendantOf(Workspace) and elapsed < 12 and Config.AutoFarm do
  1913. task.wait(Config.CheckDelay)
  1914. elapsed = elapsed + Config.CheckDelay
  1915. end
  1916.  
  1917. fixarConexao:Disconnect()
  1918. task.wait(Config.DelayBetweenCrystals)
  1919. end
  1920. else
  1921. -- Patrulha
  1922. self.CurrentIndex = (self.CurrentIndex % #Config.PatrulhaPontos) + 1
  1923. TeleportModule:TeleportTo(Config.PatrulhaPontos[self.CurrentIndex])
  1924. task.wait(2)
  1925. end
  1926. end
  1927. else
  1928. self.Running = false
  1929. break
  1930. end
  1931. end
  1932. end)
  1933.  
  1934. print("✅ Auto Farm iniciado")
  1935. end
  1936.  
  1937. function AutoFarmModule:Stop()
  1938. Config.AutoFarm = false
  1939. self.Running = false
  1940. print("🛑 Auto Farm parado")
  1941. end
  1942.  
  1943. print("✅ Módulo Auto Farm carregado")
  1944.  
  1945. --// ========== MÓDULO: TELEPORTS SALVOS ========== //
  1946. local SavedTeleportsModule = {}
  1947.  
  1948. function SavedTeleportsModule:Load()
  1949. local success, data = UtilityModule.SafePcall(function()
  1950. return HttpService:JSONDecode(readfile("PreHistoria_Teleports.json"))
  1951. end)
  1952.  
  1953. if success and data then
  1954. Config.SavedTeleports = data
  1955. print("📍 Carregado " .. #data .. " teleports salvos")
  1956. else
  1957. Config.SavedTeleports = {}
  1958. print("📍 Nenhum teleport salvo encontrado")
  1959. end
  1960. end
  1961.  
  1962. print("✅ Módulo Teleports Salvos carregado")
  1963.  
  1964. --// ========== DETECTAR SPAWN ========== //
  1965. task.spawn(function()
  1966. local char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  1967. local root = char:WaitForChild("HumanoidRootPart", 10)
  1968.  
  1969. if root then
  1970. task.wait(2)
  1971. Config.LastSpawnPosition = root.CFrame
  1972. print("📍 Spawn detectado: " .. tostring(Config.LastSpawnPosition))
  1973. end
  1974.  
  1975. LocalPlayer.CharacterAdded:Connect(function(newChar)
  1976. task.wait(2)
  1977. local newRoot = newChar:FindFirstChild("HumanoidRootPart")
  1978. if newRoot then
  1979. Config.LastSpawnPosition = newRoot.CFrame
  1980. print("📍 Spawn atualizado")
  1981. end
  1982. end)
  1983. end)
  1984.  
  1985. --// ========== INICIALIZAR MÓDULOS ========== //
  1986. PerformanceManager:Init()
  1987. PlayerESPModule:Init()
  1988. AutoColetaModule:Start()
  1989. SavedTeleportsModule:Load()
  1990.  
  1991. --// ========== CARREGAR WINDUI ========== //
  1992. local WindUI = loadstring(game:HttpGet("https://github.com/Footagesus/WindUI/releases/latest/download/main.lua"))()
  1993.  
  1994. --// ========== CRIAR WINDOW ========== //
  1995. local Window = WindUI:CreateWindow({
  1996. Title = "🦖 Pré-história - NickZScripts",
  1997. Icon = "home",
  1998. Author = "By NickZScripts",
  1999. Folder = "PreHistoriaHub",
  2000. Size = UDim2.fromOffset(580, 460),
  2001. Transparent = true,
  2002. Theme = "Dark",
  2003. Resizable = true,
  2004. SideBarWidth = 200,
  2005. Acrylic = true,
  2006. DisableInfo = false
  2007. })
  2008.  
  2009. --// ========== TAB: MENU ========== //
  2010. local MenuTab = Window:Tab({
  2011. Title = "Menu",
  2012. Icon = "home"
  2013. })
  2014.  
  2015. local MenuSection = MenuTab:Section({
  2016. Title = "Informações do Servidor"
  2017. })
  2018.  
  2019. local PlayersCountLabel = MenuTab:Label({
  2020. Text = "👥 Players Online: 0/0"
  2021. })
  2022.  
  2023. local function updatePlayerCount()
  2024. local current = #Players:GetPlayers()
  2025. local max = Players.MaxPlayers
  2026. PlayersCountLabel:Set(string.format("👥 Players Online: %d/%d", current, max))
  2027. end
  2028.  
  2029. updatePlayerCount()
  2030.  
  2031. Players.PlayerAdded:Connect(function()
  2032. task.wait(0.1)
  2033. updatePlayerCount()
  2034. end)
  2035.  
  2036. Players.PlayerRemoving:Connect(function()
  2037. task.wait(0.1)
  2038. updatePlayerCount()
  2039. end)
  2040.  
  2041. task.spawn(function()
  2042. while true do
  2043. task.wait(2)
  2044. updatePlayerCount()
  2045. end
  2046. end)
  2047.  
  2048. MenuTab:Label({
  2049. Text = "📜 Script Info"
  2050. })
  2051.  
  2052. MenuTab:Label({
  2053. Text = "Versão: " .. ScriptVersion
  2054. })
  2055.  
  2056. MenuTab:Label({
  2057. Text = "Status: ✅ Operacional"
  2058. })
  2059.  
  2060. MenuTab:Label({
  2061. Text = "👤 Jogador: " .. LocalPlayer.Name
  2062. })
  2063.  
  2064. MenuTab:Label({
  2065. Text = "Display: " .. LocalPlayer.DisplayName
  2066. })
  2067.  
  2068. MenuTab:Label({
  2069. Text = "ID: " .. LocalPlayer.UserId
  2070. })
  2071.  
  2072. local FPSLabel = MenuTab:Label({
  2073. Text = "⚡ FPS: 0"
  2074. })
  2075.  
  2076. task.spawn(function()
  2077. while true do
  2078. task.wait(0.5)
  2079. local levelNames = {"Normal", "Médio", "Agressivo"}
  2080. FPSLabel:Set(string.format("⚡ FPS: %d | Otimização: %s", PerformanceManager.FPS, levelNames[PerformanceManager.OptimizationLevel]))
  2081. end
  2082. end)
  2083.  
  2084. local SystemsSection = MenuTab:Section({
  2085. Title = "Sistemas Ativos"
  2086. })
  2087.  
  2088. AutoFarmStatusLabel = MenuTab:Label({
  2089. Text = "💎 Auto Farm - Desligado"
  2090. })
  2091.  
  2092. local EspCarnesStatusLabel = MenuTab:Label({
  2093. Text = "🥩 ESP Carnes - Desligado"
  2094. })
  2095.  
  2096. local EspJogadoresStatusLabel = MenuTab:Label({
  2097. Text = "👥 ESP Jogadores - Desligado"
  2098. })
  2099.  
  2100. AutoColetaStatusLabel = MenuTab:Label({
  2101. Text = "🔄 Auto Colet - Desligado"
  2102. })
  2103.  
  2104. local ClickTeleportStatusLabel = MenuTab:Label({
  2105. Text = "🎯 Click Teleport - Desligado"
  2106. })
  2107.  
  2108. local CreditsSection = MenuTab:Section({
  2109. Title = "Créditos"
  2110. })
  2111.  
  2112. MenuTab:Label({
  2113. Text = "👨‍💻 Desenvolvedor: NickZScripts"
  2114. })
  2115.  
  2116. MenuTab:Label({
  2117. Text = "Interface: WindUI Library"
  2118. })
  2119.  
  2120. MenuTab:Label({
  2121. Text = "Versão: " .. ScriptVersion
  2122. })
  2123.  
  2124. --// ========== TAB: AUTO FARM ========== //
  2125. local AutoFarmTab = Window:Tab({
  2126. Title = "Auto Farm",
  2127. Icon = "zap"
  2128. })
  2129.  
  2130. local FarmSection = AutoFarmTab:Section({
  2131. Title = "Farm de Cristais"
  2132. })
  2133.  
  2134. DinoLevelModule.Label = AutoFarmTab:Label({
  2135. Text = "🦖 Nível do Dino: 0/60"
  2136. })
  2137.  
  2138. DinoLevelModule:StartAutoUpdate()
  2139.  
  2140. AutoFarmToggle = AutoFarmTab:Toggle({
  2141. Title = "Auto Farm Cristais",
  2142. Desc = "Farma cristais automaticamente",
  2143. Icon = "gem",
  2144. Type = "Checkbox",
  2145. Default = false,
  2146. Callback = function(Value)
  2147. Config.AutoFarm = Value
  2148.  
  2149. if Value then
  2150. AutoFarmStatusLabel:Set("💎 Auto Farm - Ligado")
  2151. AutoFarmModule:Start()
  2152. else
  2153. AutoFarmStatusLabel:Set("💎 Auto Farm - Desligado")
  2154. AutoFarmModule:Stop()
  2155. end
  2156.  
  2157. Window:Notify({
  2158. Title = Value and "✅ Ativado" or "❌ Desativado",
  2159. Content = "Auto Farm " .. (Value and "ligado" or "desligado"),
  2160. Duration = 1
  2161. })
  2162. end,
  2163. })
  2164.  
  2165. local ColetaSection = AutoFarmTab:Section({
  2166. Title = "Auto Colet"
  2167. })
  2168.  
  2169. local AutoColetaToggle = AutoFarmTab:Toggle({
  2170. Title = "Auto Colet",
  2171. Desc = "Coleta itens próximos automaticamente",
  2172. Icon = "refresh-cw",
  2173. Type = "Checkbox",
  2174. Default = false,
  2175. Callback = function(Value)
  2176. Config.AutoColeta = Value
  2177.  
  2178. if Value then
  2179. AutoColetaStatusLabel:Set("🔄 Auto Colet - Ligado")
  2180. else
  2181. AutoColetaStatusLabel:Set("🔄 Auto Colet - Desligado")
  2182. end
  2183.  
  2184. Window:Notify({
  2185. Title = Value and "✅ Ativado" or "❌ Desativado",
  2186. Content = "Auto Colet " .. (Value and "ligado" or "desligado"),
  2187. Duration = 1
  2188. })
  2189. end,
  2190. })
  2191.  
  2192. --// ========== TAB: ESP ========== //
  2193. local EspTab = Window:Tab({
  2194. Title = "ESP",
  2195. Icon = "eye"
  2196. })
  2197.  
  2198. local EspJogadoresSection = EspTab:Section({
  2199. Title = "ESP de Jogadores"
  2200. })
  2201.  
  2202. local EspJogadoresToggle = EspTab:Toggle({
  2203. Title = "ESP de Jogadores",
  2204. Desc = "Mostra jogadores através de paredes",
  2205. Icon = "users",
  2206. Type = "Checkbox",
  2207. Default = false,
  2208. Callback = function(Value)
  2209. Config.PlayerESP = Value
  2210.  
  2211. if Value then
  2212. EspJogadoresStatusLabel:Set("👥 ESP Jogadores - Ligado")
  2213. PlayerESPModule:ReinitializeAll()
  2214. else
  2215. EspJogadoresStatusLabel:Set("👥 ESP Jogadores - Desligado")
  2216. for plr, pack in pairs(PlayerESPModule.Data) do
  2217. if pack.highlight then pack.highlight.Enabled = false end
  2218. if pack.hpGui then pack.hpGui.Enabled = false end
  2219. end
  2220. end
  2221.  
  2222. Window:Notify({
  2223. Title = Value and "✅ Ativado" or "❌ Desativado",
  2224. Content = "ESP Jogadores " .. (Value and "ligado" or "desligado"),
  2225. Duration = 1
  2226. })
  2227. end,
  2228. })
  2229.  
  2230. local EspHPToggle = EspTab:Toggle({
  2231. Title = "Barra de Vida",
  2232. Desc = "Mostra HP dos jogadores",
  2233. Icon = "heart",
  2234. Type = "Checkbox",
  2235. Default = false,
  2236. Callback = function(Value)
  2237. Config.PlayerESP_ShowHP = Value
  2238.  
  2239. for plr, pack in pairs(PlayerESPModule.Data) do
  2240. if pack.hpGui then
  2241. pack.hpGui.Enabled = PlayerESPModule:ShouldShowHP(plr) and pack.hum and pack.hum.Health > 0
  2242. end
  2243. end
  2244.  
  2245. Window:Notify({
  2246. Title = Value and "✅ Ativado" or "❌ Desativado",
  2247. Content = "Barra de Vida " .. (Value and "ligada" or "desligada"),
  2248. Duration = 1
  2249. })
  2250. end,
  2251. })
  2252.  
  2253. local EspTeamCheckToggle = EspTab:Toggle({
  2254. Title = "TeamCheck (Só Inimigos)",
  2255. Desc = "Mostra apenas jogadores inimigos",
  2256. Icon = "shield",
  2257. Type = "Checkbox",
  2258. Default = false,
  2259. Callback = function(Value)
  2260. Config.PlayerESP_TeamCheck = Value
  2261.  
  2262. for plr, pack in pairs(PlayerESPModule.Data) do
  2263. if pack.highlight then
  2264. pack.highlight.Enabled = PlayerESPModule:ShouldShowESP(plr)
  2265. end
  2266. if pack.hpGui then
  2267. pack.hpGui.Enabled = PlayerESPModule:ShouldShowHP(plr) and pack.hum and pack.hum.Health > 0
  2268. end
  2269. end
  2270.  
  2271. Window:Notify({
  2272. Title = Value and "✅ Ativado" or "❌ Desativado",
  2273. Content = "TeamCheck " .. (Value and "ligado" or "desligado"),
  2274. Duration = 1
  2275. })
  2276. end,
  2277. })
  2278.  
  2279. local EspCarnesSection = EspTab:Section({
  2280. Title = "ESP de Carnes"
  2281. })
  2282.  
  2283. local EspToggle = EspTab:Toggle({
  2284. Title = "ESP de Carnes",
  2285. Desc = "Mostra carnes no mapa",
  2286. Icon = "crosshair",
  2287. Type = "Checkbox",
  2288. Default = false,
  2289. Callback = function(Value)
  2290. Config.EspMeatActive = Value
  2291.  
  2292. if Value then
  2293. EspCarnesStatusLabel:Set("🥩 ESP Carnes - Ligado")
  2294. MeatESPModule:Start()
  2295. else
  2296. EspCarnesStatusLabel:Set("🥩 ESP Carnes - Desligado")
  2297. MeatESPModule:Stop()
  2298. end
  2299.  
  2300. Window:Notify({
  2301. Title = Value and "✅ Ativado" or "❌ Desativado",
  2302. Content = "ESP Carnes " .. (Value and "ligado" or "desligado"),
  2303. Duration = 1
  2304. })
  2305. end,
  2306. })
  2307.  
  2308. --// ========== TAB: TELEPORT ========== //
  2309. local TeleportTab = Window:Tab({
  2310. Title = "Teleport",
  2311. Icon = "navigation"
  2312. })
  2313.  
  2314. local TeleportSection = TeleportTab:Section({
  2315. Title = "Teleportes Rápidos"
  2316. })
  2317.  
  2318. local TeleportMeatButton = TeleportTab:Button({
  2319. Title = "Teleportar para Carne",
  2320. Desc = "Teleporta para a carne mais próxima",
  2321. Icon = "crosshair",
  2322. Callback = function()
  2323. local meat, distance = MeatESPModule:FindNearest()
  2324.  
  2325. if not meat then
  2326. Window:Notify({
  2327. Title = "Erro",
  2328. Content = "Nenhuma carne encontrada!",
  2329. Duration = 1
  2330. })
  2331. return
  2332. end
  2333.  
  2334. TeleportModule:SafeTeleport(CFrame.new(meat.Position + Vector3.new(0, 3, 0)), "Carne", Window)
  2335. end,
  2336. })
  2337.  
  2338. local SpawnSection = TeleportTab:Section({
  2339. Title = "Teleporte para Spawn"
  2340. })
  2341.  
  2342. local TeleportSpawnButton = TeleportTab:Button({
  2343. Title = "Voltar ao Spawn",
  2344. Desc = "Teleporta de volta ao spawn",
  2345. Icon = "home",
  2346. Callback = function()
  2347. if not Config.LastSpawnPosition then
  2348. Window:Notify({
  2349. Title = "Erro",
  2350. Content = "Spawn não detectado!",
  2351. Duration = 1
  2352. })
  2353. return
  2354. end
  2355.  
  2356. TeleportModule:SafeTeleport(Config.LastSpawnPosition, "Spawn", Window)
  2357. end,
  2358. })
  2359.  
  2360. local SavedTeleportsSection = TeleportTab:Section({
  2361. Title = "Locais Salvos"
  2362. })
  2363.  
  2364. if #Config.SavedTeleports > 0 then
  2365. for i, data in ipairs(Config.SavedTeleports) do
  2366. if data.position then
  2367. local locationName = data.name or ("Local " .. i)
  2368.  
  2369. TeleportTab:Button({
  2370. Title = "📍 " .. locationName,
  2371. Desc = "Teleportar para " .. locationName,
  2372. Icon = "map-pin",
  2373. Callback = function()
  2374. local pos = data.position
  2375.  
  2376. if not pos or not pos.X or not pos.Y or not pos.Z then
  2377. Window:Notify({
  2378. Title = "Erro",
  2379. Content = "Posição inválida!",
  2380. Duration = 1
  2381. })
  2382. return
  2383. end
  2384.  
  2385. local targetCF = CFrame.new(pos.X, pos.Y, pos.Z)
  2386. TeleportModule:SafeTeleport(targetCF, locationName, Window)
  2387. end,
  2388. })
  2389. end
  2390. end
  2391. else
  2392. TeleportTab:Label({
  2393. Text = "ℹ️ Nenhum Local Salvo"
  2394. })
  2395.  
  2396. TeleportTab:Label({
  2397. Text = "Você ainda não possui locais salvos"
  2398. })
  2399. end
  2400.  
  2401. --// ========== TAB: OUTROS ========== //
  2402. local OutrosTab = Window:Tab({
  2403. Title = "Outros",
  2404. Icon = "settings"
  2405. })
  2406.  
  2407. local DebugSection = OutrosTab:Section({
  2408. Title = "Ferramentas de Debug"
  2409. })
  2410.  
  2411. OutrosTab:Button({
  2412. Title = "Debug: Buscar Nível",
  2413. Desc = "Veja o console (F9) para detalhes",
  2414. Icon = "search",
  2415. Callback = function()
  2416. local level = DinoLevelModule:DebugSearch()
  2417. Window:Notify({
  2418. Title = "Debug",
  2419. Content = "Nível encontrado: " .. level .. "\nVeja o console (F9)",
  2420. Duration = 3
  2421. })
  2422. end,
  2423. })
  2424.  
  2425. local ClickTeleportSection = OutrosTab:Section({
  2426. Title = "Click Teleport"
  2427. })
  2428.  
  2429. OutrosTab:Label({
  2430. Text = "ℹ️ Sobre Click Teleport"
  2431. })
  2432.  
  2433. OutrosTab:Label({
  2434. Text = "Teleporte instantâneo clicando"
  2435. })
  2436.  
  2437. OutrosTab:Label({
  2438. Text = "✅ Personagem olha para onde clicou"
  2439. })
  2440.  
  2441. OutrosTab:Label({
  2442. Text = "✅ Sem efeitos visuais"
  2443. })
  2444.  
  2445. OutrosTab:Button({
  2446. Title = "Abrir Click Teleport",
  2447. Desc = "Abre a interface de Click Teleport",
  2448. Icon = "mouse-pointer",
  2449. Callback = function()
  2450. if not Config.ClickTeleportEnabled then
  2451. ClickTeleportModule:Toggle(true, Window)
  2452. ClickTeleportStatusLabel:Set("🎯 Click Teleport - Ligado")
  2453. else
  2454. Window:Notify({
  2455. Title = "Já Ativo",
  2456. Content = "Click Teleport já está aberto!",
  2457. Duration = 2
  2458. })
  2459. end
  2460. end,
  2461. })
  2462.  
  2463. local InfoSection = OutrosTab:Section({
  2464. Title = "Informações"
  2465. })
  2466.  
  2467. OutrosTab:Label({
  2468. Text = "⚙️ Sobre"
  2469. })
  2470.  
  2471. OutrosTab:Label({
  2472. Text = "Todas as informações importantes"
  2473. })
  2474.  
  2475. OutrosTab:Label({
  2476. Text = "estão na aba Menu"
  2477. })
  2478.  
  2479. --// ========== CLEANUP AO SAIR ========== //
  2480. LocalPlayer.CharacterRemoving:Connect(function()
  2481. ClickTeleportModule:Cleanup()
  2482. MeatESPModule:Stop()
  2483. end)
  2484.  
  2485. --// ========== LOGS FINAIS ========== //
  2486. print("╔═══════════════════════════════════════════════════════════╗")
  2487. print("║ Pré-história - By: NickZScripts ║")
  2488. print("╠═══════════════════════════════════════════════════════════╣")
  2489. print("║ ✅ GUI WindUI carregada! ║")
  2490. print("║ 📌 Versão: " .. ScriptVersion .. " ║")
  2491. print("║ 🎮 Jogador: " .. LocalPlayer.Name)
  2492. print("║ 📊 Players: " .. #Players:GetPlayers() .. "/" .. Players.MaxPlayers)
  2493. print("║ 📍 Teleports Salvos: " .. #Config.SavedTeleports)
  2494. print("║ ⚡ FPS Atual: " .. PerformanceManager.FPS)
  2495. print("╠═══════════════════════════════════════════════════════════╣")
  2496. print("║ 🔧 SISTEMA DE AUTO-OTIMIZAÇÃO ATIVO ║")
  2497. print("║ 📈 Ajuste dinâmico de performance ║")
  2498. print("║ 🛡️ Proteção contra crashes e travamentos ║")
  2499. print("║ ♻️ Limpeza automática de memória ║")
  2500. print("╠═══════════════════════════════════════════════════════════╣")
  2501. print("║ 📋 FUNCIONALIDADES ATIVAS: ║")
  2502. print("║ ⚡ Auto Farm de Cristais (Priorizado) ║")
  2503. print("║ 🔄 Auto Colet Independente ║")
  2504. print("║ 👥 ESP de Jogadores (Cores Únicas) ║")
  2505. print("║ 🥩 ESP de Carnes (Dinâmico) ║")
  2506. print("║ 🚀 Sistema de Teleporte Seguro ║")
  2507. print("║ 📍 Teleportes Salvos Carregados ║")
  2508. print("║ 🎯 Click Teleport (Orientação) ║")
  2509. print("║ 🔍 Sistema de Debug Completo ║")
  2510. print("╠═══════════════════════════════════════════════════════════╣")
  2511. print("║ 🆕 NOVIDADES v5.0.0: ║")
  2512. print("║ ✨ Sistema de Auto-Otimização ║")
  2513. print("║ 🏗️ Arquitetura Modular ║")
  2514. print("║ ⚡ Performance Otimizada ║")
  2515. print("║ 🛡️ Sistema Anti-Crash ║")
  2516. print("║ ♻️ Gestão Inteligente de Memória ║")
  2517. print("╚═══════════════════════════════════════════════════════════╝")
  2518.  
  2519. Window:Notify({
  2520. Title = "🦖 Pré-história",
  2521. Content = "Script carregado com sucesso!\nVersão: " .. ScriptVersion,
  2522. Duration = 3
  2523. })
Advertisement
Add Comment
Please, Sign In to add comment