Nevzyn

Untitled

Oct 21st, 2025
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.06 KB | None | 0 0
  1. --[[
  2. ╔═══════════════════════════════════════════════════════════╗
  3. ║ Pré-história - By: NickZScripts ║
  4. ║ Sistema Modular & Anti-Conflitos ║
  5. ║ Interface: Redzlib v5 CORRIGIDA ║
  6. ║ TODAS AS FUNCIONALIDADES MANTIDAS ║
  7. ╚═══════════════════════════════════════════════════════════╝
  8. ]]
  9.  
  10. --// ========== ANTI-DUPLICAÇÃO ========== //
  11. if getgenv().PreHistoriaLoaded then
  12. warn("⚠️ Script já está carregado! Evitando duplicação...")
  13. return
  14. end
  15. getgenv().PreHistoriaLoaded = true
  16.  
  17. --// ========== PROTEÇÃO E VERIFICAÇÃO ========== //
  18. repeat task.wait() until game:IsLoaded()
  19.  
  20. --// ========== SERVICES ========== //
  21. local Players = game:GetService("Players")
  22. local RunService = game:GetService("RunService")
  23. local HttpService = game:GetService("HttpService")
  24. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  25. local Teams = game:GetService("Teams")
  26. local TweenService = game:GetService("TweenService")
  27. local UserInputService = game:GetService("UserInputService")
  28.  
  29. --// ========== VARIÁVEIS GLOBAIS ========== //
  30. local LocalPlayer = Players.LocalPlayer
  31. local ScriptVersion = "v4.5.2"
  32. local LastSpawnPosition = nil
  33. local Camera = workspace.CurrentCamera
  34. local ActiveTeleportConnection = nil
  35.  
  36. --// ========== CONFIGURAÇÕES DO AUTO FARM ========== //
  37. local Config = {
  38. AutoFarm = false,
  39. AutoColeta = false,
  40. CheckDelay = 0.3,
  41. DelayBetweenCrystals = 0.1,
  42. raioDeColeta = 25,
  43. delayEntreTentativas = 0.25,
  44. podeExecutar = true,
  45.  
  46. -- ESP de Carnes
  47. EspMeatActive = false,
  48. ESP_MIN_SIZE = 35,
  49. ESP_MAX_SIZE = 65,
  50. ESP_UPDATE_RATE = 0.1,
  51. MAX_VISIBLE_DISTANCE = 999999,
  52.  
  53. -- ESP de Jogadores
  54. PlayerESP = false,
  55. PlayerESP_ShowHP = false,
  56. PlayerESP_TeamCheck = false,
  57.  
  58. -- Click Teleport
  59. ClickTeleportEnabled = false,
  60.  
  61. -- Teleports Salvos
  62. SavedTeleports = {},
  63.  
  64. -- Patrulha
  65. PatrulhaPontos = {
  66. CFrame.new(0, 30, 0),
  67. CFrame.new(800, 30, 400),
  68. CFrame.new(-750, 30, -600),
  69. CFrame.new(450, 30, -1000),
  70. CFrame.new(-900, 30, 700),
  71. CFrame.new(0, 30, 1000),
  72. },
  73. }
  74.  
  75. --// ========== CACHE DE NÍVEL ========== //
  76. local DinoLevelCache = {
  77. value = 0,
  78. lastUpdate = 0,
  79. updateInterval = 2
  80. }
  81.  
  82. --// ========== DETECTAR POSIÇÃO DE SPAWN ========== //
  83. task.spawn(function()
  84. local char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  85. local root = char:WaitForChild("HumanoidRootPart", 10)
  86.  
  87. if root then
  88. task.wait(2)
  89. LastSpawnPosition = root.CFrame
  90. end
  91.  
  92. LocalPlayer.CharacterAdded:Connect(function(newChar)
  93. task.wait(2)
  94. local newRoot = newChar:FindFirstChild("HumanoidRootPart")
  95. if newRoot then
  96. LastSpawnPosition = newRoot.CFrame
  97. end
  98. end)
  99. end)
  100.  
  101. --// ========== FUNÇÕES DE UTILIDADE ========== //
  102.  
  103. local function getCharacter()
  104. return LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  105. end
  106.  
  107. local function getHumanoidRootPart()
  108. local char = getCharacter()
  109. return char and char:FindFirstChild("HumanoidRootPart")
  110. end
  111.  
  112. local function teleportTo(cf)
  113. local root = getHumanoidRootPart()
  114. if root and root.Parent then
  115. root.Parent:SetPrimaryPartCFrame(cf)
  116. end
  117. end
  118.  
  119. local function teleportToCrystal(c)
  120. local root = getHumanoidRootPart()
  121. if root and c then
  122. root.Parent:SetPrimaryPartCFrame(CFrame.new(c.Position + Vector3.new(0, 4.5, 0)))
  123. end
  124. end
  125.  
  126. --// ========== SISTEMA DE NÍVEL DO DINO ========== //
  127.  
  128. local function getDinoLevelSilent()
  129. local now = tick()
  130. if (now - DinoLevelCache.lastUpdate) < DinoLevelCache.updateInterval then
  131. return DinoLevelCache.value
  132. end
  133.  
  134. local leaderstats = LocalPlayer:FindFirstChild("leaderstats")
  135. if leaderstats then
  136. for _, stat in ipairs(leaderstats:GetChildren()) do
  137. local name = stat.Name:lower()
  138. if name:find("level") or name:find("lvl") or name:find("nivel") then
  139. if stat:IsA("IntValue") or stat:IsA("NumberValue") then
  140. local val = tonumber(stat.Value) or 0
  141. if val > 0 then
  142. DinoLevelCache.value = val
  143. DinoLevelCache.lastUpdate = now
  144. return val
  145. end
  146. end
  147. end
  148. end
  149. end
  150.  
  151. local playerGui = LocalPlayer:FindFirstChild("PlayerGui")
  152. if playerGui then
  153. for _, gui in ipairs(playerGui:GetDescendants()) do
  154. if gui:IsA("TextLabel") or gui:IsA("TextBox") then
  155. local text = gui.Text:lower()
  156.  
  157. if text:find("level") or text:find("lvl") or text:find("nivel") then
  158. local number = text:match("%d+")
  159. if number then
  160. local val = tonumber(number)
  161. if val and val > 0 and val <= 100 then
  162. DinoLevelCache.value = val
  163. DinoLevelCache.lastUpdate = now
  164. return val
  165. end
  166. end
  167. end
  168. end
  169.  
  170. if gui:IsA("IntValue") or gui:IsA("NumberValue") then
  171. local name = gui.Name:lower()
  172. if name:find("level") or name:find("lvl") or name:find("nivel") then
  173. local val = tonumber(gui.Value) or 0
  174. if val > 0 then
  175. DinoLevelCache.value = val
  176. DinoLevelCache.lastUpdate = now
  177. return val
  178. end
  179. end
  180. end
  181. end
  182. end
  183.  
  184. DinoLevelCache.lastUpdate = now
  185. return DinoLevelCache.value
  186. end
  187.  
  188. local function debugPrintAllValues(parent, prefix)
  189. prefix = prefix or ""
  190.  
  191. for _, child in ipairs(parent:GetChildren()) do
  192. if child:IsA("IntValue") or child:IsA("NumberValue") or child:IsA("StringValue") then
  193. print(prefix .. "├─ " .. child.ClassName .. ": " .. child.Name .. " = " .. tostring(child.Value))
  194. end
  195.  
  196. if #child:GetChildren() > 0 then
  197. print(prefix .. "└─ Folder: " .. child.Name)
  198. debugPrintAllValues(child, prefix .. " ")
  199. end
  200. end
  201. end
  202.  
  203. local function getDinoLevelDebug()
  204. print("\n╔════════════════════════════════════════╗")
  205. print("║ INICIANDO BUSCA DE NÍVEL DO DINO ║")
  206. print("╚════════════════════════════════════════╝")
  207.  
  208. print("\n[1] Verificando leaderstats...")
  209. local leaderstats = LocalPlayer:FindFirstChild("leaderstats")
  210. if leaderstats then
  211. print("✓ leaderstats encontrado!")
  212. debugPrintAllValues(leaderstats, " ")
  213.  
  214. for _, stat in ipairs(leaderstats:GetChildren()) do
  215. local name = stat.Name:lower()
  216. if name:find("level") or name:find("lvl") or name:find("nivel") then
  217. if stat:IsA("IntValue") or stat:IsA("NumberValue") then
  218. local val = tonumber(stat.Value) or 0
  219. print("✓✓✓ NÍVEL ENCONTRADO em leaderstats." .. stat.Name .. ": " .. val)
  220. return val
  221. end
  222. end
  223. end
  224. else
  225. print("✗ leaderstats não encontrado")
  226. end
  227.  
  228. print("\n╔════════════════════════════════════════╗")
  229. print("║ ✗ NÍVEL NÃO ENCONTRADO ║")
  230. print("╚════════════════════════════════════════╝\n")
  231.  
  232. return 0
  233. end
  234.  
  235. --// ========== SISTEMA DE CRISTAIS ========== //
  236.  
  237. local prioridadeMap = { legendary = 1, epic = 2, rare = 3, crystal = 4 }
  238.  
  239. local function getCrystalRank(name)
  240. name = name:lower()
  241. for key, rank in pairs(prioridadeMap) do
  242. if name:find(key) then return rank end
  243. end
  244. return 5
  245. end
  246.  
  247. local function getSortedCrystals()
  248. local found = {}
  249. for _, obj in ipairs(workspace:GetDescendants()) do
  250. if obj:IsA("BasePart") and obj.Parent and obj.Parent:IsA("Model") then
  251. local rank = getCrystalRank(obj.Parent.Name)
  252. if rank < 5 then
  253. table.insert(found, {part = obj, rank = rank})
  254. end
  255. end
  256. end
  257. table.sort(found, function(a, b) return a.rank < b.rank end)
  258. local parts = {}
  259. for _, entry in ipairs(found) do
  260. table.insert(parts, entry.part)
  261. end
  262. return parts
  263. end
  264.  
  265. --// ========== SISTEMA ESP DE CARNES ========== //
  266.  
  267. local ActiveMeatESPs = {}
  268. local meatUpdateLoop = nil
  269. local meatScanLoop = nil
  270.  
  271. local function isMeatObject(obj)
  272. if not obj then return false, nil end
  273.  
  274. if obj:IsA("ProximityPrompt") and obj.Enabled then
  275. local action = (obj.ActionText or ""):lower()
  276. local objText = (obj.ObjectText or ""):lower()
  277.  
  278. local foodActions = {"coma", "eat", "pegar", "pick", "grab", "take"}
  279.  
  280. for _, foodAction in ipairs(foodActions) do
  281. if action:find(foodAction) then
  282. local fullText = action .. " " .. objText
  283. local excludeWords = {"plant", "fish", "berry", "fruit", "vegetable", "seed"}
  284.  
  285. local isExcluded = false
  286. for _, word in ipairs(excludeWords) do
  287. if fullText:find(word) then
  288. isExcluded = true
  289. break
  290. end
  291. end
  292.  
  293. if not isExcluded then
  294. local parent = obj.Parent
  295. if parent and parent:IsA("BasePart") then
  296. for _, player in ipairs(Players:GetPlayers()) do
  297. if player.Character and parent:IsDescendantOf(player.Character) then
  298. return false, nil
  299. end
  300. end
  301. return true, parent
  302. end
  303. end
  304. end
  305. end
  306. end
  307.  
  308. if obj:IsA("Model") or obj:IsA("BasePart") then
  309. local name = (obj.Name or ""):lower()
  310.  
  311. local meatWords = {
  312. "meat", "carne", "beef", "steak", "chicken",
  313. "frango", "pork", "porco", "bacon", "ham"
  314. }
  315.  
  316. for _, word in ipairs(meatWords) do
  317. if name:find(word) then
  318. for _, player in ipairs(Players:GetPlayers()) do
  319. if player.Character and obj:IsDescendantOf(player.Character) then
  320. return false, nil
  321. end
  322. end
  323.  
  324. if obj:IsA("Model") then
  325. local part = obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart")
  326. return part ~= nil, part
  327. else
  328. return true, obj
  329. end
  330. end
  331. end
  332. end
  333.  
  334. return false, nil
  335. end
  336.  
  337. local function findNearestMeat()
  338. local char = LocalPlayer.Character
  339. local root = char and char:FindFirstChild("HumanoidRootPart")
  340. if not root then return nil, math.huge end
  341.  
  342. local nearestMeat = nil
  343. local nearestDistance = math.huge
  344.  
  345. for _, obj in ipairs(workspace:GetDescendants()) do
  346. local isMeat, part = isMeatObject(obj)
  347. if isMeat and part and part.Parent then
  348. local distance = (part.Position - root.Position).Magnitude
  349. if distance < nearestDistance then
  350. nearestDistance = distance
  351. nearestMeat = part
  352. end
  353. end
  354. end
  355.  
  356. return nearestMeat, nearestDistance
  357. end
  358.  
  359. local function createMeatESP(part)
  360. if not part or not part:IsA("BasePart") or not part.Parent then return end
  361.  
  362. local id = tostring(part:GetDebugId())
  363. if ActiveMeatESPs[id] then return end
  364.  
  365. local esp = Instance.new("BillboardGui")
  366. esp.Name = "MeatESP_" .. id
  367. esp.Adornee = part
  368. esp.Size = UDim2.new(0, Config.ESP_MAX_SIZE, 0, Config.ESP_MAX_SIZE * 0.4)
  369. esp.StudsOffset = Vector3.new(0, 3, 0)
  370. esp.AlwaysOnTop = true
  371. esp.LightInfluence = 0
  372. esp.MaxDistance = Config.MAX_VISIBLE_DISTANCE
  373. esp.Parent = workspace
  374. esp.Enabled = true
  375.  
  376. local frame = Instance.new("Frame", esp)
  377. frame.Size = UDim2.new(1, 0, 1, 0)
  378. frame.BackgroundColor3 = Color3.fromRGB(255, 80, 80)
  379. frame.BackgroundTransparency = 0.4
  380. frame.BorderSizePixel = 1
  381. frame.BorderColor3 = Color3.fromRGB(255, 200, 0)
  382.  
  383. local corner = Instance.new("UICorner", frame)
  384. corner.CornerRadius = UDim.new(0, 6)
  385.  
  386. local iconLabel = Instance.new("TextLabel", frame)
  387. iconLabel.Size = UDim2.new(0.3, 0, 0.9, 0)
  388. iconLabel.Position = UDim2.new(0, 2, 0.05, 0)
  389. iconLabel.BackgroundTransparency = 1
  390. iconLabel.Text = "🥩"
  391. iconLabel.TextScaled = true
  392. iconLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  393. iconLabel.Font = Enum.Font.SourceSansBold
  394. iconLabel.TextStrokeTransparency = 0.5
  395.  
  396. local distLabel = Instance.new("TextLabel", frame)
  397. distLabel.Name = "Distance"
  398. distLabel.Size = UDim2.new(0.7, -4, 0.9, 0)
  399. distLabel.Position = UDim2.new(0.3, 2, 0.05, 0)
  400. distLabel.BackgroundTransparency = 1
  401. distLabel.Text = "0m"
  402. distLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  403. distLabel.TextStrokeTransparency = 0.3
  404. distLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
  405. distLabel.Font = Enum.Font.GothamBold
  406. distLabel.TextScaled = true
  407.  
  408. ActiveMeatESPs[id] = {
  409. gui = esp,
  410. part = part,
  411. distLabel = distLabel,
  412. frame = frame,
  413. iconLabel = iconLabel
  414. }
  415.  
  416. return true
  417. end
  418.  
  419. local function scanForMeats()
  420. if not Config.EspMeatActive then return end
  421.  
  422. for id, data in pairs(ActiveMeatESPs) do
  423. if data.gui then
  424. pcall(function() data.gui:Destroy() end)
  425. end
  426. end
  427. ActiveMeatESPs = {}
  428.  
  429. local meatCount = 0
  430. local checkedCount = 0
  431.  
  432. for _, obj in ipairs(workspace:GetDescendants()) do
  433. checkedCount = checkedCount + 1
  434.  
  435. if checkedCount % 300 == 0 then
  436. task.wait()
  437. if not Config.EspMeatActive then return end
  438. end
  439.  
  440. local isMeat, part = isMeatObject(obj)
  441. if isMeat and part and part.Parent then
  442. if createMeatESP(part) then
  443. meatCount = meatCount + 1
  444. end
  445. end
  446. end
  447. end
  448.  
  449. local function updateMeatESPInfo()
  450. if not Config.EspMeatActive then return end
  451.  
  452. local char = LocalPlayer.Character
  453. local root = char and char:FindFirstChild("HumanoidRootPart")
  454. if not root then return end
  455.  
  456. for id, data in pairs(ActiveMeatESPs) do
  457. if data.part and data.part.Parent and data.gui and data.gui.Parent then
  458. local distance = (data.part.Position - root.Position).Magnitude
  459.  
  460. data.gui.Enabled = true
  461.  
  462. if data.distLabel then
  463. if distance < 100 then
  464. data.distLabel.Text = string.format("%.0fm", distance)
  465. elseif distance < 1000 then
  466. data.distLabel.Text = string.format("%.0fm", distance)
  467. else
  468. data.distLabel.Text = string.format("%.1fkm", distance / 1000)
  469. end
  470. end
  471.  
  472. local scaleFactor
  473. if distance <= 50 then scaleFactor = 1.0
  474. elseif distance <= 200 then scaleFactor = 0.75
  475. elseif distance <= 500 then scaleFactor = 0.6
  476. elseif distance <= 1000 then scaleFactor = 0.5
  477. elseif distance <= 2000 then scaleFactor = 0.4
  478. elseif distance <= 3000 then scaleFactor = 0.35
  479. elseif distance <= 5000 then scaleFactor = 0.3
  480. elseif distance <= 10000 then scaleFactor = 0.25
  481. else scaleFactor = 0.2 end
  482.  
  483. local newSize = Config.ESP_MIN_SIZE + ((Config.ESP_MAX_SIZE - Config.ESP_MIN_SIZE) * scaleFactor)
  484. data.gui.Size = UDim2.new(0, newSize, 0, newSize * 0.4)
  485.  
  486. if data.frame then
  487. local transparency
  488. if distance < 300 then transparency = 0.3
  489. elseif distance < 1000 then transparency = 0.5
  490. elseif distance < 2500 then transparency = 0.65
  491. elseif distance < 5000 then transparency = 0.75
  492. elseif distance < 10000 then transparency = 0.8
  493. else transparency = 0.85 end
  494. data.frame.BackgroundTransparency = transparency
  495. end
  496.  
  497. if distance < 100 then
  498. data.frame.BackgroundColor3 = Color3.fromRGB(100, 255, 100)
  499. data.frame.BorderColor3 = Color3.fromRGB(200, 255, 200)
  500. elseif distance < 500 then
  501. data.frame.BackgroundColor3 = Color3.fromRGB(255, 255, 100)
  502. data.frame.BorderColor3 = Color3.fromRGB(255, 255, 150)
  503. elseif distance < 1500 then
  504. data.frame.BackgroundColor3 = Color3.fromRGB(255, 180, 100)
  505. data.frame.BorderColor3 = Color3.fromRGB(255, 200, 150)
  506. elseif distance < 3000 then
  507. data.frame.BackgroundColor3 = Color3.fromRGB(255, 120, 120)
  508. data.frame.BorderColor3 = Color3.fromRGB(255, 150, 150)
  509. elseif distance < 5000 then
  510. data.frame.BackgroundColor3 = Color3.fromRGB(200, 150, 255)
  511. data.frame.BorderColor3 = Color3.fromRGB(220, 180, 255)
  512. elseif distance < 10000 then
  513. data.frame.BackgroundColor3 = Color3.fromRGB(180, 180, 255)
  514. data.frame.BorderColor3 = Color3.fromRGB(200, 200, 255)
  515. else
  516. data.frame.BackgroundColor3 = Color3.fromRGB(150, 150, 150)
  517. data.frame.BorderColor3 = Color3.fromRGB(180, 180, 180)
  518. end
  519. else
  520. if data.gui then
  521. pcall(function() data.gui:Destroy() end)
  522. end
  523. ActiveMeatESPs[id] = nil
  524. end
  525. end
  526. end
  527.  
  528. local function startMeatESP()
  529. if meatUpdateLoop then return end
  530.  
  531. scanForMeats()
  532.  
  533. meatUpdateLoop = RunService.Heartbeat:Connect(function()
  534. updateMeatESPInfo()
  535. end)
  536.  
  537. meatScanLoop = task.spawn(function()
  538. while Config.EspMeatActive do
  539. task.wait(10)
  540. if Config.EspMeatActive then
  541. for _, obj in ipairs(workspace:GetDescendants()) do
  542. if not Config.EspMeatActive then break end
  543.  
  544. local isMeat, part = isMeatObject(obj)
  545. if isMeat and part then
  546. local id = tostring(part:GetDebugId())
  547. if not ActiveMeatESPs[id] then
  548. createMeatESP(part)
  549. end
  550. end
  551. end
  552.  
  553. for id, data in pairs(ActiveMeatESPs) do
  554. if not data.part or not data.part.Parent then
  555. if data.gui then
  556. pcall(function() data.gui:Destroy() end)
  557. end
  558. ActiveMeatESPs[id] = nil
  559. end
  560. end
  561. end
  562. end
  563. end)
  564.  
  565. workspace.DescendantAdded:Connect(function(obj)
  566. if not Config.EspMeatActive then return end
  567.  
  568. task.wait(0.1)
  569. local isMeat, part = isMeatObject(obj)
  570. if isMeat and part then
  571. local id = tostring(part:GetDebugId())
  572. if not ActiveMeatESPs[id] then
  573. createMeatESP(part)
  574. end
  575. end
  576. end)
  577. end
  578.  
  579. local function stopMeatESP()
  580. if meatUpdateLoop then
  581. meatUpdateLoop:Disconnect()
  582. meatUpdateLoop = nil
  583. end
  584.  
  585. if meatScanLoop then
  586. task.cancel(meatScanLoop)
  587. meatScanLoop = nil
  588. end
  589.  
  590. for id, data in pairs(ActiveMeatESPs) do
  591. if data.gui then
  592. pcall(function() data.gui:Destroy() end)
  593. end
  594. end
  595. ActiveMeatESPs = {}
  596. end
  597.  
  598. --// ========== SISTEMA ESP DE JOGADORES ========== //
  599.  
  600. local PlayerESP_Data = {}
  601. local PlayerESP_UpdateLoop = nil
  602. local PlayerESP_ProcessQueue = {}
  603.  
  604. local ESP_CONFIG = {
  605. UpdateInterval = 0.5,
  606. HPBarMaxDistance = 4000,
  607. HPBarSize = UDim2.new(0, 50, 0, 5),
  608. HPBarYOffset = 0.5,
  609. HighlightFillTransparency = 0.85,
  610. OutlineTransparency = 0.15,
  611. MaxPlayersPerFrame = 2,
  612. }
  613.  
  614. local COLOR_ENEMY = Color3.fromRGB(255, 85, 85)
  615. local COLOR_FRIEND = Color3.fromRGB(85, 255, 85)
  616. local COLOR_NEUTRAL = Color3.fromRGB(240, 240, 240)
  617.  
  618. local TeamColorMap = {}
  619. local UsedHues = {}
  620. local NextHueIndex = 0
  621.  
  622. local function generateUniqueTeamColor()
  623. local goldenRatio = 0.618033988749895
  624. local hue = (NextHueIndex * goldenRatio) % 1
  625.  
  626. if hue >= 0.25 and hue <= 0.45 then
  627. hue = (hue + 0.35) % 1
  628. end
  629.  
  630. local minDistance = 0.15
  631. for _, usedHue in pairs(UsedHues) do
  632. local distance = math.abs(hue - usedHue)
  633. if distance < minDistance or distance > (1 - minDistance) then
  634. NextHueIndex = NextHueIndex + 1
  635. return generateUniqueTeamColor()
  636. end
  637. end
  638.  
  639. table.insert(UsedHues, hue)
  640. NextHueIndex = NextHueIndex + 1
  641.  
  642. local sat = 0.8 + (math.random() * 0.2)
  643. local val = 0.9 + (math.random() * 0.1)
  644.  
  645. return Color3.fromHSV(hue, sat, val)
  646. end
  647.  
  648. local function isNeutralPlayer(p)
  649. return p.Team == nil
  650. end
  651.  
  652. local function isAllyPlayer(p)
  653. return LocalPlayer.Team and p.Team == LocalPlayer.Team
  654. end
  655.  
  656. local function colorForPlayer(p)
  657. if isNeutralPlayer(p) then
  658. return COLOR_NEUTRAL
  659. end
  660.  
  661. if isAllyPlayer(p) then
  662. return COLOR_FRIEND
  663. end
  664.  
  665. if p.Team and not TeamColorMap[p.Team] then
  666. TeamColorMap[p.Team] = generateUniqueTeamColor()
  667. end
  668.  
  669. return TeamColorMap[p.Team] or COLOR_ENEMY
  670. end
  671.  
  672. local function shouldShowPlayerESP(p)
  673. if not Config.PlayerESP then return false end
  674. if Config.PlayerESP_TeamCheck then return not isAllyPlayer(p) end
  675. return true
  676. end
  677.  
  678. local function shouldShowPlayerHP(p)
  679. if not Config.PlayerESP_ShowHP then return false end
  680. if Config.PlayerESP_TeamCheck then return not isAllyPlayer(p) end
  681. return true
  682. end
  683.  
  684. local function isValidPlayerCharacter(char)
  685. if not char or not char.Parent then return false end
  686. return char:FindFirstChild("Humanoid") and char:FindFirstChild("HumanoidRootPart")
  687. end
  688.  
  689. local function clearPlayerConns(pack)
  690. if not pack or not pack.conns then return end
  691. for _, c in ipairs(pack.conns) do
  692. if c and c.Connected then
  693. pcall(function() c:Disconnect() end)
  694. end
  695. end
  696. pack.conns = {}
  697. end
  698.  
  699. local function detachPlayerESP(plr)
  700. local pack = PlayerESP_Data[plr]
  701. if not pack then return end
  702.  
  703. clearPlayerConns(pack)
  704.  
  705. if pack.highlight then
  706. pcall(function() pack.highlight:Destroy() end)
  707. pack.highlight = nil
  708. end
  709.  
  710. if pack.hpGui then
  711. pcall(function() pack.hpGui:Destroy() end)
  712. pack.hpGui = nil
  713. end
  714.  
  715. PlayerESP_Data[plr] = nil
  716. end
  717.  
  718. local function ensurePlayerHighlight(plr, char)
  719. local pack = PlayerESP_Data[plr]
  720. if not pack or not isValidPlayerCharacter(char) then return end
  721.  
  722. if not pack.highlight or not pack.highlight.Parent then
  723. for _, obj in ipairs(char:GetChildren()) do
  724. if obj:IsA("Highlight") and obj.Name == "PlayerESP_Highlight" then
  725. pcall(function() obj:Destroy() end)
  726. end
  727. end
  728.  
  729. local hi = Instance.new("Highlight")
  730. hi.Name = "PlayerESP_Highlight"
  731. hi.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  732. hi.FillTransparency = ESP_CONFIG.HighlightFillTransparency
  733. hi.OutlineTransparency = ESP_CONFIG.OutlineTransparency
  734. hi.Adornee = char
  735. hi.Parent = char
  736. pack.highlight = hi
  737. end
  738.  
  739. local col = colorForPlayer(plr)
  740. pack.highlight.FillColor = col
  741. pack.highlight.OutlineColor = col
  742. pack.highlight.Adornee = char
  743. pack.highlight.Enabled = shouldShowPlayerESP(plr)
  744. end
  745.  
  746. local function ensurePlayerHPGui(plr, char)
  747. local pack = PlayerESP_Data[plr]
  748. if not pack or not isValidPlayerCharacter(char) then return end
  749.  
  750. local hum = char:FindFirstChildOfClass("Humanoid")
  751. local head = char:FindFirstChild("Head")
  752. local root = char:FindFirstChild("HumanoidRootPart")
  753.  
  754. if not hum or not root then
  755. if pack.hpGui then
  756. pack.hpGui.Enabled = false
  757. end
  758. return
  759. end
  760.  
  761. pack.hum = hum
  762. pack.head = head
  763. pack.root = root
  764.  
  765. if not pack.hpGui or not pack.hpGui.Parent then
  766. for _, obj in ipairs(char:GetChildren()) do
  767. if obj:IsA("BillboardGui") and obj.Name == "PlayerESP_HP" then
  768. pcall(function() obj:Destroy() end)
  769. end
  770. end
  771.  
  772. local bill = Instance.new("BillboardGui")
  773. bill.Name = "PlayerESP_HP"
  774. bill.AlwaysOnTop = true
  775. bill.LightInfluence = 0
  776. bill.Size = ESP_CONFIG.HPBarSize
  777. bill.MaxDistance = ESP_CONFIG.HPBarMaxDistance
  778. bill.Parent = char
  779.  
  780. local bg = Instance.new("Frame")
  781. bg.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  782. bg.BackgroundTransparency = 0.2
  783. bg.BorderSizePixel = 0
  784. bg.Size = UDim2.fromScale(1, 1)
  785. bg.Parent = bill
  786.  
  787. local stroke = Instance.new("UIStroke")
  788. stroke.Color = Color3.fromRGB(0, 0, 0)
  789. stroke.Thickness = 1.5
  790. stroke.Parent = bg
  791.  
  792. local corner1 = Instance.new("UICorner")
  793. corner1.CornerRadius = UDim.new(0, 2)
  794. corner1.Parent = bg
  795.  
  796. local fill = Instance.new("Frame")
  797. fill.BackgroundColor3 = COLOR_FRIEND
  798. fill.BorderSizePixel = 0
  799. fill.Size = UDim2.fromScale(1, 1)
  800. fill.Parent = bg
  801.  
  802. local corner2 = Instance.new("UICorner")
  803. corner2.CornerRadius = UDim.new(0, 2)
  804. corner2.Parent = fill
  805.  
  806. pack.hpGui = bill
  807. pack.hpFill = fill
  808. end
  809.  
  810. if head then
  811. pack.hpGui.Adornee = head
  812. local headSize = head.Size.Y
  813. pack.hpGui.StudsOffset = Vector3.new(0, headSize/2 + ESP_CONFIG.HPBarYOffset, 0)
  814. else
  815. pack.hpGui.Adornee = root
  816. pack.hpGui.StudsOffset = Vector3.new(0, 2.5 + ESP_CONFIG.HPBarYOffset, 0)
  817. end
  818.  
  819. pack.hpGui.Enabled = shouldShowPlayerHP(plr)
  820. end
  821.  
  822. local function updatePlayerHPBar(plr)
  823. local pack = PlayerESP_Data[plr]
  824. if not pack or not pack.hpGui or not pack.hpFill or not pack.hum then return end
  825.  
  826. local h = pack.hum.Health
  827. local m = pack.hum.MaxHealth
  828. if m <= 0 then m = 100 end
  829.  
  830. local ratio = math.clamp(h / m, 0, 1)
  831. pack.hpFill.Size = UDim2.new(ratio, 0, 1, 0)
  832.  
  833. local r, g, b
  834. if ratio > 0.5 then
  835. r = (1 - ratio) * 2 * 255
  836. g = 255
  837. b = 0
  838. else
  839. r = 255
  840. g = ratio * 2 * 255
  841. b = 0
  842. end
  843.  
  844. pack.hpFill.BackgroundColor3 = Color3.fromRGB(r, g, b)
  845. pack.hpGui.Enabled = shouldShowPlayerHP(plr) and (h > 0)
  846. end
  847.  
  848. local function setupPlayerESP(plr, char)
  849. if plr == LocalPlayer or not isValidPlayerCharacter(char) then return end
  850.  
  851. local pack = PlayerESP_Data[plr] or { conns = {} }
  852. PlayerESP_Data[plr] = pack
  853.  
  854. if pack.char and pack.char ~= char then
  855. clearPlayerConns(pack)
  856. if pack.highlight then pcall(function() pack.highlight:Destroy() end) end
  857. if pack.hpGui then pcall(function() pack.hpGui:Destroy() end) end
  858. pack.char = nil
  859. pack.highlight = nil
  860. pack.hpGui = nil
  861. pack.hpFill = nil
  862. pack.hum = nil
  863. pack.head = nil
  864. end
  865.  
  866. pack.char = char
  867. local hum = char:FindFirstChildOfClass("Humanoid")
  868.  
  869. if not hum then return end
  870.  
  871. pack.hum = hum
  872. hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
  873.  
  874. task.wait(0.1)
  875. ensurePlayerHighlight(plr, char)
  876. ensurePlayerHPGui(plr, char)
  877. updatePlayerHPBar(plr)
  878.  
  879. table.insert(pack.conns, hum.HealthChanged:Connect(function()
  880. updatePlayerHPBar(plr)
  881. end))
  882.  
  883. table.insert(pack.conns, plr:GetPropertyChangedSignal("Team"):Connect(function()
  884. task.spawn(function()
  885. ensurePlayerHighlight(plr, char)
  886. updatePlayerHPBar(plr)
  887. end)
  888. end))
  889.  
  890. pack.initialized = true
  891. end
  892.  
  893. local function hookPlayerESP(plr)
  894. if plr == LocalPlayer then return end
  895. table.insert(PlayerESP_ProcessQueue, plr)
  896. end
  897.  
  898. local function reinitializeAllPlayerESP()
  899. for plr, _ in pairs(PlayerESP_Data) do
  900. detachPlayerESP(plr)
  901. end
  902.  
  903. PlayerESP_ProcessQueue = {}
  904.  
  905. task.wait(0.1)
  906.  
  907. for _, p in ipairs(Players:GetPlayers()) do
  908. if p ~= LocalPlayer then
  909. hookPlayerESP(p)
  910. end
  911. end
  912. end
  913.  
  914. task.spawn(function()
  915. while true do
  916. task.wait(0.2)
  917.  
  918. if #PlayerESP_ProcessQueue > 0 and Config.PlayerESP then
  919. local plr = table.remove(PlayerESP_ProcessQueue, 1)
  920.  
  921. if plr and plr.Parent then
  922. detachPlayerESP(plr)
  923. PlayerESP_Data[plr] = { conns = {} }
  924.  
  925. if plr.Character then
  926. task.spawn(function()
  927. setupPlayerESP(plr, plr.Character)
  928. end)
  929. end
  930.  
  931. table.insert(PlayerESP_Data[plr].conns, plr.CharacterAdded:Connect(function(char)
  932. task.wait(0.5)
  933. setupPlayerESP(plr, char)
  934. end))
  935.  
  936. table.insert(PlayerESP_Data[plr].conns, plr.CharacterRemoving:Connect(function()
  937. local pack = PlayerESP_Data[plr]
  938. if pack then
  939. if pack.hpGui then
  940. pcall(function() pack.hpGui:Destroy() end)
  941. pack.hpGui = nil
  942. end
  943. if pack.highlight then
  944. pcall(function() pack.highlight:Destroy() end)
  945. pack.highlight = nil
  946. end
  947. pack.hum = nil
  948. pack.head = nil
  949. pack.initialized = false
  950. end
  951. end))
  952. end
  953. end
  954. end
  955. end)
  956.  
  957. task.spawn(function()
  958. task.wait(2)
  959. Players.PlayerAdded:Connect(function(p)
  960. task.wait(0.5)
  961. hookPlayerESP(p)
  962. end)
  963.  
  964. Players.PlayerRemoving:Connect(function(p)
  965. detachPlayerESP(p)
  966. end)
  967. end)
  968.  
  969. task.spawn(function()
  970. while true do
  971. task.wait(ESP_CONFIG.UpdateInterval)
  972.  
  973. if not Config.PlayerESP then
  974. task.wait(1)
  975. continue
  976. end
  977.  
  978. local processed = 0
  979. for plr, pack in pairs(PlayerESP_Data) do
  980. if processed >= ESP_CONFIG.MaxPlayersPerFrame then
  981. task.wait()
  982. processed = 0
  983. end
  984.  
  985. if plr and plr.Parent and plr ~= LocalPlayer then
  986. local char = plr.Character
  987. if char and isValidPlayerCharacter(char) then
  988. if not pack.initialized or pack.char ~= char then
  989. setupPlayerESP(plr, char)
  990. else
  991. if not pack.highlight or not pack.highlight.Parent then
  992. ensurePlayerHighlight(plr, char)
  993. end
  994. if not pack.hpGui or not pack.hpGui.Parent then
  995. ensurePlayerHPGui(plr, char)
  996. end
  997. if pack.highlight then
  998. pack.highlight.Enabled = shouldShowPlayerESP(plr)
  999. end
  1000. if pack.hpGui then
  1001. pack.hpGui.Enabled = shouldShowPlayerHP(plr) and pack.hum and pack.hum.Health > 0
  1002. end
  1003. updatePlayerHPBar(plr)
  1004. end
  1005. end
  1006. end
  1007. processed = processed + 1
  1008. end
  1009. end
  1010. end)
  1011.  
  1012. --// ========== SISTEMA DE TELEPORTE SEGURO ========== //
  1013.  
  1014. local function safeTeleport(targetCFrame, locationName)
  1015. if ActiveTeleportConnection then
  1016. ActiveTeleportConnection:Disconnect()
  1017. ActiveTeleportConnection = nil
  1018. end
  1019.  
  1020. local char = LocalPlayer.Character
  1021. local root = char and char:FindFirstChild("HumanoidRootPart")
  1022. local humanoid = char and char:FindFirstChild("Humanoid")
  1023.  
  1024. if not root or not humanoid then
  1025. print("❌ Erro: Personagem não encontrado!")
  1026. return false
  1027. end
  1028.  
  1029. print("🚀 Teleportando para: " .. locationName)
  1030.  
  1031. root.CFrame = targetCFrame
  1032.  
  1033. task.spawn(function()
  1034. task.wait(0.05)
  1035.  
  1036. local rayParams = RaycastParams.new()
  1037. rayParams.FilterType = Enum.RaycastFilterType.Blacklist
  1038. rayParams.FilterDescendantsInstances = {char}
  1039.  
  1040. local rayResult = workspace:Raycast(
  1041. root.Position,
  1042. Vector3.new(0, -100, 0),
  1043. rayParams
  1044. )
  1045.  
  1046. if rayResult then
  1047. root.CFrame = CFrame.new(rayResult.Position + Vector3.new(0, 3, 0))
  1048. end
  1049. end)
  1050.  
  1051. local teleportStartTime = tick()
  1052. local maxWaitTime = 1.2
  1053. local minWaitTime = 0.2
  1054.  
  1055. ActiveTeleportConnection = RunService.Heartbeat:Connect(function()
  1056. if not char or not char.Parent or not root or not root.Parent or not humanoid then
  1057. if ActiveTeleportConnection then
  1058. ActiveTeleportConnection:Disconnect()
  1059. ActiveTeleportConnection = nil
  1060. end
  1061. return
  1062. end
  1063.  
  1064. local elapsedTime = tick() - teleportStartTime
  1065.  
  1066. local floorMaterial = humanoid.FloorMaterial
  1067. local isOnGround = floorMaterial ~= Enum.Material.Air
  1068.  
  1069. local velocity = root.AssemblyLinearVelocity
  1070. local isStationary = velocity.Magnitude < 2
  1071.  
  1072. local humanoidState = humanoid:GetState()
  1073. local isLanded = humanoidState == Enum.HumanoidStateType.Landed or
  1074. humanoidState == Enum.HumanoidStateType.Running or
  1075. humanoidState == Enum.HumanoidStateType.RunningNoPhysics
  1076.  
  1077. if (elapsedTime > minWaitTime and (isOnGround or (isStationary and isLanded))) or elapsedTime > maxWaitTime then
  1078. if ActiveTeleportConnection then
  1079. ActiveTeleportConnection:Disconnect()
  1080. ActiveTeleportConnection = nil
  1081. end
  1082.  
  1083. if isOnGround or isLanded then
  1084. print("✅ Chegou: " .. locationName)
  1085. else
  1086. local rayParams = RaycastParams.new()
  1087. rayParams.FilterType = Enum.RaycastFilterType.Blacklist
  1088. rayParams.FilterDescendantsInstances = {char}
  1089.  
  1090. local rayResult = workspace:Raycast(
  1091. root.Position,
  1092. Vector3.new(0, -200, 0),
  1093. rayParams
  1094. )
  1095.  
  1096. if rayResult then
  1097. root.CFrame = CFrame.new(rayResult.Position + Vector3.new(0, 3, 0))
  1098. end
  1099.  
  1100. print("⚠️ Posição ajustada")
  1101. end
  1102.  
  1103. return
  1104. end
  1105. end)
  1106.  
  1107. return true
  1108. end
  1109.  
  1110. --// ========== SISTEMA DE TELEPORTS SALVOS ========== //
  1111.  
  1112. local function loadSavedTeleports()
  1113. local success, data = pcall(function()
  1114. return game:GetService("HttpService"):JSONDecode(readfile("PreHistoria_Teleports.json"))
  1115. end)
  1116.  
  1117. if success and data then
  1118. Config.SavedTeleports = data
  1119. print("📍 Carregado " .. #data .. " teleports salvos")
  1120. else
  1121. Config.SavedTeleports = {}
  1122. print("📍 Nenhum teleport salvo encontrado")
  1123. end
  1124. end
  1125.  
  1126. loadSavedTeleports()
  1127.  
  1128. --// ========== CARREGAR REDZLIB ========== //
  1129. print("⏳ Carregando Redzlib...")
  1130.  
  1131. local success, redzlib = pcall(function()
  1132. return loadstring(game:HttpGet("https://raw.githubusercontent.com/tbao143/Library-ui/refs/heads/main/Redzhubui"))()
  1133. end)
  1134.  
  1135. if not success or not redzlib then
  1136. error("❌ ERRO: Não foi possível carregar a Redzlib!")
  1137. return
  1138. end
  1139.  
  1140. print("✅ Redzlib carregada com sucesso!")
  1141.  
  1142. --// ========== CRIAR WINDOW ========== //
  1143. print("⏳ Criando Window...")
  1144.  
  1145. local Window = redzlib:MakeWindow({
  1146. Title = "🦖 Pré-história - By: NickZScripts",
  1147. SubTitle = "Sistema Modular & Anti-Conflitos | " .. ScriptVersion,
  1148. SaveFolder = "PreHistoria_RedzHub"
  1149. })
  1150.  
  1151. print("✅ Window criada!")
  1152.  
  1153. --// ========== ADICIONAR BOTÃO MINIMIZAR ========== //
  1154. Window:AddMinimizeButton({
  1155. Button = { Image = "rbxassetid://13536317727", BackgroundTransparency = 0 },
  1156. Corner = { CornerRadius = UDim.new(35, 1) },
  1157. })
  1158.  
  1159. --// ========== DEFINIR TEMA ========== //
  1160. redzlib:SetTheme("Purple")
  1161.  
  1162. --// ========== CRIAR TABS ========== //
  1163. print("⏳ Criando Tabs...")
  1164.  
  1165. local TabHome = Window:MakeTab({"🏠 Home", "home"})
  1166. local TabAutoFarm = Window:MakeTab({"⚡ Auto Farm", "zap"})
  1167. local TabEsp = Window:MakeTab({"👁️ ESP", "eye"})
  1168. local TabTeleport = Window:MakeTab({"🚀 Teleport", "navigation"})
  1169. local TabMisc = Window:MakeTab({"⚙️ Outros", "settings"})
  1170.  
  1171. print("✅ Tabs criadas!")
  1172.  
  1173. --// ========== TAB HOME ========== //
  1174. print("⏳ Configurando Tab Home...")
  1175.  
  1176. TabHome:AddSection({"✨ Bem-vindo ao Pré-história"})
  1177.  
  1178. TabHome:AddParagraph({
  1179. "👤 Informações do Jogador",
  1180. "Nome: " .. LocalPlayer.Name .. "\n" ..
  1181. "Display: " .. LocalPlayer.DisplayName .. "\n" ..
  1182. "ID: " .. LocalPlayer.UserId
  1183. })
  1184.  
  1185. TabHome:AddSection({"📊 Informações do Servidor"})
  1186.  
  1187. local PlayersCountParagraph = TabHome:AddParagraph({
  1188. "👥 Jogadores Online",
  1189. "Carregando..."
  1190. })
  1191.  
  1192. local function updatePlayerCount()
  1193. local current = #Players:GetPlayers()
  1194. local max = Players.MaxPlayers
  1195. PlayersCountParagraph:Set({
  1196. "👥 Jogadores Online",
  1197. string.format("%d/%d players no servidor", current, max)
  1198. })
  1199. end
  1200.  
  1201. updatePlayerCount()
  1202.  
  1203. Players.PlayerAdded:Connect(function()
  1204. task.wait(0.1)
  1205. updatePlayerCount()
  1206. end)
  1207.  
  1208. Players.PlayerRemoving:Connect(function()
  1209. task.wait(0.1)
  1210. updatePlayerCount()
  1211. end)
  1212.  
  1213. task.spawn(function()
  1214. while true do
  1215. task.wait(5)
  1216. updatePlayerCount()
  1217. end
  1218. end)
  1219.  
  1220. TabHome:AddSection({"⚡ Status dos Sistemas"})
  1221.  
  1222. local AutoFarmStatusParagraph = TabHome:AddParagraph({
  1223. "💎 Auto Farm",
  1224. "Status: Desligado ❌"
  1225. })
  1226.  
  1227. local EspCarnesStatusParagraph = TabHome:AddParagraph({
  1228. "🥩 ESP Carnes",
  1229. "Status: Desligado ❌"
  1230. })
  1231.  
  1232. local EspJogadoresStatusParagraph = TabHome:AddParagraph({
  1233. "👥 ESP Jogadores",
  1234. "Status: Desligado ❌"
  1235. })
  1236.  
  1237. local AutoColetaStatusParagraph = TabHome:AddParagraph({
  1238. "🔄 Auto Coleta",
  1239. "Status: Desligado ❌"
  1240. })
  1241.  
  1242. TabHome:AddSection({"ℹ️ Informações do Script"})
  1243.  
  1244. TabHome:AddParagraph({
  1245. "📜 Script Info",
  1246. "Versão: " .. ScriptVersion .. "\n" ..
  1247. "Desenvolvedor: NickZScripts\n" ..
  1248. "Interface: Redzlib v5\n" ..
  1249. "Status: ✅ Operacional"
  1250. })
  1251.  
  1252. print("✅ Tab Home configurada!")
  1253.  
  1254. --// ========== TAB AUTO FARM ========== //
  1255. print("⏳ Configurando Tab Auto Farm...")
  1256.  
  1257. TabAutoFarm:AddSection({"💎 Farm de Cristais"})
  1258.  
  1259. local DinoLevelParagraph = TabAutoFarm:AddParagraph({
  1260. "🦖 Nível do Dino",
  1261. "Nível: 0/60"
  1262. })
  1263.  
  1264. task.spawn(function()
  1265. while true do
  1266. task.wait(2)
  1267. local level = getDinoLevelSilent()
  1268. DinoLevelParagraph:Set({
  1269. "🦖 Nível do Dino",
  1270. string.format("Nível: %d/60", level)
  1271. })
  1272. end
  1273. end)
  1274.  
  1275. TabAutoFarm:AddToggle({
  1276. Name = "Auto Farm Cristais",
  1277. Description = "Farma cristais automaticamente para upar",
  1278. Default = false,
  1279. Flag = "AutoFarmToggle",
  1280. Callback = function(Value)
  1281. Config.AutoFarm = Value
  1282.  
  1283. if Value then
  1284. AutoFarmStatusParagraph:Set({
  1285. "💎 Auto Farm",
  1286. "Status: Ligado ✅"
  1287. })
  1288. print("✅ Auto Farm ativado!")
  1289. else
  1290. AutoFarmStatusParagraph:Set({
  1291. "💎 Auto Farm",
  1292. "Status: Desligado ❌"
  1293. })
  1294. print("❌ Auto Farm desativado!")
  1295. end
  1296. end,
  1297. })
  1298.  
  1299. TabAutoFarm:AddSection({"🔄 Auto Coleta"})
  1300.  
  1301. TabAutoFarm:AddToggle({
  1302. Name = "Auto Coleta",
  1303. Description = "Coleta automaticamente itens próximos (25 studs)",
  1304. Default = false,
  1305. Flag = "AutoColetToggle",
  1306. Callback = function(Value)
  1307. Config.AutoColeta = Value
  1308.  
  1309. if Value then
  1310. AutoColetaStatusParagraph:Set({
  1311. "🔄 Auto Coleta",
  1312. "Status: Ligado ✅"
  1313. })
  1314. print("✅ Auto Coleta ativado!")
  1315. else
  1316. AutoColetaStatusParagraph:Set({
  1317. "🔄 Auto Coleta",
  1318. "Status: Desligado ❌"
  1319. })
  1320. print("❌ Auto Coleta desativado!")
  1321. end
  1322. end,
  1323. })
  1324.  
  1325. print("✅ Tab Auto Farm configurada!")
  1326.  
  1327. --// ========== TAB ESP ========== //
  1328. print("⏳ Configurando Tab ESP...")
  1329.  
  1330. TabEsp:AddSection({"👥 ESP de Jogadores"})
  1331.  
  1332. TabEsp:AddToggle({
  1333. Name = "ESP de Jogadores",
  1334. Description = "Mostra jogadores através das paredes",
  1335. Default = false,
  1336. Flag = "EspJogadoresToggle",
  1337. Callback = function(Value)
  1338. Config.PlayerESP = Value
  1339.  
  1340. if Value then
  1341. EspJogadoresStatusParagraph:Set({
  1342. "👥 ESP Jogadores",
  1343. "Status: Ligado ✅"
  1344. })
  1345. reinitializeAllPlayerESP()
  1346. print("✅ ESP Jogadores ativado!")
  1347. else
  1348. EspJogadoresStatusParagraph:Set({
  1349. "👥 ESP Jogadores",
  1350. "Status: Desligado ❌"
  1351. })
  1352. for plr, pack in pairs(PlayerESP_Data) do
  1353. if pack.highlight then pack.highlight.Enabled = false end
  1354. if pack.hpGui then pack.hpGui.Enabled = false end
  1355. end
  1356. print("❌ ESP Jogadores desativado!")
  1357. end
  1358. end,
  1359. })
  1360.  
  1361. TabEsp:AddToggle({
  1362. Name = "Barra de Vida",
  1363. Description = "Mostra HP dos jogadores",
  1364. Default = false,
  1365. Flag = "EspHPToggle",
  1366. Callback = function(Value)
  1367. Config.PlayerESP_ShowHP = Value
  1368.  
  1369. for plr, pack in pairs(PlayerESP_Data) do
  1370. if pack.hpGui then
  1371. pack.hpGui.Enabled = shouldShowPlayerHP(plr) and pack.hum and pack.hum.Health > 0
  1372. end
  1373. end
  1374.  
  1375. print(Value and "✅ Barra de Vida ativada!" or "❌ Barra de Vida desativada!")
  1376. end,
  1377. })
  1378.  
  1379. TabEsp:AddToggle({
  1380. Name = "TeamCheck (Só Inimigos)",
  1381. Description = "Mostra apenas jogadores inimigos",
  1382. Default = false,
  1383. Flag = "EspTeamCheckToggle",
  1384. Callback = function(Value)
  1385. Config.PlayerESP_TeamCheck = Value
  1386.  
  1387. for plr, pack in pairs(PlayerESP_Data) do
  1388. if pack.highlight then
  1389. pack.highlight.Enabled = shouldShowPlayerESP(plr)
  1390. end
  1391. if pack.hpGui then
  1392. pack.hpGui.Enabled = shouldShowPlayerHP(plr) and pack.hum and pack.hum.Health > 0
  1393. end
  1394. end
  1395.  
  1396. print(Value and "✅ TeamCheck ativado!" or "❌ TeamCheck desativado!")
  1397. end,
  1398. })
  1399.  
  1400. TabEsp:AddSection({"🥩 ESP de Carnes"})
  1401.  
  1402. TabEsp:AddToggle({
  1403. Name = "ESP de Carnes",
  1404. Description = "Mostra carnes no mapa",
  1405. Default = false,
  1406. Flag = "EspToggle",
  1407. Callback = function(Value)
  1408. Config.EspMeatActive = Value
  1409.  
  1410. if Value then
  1411. EspCarnesStatusParagraph:Set({
  1412. "🥩 ESP Carnes",
  1413. "Status: Ligado ✅"
  1414. })
  1415. startMeatESP()
  1416. print("✅ ESP Carnes ativado!")
  1417. else
  1418. EspCarnesStatusParagraph:Set({
  1419. "🥩 ESP Carnes",
  1420. "Status: Desligado ❌"
  1421. })
  1422. stopMeatESP()
  1423. print("❌ ESP Carnes desativado!")
  1424. end
  1425. end,
  1426. })
  1427.  
  1428. print("✅ Tab ESP configurada!")
  1429.  
  1430. --// ========== TAB TELEPORT ========== //
  1431. print("⏳ Configurando Tab Teleport...")
  1432.  
  1433. TabTeleport:AddSection({"🍖 Teleportes Rápidos"})
  1434.  
  1435. TabTeleport:AddButton({
  1436. Name = "Teleportar para Carne Mais Próxima",
  1437. Description = "Teleporta para a carne mais próxima",
  1438. Callback = function()
  1439. local char = LocalPlayer.Character
  1440. local root = char and char:FindFirstChild("HumanoidRootPart")
  1441. if not root then
  1442. print("❌ Erro: Personagem não encontrado!")
  1443. return
  1444. end
  1445.  
  1446. local meat, distance = findNearestMeat()
  1447.  
  1448. if not meat then
  1449. print("❌ Erro: Nenhuma carne encontrada!")
  1450. return
  1451. end
  1452.  
  1453. safeTeleport(CFrame.new(meat.Position + Vector3.new(0, 3, 0)), "Carne")
  1454. end,
  1455. })
  1456.  
  1457. TabTeleport:AddSection({"🏠 Teleporte para Spawn"})
  1458.  
  1459. TabTeleport:AddButton({
  1460. Name = "Voltar ao Spawn",
  1461. Description = "Teleporta de volta para o spawn",
  1462. Callback = function()
  1463. if not LastSpawnPosition then
  1464. print("❌ Erro: Spawn não detectado!")
  1465. return
  1466. end
  1467.  
  1468. safeTeleport(LastSpawnPosition, "Spawn")
  1469. end,
  1470. })
  1471.  
  1472. TabTeleport:AddSection({"📍 Locais Salvos"})
  1473.  
  1474. if #Config.SavedTeleports > 0 then
  1475. for i, data in ipairs(Config.SavedTeleports) do
  1476. if data.position then
  1477. local locationName = data.name or ("Local " .. i)
  1478.  
  1479. TabTeleport:AddButton({
  1480. Name = "📍 " .. locationName,
  1481. Description = "Teleportar para " .. locationName,
  1482. Callback = function()
  1483. local pos = data.position
  1484.  
  1485. if not pos or not pos.X or not pos.Y or not pos.Z then
  1486. print("❌ Erro: Posição inválida!")
  1487. return
  1488. end
  1489.  
  1490. local targetCF = CFrame.new(pos.X, pos.Y, pos.Z)
  1491. safeTeleport(targetCF, locationName)
  1492. end,
  1493. })
  1494. end
  1495. end
  1496. else
  1497. TabTeleport:AddParagraph({
  1498. "ℹ️ Nenhum Local Salvo",
  1499. "Você ainda não possui locais salvos.\n\nUse outros scripts para salvar posições."
  1500. })
  1501. end
  1502.  
  1503. print("✅ Tab Teleport configurada!")
  1504.  
  1505. --// ========== TAB MISC ========== //
  1506. print("⏳ Configurando Tab Misc...")
  1507.  
  1508. TabMisc:AddSection({"🔍 Ferramentas de Debug"})
  1509.  
  1510. TabMisc:AddButton({
  1511. Name = "🔍 Debug: Buscar Nível (Console F9)",
  1512. Description = "Veja detalhes no console",
  1513. Callback = function()
  1514. local level = getDinoLevelDebug()
  1515. print("🔍 Debug: Nível encontrado: " .. level)
  1516. print("📋 Veja o console (F9) para mais detalhes")
  1517. end,
  1518. })
  1519.  
  1520. TabMisc:AddSection({"ℹ️ Informações"})
  1521.  
  1522. TabMisc:AddParagraph({
  1523. "⚙️ Sobre o Script",
  1524. "Todas as informações importantes estão na aba Home.\n\n" ..
  1525. "O sistema de Auto Coleta funciona de forma independente!\n\n" ..
  1526. "Teleports salvos são carregados do arquivo JSON."
  1527. })
  1528.  
  1529. print("✅ Tab Misc configurada!")
  1530.  
  1531. --// ========== SELECIONAR TAB INICIAL ========== //
  1532. print("⏳ Selecionando Tab Home...")
  1533. Window:SelectTab(TabHome)
  1534. print("✅ Tab Home selecionada!")
  1535.  
  1536. --// ========== AUTO FARM LOOP (PRINCIPAL) ========== //
  1537. print("⏳ Iniciando Auto Farm Loop...")
  1538.  
  1539. task.spawn(function()
  1540. local index = 1
  1541. print("✅ Auto Farm Loop iniciado!")
  1542.  
  1543. while true do
  1544. task.wait(Config.CheckDelay)
  1545. if Config.AutoFarm then
  1546. local currentLevel = getDinoLevelSilent()
  1547.  
  1548. if currentLevel >= 60 then
  1549. Config.AutoFarm = false
  1550.  
  1551. AutoFarmStatusParagraph:Set({
  1552. "💎 Auto Farm",
  1553. "Status: Desligado (Nível 60 atingido) ✅"
  1554. })
  1555.  
  1556. print("✅ Nível 60 atingido! Auto Farm desativado.")
  1557. else
  1558. local crystals = getSortedCrystals()
  1559. if #crystals > 0 then
  1560. for _, c in ipairs(crystals) do
  1561. if not Config.AutoFarm or not c or not c.Parent then break end
  1562. teleportToCrystal(c)
  1563.  
  1564. local fixarConexao = RunService.Heartbeat:Connect(function()
  1565. if Config.AutoFarm and c and c:IsDescendantOf(workspace) then
  1566. local char = getCharacter()
  1567. if char and char.PrimaryPart then
  1568. char:SetPrimaryPartCFrame(CFrame.new(c.Position + Vector3.new(0, 4.5, 0)))
  1569. end
  1570. end
  1571. end)
  1572.  
  1573. local elapsed = 0
  1574. while c:IsDescendantOf(workspace) and elapsed < 12 and Config.AutoFarm do
  1575. task.wait(Config.CheckDelay)
  1576. elapsed += Config.CheckDelay
  1577. end
  1578. fixarConexao:Disconnect()
  1579. task.wait(Config.DelayBetweenCrystals)
  1580. end
  1581. else
  1582. index = (index % #Config.PatrulhaPontos) + 1
  1583. teleportTo(Config.PatrulhaPontos[index])
  1584. task.wait(2)
  1585. end
  1586. end
  1587. end
  1588. end
  1589. end)
  1590.  
  1591. --// ========== AUTO COLETA (FUNCIONA COM AUTO FARM OU INDIVIDUAL) ========== //
  1592. print("⏳ Iniciando Auto Coleta Heartbeat...")
  1593.  
  1594. RunService.Heartbeat:Connect(function()
  1595. if not (Config.AutoFarm or Config.AutoColeta) then return end
  1596.  
  1597. if not Config.podeExecutar then return end
  1598. Config.podeExecutar = false
  1599.  
  1600. local root = getHumanoidRootPart()
  1601. if root then
  1602. for _, obj in ipairs(workspace:GetDescendants()) do
  1603. if obj:IsA("ProximityPrompt") and obj.Parent and obj.Parent:IsA("BasePart") then
  1604. if obj.Enabled and (obj.Parent.Position - root.Position).Magnitude <= Config.raioDeColeta then
  1605. pcall(function()
  1606. fireproximityprompt(obj)
  1607. end)
  1608. end
  1609. end
  1610. end
  1611. end
  1612.  
  1613. task.delay(Config.delayEntreTentativas, function()
  1614. Config.podeExecutar = true
  1615. end)
  1616. end)
  1617.  
  1618. print("✅ Auto Coleta Heartbeat iniciado!")
  1619.  
  1620. --// ========== CLEANUP AO SAIR ========== //
  1621. game:GetService("Players").LocalPlayer.CharacterRemoving:Connect(function()
  1622. print("🧹 Limpando recursos...")
  1623. end)
  1624.  
  1625. --// ========== LOGS FINAIS ========== //
  1626.  
  1627. print("╔═══════════════════════════════════════════════════════════╗")
  1628. print("║ Pré-história - By: NickZScripts ║")
  1629. print("╠═══════════════════════════════════════════════════════════╣")
  1630. print("║ ✅ GUI Redzlib v5 carregada com sucesso! ║")
  1631. print("║ 📌 Versão: " .. ScriptVersion .. " ║")
  1632. print("║ 🎮 Jogador: " .. LocalPlayer.Name)
  1633. print("║ 📊 Players: " .. #Players:GetPlayers() .. "/" .. Players.MaxPlayers)
  1634. print("║ 📍 Teleports Salvos: " .. #Config.SavedTeleports)
  1635. print("╠═══════════════════════════════════════════════════════════╣")
  1636. print("║ ✅ TODAS AS FUNCIONALIDADES CONFIRMADAS: ║")
  1637. print("║ ✅ Auto Farm Loop ATIVO ║")
  1638. print("║ ✅ Auto Coleta Heartbeat ATIVO ║")
  1639. print("║ ✅ ESP Sistemas CARREGADOS ║")
  1640. print("║ ✅ Sistema de Nível do Dino OPERACIONAL ║")
  1641. print("║ ✅ Teleportes FUNCIONAIS ║")
  1642. print("╠═══════════════════════════════════════════════════════════╣")
  1643. print("║ 📋 INTERFACE CARREGADA COM SUCESSO: ║")
  1644. print("║ ✅ Tab Home - COMPLETA ║")
  1645. print("║ ✅ Tab Auto Farm - COMPLETA ║")
  1646. print("║ ✅ Tab ESP - COMPLETA ║")
  1647. print("║ ✅ Tab Teleport - COMPLETA ║")
  1648. print("║ ✅ Tab Misc - COMPLETA ║")
  1649. print("╠═══════════════════════════════════════════════════════════╣")
  1650. print("║ 🎉 SCRIPT 100% FUNCIONAL E CARREGADO! ║")
  1651. print("╚═══════════════════════════════════════════════════════════╝")
  1652.  
  1653. print("\n✅ ✅ ✅ SCRIPT TOTALMENTE CARREGADO E FUNCIONAL! ✅ ✅ ✅\n")
Add Comment
Please, Sign In to add comment