Nevzyn

Untitled

Oct 21st, 2025
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.03 KB | None | 0 0
  1. --[[
  2. ╔═══════════════════════════════════════════════════════════╗
  3. ║ Pré-história - By: NickZScripts ║
  4. ║ Sistema Modular & Anti-Conflitos ║
  5. ║ Interface: RedzLib (Adaptado) ║
  6. ╚═══════════════════════════════════════════════════════════╝
  7. ]]
  8.  
  9. --// ========== SERVICES ========== //
  10. local Players = game:GetService("Players")
  11. local RunService = game:GetService("RunService")
  12. local HttpService = game:GetService("HttpService")
  13. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  14. local Teams = game:GetService("Teams")
  15. local TweenService = game:GetService("TweenService")
  16. local UserInputService = game:GetService("UserInputService")
  17. local CoreGui = game:GetService("CoreGui")
  18. local StarterGui = game:GetService("StarterGui")
  19.  
  20. --// ========== VARIÁVEIS GLOBAIS ========== //
  21. local LocalPlayer = Players.LocalPlayer
  22. local ScriptVersion = "v4.5.1-RedzLib"
  23. local LastSpawnPosition = nil
  24. local Camera = workspace.CurrentCamera
  25. local ActiveTeleportConnection = nil
  26.  
  27. --// ========== CONFIGURAÇÕES DO AUTO FARM ========== //
  28. -- (LÓGICA INTACTA)
  29. local Config = {
  30. AutoFarm = false,
  31. AutoColeta = false,
  32. CheckDelay = 0.3,
  33. DelayBetweenCrystals = 0.1,
  34. raioDeColeta = 25,
  35. delayEntreTentativas = 0.25,
  36. podeExecutar = true,
  37. EspMeatActive = false,
  38. ESP_MIN_SIZE = 35,
  39. ESP_MAX_SIZE = 65,
  40. ESP_UPDATE_RATE = 0.1,
  41. MAX_VISIBLE_DISTANCE = 999999,
  42. PlayerESP = false,
  43. PlayerESP_ShowHP = false,
  44. PlayerESP_TeamCheck = false,
  45. ClickTeleportEnabled = false,
  46. SavedTeleports = {},
  47. PatrulhaPontos = {
  48. CFrame.new(0, 30, 0),
  49. CFrame.new(800, 30, 400),
  50. CFrame.new(-750, 30, -600),
  51. CFrame.new(450, 30, -1000),
  52. CFrame.new(-900, 30, 700),
  53. CFrame.new(0, 30, 1000),
  54. },
  55. }
  56.  
  57. --// ========== CACHE DE NÍVEL ========== //
  58. -- (LÓGICA INTACTA)
  59. local DinoLevelCache = {
  60. value = 0,
  61. lastUpdate = 0,
  62. updateInterval = 2
  63. }
  64.  
  65. --// ========== DETECTAR POSIÇÃO DE SPAWN ========== //
  66. -- (LÓGICA INTACTA)
  67. task.spawn(function()
  68. local char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  69. local root = char:WaitForChild("HumanoidRootPart", 10)
  70.  
  71. if root then
  72. task.wait(2)
  73. LastSpawnPosition = root.CFrame
  74. end
  75.  
  76. LocalPlayer.CharacterAdded:Connect(function(newChar)
  77. task.wait(2)
  78. local newRoot = newChar:FindFirstChild("HumanoidRootPart")
  79. if newRoot then
  80. LastSpawnPosition = newRoot.CFrame
  81. end
  82. end)
  83. end)
  84.  
  85. --// ============================================================
  86. --// INÍCIO DA ADAPTAÇÃO PARA REDZLIB
  87. --// ============================================================
  88.  
  89. --// ========== CARREGAR REDZLIB ========== //
  90. local success, redzlib = pcall(function()
  91. return loadstring(game:HttpGet("https://raw.githubusercontent.com/tbao143/Library-ui/refs/heads/main/Redzhubui"))()
  92. end)
  93.  
  94. if not success then
  95. warn("[ERRO] Falha ao carregar a biblioteca redzlib para o script Pré-história.")
  96. StarterGui:SetCore("SendNotification", {
  97. Title = "Erro de Carregamento",
  98. Text = "A biblioteca RedzLib não pôde ser carregada. O script não funcionará.",
  99. Duration = 10
  100. })
  101. return
  102. end
  103.  
  104. --// ========== FUNÇÃO DE NOTIFICAÇÃO (ADAPTADA) ========== //
  105. local function Notify(notificationData)
  106. StarterGui:SetCore("SendNotification", {
  107. Title = notificationData.Title or "Notificação",
  108. Text = notificationData.Content or "",
  109. Duration = notificationData.Duration or 3
  110. -- Icon não é diretamente suportado, mas o título já informa.
  111. })
  112. end
  113.  
  114. --// ========== CRIAR WINDOW ========== //
  115. local Window = redzlib:MakeWindow({
  116. Title = "🦖 Pré-história | By: NickZScripts",
  117. SubTitle = ScriptVersion .. " | RedzLib Edition",
  118. SaveFolder = "PreHistoria_Config"
  119. })
  120.  
  121. -- Minimizar
  122. Window:AddMinimizeButton({
  123. Button = { Image = "rbxassetid://13536317727" }
  124. })
  125.  
  126. --// ========== CRIAR TABS (ADAPTADO) ========== //
  127. local MenuTab = Window:MakeTab({"🏠 Menu", "home"})
  128. local AutoFarmTab = Window:MakeTab({"⚡ Auto Farm", "tool"})
  129. local EspTab = Window:MakeTab({"👁️ ESP", "eye"})
  130. local TeleportTab = Window:MakeTab({"🚀 Teleport", "map"})
  131. local OutrosTab = Window:MakeTab({"⚙️ Outros", "settings"})
  132.  
  133. -- Definir tema e selecionar aba inicial
  134. redzlib:SetTheme("Dark")
  135. Window:SelectTab(MenuTab)
  136.  
  137. --// ============================================================
  138. --// FIM DA ADAPTAÇÃO INICIAL
  139. --// ============================================================
  140.  
  141.  
  142. --// ========== FUNÇÕES DE UTILIDADE ========== //
  143. -- (LÓGICA INTACTA)
  144. local function getCharacter()
  145. return LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  146. end
  147.  
  148. local function getHumanoidRootPart()
  149. local char = getCharacter()
  150. return char and char:FindFirstChild("HumanoidRootPart")
  151. end
  152.  
  153. local function teleportTo(cf)
  154. local root = getHumanoidRootPart()
  155. if root and root.Parent then
  156. root.Parent:SetPrimaryPartCFrame(cf)
  157. end
  158. end
  159.  
  160. local function teleportToCrystal(c)
  161. local root = getHumanoidRootPart()
  162. if root and c then
  163. root.Parent:SetPrimaryPartCFrame(CFrame.new(c.Position + Vector3.new(0, 4.5, 0)))
  164. end
  165. end
  166.  
  167. --// ========== SISTEMA DE TELEPORTE SEGURO ========== //
  168. -- (LÓGICA INTACTA - NOTIFICAÇÕES ADAPTADAS)
  169. local function safeTeleport(targetCFrame, locationName)
  170. if ActiveTeleportConnection then
  171. ActiveTeleportConnection:Disconnect()
  172. ActiveTeleportConnection = nil
  173. end
  174.  
  175. local char = LocalPlayer.Character
  176. local root = char and char:FindFirstChild("HumanoidRootPart")
  177. local humanoid = char and char:FindFirstChild("Humanoid")
  178.  
  179. if not root or not humanoid then
  180. Notify({
  181. Title = "❌ Erro",
  182. Content = "Personagem não encontrado!",
  183. Duration = 1
  184. })
  185. return false
  186. end
  187.  
  188. Notify({
  189. Title = "🚀 Teleportando",
  190. Content = "Indo para: " .. locationName,
  191. Duration = 0.5
  192. })
  193.  
  194. root.CFrame = targetCFrame
  195.  
  196. task.spawn(function()
  197. task.wait(0.05)
  198. local rayParams = RaycastParams.new()
  199. rayParams.FilterType = Enum.RaycastFilterType.Blacklist
  200. rayParams.FilterDescendantsInstances = {char}
  201. local rayResult = workspace:Raycast(root.Position, Vector3.new(0, -100, 0), rayParams)
  202. if rayResult then
  203. root.CFrame = CFrame.new(rayResult.Position + Vector3.new(0, 3, 0))
  204. end
  205. end)
  206.  
  207. local teleportStartTime = tick()
  208. local maxWaitTime = 1.2
  209. local minWaitTime = 0.2
  210.  
  211. ActiveTeleportConnection = RunService.Heartbeat:Connect(function()
  212. if not char or not char.Parent or not root or not root.Parent or not humanoid then
  213. if ActiveTeleportConnection then ActiveTeleportConnection:Disconnect(); ActiveTeleportConnection = nil end
  214. return
  215. end
  216.  
  217. local elapsedTime = tick() - teleportStartTime
  218. local floorMaterial = humanoid.FloorMaterial
  219. local isOnGround = floorMaterial ~= Enum.Material.Air
  220. local velocity = root.AssemblyLinearVelocity
  221. local isStationary = velocity.Magnitude < 2
  222. local humanoidState = humanoid:GetState()
  223. local isLanded = humanoidState == Enum.HumanoidStateType.Landed or
  224. humanoidState == Enum.HumanoidStateType.Running or
  225. humanoidState == Enum.HumanoidStateType.RunningNoPhysics
  226.  
  227. if (elapsedTime > minWaitTime and (isOnGround or (isStationary and isLanded))) or elapsedTime > maxWaitTime then
  228. if ActiveTeleportConnection then ActiveTeleportConnection:Disconnect(); ActiveTeleportConnection = nil end
  229.  
  230. if isOnGround or isLanded then
  231. Notify({ Title = "✅ Chegou", Content = locationName, Duration = 0.5 })
  232. else
  233. local rayParams = RaycastParams.new(); rayParams.FilterType = Enum.RaycastFilterType.Blacklist; rayParams.FilterDescendantsInstances = {char}
  234. local rayResult = workspace:Raycast(root.Position, Vector3.new(0, -200, 0), rayParams)
  235. if rayResult then root.CFrame = CFrame.new(rayResult.Position + Vector3.new(0, 3, 0)) end
  236. Notify({ Title = "⚠️ Ajustado", Content = "Posição corrigida", Duration = 0.5 })
  237. end
  238. return
  239. end
  240. end)
  241. return true
  242. end
  243.  
  244. --// ========== MÓDULO: CLICK TELEPORT (SEM EFEITOS VISUAIS) ========== //
  245. -- (LÓGICA 100% INTACTA - ESTE MÓDULO GERA SUA PRÓPRIA UI INDEPENDENTE)
  246. local ClickTeleportModule = (function()
  247. local _enabled = false; local _uiVisible = false; local _screenGui = nil; local _mainFrame = nil; local _minimizedBtn = nil; local _connections = {}
  248. local Mouse = LocalPlayer:GetMouse()
  249. local ClickState = {StartTime = 0, StartPosition = nil, IsValid = false}
  250. local CTConfig = {MaxClickTime = 0.3, MaxDragDistance = 10, RaycastDistance = 10000, TeleportOffset = 3}
  251. local CTTheme = {Background = Color3.fromRGB(25, 25, 35), Secondary = Color3.fromRGB(35, 35, 45), Accent = Color3.fromRGB(90, 170, 255), Success = Color3.fromRGB(90, 255, 140), Danger = Color3.fromRGB(255, 90, 90), Text = Color3.fromRGB(255, 255, 255), TextDim = Color3.fromRGB(180, 180, 200)}
  252. local function _getMouseHit()
  253. local unitRay = Camera:ScreenPointToRay(Mouse.X, Mouse.Y)
  254. local raycastParams = RaycastParams.new(); raycastParams.FilterType = Enum.RaycastFilterType.Blacklist; raycastParams.FilterDescendantsInstances = {LocalPlayer.Character}; raycastParams.IgnoreWater = false
  255. return workspace:Raycast(unitRay.Origin, unitRay.Direction * CTConfig.RaycastDistance, raycastParams)
  256. end
  257. local function _teleportToPosition(position)
  258. local root = getHumanoidRootPart()
  259. if not root then return false end
  260. local currentPosition = root.Position
  261. local teleportPos = position + Vector3.new(0, CTConfig.TeleportOffset, 0)
  262. local directionVector = (position - currentPosition)
  263. local horizontalDirection = Vector3.new(directionVector.X, 0, directionVector.Z)
  264. local lookDirection = horizontalDirection.Unit
  265. local targetCFrame = CFrame.new(teleportPos, teleportPos + lookDirection)
  266. root.CFrame = targetCFrame
  267. return true
  268. end
  269. local function _isValidClick(startPos, endPos, duration)
  270. if duration > CTConfig.MaxClickTime then return false end
  271. if (endPos - startPos).Magnitude > CTConfig.MaxDragDistance then return false end
  272. return true
  273. end
  274. local function _updateStatusLabel(text, color)
  275. if _mainFrame then local statusLabel = _mainFrame:FindFirstChild("Container"):FindFirstChild("StatusLabel"); if statusLabel then statusLabel.Text = text; statusLabel.TextColor3 = color end end
  276. end
  277. local function _enableClickDetection()
  278. for _, conn in ipairs(_connections) do if conn and conn.Connected then conn:Disconnect() end end; _connections = {}
  279. table.insert(_connections, UserInputService.InputBegan:Connect(function(input, gameProcessed)
  280. if gameProcessed or not _enabled then return end
  281. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then ClickState.StartTime = tick(); ClickState.StartPosition = Vector2.new(Mouse.X, Mouse.Y); ClickState.IsValid = true end
  282. end))
  283. table.insert(_connections, UserInputService.InputEnded:Connect(function(input, gameProcessed)
  284. if gameProcessed or not _enabled or not ClickState.IsValid then return end
  285. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  286. local clickDuration = tick() - ClickState.StartTime; local endPosition = Vector2.new(Mouse.X, Mouse.Y)
  287. if _isValidClick(ClickState.StartPosition, endPosition, clickDuration) then
  288. local raycastResult = _getMouseHit()
  289. if raycastResult then
  290. if _teleportToPosition(raycastResult.Position) then _updateStatusLabel("✅ Teleportado!", CTTheme.Success); task.wait(1); _updateStatusLabel("Clique em qualquer lugar para teleportar", CTTheme.TextDim) end
  291. else _updateStatusLabel("❌ Não é possível teleportar para o céu", CTTheme.Danger); task.wait(1.5); _updateStatusLabel("Clique em qualquer lugar para teleportar", CTTheme.TextDim) end
  292. end
  293. ClickState.IsValid = false
  294. end
  295. end))
  296. end
  297. local function _disableClickDetection() for _, conn in ipairs(_connections) do if conn and conn.Connected then conn:Disconnect() end end; _connections = {} end
  298. local function _minimizeUI() if _mainFrame then _mainFrame.Visible = false end; if _minimizedBtn then _minimizedBtn.Visible = true; _minimizedBtn.Size = UDim2.new(0, 0, 0, 0); TweenService:Create(_minimizedBtn, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 50, 0, 50)}):Play() end end
  299. local function _maximizeUI() if _minimizedBtn then TweenService:Create(_minimizedBtn, TweenInfo.new(0.2, Enum.EasingStyle.Back, Enum.EasingDirection.In), {Size = UDim2.new(0, 0, 0, 0)}):Play(); task.wait(0.2); _minimizedBtn.Visible = false end; if _mainFrame then _mainFrame.Visible = true; _mainFrame.Size = UDim2.new(0, 0, 0, 0); TweenService:Create(_mainFrame, TweenInfo.new(0.3, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 260, 0, 180)}):Play() end end
  300. local function _createUI()
  301. if _screenGui then pcall(function() _screenGui:Destroy() end); _screenGui = nil end
  302. _screenGui = Instance.new("ScreenGui"); _screenGui.Name = "ClickTeleportUI_PreHistoria"; _screenGui.ResetOnSpawn = false; _screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling; _screenGui.Parent = CoreGui
  303. _mainFrame = Instance.new("Frame"); _mainFrame.Name = "MainFrame"; _mainFrame.Size = UDim2.new(0, 260, 0, 180); _mainFrame.Position = UDim2.new(0.5, -130, 0.5, -90); _mainFrame.BackgroundColor3 = CTTheme.Background; _mainFrame.BackgroundTransparency = 0.05; _mainFrame.BorderSizePixel = 0; _mainFrame.Active = true; _mainFrame.Draggable = true; _mainFrame.Parent = _screenGui
  304. local mainCorner = Instance.new("UICorner"); mainCorner.CornerRadius = UDim.new(0, 12); mainCorner.Parent = _mainFrame; local mainStroke = Instance.new("UIStroke"); mainStroke.Color = CTTheme.Accent; mainStroke.Thickness = 2; mainStroke.Transparency = 0.3; mainStroke.Parent = _mainFrame; local bgGradient = Instance.new("UIGradient"); bgGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(30, 30, 40)), ColorSequenceKeypoint.new(1, Color3.fromRGB(20, 20, 30))}; bgGradient.Rotation = 45; bgGradient.Parent = _mainFrame
  305. local header = Instance.new("Frame"); header.Size = UDim2.new(1, 0, 0, 50); header.BackgroundColor3 = CTTheme.Secondary; header.BackgroundTransparency = 0.2; header.BorderSizePixel = 0; header.Parent = _mainFrame; local headerCorner = Instance.new("UICorner"); headerCorner.CornerRadius = UDim.new(0, 12); headerCorner.Parent = header; local headerFix = Instance.new("Frame"); headerFix.Size = UDim2.new(1, 0, 0, 12); headerFix.Position = UDim2.new(0, 0, 1, -12); headerFix.BackgroundColor3 = CTTheme.Secondary; headerFix.BackgroundTransparency = 0.2; headerFix.BorderSizePixel = 0; headerFix.Parent = header
  306. local title = Instance.new("TextLabel"); title.Size = UDim2.new(1, -85, 1, 0); title.Position = UDim2.new(0, 15, 0, 0); title.BackgroundTransparency = 1; title.Text = "🎯 Click Teleport"; title.TextColor3 = CTTheme.Text; title.TextSize = 17; title.Font = Enum.Font.GothamBold; title.TextXAlignment = Enum.TextXAlignment.Left; title.Parent = header
  307. local minimizeBtn = Instance.new("TextButton"); minimizeBtn.Size = UDim2.new(0, 35, 0, 35); minimizeBtn.Position = UDim2.new(1, -78, 0.5, -17.5); minimizeBtn.BackgroundColor3 = Color3.fromRGB(255, 200, 100); minimizeBtn.BackgroundTransparency = 0.2; minimizeBtn.Text = "➖"; minimizeBtn.TextColor3 = CTTheme.Text; minimizeBtn.TextSize = 18; minimizeBtn.Font = Enum.Font.GothamBold; minimizeBtn.AutoButtonColor = false; minimizeBtn.Parent = header; local minimizeCorner = Instance.new("UICorner"); minimizeCorner.CornerRadius = UDim.new(0, 8); minimizeCorner.Parent = minimizeBtn
  308. local closeBtn = Instance.new("TextButton"); closeBtn.Size = UDim2.new(0, 35, 0, 35); closeBtn.Position = UDim2.new(1, -38, 0.5, -17.5); closeBtn.BackgroundColor3 = CTTheme.Danger; closeBtn.BackgroundTransparency = 0.2; closeBtn.Text = "✕"; closeBtn.TextColor3 = CTTheme.Text; closeBtn.TextSize = 20; closeBtn.Font = Enum.Font.GothamBold; closeBtn.AutoButtonColor = false; closeBtn.Parent = header; local closeCorner = Instance.new("UICorner"); closeCorner.CornerRadius = UDim.new(0, 8); closeCorner.Parent = closeBtn
  309. local container = Instance.new("Frame"); container.Name = "Container"; container.Size = UDim2.new(1, -20, 1, -60); container.Position = UDim2.new(0, 10, 0, 55); container.BackgroundTransparency = 1; container.Parent = _mainFrame
  310. local toggleBtn = Instance.new("TextButton"); toggleBtn.Name = "ToggleBtn"; toggleBtn.Size = UDim2.new(1, 0, 0, 55); toggleBtn.Position = UDim2.new(0, 0, 0, 0); toggleBtn.BackgroundColor3 = CTTheme.Danger; toggleBtn.BackgroundTransparency = 0.1; toggleBtn.Text = "🔴 DESATIVADO"; toggleBtn.TextColor3 = CTTheme.Text; toggleBtn.TextSize = 16; toggleBtn.Font = Enum.Font.GothamBold; toggleBtn.AutoButtonColor = false; toggleBtn.Parent = container; local toggleCorner = Instance.new("UICorner"); toggleCorner.CornerRadius = UDim.new(0, 10); toggleCorner.Parent = toggleBtn; local toggleStroke = Instance.new("UIStroke"); toggleStroke.Name = "Stroke"; toggleStroke.Color = CTTheme.Danger; toggleStroke.Thickness = 2; toggleStroke.Transparency = 0.3; toggleStroke.Parent = toggleBtn
  311. local statusLabel = Instance.new("TextLabel"); statusLabel.Name = "StatusLabel"; statusLabel.Size = UDim2.new(1, 0, 0, 25); statusLabel.Position = UDim2.new(0, 0, 0, 65); statusLabel.BackgroundTransparency = 1; statusLabel.Text = "Clique em qualquer lugar para teleportar"; statusLabel.TextColor3 = CTTheme.TextDim; statusLabel.TextSize = 12; statusLabel.Font = Enum.Font.Gotham; statusLabel.TextWrapped = true; statusLabel.Parent = container
  312. local infoLabel = Instance.new("TextLabel"); infoLabel.Size = UDim2.new(1, 0, 0, 20); infoLabel.Position = UDim2.new(0, 0, 0, 92); infoLabel.BackgroundTransparency = 1; infoLabel.Text = "⚡ Teleporte limpo e instantâneo"; infoLabel.TextColor3 = CTTheme.Success; infoLabel.TextSize = 11; infoLabel.Font = Enum.Font.Gotham; infoLabel.Parent = container
  313. _minimizedBtn = Instance.new("TextButton"); _minimizedBtn.Name = "MinimizedBtn"; _minimizedBtn.Size = UDim2.new(0, 50, 0, 50); _minimizedBtn.Position = UDim2.new(1, -60, 0, 10); _minimizedBtn.BackgroundColor3 = CTTheme.Accent; _minimizedBtn.BackgroundTransparency = 0.1; _minimizedBtn.Text = "🎯"; _minimizedBtn.TextColor3 = CTTheme.Text; _minimizedBtn.TextSize = 24; _minimizedBtn.Font = Enum.Font.GothamBold; _minimizedBtn.AutoButtonColor = false; _minimizedBtn.Visible = false; _minimizedBtn.Active = true; _minimizedBtn.Draggable = true; _minimizedBtn.Parent = _screenGui; local minimizedCorner = Instance.new("UICorner"); minimizedCorner.CornerRadius = UDim.new(0, 12); minimizedCorner.Parent = _minimizedBtn; local minimizedStroke = Instance.new("UIStroke"); minimizedStroke.Color = CTTheme.Accent; minimizedStroke.Thickness = 2; minimizedStroke.Parent = _minimizedBtn; local minimizedGradient = Instance.new("UIGradient"); minimizedGradient.Color = ColorSequence.new{ColorSequenceKeypoint.new(0, Color3.fromRGB(100, 180, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(70, 140, 255))}; minimizedGradient.Rotation = 90; minimizedGradient.Parent = _minimizedBtn
  314. toggleBtn.MouseButton1Click:Connect(function() _enabled = not _enabled; if _enabled then toggleBtn.Text = "🟢 ATIVADO"; toggleBtn.BackgroundColor3 = CTTheme.Success; toggleStroke.Color = CTTheme.Success; statusLabel.Text = "Clique em qualquer lugar para teleportar"; _enableClickDetection() else toggleBtn.Text = "🔴 DESATIVADO"; toggleBtn.BackgroundColor3 = CTTheme.Danger; toggleStroke.Color = CTTheme.Danger; statusLabel.Text = "Teleporte desativado"; _disableClickDetection() end end)
  315. minimizeBtn.MouseButton1Click:Connect(_minimizeUI)
  316. _minimizedBtn.MouseButton1Click:Connect(_maximizeUI)
  317. closeBtn.MouseButton1Click:Connect(function() _enabled = false; _disableClickDetection(); if _screenGui then pcall(function() _screenGui:Destroy() end); _screenGui = nil; _mainFrame = nil; _minimizedBtn = nil end; _uiVisible = false; Config.ClickTeleportEnabled = false; Notify({Title = "🎯 Click Teleport", Content = "Desativado completamente", Duration = 1}) end)
  318. local function addHoverEffect(button, normalTrans) button.MouseEnter:Connect(function() TweenService:Create(button, TweenInfo.new(0.2), {BackgroundTransparency = 0}):Play() end); button.MouseLeave:Connect(function() TweenService:Create(button, TweenInfo.new(0.2), {BackgroundTransparency = normalTrans or 0.1}):Play() end) end
  319. addHoverEffect(toggleBtn, 0.1); addHoverEffect(minimizeBtn, 0.2); addHoverEffect(closeBtn, 0.2); addHoverEffect(_minimizedBtn, 0.1)
  320. _uiVisible = true
  321. end
  322. return { Init = function() print("✅ Módulo Click Teleport inicializado (Sem efeitos visuais)") end, Toggle = function(state) Config.ClickTeleportEnabled = state; if state then if not _uiVisible then _createUI(); Notify({Title = "🎯 Click Teleport", Content = "Interface aberta!", Duration = 1}) end else if _screenGui then _enabled = false; _disableClickDetection(); pcall(function() _screenGui:Destroy() end); _screenGui = nil; _mainFrame = nil; _minimizedBtn = nil end; _uiVisible = false; Notify({Title = "🎯 Click Teleport", Content = "Desativado", Duration = 1}) end end, Cleanup = function() _enabled = false; _disableClickDetection(); if _screenGui then pcall(function() _screenGui:Destroy() end); _screenGui = nil; _mainFrame = nil; _minimizedBtn = nil end; _uiVisible = false; print("🧹 Click Teleport limpo") end, IsEnabled = function() return Config.ClickTeleportEnabled end }
  323. end)()
  324. ClickTeleportModule.Init()
  325.  
  326. --// ========== DEMAIS SISTEMAS (LÓGICA INTACTA) ========== //
  327. -- (Todos os sistemas de jogo, como nível do dino, cristais, ESP de carnes e jogadores, permanecem 100% iguais)
  328. local function getDinoLevelSilent() local now = tick(); if (now - DinoLevelCache.lastUpdate) < DinoLevelCache.updateInterval then return DinoLevelCache.value end; local leaderstats = LocalPlayer:FindFirstChild("leaderstats"); if leaderstats then for _, stat in ipairs(leaderstats:GetChildren()) do local name = stat.Name:lower(); if name:find("level") or name:find("lvl") or name:find("nivel") then if stat:IsA("IntValue") or stat:IsA("NumberValue") then local val = tonumber(stat.Value) or 0; if val > 0 then DinoLevelCache.value = val; DinoLevelCache.lastUpdate = now; return val end end end end end; local playerGui = LocalPlayer:FindFirstChild("PlayerGui"); if playerGui then for _, gui in ipairs(playerGui:GetDescendants()) do if gui:IsA("TextLabel") or gui:IsA("TextBox") then local text = gui.Text:lower(); if text:find("level") or text:find("lvl") or text:find("nivel") then local number = text:match("%d+"); if number then local val = tonumber(number); if val and val > 0 and val <= 100 then DinoLevelCache.value = val; DinoLevelCache.lastUpdate = now; return val end end end end; if gui:IsA("IntValue") or gui:IsA("NumberValue") then local name = gui.Name:lower(); if name:find("level") or name:find("lvl") or name:find("nivel") then local val = tonumber(gui.Value) or 0; if val > 0 then DinoLevelCache.value = val; DinoLevelCache.lastUpdate = now; return val end end end end end; local char = LocalPlayer.Character; if char then for _, obj in ipairs(char:GetDescendants()) do if obj:IsA("IntValue") or obj:IsA("NumberValue") then local name = obj.Name:lower(); if name:find("level") or name:find("lvl") or name:find("nivel") then local val = tonumber(obj.Value) or 0; if val > 0 then DinoLevelCache.value = val; DinoLevelCache.lastUpdate = now; return val end end end end; local possibleFolders = {workspace:FindFirstChild("Dinosaurs"), workspace:FindFirstChild("Pets"), workspace:FindFirstChild("NPCs"), workspace:FindFirstChild("Creatures"), workspace:FindFirstChild("Animals")}; for _, folder in ipairs(possibleFolders) do if folder then for _, dino in ipairs(folder:GetChildren()) do local owner = dino:FindFirstChild("Owner") or dino:FindFirstChild("Player"); if owner and owner:IsA("ObjectValue") and owner.Value == LocalPlayer then for _, obj in ipairs(dino:GetDescendants()) do if obj:IsA("IntValue") or obj:IsA("NumberValue") or obj:IsA("StringValue") then local name = obj.Name:lower(); if name:find("level") or name:find("lvl") or name:find("nivel") then local val = tonumber(obj.Value) or 0; if val > 0 then DinoLevelCache.value = val; DinoLevelCache.lastUpdate = now; return val end end end end end end end end; DinoLevelCache.lastUpdate = now; return DinoLevelCache.value end
  329. local function getDinoLevelDebug() print("\n╔════════════════════════════════════════╗"); print("║ INICIANDO BUSCA DE NÍVEL DO DINO ║"); print("╚════════════════════════════════════════╝"); print("\n[1] Verificando leaderstats..."); local leaderstats = LocalPlayer:FindFirstChild("leaderstats"); if leaderstats then print("✓ leaderstats encontrado!"); for _, stat in ipairs(leaderstats:GetChildren()) do local name = stat.Name:lower(); if name:find("level") or name:find("lvl") or name:find("nivel") then if stat:IsA("IntValue") or stat:IsA("NumberValue") then local val = tonumber(stat.Value) or 0; print("✓✓✓ NÍVEL ENCONTRADO em leaderstats." .. stat.Name .. ": " .. val); return val end end end else print("✗ leaderstats não encontrado") end; print("\n[2] Verificando PlayerGui..."); local playerGui = LocalPlayer:FindFirstChild("PlayerGui"); if playerGui then print("✓ PlayerGui encontrado!"); for _, gui in ipairs(playerGui:GetDescendants()) do if gui:IsA("TextLabel") or gui:IsA("TextBox") then local text = gui.Text:lower(); if text:find("level") or text:find("lvl") or text:find("nivel") then print(" └─ Texto encontrado: " .. gui.Text); local number = text:match("%d+"); if number then local val = tonumber(number); if val and val > 0 and val <= 100 then print("✓✓✓ NÍVEL ENCONTRADO em GUI: " .. val); return val end end end end end; print("✗ Nível não encontrado no PlayerGui") end; print("\n╔════════════════════════════════════════╗"); print("║ ✗ NÍVEL NÃO ENCONTRADO ║"); print("╚════════════════════════════════════════╝\n"); return 0 end
  330. local prioridadeMap = { legendary = 1, epic = 2, rare = 3, crystal = 4 }; local function getCrystalRank(name) name = name:lower(); for key, rank in pairs(prioridadeMap) do if name:find(key) then return rank end end; return 5 end; local function getSortedCrystals() local found = {}; for _, obj in ipairs(workspace:GetDescendants()) do if obj:IsA("BasePart") and obj.Parent and obj.Parent:IsA("Model") then local rank = getCrystalRank(obj.Parent.Name); if rank < 5 then table.insert(found, {part = obj, rank = rank}) end end end; table.sort(found, function(a, b) return a.rank < b.rank end); local parts = {}; for _, entry in ipairs(found) do table.insert(parts, entry.part) end; return parts end
  331. local ActiveMeatESPs = {}; local meatUpdateLoop = nil; local meatScanLoop = nil; local function isMeatObject(obj) if not obj then return false, nil end; if obj:IsA("ProximityPrompt") and obj.Enabled then local action = (obj.ActionText or ""):lower(); local objText = (obj.ObjectText or ""):lower(); local foodActions = {"coma", "eat", "pegar", "pick", "grab", "take"}; for _, foodAction in ipairs(foodActions) do if action:find(foodAction) then local fullText = action .. " " .. objText; local excludeWords = {"plant", "fish", "berry", "fruit", "vegetable", "seed"}; local isExcluded = false; for _, word in ipairs(excludeWords) do if fullText:find(word) then isExcluded = true; break end end; if not isExcluded then local parent = obj.Parent; if parent and parent:IsA("BasePart") then for _, player in ipairs(Players:GetPlayers()) do if player.Character and parent:IsDescendantOf(player.Character) then return false, nil end end; return true, parent end end end end end; if obj:IsA("Model") or obj:IsA("BasePart") then local name = (obj.Name or ""):lower(); local meatWords = {"meat", "carne", "beef", "steak", "chicken", "frango", "pork", "porco", "bacon", "ham"}; for _, word in ipairs(meatWords) do if name:find(word) then for _, player in ipairs(Players:GetPlayers()) do if player.Character and obj:IsDescendantOf(player.Character) then return false, nil end end; if obj:IsA("Model") then local part = obj.PrimaryPart or obj:FindFirstChildWhichIsA("BasePart"); return part ~= nil, part else return true, obj end end end end; return false, nil end; local function findNearestMeat() local char = LocalPlayer.Character; local root = char and char:FindFirstChild("HumanoidRootPart"); if not root then return nil, math.huge end; local nearestMeat = nil; local nearestDistance = math.huge; for _, obj in ipairs(workspace:GetDescendants()) do local isMeat, part = isMeatObject(obj); if isMeat and part and part.Parent then local distance = (part.Position - root.Position).Magnitude; if distance < nearestDistance then nearestDistance = distance; nearestMeat = part end end end; return nearestMeat, nearestDistance end
  332. local function createMeatESP(part) if not part or not part:IsA("BasePart") or not part.Parent then return end; local id = tostring(part:GetDebugId()); if ActiveMeatESPs[id] then return end; local esp = Instance.new("BillboardGui"); esp.Name = "MeatESP_" .. id; esp.Adornee = part; esp.Size = UDim2.new(0, Config.ESP_MAX_SIZE, 0, Config.ESP_MAX_SIZE * 0.4); esp.StudsOffset = Vector3.new(0, 3, 0); esp.AlwaysOnTop = true; esp.LightInfluence = 0; esp.MaxDistance = Config.MAX_VISIBLE_DISTANCE; esp.Parent = workspace; esp.Enabled = true; local frame = Instance.new("Frame", esp); frame.Size = UDim2.new(1, 0, 1, 0); frame.BackgroundColor3 = Color3.fromRGB(255, 80, 80); frame.BackgroundTransparency = 0.4; frame.BorderSizePixel = 1; frame.BorderColor3 = Color3.fromRGB(255, 200, 0); local corner = Instance.new("UICorner", frame); corner.CornerRadius = UDim.new(0, 6); local iconLabel = Instance.new("TextLabel", frame); iconLabel.Size = UDim2.new(0.3, 0, 0.9, 0); iconLabel.Position = UDim2.new(0, 2, 0.05, 0); iconLabel.BackgroundTransparency = 1; iconLabel.Text = "🥩"; iconLabel.TextScaled = true; iconLabel.TextColor3 = Color3.fromRGB(255, 255, 255); iconLabel.Font = Enum.Font.SourceSansBold; iconLabel.TextStrokeTransparency = 0.5; local distLabel = Instance.new("TextLabel", frame); distLabel.Name = "Distance"; distLabel.Size = UDim2.new(0.7, -4, 0.9, 0); distLabel.Position = UDim2.new(0.3, 2, 0.05, 0); distLabel.BackgroundTransparency = 1; distLabel.Text = "0m"; distLabel.TextColor3 = Color3.fromRGB(255, 255, 255); distLabel.TextStrokeTransparency = 0.3; distLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0); distLabel.Font = Enum.Font.GothamBold; distLabel.TextScaled = true; ActiveMeatESPs[id] = {gui = esp, part = part, distLabel = distLabel, frame = frame, iconLabel = iconLabel}; return true end; local function scanForMeats() if not Config.EspMeatActive then return end; for id, data in pairs(ActiveMeatESPs) do if data.gui then pcall(function() data.gui:Destroy() end) end end; ActiveMeatESPs = {}; local meatCount = 0; local checkedCount = 0; for _, obj in ipairs(workspace:GetDescendants()) do checkedCount = checkedCount + 1; if checkedCount % 300 == 0 then task.wait(); if not Config.EspMeatActive then return end end; local isMeat, part = isMeatObject(obj); if isMeat and part and part.Parent then if createMeatESP(part) then meatCount = meatCount + 1 end end end end
  333. local function updateMeatESPInfo() if not Config.EspMeatActive then return end; local char = LocalPlayer.Character; local root = char and char:FindFirstChild("HumanoidRootPart"); if not root then return end; for id, data in pairs(ActiveMeatESPs) do if data.part and data.part.Parent and data.gui and data.gui.Parent then local distance = (data.part.Position - root.Position).Magnitude; data.gui.Enabled = true; if data.distLabel then if distance < 100 then data.distLabel.Text = string.format("%.0fm", distance) elseif distance < 1000 then data.distLabel.Text = string.format("%.0fm", distance) else data.distLabel.Text = string.format("%.1fkm", distance / 1000) end end; local scaleFactor; if distance <= 50 then scaleFactor = 1.0 elseif distance <= 200 then scaleFactor = 0.75 elseif distance <= 500 then scaleFactor = 0.6 elseif distance <= 1000 then scaleFactor = 0.5 elseif distance <= 2000 then scaleFactor = 0.4 elseif distance <= 3000 then scaleFactor = 0.35 elseif distance <= 5000 then scaleFactor = 0.3 elseif distance <= 10000 then scaleFactor = 0.25 else scaleFactor = 0.2 end; local newSize = Config.ESP_MIN_SIZE + ((Config.ESP_MAX_SIZE - Config.ESP_MIN_SIZE) * scaleFactor); data.gui.Size = UDim2.new(0, newSize, 0, newSize * 0.4); if data.frame then local transparency; if distance < 300 then transparency = 0.3 elseif distance < 1000 then transparency = 0.5 elseif distance < 2500 then transparency = 0.65 elseif distance < 5000 then transparency = 0.75 elseif distance < 10000 then transparency = 0.8 else transparency = 0.85 end; data.frame.BackgroundTransparency = transparency end; if distance < 100 then data.frame.BackgroundColor3 = Color3.fromRGB(100, 255, 100); data.frame.BorderColor3 = Color3.fromRGB(200, 255, 200) elseif distance < 500 then data.frame.BackgroundColor3 = Color3.fromRGB(255, 255, 100); data.frame.BorderColor3 = Color3.fromRGB(255, 255, 150) elseif distance < 1500 then data.frame.BackgroundColor3 = Color3.fromRGB(255, 180, 100); data.frame.BorderColor3 = Color3.fromRGB(255, 200, 150) elseif distance < 3000 then data.frame.BackgroundColor3 = Color3.fromRGB(255, 120, 120); data.frame.BorderColor3 = Color3.fromRGB(255, 150, 150) elseif distance < 5000 then data.frame.BackgroundColor3 = Color3.fromRGB(200, 150, 255); data.frame.BorderColor3 = Color3.fromRGB(220, 180, 255) elseif distance < 10000 then data.frame.BackgroundColor3 = Color3.fromRGB(180, 180, 255); data.frame.BorderColor3 = Color3.fromRGB(200, 200, 255) else data.frame.BackgroundColor3 = Color3.fromRGB(150, 150, 150); data.frame.BorderColor3 = Color3.fromRGB(180, 180, 180) end else if data.gui then pcall(function() data.gui:Destroy() end) end; ActiveMeatESPs[id] = nil end end end
  334. local function startMeatESP() if meatUpdateLoop then return end; scanForMeats(); meatUpdateLoop = RunService.Heartbeat:Connect(updateMeatESPInfo); meatScanLoop = task.spawn(function() while Config.EspMeatActive do task.wait(10); if Config.EspMeatActive then for _, obj in ipairs(workspace:GetDescendants()) do if not Config.EspMeatActive then break end; local isMeat, part = isMeatObject(obj); if isMeat and part then local id = tostring(part:GetDebugId()); if not ActiveMeatESPs[id] then createMeatESP(part) end end end; for id, data in pairs(ActiveMeatESPs) do if not data.part or not data.part.Parent then if data.gui then pcall(function() data.gui:Destroy() end) end; ActiveMeatESPs[id] = nil end end end end end); workspace.DescendantAdded:Connect(function(obj) if not Config.EspMeatActive then return end; task.wait(0.1); local isMeat, part = isMeatObject(obj); if isMeat and part then local id = tostring(part:GetDebugId()); if not ActiveMeatESPs[id] then createMeatESP(part) end end end) end; local function stopMeatESP() if meatUpdateLoop then meatUpdateLoop:Disconnect(); meatUpdateLoop = nil end; if meatScanLoop then task.cancel(meatScanLoop); meatScanLoop = nil end; for id, data in pairs(ActiveMeatESPs) do if data.gui then pcall(function() data.gui:Destroy() end) end end; ActiveMeatESPs = {} end
  335. local PlayerESP_Data = {}; local PlayerESP_UpdateLoop = nil; local PlayerESP_ProcessQueue = {}; local ESP_CONFIG = {UpdateInterval = 0.5, HPBarMaxDistance = 4000, HPBarSize = UDim2.new(0, 50, 0, 5), HPBarYOffset = 0.5, HighlightFillTransparency = 0.85, OutlineTransparency = 0.15, MaxPlayersPerFrame = 2}; local COLOR_ENEMY = Color3.fromRGB(255, 85, 85); local COLOR_FRIEND = Color3.fromRGB(85, 255, 85); local COLOR_NEUTRAL = Color3.fromRGB(240, 240, 240); local TeamColorMap = {}; local UsedHues = {}; local NextHueIndex = 0; local function generateUniqueTeamColor() local goldenRatio = 0.618033988749895; local hue = (NextHueIndex * goldenRatio) % 1; if hue >= 0.25 and hue <= 0.45 then hue = (hue + 0.35) % 1 end; local minDistance = 0.15; for _, usedHue in pairs(UsedHues) do local distance = math.abs(hue - usedHue); if distance < minDistance or distance > (1 - minDistance) then NextHueIndex = NextHueIndex + 1; return generateUniqueTeamColor() end end; table.insert(UsedHues, hue); NextHueIndex = NextHueIndex + 1; local sat = 0.8 + (math.random() * 0.2); local val = 0.9 + (math.random() * 0.1); return Color3.fromHSV(hue, sat, val) end; local function isNeutralPlayer(p) return p.Team == nil end; local function isAllyPlayer(p) return LocalPlayer.Team and p.Team == LocalPlayer.Team end; local function colorForPlayer(p) if isNeutralPlayer(p) then return COLOR_NEUTRAL end; if isAllyPlayer(p) then return COLOR_FRIEND end; if p.Team and not TeamColorMap[p.Team] then TeamColorMap[p.Team] = generateUniqueTeamColor() end; return TeamColorMap[p.Team] or COLOR_ENEMY end; local function shouldShowPlayerESP(p) if not Config.PlayerESP then return false end; if Config.PlayerESP_TeamCheck then return not isAllyPlayer(p) end; return true end; local function shouldShowPlayerHP(p) if not Config.PlayerESP_ShowHP then return false end; if Config.PlayerESP_TeamCheck then return not isAllyPlayer(p) end; return true end; local function isValidPlayerCharacter(char) if not char or not char.Parent then return false end; return char:FindFirstChild("Humanoid") and char:FindFirstChild("HumanoidRootPart") end; local function clearPlayerConns(pack) if not pack or not pack.conns then return end; for _, c in ipairs(pack.conns) do if c and c.Connected then pcall(function() c:Disconnect() end) end end; pack.conns = {} end; local function detachPlayerESP(plr) local pack = PlayerESP_Data[plr]; if not pack then return end; clearPlayerConns(pack); if pack.highlight then pcall(function() pack.highlight:Destroy() end); pack.highlight = nil end; if pack.hpGui then pcall(function() pack.hpGui:Destroy() end); pack.hpGui = nil end; PlayerESP_Data[plr] = nil end
  336. local function ensurePlayerHighlight(plr, char) local pack = PlayerESP_Data[plr]; if not pack or not isValidPlayerCharacter(char) then return end; if not pack.highlight or not pack.highlight.Parent then for _, obj in ipairs(char:GetChildren()) do if obj:IsA("Highlight") and obj.Name == "PlayerESP_Highlight" then pcall(function() obj:Destroy() end) end end; local hi = Instance.new("Highlight"); hi.Name = "PlayerESP_Highlight"; hi.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop; hi.FillTransparency = ESP_CONFIG.HighlightFillTransparency; hi.OutlineTransparency = ESP_CONFIG.OutlineTransparency; hi.Adornee = char; hi.Parent = char; pack.highlight = hi end; local col = colorForPlayer(plr); pack.highlight.FillColor = col; pack.highlight.OutlineColor = col; pack.highlight.Adornee = char; pack.highlight.Enabled = shouldShowPlayerESP(plr) end
  337. local function ensurePlayerHPGui(plr, char) local pack = PlayerESP_Data[plr]; if not pack or not isValidPlayerCharacter(char) then return end; local hum = char:FindFirstChildOfClass("Humanoid"); local head = char:FindFirstChild("Head"); local root = char:FindFirstChild("HumanoidRootPart"); if not hum or not root then if pack.hpGui then pack.hpGui.Enabled = false end; return end; pack.hum = hum; pack.head = head; pack.root = root; if not pack.hpGui or not pack.hpGui.Parent then for _, obj in ipairs(char:GetChildren()) do if obj:IsA("BillboardGui") and obj.Name == "PlayerESP_HP" then pcall(function() obj:Destroy() end) end end; local bill = Instance.new("BillboardGui"); bill.Name = "PlayerESP_HP"; bill.AlwaysOnTop = true; bill.LightInfluence = 0; bill.Size = ESP_CONFIG.HPBarSize; bill.MaxDistance = ESP_CONFIG.HPBarMaxDistance; bill.Parent = char; local bg = Instance.new("Frame"); bg.BackgroundColor3 = Color3.fromRGB(25, 25, 25); bg.BackgroundTransparency = 0.2; bg.BorderSizePixel = 0; bg.Size = UDim2.fromScale(1, 1); bg.Parent = bill; local stroke = Instance.new("UIStroke"); stroke.Color = Color3.fromRGB(0, 0, 0); stroke.Thickness = 1.5; stroke.Parent = bg; local corner1 = Instance.new("UICorner"); corner1.CornerRadius = UDim.new(0, 2); corner1.Parent = bg; local fill = Instance.new("Frame"); fill.BackgroundColor3 = COLOR_FRIEND; fill.BorderSizePixel = 0; fill.Size = UDim2.fromScale(1, 1); fill.Parent = bg; local corner2 = Instance.new("UICorner"); corner2.CornerRadius = UDim.new(0, 2); corner2.Parent = fill; pack.hpGui = bill; pack.hpFill = fill end; if head then pack.hpGui.Adornee = head; local headSize = head.Size.Y; pack.hpGui.StudsOffset = Vector3.new(0, headSize/2 + ESP_CONFIG.HPBarYOffset, 0) else pack.hpGui.Adornee = root; pack.hpGui.StudsOffset = Vector3.new(0, 2.5 + ESP_CONFIG.HPBarYOffset, 0) end; pack.hpGui.Enabled = shouldShowPlayerHP(plr) end
  338. local function updatePlayerHPBar(plr) local pack = PlayerESP_Data[plr]; if not pack or not pack.hpGui or not pack.hpFill or not pack.hum then return end; local h = pack.hum.Health; local m = pack.hum.MaxHealth; if m <= 0 then m = 100 end; local ratio = math.clamp(h / m, 0, 1); pack.hpFill.Size = UDim2.new(ratio, 0, 1, 0); local r, g, b; if ratio > 0.5 then r = (1 - ratio) * 2 * 255; g = 255; b = 0 else r = 255; g = ratio * 2 * 255; b = 0 end; pack.hpFill.BackgroundColor3 = Color3.fromRGB(r, g, b); pack.hpGui.Enabled = shouldShowPlayerHP(plr) and (h > 0) end
  339. local function setupPlayerESP(plr, char) if plr == LocalPlayer or not isValidPlayerCharacter(char) then return end; local pack = PlayerESP_Data[plr] or { conns = {} }; PlayerESP_Data[plr] = pack; if pack.char and pack.char ~= char then clearPlayerConns(pack); if pack.highlight then pcall(function() pack.highlight:Destroy() end) end; if pack.hpGui then pcall(function() pack.hpGui:Destroy() end) end; pack.char = nil; pack.highlight = nil; pack.hpGui = nil; pack.hpFill = nil; pack.hum = nil; pack.head = nil end; pack.char = char; local hum = char:FindFirstChildOfClass("Humanoid"); if not hum then return end; pack.hum = hum; hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff; task.wait(0.1); ensurePlayerHighlight(plr, char); ensurePlayerHPGui(plr, char); updatePlayerHPBar(plr); table.insert(pack.conns, hum.HealthChanged:Connect(function() updatePlayerHPBar(plr) end)); table.insert(pack.conns, plr:GetPropertyChangedSignal("Team"):Connect(function() task.spawn(function() ensurePlayerHighlight(plr, char); updatePlayerHPBar(plr) end) end)); pack.initialized = true end
  340. local function hookPlayerESP(plr) if plr == LocalPlayer then return end; table.insert(PlayerESP_ProcessQueue, plr) end; local function reinitializeAllPlayerESP() for plr, _ in pairs(PlayerESP_Data) do detachPlayerESP(plr) end; PlayerESP_ProcessQueue = {}; task.wait(0.1); for _, p in ipairs(Players:GetPlayers()) do if p ~= LocalPlayer then hookPlayerESP(p) end end end; task.spawn(function() while true do task.wait(0.2); if #PlayerESP_ProcessQueue > 0 and Config.PlayerESP then local plr = table.remove(PlayerESP_ProcessQueue, 1); if plr and plr.Parent then detachPlayerESP(plr); PlayerESP_Data[plr] = { conns = {} }; if plr.Character then task.spawn(function() setupPlayerESP(plr, plr.Character) end) end; table.insert(PlayerESP_Data[plr].conns, plr.CharacterAdded:Connect(function(char) task.wait(0.5); setupPlayerESP(plr, char) end)); table.insert(PlayerESP_Data[plr].conns, plr.CharacterRemoving:Connect(function() local pack = PlayerESP_Data[plr]; if pack then if pack.hpGui then pcall(function() pack.hpGui:Destroy() end); pack.hpGui = nil end; if pack.highlight then pcall(function() pack.highlight:Destroy() end); pack.highlight = nil end; pack.hum = nil; pack.head = nil; pack.initialized = false end end)) end end end end); task.spawn(function() task.wait(2); Players.PlayerAdded:Connect(function(p) task.wait(0.5); hookPlayerESP(p) end); Players.PlayerRemoving:Connect(function(p) detachPlayerESP(p) end) end); task.spawn(function() while true do task.wait(ESP_CONFIG.UpdateInterval); if not Config.PlayerESP then task.wait(1); continue end; local processed = 0; for plr, pack in pairs(PlayerESP_Data) do if processed >= ESP_CONFIG.MaxPlayersPerFrame then task.wait(); processed = 0 end; if plr and plr.Parent and plr ~= LocalPlayer then local char = plr.Character; if char and isValidPlayerCharacter(char) then if not pack.initialized or pack.char ~= char then setupPlayerESP(plr, char) else if not pack.highlight or not pack.highlight.Parent then ensurePlayerHighlight(plr, char) end; if not pack.hpGui or not pack.hpGui.Parent then ensurePlayerHPGui(plr, char) end; if pack.highlight then pack.highlight.Enabled = shouldShowPlayerESP(plr) end; if pack.hpGui then pack.hpGui.Enabled = shouldShowPlayerHP(plr) and pack.hum and pack.hum.Health > 0 end; updatePlayerHPBar(plr) end end end; processed = processed + 1 end end end)
  341. local function loadSavedTeleports() local success, data = pcall(function() return HttpService:JSONDecode(readfile("PreHistoria_Teleports.json")) end); if success and data then Config.SavedTeleports = data; print("📍 Carregado " .. #data .. " teleports salvos") else Config.SavedTeleports = {}; print("📍 Nenhum teleport salvo encontrado") end end; loadSavedTeleports()
  342.  
  343. --// ============================================================
  344. --// CRIAÇÃO DOS ELEMENTOS DA UI (ADAPTADO)
  345. --// ============================================================
  346.  
  347. --// ========== ABA MENU ========== //
  348. local MenuSection = MenuTab:AddSection({"📊 Informações"})
  349.  
  350. --[[
  351. NOTA: RedzLib não tem um "Label" que pode ser atualizado facilmente como o Rayfield.
  352. A solução é criar um Parágrafo e depois encontrar o objeto TextLabel dentro dele para atualizar o texto.
  353. Isso depende da estrutura interna do RedzLib, mas é a abordagem mais direta para manter a funcionalidade.
  354. --]]
  355. local PlayersCountParagraph = MenuTab:AddParagraph({"👥 Players Online: 0/0"})
  356. local function updatePlayerCount()
  357. local current = #Players:GetPlayers()
  358. local max = Players.MaxPlayers
  359. if PlayersCountParagraph and PlayersCountParagraph.Paragraph_1 then
  360. PlayersCountParagraph.Paragraph_1.Text = string.format("👥 Players Online: %d/%d", current, max)
  361. end
  362. end
  363. updatePlayerCount()
  364. Players.PlayerAdded:Connect(function() task.wait(0.1); updatePlayerCount() end)
  365. Players.PlayerRemoving:Connect(function() task.wait(0.1); updatePlayerCount() end)
  366. task.spawn(function() while true do task.wait(2); updatePlayerCount() end end)
  367.  
  368. MenuTab:AddParagraph({"📜 Script Info", "Versão: " .. ScriptVersion .. "\nStatus: ✅ Operacional"})
  369. MenuTab:AddParagraph({"👤 Jogador", "Nome: " .. LocalPlayer.Name .. "\nDisplay: " .. LocalPlayer.DisplayName .. "\nID: " .. LocalPlayer.UserId})
  370.  
  371. local SystemsSection = MenuTab:AddSection({"⚡ Sistemas Ativos"})
  372. local AutoFarmStatusParagraph = SystemsSection:AddParagraph({"💎 Auto Farm - Desligado"})
  373. local EspCarnesStatusParagraph = SystemsSection:AddParagraph({"🥩 ESP Carnes - Desligado"})
  374. local EspJogadoresStatusParagraph = SystemsSection:AddParagraph({"👥 ESP Jogadores - Desligado"})
  375. local AutoColetaStatusParagraph = SystemsSection:AddParagraph({"🔄 Auto Coleta - Desligado"})
  376. local ClickTeleportStatusParagraph = SystemsSection:AddParagraph({"🎯 Click Teleport - Desligado"})
  377.  
  378. local CreditsSection = MenuTab:AddSection({"👨‍💻 Créditos"})
  379. CreditsSection:AddParagraph({"Desenvolvedor", "Script: NickZScripts\nInterface: RedzLib (Adaptado)\nVersão: " .. ScriptVersion})
  380.  
  381. --// ========== ABA AUTO FARM ========== //
  382. local FarmSection = AutoFarmTab:AddSection({"💎 Farm de Cristais"})
  383.  
  384. local DinoLevelParagraph = FarmSection:AddParagraph({"🦖 Nível do Dino: 0/60"})
  385. task.spawn(function()
  386. while true do
  387. task.wait(2)
  388. local level = getDinoLevelSilent()
  389. if DinoLevelParagraph and DinoLevelParagraph.Paragraph_1 then
  390. DinoLevelParagraph.Paragraph_1.Text = string.format("🦖 Nível do Dino: %d/60", level)
  391. end
  392. end
  393. end)
  394.  
  395. local AutoFarmToggle = AutoFarmTab:AddToggle({
  396. Name = "Auto Farm Cristais",
  397. Default = false,
  398. Callback = function(Value)
  399. Config.AutoFarm = Value
  400. if AutoFarmStatusParagraph and AutoFarmStatusParagraph.Paragraph_1 then
  401. AutoFarmStatusParagraph.Paragraph_1.Text = "💎 Auto Farm - " .. (Value and "Ligado" or "Desligado")
  402. end
  403. Notify({
  404. Title = Value and "✅ Ativado" or "❌ Desativado",
  405. Content = "Auto Farm " .. (Value and "ligado" or "desligado"),
  406. Duration = 1
  407. })
  408. end,
  409. })
  410.  
  411. local ColetaSection = AutoFarmTab:AddSection({"🔄 Auto Coleta"})
  412. local AutoColetaToggle = ColetaSection:AddToggle({
  413. Name = "Auto Coleta (Independente)",
  414. Description = "Coleta itens próximos mesmo sem o Auto Farm estar ativo.",
  415. Default = false,
  416. Callback = function(Value)
  417. Config.AutoColeta = Value
  418. if AutoColetaStatusParagraph and AutoColetaStatusParagraph.Paragraph_1 then
  419. AutoColetaStatusParagraph.Paragraph_1.Text = "🔄 Auto Coleta - " .. (Value and "Ligado" or "Desligado")
  420. end
  421. Notify({
  422. Title = Value and "✅ Ativado" or "❌ Desativado",
  423. Content = "Auto Coleta " .. (Value and "ligado" ou "desligado"),
  424. Duration = 1
  425. })
  426. end,
  427. })
  428.  
  429. --// ========== ABA ESP ========== //
  430. local EspJogadoresSection = EspTab:AddSection({"👥 ESP de Jogadores"})
  431. EspTab:AddToggle({
  432. Name = "ESP de Jogadores",
  433. Default = false,
  434. Callback = function(Value)
  435. Config.PlayerESP = Value
  436. if EspJogadoresStatusParagraph and EspJogadoresStatusParagraph.Paragraph_1 then
  437. EspJogadoresStatusParagraph.Paragraph_1.Text = "👥 ESP Jogadores - " .. (Value and "Ligado" or "Desligado")
  438. end
  439. if Value then reinitializeAllPlayerESP() else
  440. for plr, pack in pairs(PlayerESP_Data) do
  441. if pack.highlight then pack.highlight.Enabled = false end
  442. if pack.hpGui then pack.hpGui.Enabled = false end
  443. end
  444. end
  445. Notify({ Title = Value and "✅ Ativado" or "❌ Desativado", Content = "ESP Jogadores " .. (Value and "ligado" or "desligado"), Duration = 1 })
  446. end,
  447. })
  448. EspTab:AddToggle({
  449. Name = "Barra de Vida",
  450. Default = false,
  451. Callback = function(Value)
  452. Config.PlayerESP_ShowHP = Value
  453. for plr, pack in pairs(PlayerESP_Data) do if pack.hpGui then pack.hpGui.Enabled = shouldShowPlayerHP(plr) and pack.hum and pack.hum.Health > 0 end end
  454. Notify({ Title = Value and "✅ Ativado" or "❌ Desativado", Content = "Barra de Vida " .. (Value and "ligada" or "desligada"), Duration = 1 })
  455. end,
  456. })
  457. EspTab:AddToggle({
  458. Name = "TeamCheck (Só Inimigos)",
  459. Default = false,
  460. Callback = function(Value)
  461. Config.PlayerESP_TeamCheck = Value
  462. for plr, pack in pairs(PlayerESP_Data) do if pack.highlight then pack.highlight.Enabled = shouldShowPlayerESP(plr) end; if pack.hpGui then pack.hpGui.Enabled = shouldShowPlayerHP(plr) and pack.hum and pack.hum.Health > 0 end end
  463. Notify({ Title = Value and "✅ Ativado" or "❌ Desativado", Content = "TeamCheck " .. (Value and "ligado" or "desligado"), Duration = 1 })
  464. end,
  465. })
  466.  
  467. local EspCarnesSection = EspTab:AddSection({"🥩 ESP de Carnes"})
  468. EspTab:AddToggle({
  469. Name = "ESP de Carnes",
  470. Default = false,
  471. Callback = function(Value)
  472. Config.EspMeatActive = Value
  473. if EspCarnesStatusParagraph and EspCarnesStatusParagraph.Paragraph_1 then
  474. EspCarnesStatusParagraph.Paragraph_1.Text = "🥩 ESP Carnes - " .. (Value and "Ligado" or "Desligado")
  475. end
  476. if Value then startMeatESP() else stopMeatESP() end
  477. Notify({ Title = Value and "✅ Ativado" or "❌ Desativado", Content = "ESP Carnes " .. (Value and "ligado" or "desligado"), Duration = 1 })
  478. end,
  479. })
  480.  
  481. --// ========== ABA TELEPORT ========== //
  482. local TeleportSection = TeleportTab:AddSection({"🍖 Teleportes Rápidos"})
  483. TeleportTab:AddButton({"Teleportar para Carne Mais Próxima", function()
  484. local char = LocalPlayer.Character; local root = char and char:FindFirstChild("HumanoidRootPart")
  485. if not root then Notify({Title = "❌ Erro", Content = "Personagem não encontrado!", Duration = 1}); return end
  486. local meat, distance = findNearestMeat()
  487. if not meat then Notify({Title = "❌ Erro", Content = "Nenhuma carne encontrada!", Duration = 1}); return end
  488. safeTeleport(CFrame.new(meat.Position + Vector3.new(0, 3, 0)), "Carne")
  489. end})
  490.  
  491. local SpawnSection = TeleportTab:AddSection({"🏠 Teleporte para Spawn"})
  492. TeleportTab:AddButton({"Voltar ao Spawn", function()
  493. if not LastSpawnPosition then Notify({Title = "❌ Erro", Content = "Spawn não detectado!", Duration = 1}); return end
  494. safeTeleport(LastSpawnPosition, "Spawn")
  495. end})
  496.  
  497. local SavedTeleportsSection = TeleportTab:AddSection({"📍 Locais Salvos"})
  498. if #Config.SavedTeleports > 0 then
  499. for i, data in ipairs(Config.SavedTeleports) do
  500. if data.position then
  501. local locationName = data.name or ("Local " .. i)
  502. TeleportTab:AddButton({"📍 " .. locationName, function()
  503. local pos = data.position
  504. if not pos or not pos.X or not pos.Y or not pos.Z then Notify({Title = "❌ Erro", Content = "Posição inválida!", Duration = 1}); return end
  505. safeTeleport(CFrame.new(pos.X, pos.Y, pos.Z), locationName)
  506. end})
  507. end
  508. end
  509. else
  510. SavedTeleportsSection:AddParagraph({"ℹ️ Nenhum Local Salvo", "Você ainda não possui locais salvos.\nUse outros scripts para salvar posições."})
  511. end
  512.  
  513. --// ========== ABA OUTROS ========== //
  514. local DebugSection = OutrosTab:AddSection({"🔍 Ferramentas de Debug"})
  515. OutrosTab:AddButton({"🔍 Debug: Buscar Nível (Veja Console F9)", function()
  516. local level = getDinoLevelDebug()
  517. Notify({Title = "🔍 Debug", Content = "Nível encontrado: " .. level .. "\nVeja o console (F9) para detalhes", Duration = 3})
  518. end})
  519.  
  520. local ClickTeleportSection = OutrosTab:AddSection({"🎯 Click Teleport"})
  521. ClickTeleportSection:AddParagraph({"ℹ️ Sobre Click Teleport", "Teleporte instantâneo clicando em qualquer superfície.\n\n✅ Personagem olha para onde clicou\n✅ Anti-acidental\n✅ Interface móvel\n✅ Sem efeitos visuais\n\n💡 Use o botão ✕ na interface para desativar"})
  522. OutrosTab:AddButton({"🎯 Abrir Click Teleport", function()
  523. if not Config.ClickTeleportEnabled then
  524. ClickTeleportModule.Toggle(true)
  525. if ClickTeleportStatusParagraph and ClickTeleportStatusParagraph.Paragraph_1 then
  526. ClickTeleportStatusParagraph.Paragraph_1.Text = "🎯 Click Teleport - Ligado"
  527. end
  528. Notify({Title = "✅ Click Teleport", Content = "Interface aberta!\n\nPara fechar, clique no botão ✕ na interface", Duration = 2})
  529. else
  530. Notify({Title = "ℹ️ Já Ativo", Content = "Click Teleport já está aberto!\n\nPara desativar, use o botão ✕ na interface", Duration = 2})
  531. end
  532. end})
  533.  
  534. local InfoSection = OutrosTab:AddSection({"ℹ️ Informações"})
  535. InfoSection:AddParagraph({"⚙️ Sobre", "Todas as informações importantes estão na aba Menu.\n\nO sistema de Auto Coleta funciona de forma independente!\n\nTeleports salvos são carregados de um arquivo."})
  536.  
  537. --// ============================================================
  538. --// LÓGICA PRINCIPAL DO SCRIPT (INTACTA)
  539. --// ============================================================
  540.  
  541. task.spawn(function()
  542. local index = 1
  543. while true do
  544. task.wait(Config.CheckDelay)
  545. if Config.AutoFarm then
  546. local currentLevel = getDinoLevelSilent()
  547. if currentLevel >= 60 then
  548. Config.AutoFarm = false
  549. -- NOTA: RedzLib não tem um método para setar o valor do Toggle programaticamente.
  550. -- O usuário precisará desativá-lo manualmente ou o script o fará na próxima vez que for executado.
  551. -- A lógica interna (Config.AutoFarm = false) garante que o farm pare.
  552. AutoFarmToggle:SetValue(false) -- Tentativa de setar o valor
  553. if AutoFarmStatusParagraph and AutoFarmStatusParagraph.Paragraph_1 then AutoFarmStatusParagraph.Paragraph_1.Text = "💎 Auto Farm - Desligado" end
  554. Notify({Title = "✅ Completo", Content = "Nível 60 atingido!", Duration = 2})
  555. else
  556. local crystals = getSortedCrystals()
  557. if #crystals > 0 then
  558. for _, c in ipairs(crystals) do
  559. if not Config.AutoFarm or not c or not c.Parent then break end
  560. teleportToCrystal(c)
  561. local fixarConexao = RunService.Heartbeat:Connect(function()
  562. if Config.AutoFarm and c and c:IsDescendantOf(workspace) then
  563. local char = getCharacter(); if char and char.PrimaryPart then char:SetPrimaryPartCFrame(CFrame.new(c.Position + Vector3.new(0, 4.5, 0))) end
  564. end
  565. end)
  566. local elapsed = 0
  567. while c:IsDescendantOf(workspace) and elapsed < 12 and Config.AutoFarm do task.wait(Config.CheckDelay); elapsed += Config.CheckDelay end
  568. fixarConexao:Disconnect()
  569. task.wait(Config.DelayBetweenCrystals)
  570. end
  571. else
  572. index = (index % #Config.PatrulhaPontos) + 1
  573. teleportTo(Config.PatrulhaPontos[index])
  574. task.wait(2)
  575. end
  576. end
  577. end
  578. end
  579. end)
  580.  
  581. RunService.Heartbeat:Connect(function()
  582. if not (Config.AutoFarm or Config.AutoColeta) then return end
  583. if not Config.podeExecutar then return end
  584. Config.podeExecutar = false
  585. local root = getHumanoidRootPart()
  586. if root then
  587. for _, obj in ipairs(workspace:GetDescendants()) do
  588. if obj:IsA("ProximityPrompt") and obj.Parent and obj.Parent:IsA("BasePart") then
  589. if obj.Enabled and (obj.Parent.Position - root.Position).Magnitude <= Config.raioDeColeta then
  590. pcall(function() fireproximityprompt(obj) end)
  591. end
  592. end
  593. end
  594. end
  595. task.delay(Config.delayEntreTentativas, function() Config.podeExecutar = true end)
  596. end)
  597.  
  598. game:GetService("Players").LocalPlayer.CharacterRemoving:Connect(function() ClickTeleportModule.Cleanup() end)
  599.  
  600. --// ========== LOGS FINAIS (ATUALIZADOS) ========== //
  601. print("╔═══════════════════════════════════════════════════════════╗")
  602. print("║ Pré-história - By: NickZScripts ║")
  603. print("╠═══════════════════════════════════════════════════════════╣")
  604. print("║ ✅ GUI RedzLib carregada! ║")
  605. print("║ 📌 Versão: " .. ScriptVersion .. " ║")
  606. print("║ 🎮 Jogador: " .. LocalPlayer.Name)
  607. print("╚═══════════════════════════════════════════════════════════╝")
  608. Notify({Title = "✅ Pré-história Carregado", Content = "Script de NickZScripts com UI RedzLib está pronto!", Duration = 5})
Add Comment
Please, Sign In to add comment