Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- ╔═══════════════════════════════════════════════════════════╗
- ║ Pré-história - By: NickZScripts ║
- ║ Sistema Modular & Anti-Conflitos ║
- ║ Interface: RedzLib (Adaptado) ║
- ╚═══════════════════════════════════════════════════════════╝
- ]]
- --// ========== SERVICES ========== //
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local HttpService = game:GetService("HttpService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Teams = game:GetService("Teams")
- local TweenService = game:GetService("TweenService")
- local UserInputService = game:GetService("UserInputService")
- local CoreGui = game:GetService("CoreGui")
- local StarterGui = game:GetService("StarterGui")
- --// ========== VARIÁVEIS GLOBAIS ========== //
- local LocalPlayer = Players.LocalPlayer
- local ScriptVersion = "v4.5.1-RedzLib"
- local LastSpawnPosition = nil
- local Camera = workspace.CurrentCamera
- local ActiveTeleportConnection = nil
- --// ========== CONFIGURAÇÕES DO AUTO FARM ========== //
- -- (LÓGICA INTACTA)
- local Config = {
- AutoFarm = false,
- AutoColeta = false,
- CheckDelay = 0.3,
- DelayBetweenCrystals = 0.1,
- raioDeColeta = 25,
- delayEntreTentativas = 0.25,
- podeExecutar = true,
- EspMeatActive = false,
- ESP_MIN_SIZE = 35,
- ESP_MAX_SIZE = 65,
- ESP_UPDATE_RATE = 0.1,
- MAX_VISIBLE_DISTANCE = 999999,
- PlayerESP = false,
- PlayerESP_ShowHP = false,
- PlayerESP_TeamCheck = false,
- ClickTeleportEnabled = false,
- SavedTeleports = {},
- PatrulhaPontos = {
- CFrame.new(0, 30, 0),
- CFrame.new(800, 30, 400),
- CFrame.new(-750, 30, -600),
- CFrame.new(450, 30, -1000),
- CFrame.new(-900, 30, 700),
- CFrame.new(0, 30, 1000),
- },
- }
- --// ========== CACHE DE NÍVEL ========== //
- -- (LÓGICA INTACTA)
- local DinoLevelCache = {
- value = 0,
- lastUpdate = 0,
- updateInterval = 2
- }
- --// ========== DETECTAR POSIÇÃO DE SPAWN ========== //
- -- (LÓGICA INTACTA)
- task.spawn(function()
- local char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
- local root = char:WaitForChild("HumanoidRootPart", 10)
- if root then
- task.wait(2)
- LastSpawnPosition = root.CFrame
- end
- LocalPlayer.CharacterAdded:Connect(function(newChar)
- task.wait(2)
- local newRoot = newChar:FindFirstChild("HumanoidRootPart")
- if newRoot then
- LastSpawnPosition = newRoot.CFrame
- end
- end)
- end)
- --// ============================================================
- --// INÍCIO DA ADAPTAÇÃO PARA REDZLIB
- --// ============================================================
- --// ========== CARREGAR REDZLIB ========== //
- local success, redzlib = pcall(function()
- return loadstring(game:HttpGet("https://raw.githubusercontent.com/tbao143/Library-ui/refs/heads/main/Redzhubui"))()
- end)
- if not success then
- warn("[ERRO] Falha ao carregar a biblioteca redzlib para o script Pré-história.")
- StarterGui:SetCore("SendNotification", {
- Title = "Erro de Carregamento",
- Text = "A biblioteca RedzLib não pôde ser carregada. O script não funcionará.",
- Duration = 10
- })
- return
- end
- --// ========== FUNÇÃO DE NOTIFICAÇÃO (ADAPTADA) ========== //
- local function Notify(notificationData)
- StarterGui:SetCore("SendNotification", {
- Title = notificationData.Title or "Notificação",
- Text = notificationData.Content or "",
- Duration = notificationData.Duration or 3
- -- Icon não é diretamente suportado, mas o título já informa.
- })
- end
- --// ========== CRIAR WINDOW ========== //
- local Window = redzlib:MakeWindow({
- Title = "🦖 Pré-história | By: NickZScripts",
- SubTitle = ScriptVersion .. " | RedzLib Edition",
- SaveFolder = "PreHistoria_Config"
- })
- -- Minimizar
- Window:AddMinimizeButton({
- Button = { Image = "rbxassetid://13536317727" }
- })
- --// ========== CRIAR TABS (ADAPTADO) ========== //
- local MenuTab = Window:MakeTab({"🏠 Menu", "home"})
- local AutoFarmTab = Window:MakeTab({"⚡ Auto Farm", "tool"})
- local EspTab = Window:MakeTab({"👁️ ESP", "eye"})
- local TeleportTab = Window:MakeTab({"🚀 Teleport", "map"})
- local OutrosTab = Window:MakeTab({"⚙️ Outros", "settings"})
- -- Definir tema e selecionar aba inicial
- redzlib:SetTheme("Dark")
- Window:SelectTab(MenuTab)
- --// ============================================================
- --// FIM DA ADAPTAÇÃO INICIAL
- --// ============================================================
- --// ========== FUNÇÕES DE UTILIDADE ========== //
- -- (LÓGICA INTACTA)
- local function getCharacter()
- return LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
- end
- local function getHumanoidRootPart()
- local char = getCharacter()
- return char and char:FindFirstChild("HumanoidRootPart")
- end
- local function teleportTo(cf)
- local root = getHumanoidRootPart()
- if root and root.Parent then
- root.Parent:SetPrimaryPartCFrame(cf)
- end
- end
- local function teleportToCrystal(c)
- local root = getHumanoidRootPart()
- if root and c then
- root.Parent:SetPrimaryPartCFrame(CFrame.new(c.Position + Vector3.new(0, 4.5, 0)))
- end
- end
- --// ========== SISTEMA DE TELEPORTE SEGURO ========== //
- -- (LÓGICA INTACTA - NOTIFICAÇÕES ADAPTADAS)
- local function safeTeleport(targetCFrame, locationName)
- if ActiveTeleportConnection then
- ActiveTeleportConnection:Disconnect()
- ActiveTeleportConnection = nil
- end
- local char = LocalPlayer.Character
- local root = char and char:FindFirstChild("HumanoidRootPart")
- local humanoid = char and char:FindFirstChild("Humanoid")
- if not root or not humanoid then
- Notify({
- Title = "❌ Erro",
- Content = "Personagem não encontrado!",
- Duration = 1
- })
- return false
- end
- Notify({
- Title = "🚀 Teleportando",
- Content = "Indo para: " .. locationName,
- Duration = 0.5
- })
- root.CFrame = targetCFrame
- task.spawn(function()
- task.wait(0.05)
- local rayParams = RaycastParams.new()
- rayParams.FilterType = Enum.RaycastFilterType.Blacklist
- rayParams.FilterDescendantsInstances = {char}
- local rayResult = workspace:Raycast(root.Position, Vector3.new(0, -100, 0), rayParams)
- if rayResult then
- root.CFrame = CFrame.new(rayResult.Position + Vector3.new(0, 3, 0))
- end
- end)
- local teleportStartTime = tick()
- local maxWaitTime = 1.2
- local minWaitTime = 0.2
- ActiveTeleportConnection = RunService.Heartbeat:Connect(function()
- if not char or not char.Parent or not root or not root.Parent or not humanoid then
- if ActiveTeleportConnection then ActiveTeleportConnection:Disconnect(); ActiveTeleportConnection = nil end
- return
- end
- local elapsedTime = tick() - teleportStartTime
- local floorMaterial = humanoid.FloorMaterial
- local isOnGround = floorMaterial ~= Enum.Material.Air
- local velocity = root.AssemblyLinearVelocity
- local isStationary = velocity.Magnitude < 2
- local humanoidState = humanoid:GetState()
- local isLanded = humanoidState == Enum.HumanoidStateType.Landed or
- humanoidState == Enum.HumanoidStateType.Running or
- humanoidState == Enum.HumanoidStateType.RunningNoPhysics
- if (elapsedTime > minWaitTime and (isOnGround or (isStationary and isLanded))) or elapsedTime > maxWaitTime then
- if ActiveTeleportConnection then ActiveTeleportConnection:Disconnect(); ActiveTeleportConnection = nil end
- if isOnGround or isLanded then
- Notify({ Title = "✅ Chegou", Content = locationName, Duration = 0.5 })
- else
- local rayParams = RaycastParams.new(); rayParams.FilterType = Enum.RaycastFilterType.Blacklist; rayParams.FilterDescendantsInstances = {char}
- local rayResult = workspace:Raycast(root.Position, Vector3.new(0, -200, 0), rayParams)
- if rayResult then root.CFrame = CFrame.new(rayResult.Position + Vector3.new(0, 3, 0)) end
- Notify({ Title = "⚠️ Ajustado", Content = "Posição corrigida", Duration = 0.5 })
- end
- return
- end
- end)
- return true
- end
- --// ========== MÓDULO: CLICK TELEPORT (SEM EFEITOS VISUAIS) ========== //
- -- (LÓGICA 100% INTACTA - ESTE MÓDULO GERA SUA PRÓPRIA UI INDEPENDENTE)
- local ClickTeleportModule = (function()
- local _enabled = false; local _uiVisible = false; local _screenGui = nil; local _mainFrame = nil; local _minimizedBtn = nil; local _connections = {}
- local Mouse = LocalPlayer:GetMouse()
- local ClickState = {StartTime = 0, StartPosition = nil, IsValid = false}
- local CTConfig = {MaxClickTime = 0.3, MaxDragDistance = 10, RaycastDistance = 10000, TeleportOffset = 3}
- 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)}
- local function _getMouseHit()
- local unitRay = Camera:ScreenPointToRay(Mouse.X, Mouse.Y)
- local raycastParams = RaycastParams.new(); raycastParams.FilterType = Enum.RaycastFilterType.Blacklist; raycastParams.FilterDescendantsInstances = {LocalPlayer.Character}; raycastParams.IgnoreWater = false
- return workspace:Raycast(unitRay.Origin, unitRay.Direction * CTConfig.RaycastDistance, raycastParams)
- end
- local function _teleportToPosition(position)
- local root = getHumanoidRootPart()
- if not root then return false end
- local currentPosition = root.Position
- local teleportPos = position + Vector3.new(0, CTConfig.TeleportOffset, 0)
- local directionVector = (position - currentPosition)
- local horizontalDirection = Vector3.new(directionVector.X, 0, directionVector.Z)
- local lookDirection = horizontalDirection.Unit
- local targetCFrame = CFrame.new(teleportPos, teleportPos + lookDirection)
- root.CFrame = targetCFrame
- return true
- end
- local function _isValidClick(startPos, endPos, duration)
- if duration > CTConfig.MaxClickTime then return false end
- if (endPos - startPos).Magnitude > CTConfig.MaxDragDistance then return false end
- return true
- end
- local function _updateStatusLabel(text, color)
- if _mainFrame then local statusLabel = _mainFrame:FindFirstChild("Container"):FindFirstChild("StatusLabel"); if statusLabel then statusLabel.Text = text; statusLabel.TextColor3 = color end end
- end
- local function _enableClickDetection()
- for _, conn in ipairs(_connections) do if conn and conn.Connected then conn:Disconnect() end end; _connections = {}
- table.insert(_connections, UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed or not _enabled then return end
- 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
- end))
- table.insert(_connections, UserInputService.InputEnded:Connect(function(input, gameProcessed)
- if gameProcessed or not _enabled or not ClickState.IsValid then return end
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- local clickDuration = tick() - ClickState.StartTime; local endPosition = Vector2.new(Mouse.X, Mouse.Y)
- if _isValidClick(ClickState.StartPosition, endPosition, clickDuration) then
- local raycastResult = _getMouseHit()
- if raycastResult then
- if _teleportToPosition(raycastResult.Position) then _updateStatusLabel("✅ Teleportado!", CTTheme.Success); task.wait(1); _updateStatusLabel("Clique em qualquer lugar para teleportar", CTTheme.TextDim) end
- 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
- end
- ClickState.IsValid = false
- end
- end))
- end
- local function _disableClickDetection() for _, conn in ipairs(_connections) do if conn and conn.Connected then conn:Disconnect() end end; _connections = {} end
- 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
- 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
- local function _createUI()
- if _screenGui then pcall(function() _screenGui:Destroy() end); _screenGui = nil end
- _screenGui = Instance.new("ScreenGui"); _screenGui.Name = "ClickTeleportUI_PreHistoria"; _screenGui.ResetOnSpawn = false; _screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling; _screenGui.Parent = CoreGui
- _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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- _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
- 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)
- minimizeBtn.MouseButton1Click:Connect(_minimizeUI)
- _minimizedBtn.MouseButton1Click:Connect(_maximizeUI)
- 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)
- 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
- addHoverEffect(toggleBtn, 0.1); addHoverEffect(minimizeBtn, 0.2); addHoverEffect(closeBtn, 0.2); addHoverEffect(_minimizedBtn, 0.1)
- _uiVisible = true
- end
- 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 }
- end)()
- ClickTeleportModule.Init()
- --// ========== DEMAIS SISTEMAS (LÓGICA INTACTA) ========== //
- -- (Todos os sistemas de jogo, como nível do dino, cristais, ESP de carnes e jogadores, permanecem 100% iguais)
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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)
- 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()
- --// ============================================================
- --// CRIAÇÃO DOS ELEMENTOS DA UI (ADAPTADO)
- --// ============================================================
- --// ========== ABA MENU ========== //
- local MenuSection = MenuTab:AddSection({"📊 Informações"})
- --[[
- NOTA: RedzLib não tem um "Label" que pode ser atualizado facilmente como o Rayfield.
- A solução é criar um Parágrafo e depois encontrar o objeto TextLabel dentro dele para atualizar o texto.
- Isso depende da estrutura interna do RedzLib, mas é a abordagem mais direta para manter a funcionalidade.
- --]]
- local PlayersCountParagraph = MenuTab:AddParagraph({"👥 Players Online: 0/0"})
- local function updatePlayerCount()
- local current = #Players:GetPlayers()
- local max = Players.MaxPlayers
- if PlayersCountParagraph and PlayersCountParagraph.Paragraph_1 then
- PlayersCountParagraph.Paragraph_1.Text = string.format("👥 Players Online: %d/%d", current, max)
- end
- end
- updatePlayerCount()
- Players.PlayerAdded:Connect(function() task.wait(0.1); updatePlayerCount() end)
- Players.PlayerRemoving:Connect(function() task.wait(0.1); updatePlayerCount() end)
- task.spawn(function() while true do task.wait(2); updatePlayerCount() end end)
- MenuTab:AddParagraph({"📜 Script Info", "Versão: " .. ScriptVersion .. "\nStatus: ✅ Operacional"})
- MenuTab:AddParagraph({"👤 Jogador", "Nome: " .. LocalPlayer.Name .. "\nDisplay: " .. LocalPlayer.DisplayName .. "\nID: " .. LocalPlayer.UserId})
- local SystemsSection = MenuTab:AddSection({"⚡ Sistemas Ativos"})
- local AutoFarmStatusParagraph = SystemsSection:AddParagraph({"💎 Auto Farm - Desligado"})
- local EspCarnesStatusParagraph = SystemsSection:AddParagraph({"🥩 ESP Carnes - Desligado"})
- local EspJogadoresStatusParagraph = SystemsSection:AddParagraph({"👥 ESP Jogadores - Desligado"})
- local AutoColetaStatusParagraph = SystemsSection:AddParagraph({"🔄 Auto Coleta - Desligado"})
- local ClickTeleportStatusParagraph = SystemsSection:AddParagraph({"🎯 Click Teleport - Desligado"})
- local CreditsSection = MenuTab:AddSection({"👨💻 Créditos"})
- CreditsSection:AddParagraph({"Desenvolvedor", "Script: NickZScripts\nInterface: RedzLib (Adaptado)\nVersão: " .. ScriptVersion})
- --// ========== ABA AUTO FARM ========== //
- local FarmSection = AutoFarmTab:AddSection({"💎 Farm de Cristais"})
- local DinoLevelParagraph = FarmSection:AddParagraph({"🦖 Nível do Dino: 0/60"})
- task.spawn(function()
- while true do
- task.wait(2)
- local level = getDinoLevelSilent()
- if DinoLevelParagraph and DinoLevelParagraph.Paragraph_1 then
- DinoLevelParagraph.Paragraph_1.Text = string.format("🦖 Nível do Dino: %d/60", level)
- end
- end
- end)
- local AutoFarmToggle = AutoFarmTab:AddToggle({
- Name = "Auto Farm Cristais",
- Default = false,
- Callback = function(Value)
- Config.AutoFarm = Value
- if AutoFarmStatusParagraph and AutoFarmStatusParagraph.Paragraph_1 then
- AutoFarmStatusParagraph.Paragraph_1.Text = "💎 Auto Farm - " .. (Value and "Ligado" or "Desligado")
- end
- Notify({
- Title = Value and "✅ Ativado" or "❌ Desativado",
- Content = "Auto Farm " .. (Value and "ligado" or "desligado"),
- Duration = 1
- })
- end,
- })
- local ColetaSection = AutoFarmTab:AddSection({"🔄 Auto Coleta"})
- local AutoColetaToggle = ColetaSection:AddToggle({
- Name = "Auto Coleta (Independente)",
- Description = "Coleta itens próximos mesmo sem o Auto Farm estar ativo.",
- Default = false,
- Callback = function(Value)
- Config.AutoColeta = Value
- if AutoColetaStatusParagraph and AutoColetaStatusParagraph.Paragraph_1 then
- AutoColetaStatusParagraph.Paragraph_1.Text = "🔄 Auto Coleta - " .. (Value and "Ligado" or "Desligado")
- end
- Notify({
- Title = Value and "✅ Ativado" or "❌ Desativado",
- Content = "Auto Coleta " .. (Value and "ligado" ou "desligado"),
- Duration = 1
- })
- end,
- })
- --// ========== ABA ESP ========== //
- local EspJogadoresSection = EspTab:AddSection({"👥 ESP de Jogadores"})
- EspTab:AddToggle({
- Name = "ESP de Jogadores",
- Default = false,
- Callback = function(Value)
- Config.PlayerESP = Value
- if EspJogadoresStatusParagraph and EspJogadoresStatusParagraph.Paragraph_1 then
- EspJogadoresStatusParagraph.Paragraph_1.Text = "👥 ESP Jogadores - " .. (Value and "Ligado" or "Desligado")
- end
- if Value then reinitializeAllPlayerESP() else
- for plr, pack in pairs(PlayerESP_Data) do
- if pack.highlight then pack.highlight.Enabled = false end
- if pack.hpGui then pack.hpGui.Enabled = false end
- end
- end
- Notify({ Title = Value and "✅ Ativado" or "❌ Desativado", Content = "ESP Jogadores " .. (Value and "ligado" or "desligado"), Duration = 1 })
- end,
- })
- EspTab:AddToggle({
- Name = "Barra de Vida",
- Default = false,
- Callback = function(Value)
- Config.PlayerESP_ShowHP = Value
- 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
- Notify({ Title = Value and "✅ Ativado" or "❌ Desativado", Content = "Barra de Vida " .. (Value and "ligada" or "desligada"), Duration = 1 })
- end,
- })
- EspTab:AddToggle({
- Name = "TeamCheck (Só Inimigos)",
- Default = false,
- Callback = function(Value)
- Config.PlayerESP_TeamCheck = Value
- 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
- Notify({ Title = Value and "✅ Ativado" or "❌ Desativado", Content = "TeamCheck " .. (Value and "ligado" or "desligado"), Duration = 1 })
- end,
- })
- local EspCarnesSection = EspTab:AddSection({"🥩 ESP de Carnes"})
- EspTab:AddToggle({
- Name = "ESP de Carnes",
- Default = false,
- Callback = function(Value)
- Config.EspMeatActive = Value
- if EspCarnesStatusParagraph and EspCarnesStatusParagraph.Paragraph_1 then
- EspCarnesStatusParagraph.Paragraph_1.Text = "🥩 ESP Carnes - " .. (Value and "Ligado" or "Desligado")
- end
- if Value then startMeatESP() else stopMeatESP() end
- Notify({ Title = Value and "✅ Ativado" or "❌ Desativado", Content = "ESP Carnes " .. (Value and "ligado" or "desligado"), Duration = 1 })
- end,
- })
- --// ========== ABA TELEPORT ========== //
- local TeleportSection = TeleportTab:AddSection({"🍖 Teleportes Rápidos"})
- TeleportTab:AddButton({"Teleportar para Carne Mais Próxima", function()
- local char = LocalPlayer.Character; local root = char and char:FindFirstChild("HumanoidRootPart")
- if not root then Notify({Title = "❌ Erro", Content = "Personagem não encontrado!", Duration = 1}); return end
- local meat, distance = findNearestMeat()
- if not meat then Notify({Title = "❌ Erro", Content = "Nenhuma carne encontrada!", Duration = 1}); return end
- safeTeleport(CFrame.new(meat.Position + Vector3.new(0, 3, 0)), "Carne")
- end})
- local SpawnSection = TeleportTab:AddSection({"🏠 Teleporte para Spawn"})
- TeleportTab:AddButton({"Voltar ao Spawn", function()
- if not LastSpawnPosition then Notify({Title = "❌ Erro", Content = "Spawn não detectado!", Duration = 1}); return end
- safeTeleport(LastSpawnPosition, "Spawn")
- end})
- local SavedTeleportsSection = TeleportTab:AddSection({"📍 Locais Salvos"})
- if #Config.SavedTeleports > 0 then
- for i, data in ipairs(Config.SavedTeleports) do
- if data.position then
- local locationName = data.name or ("Local " .. i)
- TeleportTab:AddButton({"📍 " .. locationName, function()
- local pos = data.position
- 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
- safeTeleport(CFrame.new(pos.X, pos.Y, pos.Z), locationName)
- end})
- end
- end
- else
- SavedTeleportsSection:AddParagraph({"ℹ️ Nenhum Local Salvo", "Você ainda não possui locais salvos.\nUse outros scripts para salvar posições."})
- end
- --// ========== ABA OUTROS ========== //
- local DebugSection = OutrosTab:AddSection({"🔍 Ferramentas de Debug"})
- OutrosTab:AddButton({"🔍 Debug: Buscar Nível (Veja Console F9)", function()
- local level = getDinoLevelDebug()
- Notify({Title = "🔍 Debug", Content = "Nível encontrado: " .. level .. "\nVeja o console (F9) para detalhes", Duration = 3})
- end})
- local ClickTeleportSection = OutrosTab:AddSection({"🎯 Click Teleport"})
- 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"})
- OutrosTab:AddButton({"🎯 Abrir Click Teleport", function()
- if not Config.ClickTeleportEnabled then
- ClickTeleportModule.Toggle(true)
- if ClickTeleportStatusParagraph and ClickTeleportStatusParagraph.Paragraph_1 then
- ClickTeleportStatusParagraph.Paragraph_1.Text = "🎯 Click Teleport - Ligado"
- end
- Notify({Title = "✅ Click Teleport", Content = "Interface aberta!\n\nPara fechar, clique no botão ✕ na interface", Duration = 2})
- else
- Notify({Title = "ℹ️ Já Ativo", Content = "Click Teleport já está aberto!\n\nPara desativar, use o botão ✕ na interface", Duration = 2})
- end
- end})
- local InfoSection = OutrosTab:AddSection({"ℹ️ Informações"})
- 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."})
- --// ============================================================
- --// LÓGICA PRINCIPAL DO SCRIPT (INTACTA)
- --// ============================================================
- task.spawn(function()
- local index = 1
- while true do
- task.wait(Config.CheckDelay)
- if Config.AutoFarm then
- local currentLevel = getDinoLevelSilent()
- if currentLevel >= 60 then
- Config.AutoFarm = false
- -- NOTA: RedzLib não tem um método para setar o valor do Toggle programaticamente.
- -- O usuário precisará desativá-lo manualmente ou o script o fará na próxima vez que for executado.
- -- A lógica interna (Config.AutoFarm = false) garante que o farm pare.
- AutoFarmToggle:SetValue(false) -- Tentativa de setar o valor
- if AutoFarmStatusParagraph and AutoFarmStatusParagraph.Paragraph_1 then AutoFarmStatusParagraph.Paragraph_1.Text = "💎 Auto Farm - Desligado" end
- Notify({Title = "✅ Completo", Content = "Nível 60 atingido!", Duration = 2})
- else
- local crystals = getSortedCrystals()
- if #crystals > 0 then
- for _, c in ipairs(crystals) do
- if not Config.AutoFarm or not c or not c.Parent then break end
- teleportToCrystal(c)
- local fixarConexao = RunService.Heartbeat:Connect(function()
- if Config.AutoFarm and c and c:IsDescendantOf(workspace) then
- local char = getCharacter(); if char and char.PrimaryPart then char:SetPrimaryPartCFrame(CFrame.new(c.Position + Vector3.new(0, 4.5, 0))) end
- end
- end)
- local elapsed = 0
- while c:IsDescendantOf(workspace) and elapsed < 12 and Config.AutoFarm do task.wait(Config.CheckDelay); elapsed += Config.CheckDelay end
- fixarConexao:Disconnect()
- task.wait(Config.DelayBetweenCrystals)
- end
- else
- index = (index % #Config.PatrulhaPontos) + 1
- teleportTo(Config.PatrulhaPontos[index])
- task.wait(2)
- end
- end
- end
- end
- end)
- RunService.Heartbeat:Connect(function()
- if not (Config.AutoFarm or Config.AutoColeta) then return end
- if not Config.podeExecutar then return end
- Config.podeExecutar = false
- local root = getHumanoidRootPart()
- if root then
- for _, obj in ipairs(workspace:GetDescendants()) do
- if obj:IsA("ProximityPrompt") and obj.Parent and obj.Parent:IsA("BasePart") then
- if obj.Enabled and (obj.Parent.Position - root.Position).Magnitude <= Config.raioDeColeta then
- pcall(function() fireproximityprompt(obj) end)
- end
- end
- end
- end
- task.delay(Config.delayEntreTentativas, function() Config.podeExecutar = true end)
- end)
- game:GetService("Players").LocalPlayer.CharacterRemoving:Connect(function() ClickTeleportModule.Cleanup() end)
- --// ========== LOGS FINAIS (ATUALIZADOS) ========== //
- print("╔═══════════════════════════════════════════════════════════╗")
- print("║ Pré-história - By: NickZScripts ║")
- print("╠═══════════════════════════════════════════════════════════╣")
- print("║ ✅ GUI RedzLib carregada! ║")
- print("║ 📌 Versão: " .. ScriptVersion .. " ║")
- print("║ 🎮 Jogador: " .. LocalPlayer.Name)
- print("╚═══════════════════════════════════════════════════════════╝")
- 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