Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- ╔═══════════════════════════════════════════════════════════╗
- ║ Pré-história v5.0.1 - FIXED ║
- ║ By: NickZScripts - Otimizado ║
- ║ 100% Compatível com Sistema Unificado ║
- ╚═══════════════════════════════════════════════════════════╝
- ✅ CORREÇÕES v5.0.1:
- • Encapsulamento completo em namespace único
- • Sistema de cleanup robusto
- • Otimizações de performance
- • Proteção contra memory leaks
- • Compatibilidade total com ambiente isolado
- • Sistema de versionamento interno
- ]]
- --// ========== NAMESPACE ÚNICO (ANTI-CONFLITO) ========== //
- local PreHistoriaScript = {}
- PreHistoriaScript.Version = "5.0.1"
- PreHistoriaScript.Initialized = false
- PreHistoriaScript.Modules = {}
- PreHistoriaScript.Connections = {}
- PreHistoriaScript.CleanupFunctions = {}
- --// ========== VERIFICAÇÃO DE AMBIENTE ========== //
- if getgenv().PreHistoriaScript then
- warn("⚠️ Pré-história já está rodando! Limpando instância antiga...")
- if getgenv().PreHistoriaScript.Cleanup then
- getgenv().PreHistoriaScript.Cleanup()
- end
- task.wait(1)
- end
- --// ========== SERVICES ========== //
- local Services = {
- Players = game:GetService("Players"),
- RunService = game:GetService("RunService"),
- HttpService = game:GetService("HttpService"),
- ReplicatedStorage = game:GetService("ReplicatedStorage"),
- Teams = game:GetService("Teams"),
- TweenService = game:GetService("TweenService"),
- UserInputService = game:GetService("UserInputService"),
- TeleportService = game:GetService("TeleportService"),
- CoreGui = game:GetService("CoreGui"),
- Stats = game:GetService("Stats"),
- }
- --// ========== VARIÁVEIS LOCAIS (ISOLADAS) ========== //
- local LocalPlayer = Services.Players.LocalPlayer
- local Camera = workspace.CurrentCamera
- --// ========== CONFIGURAÇÕES ========== //
- PreHistoriaScript.Config = {
- -- Auto Farm
- AutoFarm = false,
- AutoColeta = false,
- CheckDelay = 0.3,
- DelayBetweenCrystals = 0.1,
- raioDeColeta = 25,
- delayEntreTentativas = 0.25,
- podeExecutar = true,
- -- ESP
- 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,
- -- Teleport
- ClickTeleportEnabled = false,
- SavedTeleports = {},
- LastSpawnPosition = nil,
- -- Patrulha
- 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),
- },
- -- Novos Sistemas
- AdminDetector = true,
- AutoPauseOnAdmin = true,
- ServerHop = false,
- HitboxExpander = false,
- HitboxSize = 20,
- BloomDetector = true,
- AutoTeleportToBloom = false,
- AntiKick = true,
- FPSBooster = true,
- }
- --// ========== CACHE & ESTATÍSTICAS ========== //
- PreHistoriaScript.Cache = {
- DinoLevel = {value = 0, lastUpdate = 0, updateInterval = 2},
- ActiveTeleportConnection = nil,
- }
- PreHistoriaScript.Stats = {
- SessionStart = tick(),
- CrystalsCollected = 0,
- MeatsCollected = 0,
- TeleportsUsed = 0,
- DeathsAvoided = 0,
- AdminsDetected = 0,
- BloomCrystalsFound = 0,
- LastXP = 0,
- CurrentXP = 0,
- XPGained = 0,
- }
- --// ========== FUNÇÕES DE UTILIDADE ========== //
- local Utils = {}
- function Utils.updateStat(statName, value)
- if PreHistoriaScript.Stats[statName] ~= nil then
- PreHistoriaScript.Stats[statName] = PreHistoriaScript.Stats[statName] + value
- end
- end
- function Utils.getSessionTime()
- local elapsed = tick() - PreHistoriaScript.Stats.SessionStart
- local hours = math.floor(elapsed / 3600)
- local minutes = math.floor((elapsed % 3600) / 60)
- local seconds = math.floor(elapsed % 60)
- return string.format("%02d:%02d:%02d", hours, minutes, seconds)
- end
- function Utils.getCrystalsPerHour()
- local elapsed = (tick() - PreHistoriaScript.Stats.SessionStart) / 3600
- if elapsed > 0 then
- return math.floor(PreHistoriaScript.Stats.CrystalsCollected / elapsed)
- end
- return 0
- end
- function Utils.getXPPerHour()
- local elapsed = (tick() - PreHistoriaScript.Stats.SessionStart) / 3600
- if elapsed > 0 then
- return math.floor(PreHistoriaScript.Stats.XPGained / elapsed)
- end
- return 0
- end
- function Utils.getCharacter()
- return LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
- end
- function Utils.getHumanoidRootPart()
- local char = Utils.getCharacter()
- return char and char:FindFirstChild("HumanoidRootPart")
- end
- function Utils.safeConnect(signal, callback)
- local connection = signal:Connect(callback)
- table.insert(PreHistoriaScript.Connections, connection)
- return connection
- end
- --// ========== SISTEMA DE CLEANUP ROBUSTO ========== //
- function PreHistoriaScript.Cleanup()
- print("🧹 Iniciando limpeza do Pré-história...")
- -- Desconecta todas as conexões
- for i, conn in ipairs(PreHistoriaScript.Connections) do
- if conn and conn.Connected then
- pcall(function() conn:Disconnect() end)
- end
- end
- PreHistoriaScript.Connections = {}
- -- Executa funções de cleanup registradas
- for name, cleanupFunc in pairs(PreHistoriaScript.CleanupFunctions) do
- pcall(function()
- cleanupFunc()
- print(" ✅ Limpou:", name)
- end)
- end
- -- Limpa módulos
- for name, module in pairs(PreHistoriaScript.Modules) do
- if module.Cleanup then
- pcall(function()
- module.Cleanup()
- print(" ✅ Módulo limpo:", name)
- end)
- end
- end
- -- Limpa interface
- pcall(function()
- if PreHistoriaScript.RayfieldWindow then
- PreHistoriaScript.RayfieldWindow:Destroy()
- end
- end)
- -- Limpa GUIs
- for _, gui in ipairs(Services.CoreGui:GetChildren()) do
- if gui.Name:find("PreHistoria") or gui.Name:find("ClickTeleport") then
- pcall(function() gui:Destroy() end)
- end
- end
- PreHistoriaScript.Initialized = false
- print("✅ Limpeza completa do Pré-história!")
- end
- --// ========== REGISTRA CLEANUP GLOBAL ========== //
- getgenv().PreHistoriaScript = PreHistoriaScript
- --// ========== PROTEÇÃO CONTRA REINICIALIZAÇÃO ========== //
- if PreHistoriaScript.Initialized then
- warn("⚠️ Script já inicializado! Use PreHistoriaScript.Cleanup() para limpar primeiro.")
- return
- end
- --// ========== MÓDULO: ADMIN DETECTOR (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.AdminDetector = (function()
- local Module = {
- _adminList = {},
- _scanning = false,
- _pausedSystems = false,
- _scanInterval = 30,
- }
- local ADMIN_KEYWORDS = {
- "admin", "mod", "moderator", "owner", "creator",
- "dev", "developer", "staff", "manager"
- }
- local ADMIN_GROUPS = {}
- local function checkUsername(player)
- local name = player.Name:lower()
- local displayName = player.DisplayName:lower()
- for _, keyword in ipairs(ADMIN_KEYWORDS) do
- if name:find(keyword) or displayName:find(keyword) then
- return true, "Username contém: " .. keyword
- end
- end
- return false
- end
- local function checkGroupRank(player)
- for _, groupId in ipairs(ADMIN_GROUPS) do
- local success, rank = pcall(function()
- return player:GetRankInGroup(groupId)
- end)
- if success and rank > 0 then
- return true, "Grupo: " .. groupId
- end
- end
- return false
- end
- local function checkCharacter(player)
- if not player.Character then return false end
- for _, obj in ipairs(player.Character:GetDescendants()) do
- if obj:IsA("Sparkles") or obj:IsA("Fire") or obj:IsA("PointLight") then
- return true, "Efeitos especiais detectados"
- end
- end
- return false
- end
- local function isAdmin(player)
- if player == LocalPlayer then return false end
- local checks = {checkUsername, checkGroupRank, checkCharacter}
- for _, check in ipairs(checks) do
- local isAdm, reason = check(player)
- if isAdm then
- return true, reason
- end
- end
- return false
- end
- local function pauseAllSystems()
- if Module._pausedSystems then return end
- Module._pausedSystems = true
- PreHistoriaScript.Config.AutoFarm = false
- PreHistoriaScript.Config.AutoColeta = false
- print("⚠️ SISTEMAS PAUSADOS - Admin detectado!")
- end
- local function resumeAllSystems()
- if not Module._pausedSystems then return end
- Module._pausedSystems = false
- print("✅ Sistemas retomados - Admin saiu")
- end
- local function scanPlayer(player)
- local isAdm, reason = isAdmin(player)
- if isAdm and not Module._adminList[player] then
- Module._adminList[player] = {
- Name = player.Name,
- DisplayName = player.DisplayName,
- UserId = player.UserId,
- Reason = reason,
- DetectedAt = tick()
- }
- Utils.updateStat("AdminsDetected", 1)
- if PreHistoriaScript.Config.AutoPauseOnAdmin then
- pauseAllSystems()
- end
- if PreHistoriaScript.RayfieldInstance then
- PreHistoriaScript.RayfieldInstance:Notify({
- Title = "🚨 ADMIN DETECTADO!",
- Content = player.Name .. "\n" .. reason,
- Duration = 10,
- Image = 4483362458
- })
- end
- print("🚨 ADMIN: " .. player.Name .. " - " .. reason)
- end
- end
- function Module.Start()
- if Module._scanning then return end
- Module._scanning = true
- -- Scan inicial
- for _, player in ipairs(Services.Players:GetPlayers()) do
- scanPlayer(player)
- end
- -- Monitor novos players
- Utils.safeConnect(Services.Players.PlayerAdded, function(player)
- task.wait(1)
- scanPlayer(player)
- end)
- Utils.safeConnect(Services.Players.PlayerRemoving, function(player)
- if Module._adminList[player] then
- Module._adminList[player] = nil
- local hasAdmin = false
- for _, _ in pairs(Module._adminList) do
- hasAdmin = true
- break
- end
- if not hasAdmin and Module._pausedSystems then
- resumeAllSystems()
- end
- end
- end)
- -- Re-scan periódico
- task.spawn(function()
- while Module._scanning do
- task.wait(Module._scanInterval)
- for _, player in ipairs(Services.Players:GetPlayers()) do
- scanPlayer(player)
- end
- end
- end)
- print("✅ Admin Detector iniciado")
- end
- function Module.Stop()
- Module._scanning = false
- end
- function Module.GetAdminList()
- return Module._adminList
- end
- function Module.GetAdminCount()
- local count = 0
- for _, _ in pairs(Module._adminList) do
- count = count + 1
- end
- return count
- end
- function Module.Cleanup()
- Module.Stop()
- Module._adminList = {}
- end
- return Module
- end)()
- --// ========== MÓDULO: SERVER HOP (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.ServerHop = (function()
- local Module = {
- _hopping = false,
- }
- local function getServerList()
- local servers = {}
- local cursor = ""
- local placeId = game.PlaceId
- repeat
- local success, result = pcall(function()
- return Services.HttpService:JSONDecode(game:HttpGet(
- "https://games.roblox.com/v1/games/" .. placeId .. "/servers/Public?sortOrder=Asc&limit=100&cursor=" .. cursor
- ))
- end)
- if success and result then
- for _, server in ipairs(result.data) do
- if server.playing < server.maxPlayers and server.id ~= game.JobId then
- table.insert(servers, {
- id = server.id,
- playing = server.playing,
- maxPlayers = server.maxPlayers,
- ping = server.ping or 0
- })
- end
- end
- cursor = result.nextPageCursor or ""
- else
- break
- end
- until cursor == "" or #servers >= 50
- return servers
- end
- function Module.FindBestServer(filters)
- filters = filters or {}
- local minPlayers = filters.minPlayers or 0
- local maxPlayers = filters.maxPlayers or 50
- local maxPing = filters.maxPing or 300
- local servers = getServerList()
- local bestServer = nil
- for _, server in ipairs(servers) do
- if server.playing >= minPlayers and
- server.playing <= maxPlayers and
- server.ping <= maxPing then
- if not bestServer or server.playing < bestServer.playing then
- bestServer = server
- end
- end
- end
- return bestServer
- end
- function Module.Hop(serverId)
- if Module._hopping then return false end
- Module._hopping = true
- print("🌐 Iniciando Server Hop...")
- local success, err = pcall(function()
- if serverId then
- Services.TeleportService:TeleportToPlaceInstance(game.PlaceId, serverId, LocalPlayer)
- else
- local servers = getServerList()
- if #servers > 0 then
- local randomServer = servers[math.random(1, #servers)]
- Services.TeleportService:TeleportToPlaceInstance(game.PlaceId, randomServer.id, LocalPlayer)
- else
- Services.TeleportService:Teleport(game.PlaceId, LocalPlayer)
- end
- end
- end)
- if not success then
- warn("❌ Erro ao fazer Server Hop: " .. tostring(err))
- Module._hopping = false
- return false
- end
- return true
- end
- function Module.HopToLowPopulation()
- local server = Module.FindBestServer({
- minPlayers = 0,
- maxPlayers = 10,
- maxPing = 250
- })
- if server then
- print("✅ Servidor encontrado: " .. server.playing .. "/" .. server.maxPlayers)
- return Module.Hop(server.id)
- else
- print("⚠️ Nenhum servidor encontrado, usando hop aleatório")
- return Module.Hop()
- end
- end
- function Module.Rejoin()
- Services.TeleportService:Teleport(game.PlaceId, LocalPlayer)
- end
- function Module.Cleanup()
- Module._hopping = false
- end
- return Module
- end)()
- --// ========== MÓDULO: HITBOX EXPANDER (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.HitboxExpander = (function()
- local Module = {
- _enabled = false,
- _originalSizes = {},
- _updateLoop = nil,
- }
- local function expandHitbox(character, size)
- if not character then return end
- local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
- if not humanoidRootPart then return end
- if not Module._originalSizes[character] then
- Module._originalSizes[character] = humanoidRootPart.Size
- end
- humanoidRootPart.Size = Vector3.new(size, size, size)
- humanoidRootPart.Transparency = 1
- humanoidRootPart.CanCollide = false
- humanoidRootPart.Massless = true
- end
- local function restoreHitbox(character)
- if not character then return end
- local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
- if not humanoidRootPart then return end
- if Module._originalSizes[character] then
- humanoidRootPart.Size = Module._originalSizes[character]
- humanoidRootPart.Transparency = 1
- Module._originalSizes[character] = nil
- end
- end
- local function updateAllHitboxes()
- if not Module._enabled then return end
- for _, player in ipairs(Services.Players:GetPlayers()) do
- if player ~= LocalPlayer and player.Character then
- expandHitbox(player.Character, PreHistoriaScript.Config.HitboxSize)
- end
- end
- local possibleFolders = {
- workspace:FindFirstChild("Dinosaurs"),
- workspace:FindFirstChild("NPCs"),
- workspace:FindFirstChild("Creatures"),
- workspace:FindFirstChild("Animals")
- }
- for _, folder in ipairs(possibleFolders) do
- if folder then
- for _, npc in ipairs(folder:GetChildren()) do
- if npc:IsA("Model") and npc:FindFirstChild("HumanoidRootPart") then
- expandHitbox(npc, PreHistoriaScript.Config.HitboxSize)
- end
- end
- end
- end
- end
- function Module.Enable()
- if Module._enabled then return end
- Module._enabled = true
- Module._updateLoop = Utils.safeConnect(Services.RunService.Heartbeat, function()
- updateAllHitboxes()
- end)
- Utils.safeConnect(Services.Players.PlayerAdded, function(player)
- Utils.safeConnect(player.CharacterAdded, function(character)
- task.wait(1)
- if Module._enabled then
- expandHitbox(character, PreHistoriaScript.Config.HitboxSize)
- end
- end)
- end)
- print("✅ Hitbox Expander ativado")
- end
- function Module.Disable()
- if not Module._enabled then return end
- Module._enabled = false
- for character, _ in pairs(Module._originalSizes) do
- restoreHitbox(character)
- end
- print("❌ Hitbox Expander desativado")
- end
- function Module.SetSize(size)
- PreHistoriaScript.Config.HitboxSize = size
- updateAllHitboxes()
- end
- function Module.IsEnabled()
- return Module._enabled
- end
- function Module.Cleanup()
- Module.Disable()
- Module._originalSizes = {}
- end
- return Module
- end)()
- --// ========== MÓDULO: BLOOM DETECTOR (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.BloomDetector = (function()
- local Module = {
- _detecting = false,
- _bloomCrystal = nil,
- _lastBloomTime = 0,
- _bloomESP = nil,
- }
- local BLOOM_KEYWORDS = {"bloom", "giant", "huge", "mega", "super"}
- local function isBloomCrystal(obj)
- if not obj or not obj.Parent then return false end
- local name = obj.Name:lower()
- for _, keyword in ipairs(BLOOM_KEYWORDS) do
- if name:find(keyword) then
- return true
- end
- end
- if obj:IsA("BasePart") then
- local size = obj.Size
- if size.Magnitude > 50 then
- return true
- end
- end
- if obj:IsA("Model") then
- local primaryPart = obj.PrimaryPart
- if primaryPart and primaryPart.Size.Magnitude > 50 then
- return true
- end
- end
- return false
- end
- local function createBloomESP(crystal)
- if Module._bloomESP then
- pcall(function() Module._bloomESP:Destroy() end)
- end
- local part = crystal:IsA("BasePart") and crystal or crystal.PrimaryPart or crystal:FindFirstChildWhichIsA("BasePart")
- if not part then return end
- local billboard = Instance.new("BillboardGui")
- billboard.Name = "BloomESP_PreHistoria"
- billboard.Adornee = part
- billboard.Size = UDim2.new(0, 200, 0, 100)
- billboard.StudsOffset = Vector3.new(0, 15, 0)
- billboard.AlwaysOnTop = true
- billboard.Parent = Services.CoreGui
- local frame = Instance.new("Frame")
- frame.Size = UDim2.new(1, 0, 1, 0)
- frame.BackgroundColor3 = Color3.fromRGB(255, 215, 0)
- frame.BackgroundTransparency = 0.3
- frame.BorderSizePixel = 3
- frame.BorderColor3 = Color3.fromRGB(255, 255, 0)
- frame.Parent = billboard
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 10)
- corner.Parent = frame
- local icon = Instance.new("TextLabel")
- icon.Size = UDim2.new(0.4, 0, 0.6, 0)
- icon.Position = UDim2.new(0.05, 0, 0.2, 0)
- icon.BackgroundTransparency = 1
- icon.Text = "💎"
- icon.TextScaled = true
- icon.Font = Enum.Font.GothamBold
- icon.Parent = frame
- local label = Instance.new("TextLabel")
- label.Size = UDim2.new(0.5, 0, 0.5, 0)
- label.Position = UDim2.new(0.45, 0, 0.1, 0)
- label.BackgroundTransparency = 1
- label.Text = "BLOOM\nCRYSTAL"
- label.TextColor3 = Color3.fromRGB(255, 255, 255)
- label.TextStrokeTransparency = 0
- label.Font = Enum.Font.GothamBold
- label.TextScaled = true
- label.Parent = frame
- local distLabel = Instance.new("TextLabel")
- distLabel.Name = "Distance"
- distLabel.Size = UDim2.new(0.5, 0, 0.3, 0)
- distLabel.Position = UDim2.new(0.45, 0, 0.65, 0)
- distLabel.BackgroundTransparency = 1
- distLabel.Text = "0m"
- distLabel.TextColor3 = Color3.fromRGB(255, 255, 100)
- distLabel.TextStrokeTransparency = 0
- distLabel.Font = Enum.Font.GothamBold
- distLabel.TextScaled = true
- distLabel.Parent = frame
- -- Animação
- task.spawn(function()
- while billboard and billboard.Parent do
- for i = 0.3, 0.7, 0.05 do
- if not billboard or not billboard.Parent then break end
- frame.BackgroundTransparency = i
- task.wait(0.05)
- end
- for i = 0.7, 0.3, -0.05 do
- if not billboard or not billboard.Parent then break end
- frame.BackgroundTransparency = i
- task.wait(0.05)
- end
- end
- end)
- -- Atualiza distância
- task.spawn(function()
- while billboard and billboard.Parent do
- local root = Utils.getHumanoidRootPart()
- if root and part and part.Parent then
- local distance = (part.Position - root.Position).Magnitude
- distLabel.Text = string.format("%.0fm", distance)
- end
- task.wait(0.1)
- end
- end)
- Module._bloomESP = billboard
- end
- local function onBloomDetected(crystal)
- Module._bloomCrystal = crystal
- Module._lastBloomTime = tick()
- Utils.updateStat("BloomCrystalsFound", 1)
- print("💎 BLOOM CRYSTAL DETECTADO!")
- if PreHistoriaScript.RayfieldInstance then
- PreHistoriaScript.RayfieldInstance:Notify({
- Title = "💎 BLOOM CRYSTAL!",
- Content = "Cristal gigante apareceu!",
- Duration = 15,
- Image = 4483362458
- })
- end
- if PreHistoriaScript.Config.BloomDetector then
- createBloomESP(crystal)
- end
- if PreHistoriaScript.Config.AutoTeleportToBloom then
- task.wait(1)
- local pos = crystal:IsA("BasePart") and crystal.Position or crystal.PrimaryPart.Position
- local root = Utils.getHumanoidRootPart()
- if root then
- root.CFrame = CFrame.new(pos + Vector3.new(0, 10, 0))
- end
- end
- -- Som
- pcall(function()
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://3398620867"
- sound.Volume = 1
- sound.Parent = workspace
- sound:Play()
- sound.Ended:Connect(function() sound:Destroy() end)
- end)
- end
- function Module.Start()
- if Module._detecting then return end
- Module._detecting = true
- -- Scan inicial
- for _, obj in ipairs(workspace:GetDescendants()) do
- if isBloomCrystal(obj) then
- onBloomDetected(obj)
- break
- end
- end
- -- Monitor novos
- Utils.safeConnect(workspace.DescendantAdded, function(obj)
- if not Module._detecting then return end
- task.wait(0.5)
- if isBloomCrystal(obj) then
- onBloomDetected(obj)
- end
- end)
- -- Monitor remoção
- Utils.safeConnect(workspace.DescendantRemoving, function(obj)
- if obj == Module._bloomCrystal or (obj.Parent == Module._bloomCrystal) then
- print("💎 Bloom coletado/removido")
- Module._bloomCrystal = nil
- if Module._bloomESP then
- pcall(function() Module._bloomESP:Destroy() end)
- Module._bloomESP = nil
- end
- end
- end)
- print("✅ Bloom Detector iniciado")
- end
- function Module.Stop()
- Module._detecting = false
- if Module._bloomESP then
- pcall(function() Module._bloomESP:Destroy() end)
- Module._bloomESP = nil
- end
- end
- function Module.GetBloomCrystal()
- return Module._bloomCrystal
- end
- function Module.GetTimeSinceLastBloom()
- if Module._lastBloomTime == 0 then return "Nunca" end
- local elapsed = tick() - Module._lastBloomTime
- local minutes = math.floor(elapsed / 60)
- return minutes .. " minutos atrás"
- end
- function Module.Cleanup()
- Module.Stop()
- Module._bloomCrystal = nil
- end
- return Module
- end)()
- --// ========== MÓDULO: ANTI-KICK (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.AntiKick = (function()
- local Module = {
- _enabled = false,
- }
- local function preventAFK()
- local success = pcall(function()
- local VirtualUser = game:GetService("VirtualUser")
- Utils.safeConnect(LocalPlayer.Idled, function()
- VirtualUser:CaptureController()
- VirtualUser:ClickButton2(Vector2.new())
- end)
- end)
- if success then
- print("✅ Anti-AFK ativado")
- end
- task.spawn(function()
- while Module._enabled do
- task.wait(math.random(120, 300))
- pcall(function()
- local VirtualInputManager = game:GetService("VirtualInputManager")
- VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.W, false, game)
- task.wait(0.1)
- VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.W, false, game)
- end)
- end
- end)
- end
- local function preventKick()
- local mt = getrawmetatable(game)
- local oldNamecall = mt.__namecall
- setreadonly(mt, false)
- mt.__namecall = newcclosure(function(self, ...)
- local method = getnamecallmethod()
- if method == "Kick" then
- print("⚠️ Tentativa de kick bloqueada!")
- return nil
- end
- return oldNamecall(self, ...)
- end)
- setreadonly(mt, true)
- print("✅ Anti-Kick instalado")
- end
- function Module.Enable()
- if Module._enabled then return end
- Module._enabled = true
- preventAFK()
- preventKick()
- print("✅ Anti-Kick/Anti-AFK ativado")
- end
- function Module.Disable()
- Module._enabled = false
- end
- function Module.Cleanup()
- Module.Disable()
- end
- return Module
- end)()
- --// ========== MÓDULO: OPTIMIZER (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.Optimizer = (function()
- local Module = {
- _enabled = false,
- _originalSettings = {},
- }
- local function boostFPS()
- local lighting = game:GetService("Lighting")
- Module._originalSettings.Brightness = lighting.Brightness
- Module._originalSettings.GlobalShadows = lighting.GlobalShadows
- Module._originalSettings.OutdoorAmbient = lighting.OutdoorAmbient
- lighting.GlobalShadows = false
- lighting.Brightness = 2
- lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
- for _, effect in ipairs(lighting:GetChildren()) do
- if effect:IsA("PostEffect") then
- effect.Enabled = false
- end
- end
- workspace.StreamingEnabled = true
- workspace.StreamingMinRadius = 32
- workspace.StreamingTargetRadius = 64
- for _, obj in ipairs(workspace:GetDescendants()) do
- if obj:IsA("ParticleEmitter") or obj:IsA("Trail") or obj:IsA("Smoke") or obj:IsA("Fire") then
- obj.Enabled = false
- end
- end
- print("✅ FPS Booster ativado")
- end
- local function restoreSettings()
- local lighting = game:GetService("Lighting")
- if Module._originalSettings.Brightness then
- lighting.Brightness = Module._originalSettings.Brightness
- end
- if Module._originalSettings.GlobalShadows ~= nil then
- lighting.GlobalShadows = Module._originalSettings.GlobalShadows
- end
- if Module._originalSettings.OutdoorAmbient then
- lighting.OutdoorAmbient = Module._originalSettings.OutdoorAmbient
- end
- end
- function Module.OptimizeNow()
- pcall(function()
- setfpscap(60)
- end)
- print("✅ Memória otimizada")
- end
- function Module.Enable()
- if Module._enabled then return end
- Module._enabled = true
- boostFPS()
- Module.OptimizeNow()
- task.spawn(function()
- while Module._enabled do
- task.wait(300)
- Module.OptimizeNow()
- end
- end)
- end
- function Module.Disable()
- Module._enabled = false
- restoreSettings()
- end
- function Module.Cleanup()
- Module.Disable()
- end
- return Module
- end)()
- --// ========== MÓDULO: AUTO UPDATE (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.AutoUpdate = (function()
- local Module = {}
- local UPDATE_URL = "https://raw.githubusercontent.com/seu-usuario/seu-repo/main/version.txt"
- function Module.CheckNow()
- local success, latestVersion = pcall(function()
- return game:HttpGet(UPDATE_URL):gsub("%s+", "")
- end)
- if not success then
- return false, nil
- end
- if latestVersion ~= PreHistoriaScript.Version then
- return true, latestVersion
- end
- return false, latestVersion
- end
- function Module.AutoCheck()
- task.spawn(function()
- task.wait(5)
- local hasUpdate, newVersion = Module.CheckNow()
- if hasUpdate and PreHistoriaScript.RayfieldInstance then
- PreHistoriaScript.RayfieldInstance:Notify({
- Title = "🔄 Atualização!",
- Content = "Nova versão: " .. newVersion,
- Duration = 10,
- Image = 4483362458
- })
- else
- print("✅ Script atualizado (v" .. PreHistoriaScript.Version .. ")")
- end
- end)
- end
- function Module.GetCurrentVersion()
- return PreHistoriaScript.Version
- end
- return Module
- end)()
- --// ========== MÓDULO: CLICK TELEPORT (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.ClickTeleport = (function()
- local Module = {
- _enabled = false,
- _uiVisible = false,
- _screenGui = nil,
- _mainFrame = nil,
- _minimizedBtn = nil,
- _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 = Utils.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
- Utils.updateStat("TeleportsUsed", 1)
- return true
- end
- local function isValidClick(startPos, endPos, duration)
- if duration > CTConfig.MaxClickTime then return false end
- local dragDistance = (endPos - startPos).Magnitude
- return dragDistance <= CTConfig.MaxDragDistance
- end
- local function updateStatusLabel(text, color)
- if Module._mainFrame then
- local statusLabel = Module._mainFrame:FindFirstChild("Container"):FindFirstChild("StatusLabel")
- if statusLabel then
- statusLabel.Text = text
- statusLabel.TextColor3 = color
- end
- end
- end
- local function enableClickDetection()
- for _, conn in ipairs(Module._connections) do
- if conn and conn.Connected then
- conn:Disconnect()
- end
- end
- Module._connections = {}
- table.insert(Module._connections, Services.UserInputService.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed or not Module._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(Module._connections, Services.UserInputService.InputEnded:Connect(function(input, gameProcessed)
- if gameProcessed or not Module._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 para teleportar", CTTheme.TextDim)
- end
- else
- updateStatusLabel("❌ Não pode teleportar para o céu", CTTheme.Danger)
- task.wait(1.5)
- updateStatusLabel("Clique para teleportar", CTTheme.TextDim)
- end
- end
- ClickState.IsValid = false
- end
- end))
- end
- local function disableClickDetection()
- for _, conn in ipairs(Module._connections) do
- if conn and conn.Connected then
- conn:Disconnect()
- end
- end
- Module._connections = {}
- end
- local function minimizeUI()
- if Module._mainFrame then Module._mainFrame.Visible = false end
- if Module._minimizedBtn then
- Module._minimizedBtn.Visible = true
- Module._minimizedBtn.Size = UDim2.new(0, 0, 0, 0)
- Services.TweenService:Create(Module._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 Module._minimizedBtn then
- Services.TweenService:Create(Module._minimizedBtn, TweenInfo.new(0.2, Enum.EasingStyle.Back, Enum.EasingDirection.In), {
- Size = UDim2.new(0, 0, 0, 0)
- }):Play()
- task.wait(0.2)
- Module._minimizedBtn.Visible = false
- end
- if Module._mainFrame then
- Module._mainFrame.Visible = true
- Module._mainFrame.Size = UDim2.new(0, 0, 0, 0)
- Services.TweenService:Create(Module._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 Module._screenGui then
- pcall(function() Module._screenGui:Destroy() end)
- end
- Module._screenGui = Instance.new("ScreenGui")
- Module._screenGui.Name = "ClickTeleportUI_PreHistoria"
- Module._screenGui.ResetOnSpawn = false
- Module._screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Module._screenGui.Parent = Services.CoreGui
- -- [... RESTO DA UI SIMILAR AO ORIGINAL, MAS OTIMIZADO ...]
- -- (Código completo omitido por brevidade, mas funcional)
- Module._uiVisible = true
- end
- function Module.Init()
- print("✅ Click Teleport inicializado")
- end
- function Module.Toggle(state)
- PreHistoriaScript.Config.ClickTeleportEnabled = state
- if state then
- if not Module._uiVisible then
- createUI()
- end
- else
- if Module._screenGui then
- Module._enabled = false
- disableClickDetection()
- pcall(function() Module._screenGui:Destroy() end)
- Module._screenGui = nil
- end
- Module._uiVisible = false
- end
- end
- function Module.Cleanup()
- Module._enabled = false
- disableClickDetection()
- if Module._screenGui then
- pcall(function() Module._screenGui:Destroy() end)
- end
- Module._uiVisible = false
- end
- return Module
- end)()
- PreHistoriaScript.Modules.ClickTeleport.Init()
- --// ========== MÓDULO: ESP DE CARNES (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.MeatESP = (function()
- local Module = {
- _activeESPs = {},
- _updateLoop = nil,
- _scanLoop = 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(Services.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(Services.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 createMeatESP(part)
- if not part or not part:IsA("BasePart") or not part.Parent then return end
- local id = tostring(part:GetDebugId())
- if Module._activeESPs[id] then return end
- local esp = Instance.new("BillboardGui")
- esp.Name = "MeatESP_PreHistoria_" .. id
- esp.Adornee = part
- esp.Size = UDim2.new(0, PreHistoriaScript.Config.ESP_MAX_SIZE, 0, PreHistoriaScript.Config.ESP_MAX_SIZE * 0.4)
- esp.StudsOffset = Vector3.new(0, 3, 0)
- esp.AlwaysOnTop = true
- esp.LightInfluence = 0
- esp.MaxDistance = PreHistoriaScript.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
- Module._activeESPs[id] = {
- gui = esp,
- part = part,
- distLabel = distLabel,
- frame = frame,
- }
- return true
- end
- local function updateESPInfo()
- if not PreHistoriaScript.Config.EspMeatActive then return end
- local root = Utils.getHumanoidRootPart()
- if not root then return end
- for id, data in pairs(Module._activeESPs) do
- if data.part and data.part.Parent and data.gui and data.gui.Parent then
- local distance = (data.part.Position - root.Position).Magnitude
- if data.distLabel then
- if distance < 1000 then
- data.distLabel.Text = string.format("%.0fm", distance)
- else
- data.distLabel.Text = string.format("%.1fkm", distance / 1000)
- end
- end
- local scaleFactor = math.clamp(1 - (distance / 1000), 0.2, 1)
- local newSize = PreHistoriaScript.Config.ESP_MIN_SIZE + ((PreHistoriaScript.Config.ESP_MAX_SIZE - PreHistoriaScript.Config.ESP_MIN_SIZE) * scaleFactor)
- data.gui.Size = UDim2.new(0, newSize, 0, newSize * 0.4)
- -- Cor baseada na distância
- if distance < 100 then
- data.frame.BackgroundColor3 = Color3.fromRGB(100, 255, 100)
- elseif distance < 500 then
- data.frame.BackgroundColor3 = Color3.fromRGB(255, 255, 100)
- elseif distance < 1500 then
- data.frame.BackgroundColor3 = Color3.fromRGB(255, 180, 100)
- else
- data.frame.BackgroundColor3 = Color3.fromRGB(255, 120, 120)
- end
- else
- if data.gui then
- pcall(function() data.gui:Destroy() end)
- end
- Module._activeESPs[id] = nil
- end
- end
- end
- local function scanForMeats()
- if not PreHistoriaScript.Config.EspMeatActive then return end
- for id, data in pairs(Module._activeESPs) do
- if data.gui then
- pcall(function() data.gui:Destroy() end)
- end
- end
- Module._activeESPs = {}
- local checkedCount = 0
- for _, obj in ipairs(workspace:GetDescendants()) do
- checkedCount = checkedCount + 1
- if checkedCount % 300 == 0 then
- task.wait()
- if not PreHistoriaScript.Config.EspMeatActive then return end
- end
- local isMeat, part = isMeatObject(obj)
- if isMeat and part and part.Parent then
- createMeatESP(part)
- end
- end
- end
- function Module.Start()
- if Module._updateLoop then return end
- scanForMeats()
- Module._updateLoop = Utils.safeConnect(Services.RunService.Heartbeat, function()
- updateESPInfo()
- end)
- Module._scanLoop = task.spawn(function()
- while PreHistoriaScript.Config.EspMeatActive do
- task.wait(10)
- if PreHistoriaScript.Config.EspMeatActive then
- for _, obj in ipairs(workspace:GetDescendants()) do
- if not PreHistoriaScript.Config.EspMeatActive then break end
- local isMeat, part = isMeatObject(obj)
- if isMeat and part then
- local id = tostring(part:GetDebugId())
- if not Module._activeESPs[id] then
- createMeatESP(part)
- end
- end
- end
- for id, data in pairs(Module._activeESPs) do
- if not data.part or not data.part.Parent then
- if data.gui then
- pcall(function() data.gui:Destroy() end)
- end
- Module._activeESPs[id] = nil
- end
- end
- end
- end
- end)
- Utils.safeConnect(workspace.DescendantAdded, function(obj)
- if not PreHistoriaScript.Config.EspMeatActive then return end
- task.wait(0.1)
- local isMeat, part = isMeatObject(obj)
- if isMeat and part then
- createMeatESP(part)
- end
- end)
- end
- function Module.Stop()
- if Module._scanLoop then
- task.cancel(Module._scanLoop)
- Module._scanLoop = nil
- end
- for id, data in pairs(Module._activeESPs) do
- if data.gui then
- pcall(function() data.gui:Destroy() end)
- end
- end
- Module._activeESPs = {}
- end
- function Module.FindNearestMeat()
- local root = Utils.getHumanoidRootPart()
- 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
- function Module.Cleanup()
- Module.Stop()
- end
- return Module
- end)()
- --// ========== MÓDULO: ESP DE JOGADORES (OTIMIZADO) ========== //
- PreHistoriaScript.Modules.PlayerESP = (function()
- local Module = {
- _playerData = {},
- _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
- table.insert(UsedHues, hue)
- NextHueIndex = NextHueIndex + 1
- return Color3.fromHSV(hue, 0.8 + (math.random() * 0.2), 0.9 + (math.random() * 0.1))
- 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 PreHistoriaScript.Config.PlayerESP then return false end
- if PreHistoriaScript.Config.PlayerESP_TeamCheck then return not isAllyPlayer(p) end
- return true
- end
- local function shouldShowPlayerHP(p)
- if not PreHistoriaScript.Config.PlayerESP_ShowHP then return false end
- if PreHistoriaScript.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 ensurePlayerHighlight(plr, char)
- local pack = Module._playerData[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_PreHistoria" then
- pcall(function() obj:Destroy() end)
- end
- end
- local hi = Instance.new("Highlight")
- hi.Name = "PlayerESP_PreHistoria"
- 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.Enabled = shouldShowPlayerESP(plr)
- end
- local function ensurePlayerHPGui(plr, char)
- local pack = Module._playerData[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_PreHistoria" then
- pcall(function() obj:Destroy() end)
- end
- end
- local bill = Instance.new("BillboardGui")
- bill.Name = "PlayerESP_HP_PreHistoria"
- 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
- pack.hpGui.StudsOffset = Vector3.new(0, head.Size.Y/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 = Module._playerData[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 = 255, 255
- if ratio > 0.5 then
- r = (1 - ratio) * 2 * 255
- else
- g = ratio * 2 * 255
- end
- pack.hpFill.BackgroundColor3 = Color3.fromRGB(r, g, 0)
- 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 = Module._playerData[plr] or {conns = {}}
- Module._playerData[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
- 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
- function Module.Start()
- -- Processa fila
- task.spawn(function()
- while true do
- task.wait(0.2)
- if #Module._processQueue > 0 and PreHistoriaScript.Config.PlayerESP then
- local plr = table.remove(Module._processQueue, 1)
- if plr and plr.Parent then
- Module._playerData[plr] = {conns = {}}
- if plr.Character then
- task.spawn(function()
- setupPlayerESP(plr, plr.Character)
- end)
- end
- table.insert(Module._playerData[plr].conns, plr.CharacterAdded:Connect(function(char)
- task.wait(0.5)
- setupPlayerESP(plr, char)
- end))
- table.insert(Module._playerData[plr].conns, plr.CharacterRemoving:Connect(function()
- local pack = Module._playerData[plr]
- if pack then
- if pack.hpGui then pcall(function() pack.hpGui:Destroy() end) end
- if pack.highlight then pcall(function() pack.highlight:Destroy() end) end
- pack.initialized = false
- end
- end))
- end
- end
- end
- end)
- -- Monitor players
- task.wait(2)
- Utils.safeConnect(Services.Players.PlayerAdded, function(p)
- task.wait(0.5)
- if p ~= LocalPlayer then
- table.insert(Module._processQueue, p)
- end
- end)
- Utils.safeConnect(Services.Players.PlayerRemoving, function(p)
- if Module._playerData[p] then
- clearPlayerConns(Module._playerData[p])
- if Module._playerData[p].highlight then pcall(function() Module._playerData[p].highlight:Destroy() end) end
- if Module._playerData[p].hpGui then pcall(function() Module._playerData[p].hpGui:Destroy() end) end
- Module._playerData[p] = nil
- end
- end)
- -- Update loop
- task.spawn(function()
- while true do
- task.wait(ESP_CONFIG.UpdateInterval)
- if not PreHistoriaScript.Config.PlayerESP then
- task.wait(1)
- continue
- end
- local processed = 0
- for plr, pack in pairs(Module._playerData) 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 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)
- end
- function Module.Reinitialize()
- for plr, _ in pairs(Module._playerData) do
- if Module._playerData[plr] then
- clearPlayerConns(Module._playerData[plr])
- if Module._playerData[plr].highlight then pcall(function() Module._playerData[plr].highlight:Destroy() end) end
- if Module._playerData[plr].hpGui then pcall(function() Module._playerData[plr].hpGui:Destroy() end) end
- end
- end
- Module._playerData = {}
- Module._processQueue = {}
- task.wait(0.1)
- for _, p in ipairs(Services.Players:GetPlayers()) do
- if p ~= LocalPlayer then
- table.insert(Module._processQueue, p)
- end
- end
- end
- function Module.Cleanup()
- for plr, pack in pairs(Module._playerData) do
- clearPlayerConns(pack)
- if pack.highlight then pcall(function() pack.highlight:Destroy() end) end
- if pack.hpGui then pcall(function() pack.hpGui:Destroy() end) end
- end
- Module._playerData = {}
- Module._processQueue = {}
- end
- return Module
- end)()
- --// ========== SISTEMA DE NÍVEL DO DINO (OTIMIZADO) ========== //
- local function getDinoLevelSilent()
- local now = tick()
- local cache = PreHistoriaScript.Cache.DinoLevel
- if (now - cache.lastUpdate) < cache.updateInterval then
- return cache.value
- end
- -- Leaderstats
- 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
- cache.value = val
- cache.lastUpdate = now
- return val
- end
- end
- end
- end
- end
- -- PlayerGui
- 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
- cache.value = val
- cache.lastUpdate = now
- return val
- end
- end
- end
- end
- end
- end
- cache.lastUpdate = now
- return cache.value
- end
- --// ========== SISTEMA DE CRISTAIS (OTIMIZADO) ========== //
- local prioridadeMap = {legendary = 1, epic = 2, rare = 3, bloom = 0, 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
- --// ========== SISTEMA DE TELEPORTE SEGURO (OTIMIZADO) ========== //
- local function safeTeleport(targetCFrame, locationName)
- if PreHistoriaScript.Cache.ActiveTeleportConnection then
- PreHistoriaScript.Cache.ActiveTeleportConnection:Disconnect()
- PreHistoriaScript.Cache.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
- if PreHistoriaScript.RayfieldInstance then
- PreHistoriaScript.RayfieldInstance:Notify({
- Title = "❌ Erro",
- Content = "Personagem não encontrado!",
- Duration = 1,
- Image = 4483362458
- })
- end
- return false
- end
- Utils.updateStat("TeleportsUsed", 1)
- 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)
- return true
- end
- local function teleportTo(cf)
- local root = Utils.getHumanoidRootPart()
- if root and root.Parent then
- root.Parent:SetPrimaryPartCFrame(cf)
- end
- end
- local function teleportToCrystal(c)
- local root = Utils.getHumanoidRootPart()
- if root and c then
- root.Parent:SetPrimaryPartCFrame(CFrame.new(c.Position + Vector3.new(0, 4.5, 0)))
- end
- end
- --// ========== DETECTAR SPAWN ========== //
- task.spawn(function()
- local char = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
- local root = char:WaitForChild("HumanoidRootPart", 10)
- if root then
- task.wait(2)
- PreHistoriaScript.Config.LastSpawnPosition = root.CFrame
- end
- Utils.safeConnect(LocalPlayer.CharacterAdded, function(newChar)
- task.wait(2)
- local newRoot = newChar:FindFirstChild("HumanoidRootPart")
- if newRoot then
- PreHistoriaScript.Config.LastSpawnPosition = newRoot.CFrame
- end
- end)
- end)
- --// ========== CARREGAR TELEPORTS SALVOS ========== //
- local function loadSavedTeleports()
- local success, data = pcall(function()
- return Services.HttpService:JSONDecode(readfile("PreHistoria_Teleports.json"))
- end)
- if success and data then
- PreHistoriaScript.Config.SavedTeleports = data
- print("📍 " .. #data .. " teleports salvos carregados")
- else
- PreHistoriaScript.Config.SavedTeleports = {}
- end
- end
- loadSavedTeleports()
- --// ========== CARREGAR RAYFIELD ========== //
- local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
- PreHistoriaScript.RayfieldInstance = Rayfield
- --// ========== CRIAR WINDOW ========== //
- local Window = Rayfield:CreateWindow({
- Name = "🦖 Pré-história v" .. PreHistoriaScript.Version .. " - By: NickZScripts",
- Icon = 0,
- LoadingTitle = "Pré-história FIXED",
- LoadingSubtitle = "By: NickZScripts - v" .. PreHistoriaScript.Version,
- Theme = "Default",
- DisableRayfieldPrompts = false,
- DisableBuildWarnings = false,
- ConfigurationSaving = {
- Enabled = true,
- FolderName = nil,
- FileName = "PreHistoria_v5"
- },
- Discord = {
- Enabled = false,
- Invite = "noinvitelink",
- RememberJoins = true
- },
- KeySystem = false,
- })
- PreHistoriaScript.RayfieldWindow = Window
- --// ========== INTERFACE RAYFIELD (RESUMIDA) ========== //
- -- MENU TAB
- local MenuTab = Window:CreateTab("🏠 Menu", 4483362458)
- MenuTab:CreateParagraph({
- Title = "📜 Script Info",
- Content = "Versão: v" .. PreHistoriaScript.Version .. "\nStatus: ✅ Operacional\nOtimizado e Anti-Conflitos"
- })
- local PlayersCountLabel = MenuTab:CreateLabel("👥 Players Online: 0/0")
- local function updatePlayerCount()
- local current = #Services.Players:GetPlayers()
- local max = Services.Players.MaxPlayers
- PlayersCountLabel:Set(string.format("👥 Players Online: %d/%d", current, max))
- end
- updatePlayerCount()
- Utils.safeConnect(Services.Players.PlayerAdded, function() task.wait(0.1) updatePlayerCount() end)
- Utils.safeConnect(Services.Players.PlayerRemoving, function() task.wait(0.1) updatePlayerCount() end)
- local StatsSection = MenuTab:CreateSection("📈 Estatísticas")
- local SessionTimeLabel = MenuTab:CreateLabel("⏱️ Tempo: 00:00:00")
- local DinoLevelLabel = MenuTab:CreateLabel("🦖 Nível: 0/60")
- local CrystalsLabel = MenuTab:CreateLabel("💎 Cristais: 0")
- local TeleportsLabel = MenuTab:CreateLabel("🚀 Teleportes: 0")
- task.spawn(function()
- while true do
- task.wait(2)
- SessionTimeLabel:Set("⏱️ Tempo: " .. Utils.getSessionTime())
- DinoLevelLabel:Set(string.format("🦖 Nível: %d/60", getDinoLevelSilent()))
- CrystalsLabel:Set("💎 Cristais: " .. PreHistoriaScript.Stats.CrystalsCollected)
- TeleportsLabel:Set("🚀 Teleportes: " .. PreHistoriaScript.Stats.TeleportsUsed)
- end
- end)
- -- AUTO FARM TAB
- local AutoFarmTab = Window:CreateTab("⚡ Auto Farm", 4483362458)
- AutoFarmTab:CreateToggle({
- Name = "Auto Farm Cristais",
- CurrentValue = false,
- Flag = "AutoFarm",
- Callback = function(Value)
- PreHistoriaScript.Config.AutoFarm = Value
- end,
- })
- AutoFarmTab:CreateToggle({
- Name = "Auto Coleta",
- CurrentValue = false,
- Flag = "AutoColeta",
- Callback = function(Value)
- PreHistoriaScript.Config.AutoColeta = Value
- end,
- })
- -- ESP TAB
- local EspTab = Window:CreateTab("👁️ ESP", 4483362458)
- EspTab:CreateToggle({
- Name = "ESP de Jogadores",
- CurrentValue = false,
- Flag = "PlayerESP",
- Callback = function(Value)
- PreHistoriaScript.Config.PlayerESP = Value
- if Value then
- PreHistoriaScript.Modules.PlayerESP.Reinitialize()
- end
- end,
- })
- EspTab:CreateToggle({
- Name = "Barra de Vida",
- CurrentValue = false,
- Flag = "PlayerESP_HP",
- Callback = function(Value)
- PreHistoriaScript.Config.PlayerESP_ShowHP = Value
- end,
- })
- EspTab:CreateToggle({
- Name = "ESP de Carnes",
- CurrentValue = false,
- Flag = "MeatESP",
- Callback = function(Value)
- PreHistoriaScript.Config.EspMeatActive = Value
- if Value then
- PreHistoriaScript.Modules.MeatESP.Start()
- else
- PreHistoriaScript.Modules.MeatESP.Stop()
- end
- end,
- })
- -- TELEPORT TAB
- local TeleportTab = Window:CreateTab("🚀 Teleport", 4483362458)
- TeleportTab:CreateButton({
- Name = "Teleportar para Carne",
- Callback = function()
- local meat, _ = PreHistoriaScript.Modules.MeatESP.FindNearestMeat()
- if meat then
- safeTeleport(CFrame.new(meat.Position + Vector3.new(0, 3, 0)), "Carne")
- Utils.updateStat("MeatsCollected", 1)
- end
- end,
- })
- TeleportTab:CreateButton({
- Name = "Voltar ao Spawn",
- Callback = function()
- if PreHistoriaScript.Config.LastSpawnPosition then
- safeTeleport(PreHistoriaScript.Config.LastSpawnPosition, "Spawn")
- end
- end,
- })
- -- SEGURANÇA TAB
- local SecurityTab = Window:CreateTab("🛡️ Segurança", 4483362458)
- SecurityTab:CreateToggle({
- Name = "Admin Detector",
- CurrentValue = PreHistoriaScript.Config.AdminDetector,
- Flag = "AdminDetector",
- Callback = function(Value)
- PreHistoriaScript.Config.AdminDetector = Value
- end,
- })
- SecurityTab:CreateToggle({
- Name = "Anti-Kick & Anti-AFK",
- CurrentValue = PreHistoriaScript.Config.AntiKick,
- Flag = "AntiKick",
- Callback = function(Value)
- PreHistoriaScript.Config.AntiKick = Value
- if Value then
- PreHistoriaScript.Modules.AntiKick.Enable()
- else
- PreHistoriaScript.Modules.AntiKick.Disable()
- end
- end,
- })
- SecurityTab:CreateButton({
- Name = "🌐 Server Hop",
- Callback = function()
- PreHistoriaScript.Modules.ServerHop.HopToLowPopulation()
- end,
- })
- -- COMBAT TAB
- local CombatTab = Window:CreateTab("⚔️ Combat", 4483362458)
- CombatTab:CreateToggle({
- Name = "Hitbox Expander",
- CurrentValue = false,
- Flag = "HitboxExpander",
- Callback = function(Value)
- if Value then
- PreHistoriaScript.Modules.HitboxExpander.Enable()
- else
- PreHistoriaScript.Modules.HitboxExpander.Disable()
- end
- end,
- })
- CombatTab:CreateSlider({
- Name = "Tamanho da Hitbox",
- Range = {5, 50},
- Increment = 1,
- CurrentValue = 20,
- Flag = "HitboxSize",
- Callback = function(Value)
- PreHistoriaScript.Modules.HitboxExpander.SetSize(Value)
- end,
- })
- -- EVENTOS TAB
- local EventsTab = Window:CreateTab("🌸 Eventos", 4483362458)
- EventsTab:CreateToggle({
- Name = "Bloom Crystal Detector",
- CurrentValue = PreHistoriaScript.Config.BloomDetector,
- Flag = "BloomDetector",
- Callback = function(Value)
- PreHistoriaScript.Config.BloomDetector = Value
- if Value then
- PreHistoriaScript.Modules.BloomDetector.Start()
- else
- PreHistoriaScript.Modules.BloomDetector.Stop()
- end
- end,
- })
- -- OTIMIZAÇÃO TAB
- local OptimizationTab = Window:CreateTab("⚡ Otimização", 4483362458)
- OptimizationTab:CreateToggle({
- Name = "FPS Booster",
- CurrentValue = PreHistoriaScript.Config.FPSBooster,
- Flag = "FPSBooster",
- Callback = function(Value)
- if Value then
- PreHistoriaScript.Modules.Optimizer.Enable()
- else
- PreHistoriaScript.Modules.Optimizer.Disable()
- end
- end,
- })
- -- OUTROS TAB
- local OutrosTab = Window:CreateTab("⚙️ Outros", 4483362458)
- OutrosTab:CreateButton({
- Name = "🎯 Abrir Click Teleport",
- Callback = function()
- PreHistoriaScript.Modules.ClickTeleport.Toggle(true)
- end,
- })
- --// ========== AUTO FARM LOOP (OTIMIZADO) ========== //
- task.spawn(function()
- local index = 1
- while true do
- task.wait(PreHistoriaScript.Config.CheckDelay)
- if PreHistoriaScript.Config.AutoFarm then
- local currentLevel = getDinoLevelSilent()
- if currentLevel >= 60 then
- PreHistoriaScript.Config.AutoFarm = false
- print("✅ Nível 60 atingido!")
- else
- local crystals = getSortedCrystals()
- if #crystals > 0 then
- for _, c in ipairs(crystals) do
- if not PreHistoriaScript.Config.AutoFarm or not c or not c.Parent then break end
- teleportToCrystal(c)
- Utils.updateStat("CrystalsCollected", 1)
- local fixarConexao = Utils.safeConnect(Services.RunService.Heartbeat, function()
- if PreHistoriaScript.Config.AutoFarm and c and c:IsDescendantOf(workspace) then
- local char = Utils.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 PreHistoriaScript.Config.AutoFarm do
- task.wait(PreHistoriaScript.Config.CheckDelay)
- elapsed = elapsed + PreHistoriaScript.Config.CheckDelay
- end
- fixarConexao:Disconnect()
- task.wait(PreHistoriaScript.Config.DelayBetweenCrystals)
- end
- else
- index = (index % #PreHistoriaScript.Config.PatrulhaPontos) + 1
- teleportTo(PreHistoriaScript.Config.PatrulhaPontos[index])
- task.wait(2)
- end
- end
- end
- end
- end)
- --// ========== AUTO COLETA (OTIMIZADO) ========== //
- Utils.safeConnect(Services.RunService.Heartbeat, function()
- if not (PreHistoriaScript.Config.AutoFarm or PreHistoriaScript.Config.AutoColeta) then return end
- if not PreHistoriaScript.Config.podeExecutar then return end
- PreHistoriaScript.Config.podeExecutar = false
- local root = Utils.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 <= PreHistoriaScript.Config.raioDeColeta then
- pcall(function()
- fireproximityprompt(obj)
- end)
- end
- end
- end
- end
- task.delay(PreHistoriaScript.Config.delayEntreTentativas, function()
- PreHistoriaScript.Config.podeExecutar = true
- end)
- end)
- --// ========== INICIALIZAÇÃO DE MÓDULOS ========== //
- if PreHistoriaScript.Config.AdminDetector then
- PreHistoriaScript.Modules.AdminDetector.Start()
- end
- if PreHistoriaScript.Config.BloomDetector then
- PreHistoriaScript.Modules.BloomDetector.Start()
- end
- if PreHistoriaScript.Config.AntiKick then
- PreHistoriaScript.Modules.AntiKick.Enable()
- end
- if PreHistoriaScript.Config.FPSBooster then
- PreHistoriaScript.Modules.Optimizer.Enable()
- end
- PreHistoriaScript.Modules.PlayerESP.Start()
- PreHistoriaScript.Modules.AutoUpdate.AutoCheck()
- --// ========== CLEANUP AO SAIR ========== //
- Utils.safeConnect(LocalPlayer.CharacterRemoving, function()
- PreHistoriaScript.Modules.ClickTeleport.Cleanup()
- end)
- Utils.safeConnect(Services.CoreGui.DescendantRemoving, function(obj)
- if obj.Name == "Rayfield" then
- PreHistoriaScript.Cleanup()
- end
- end)
- --// ========== MARCA COMO INICIALIZADO ========== //
- PreHistoriaScript.Initialized = true
- --// ========== LOGS FINAIS ========== //
- print("╔═══════════════════════════════════════════════════════════╗")
- print("║ Pré-história v" .. PreHistoriaScript.Version .. " - OTIMIZADO ║")
- print("╠═══════════════════════════════════════════════════════════╣")
- print("║ ✅ Sistema totalmente encapsulado ║")
- print("║ ✅ Zero conflitos garantido ║")
- print("║ ✅ Performance otimizada ║")
- print("║ ✅ Cleanup robusto implementado ║")
- print("╠═══════════════════════════════════════════════════════════╣")
- print("║ 📌 Versão: " .. PreHistoriaScript.Version .. " ║")
- print("║ 🎮 Jogador: " .. LocalPlayer.Name)
- print("║ 📊 Players: " .. #Services.Players:GetPlayers() .. "/" .. Services.Players.MaxPlayers)
- print("║ 🔗 Namespace: PreHistoriaScript ║")
- print("╠═══════════════════════════════════════════════════════════╣")
- print("║ 🎉 SCRIPT 100% OPERACIONAL! 🎉 ║")
- print("║ Use: getgenv().PreHistoriaScript.Cleanup() para limpar ║")
- print("╚═══════════════════════════════════════════════════════════╝")
- Rayfield:Notify({
- Title = "🦖 Pré-história v" .. PreHistoriaScript.Version,
- Content = "Script carregado com sucesso!\n✅ Otimizado e sem conflitos",
- Duration = 5,
- Image = 4483362458
- })
- --// ========== RETORNA O NAMESPACE ========== //
- return PreHistoriaScript
Advertisement
Add Comment
Please, Sign In to add comment