--// Menú de Animales - LocalScript local Players = game:GetService("Players") local UIS = game:GetService("UserInputService") local PathfindingService = game:GetService("PathfindingService") local player = Players.LocalPlayer --// CONFIG local MULT = 1.4 -- multiplicador de velocidad local STOP_DIST = 5 -- distancia al animal para "llegar" local HOLD_TIME = 3 -- segundos que mantiene la tecla E local HOME_POS = Vector3.new(8, 0.30000001192092896, 8) -- a donde vuelve después de la E local HOME_STOP = 3 -- distancia para considerar que llegó a HOME_POS local TOGGLE_KEY = Enum.KeyCode.RightShift -- mostrar/ocultar todo el menú local ANIMALES = { "ardilla","astralix","aurelion","caballo","camello","cerdo","ciervo","dark", "escorpion","esfinge_mecanica","fenec","foki","gallina","guardian_comunidad", "jaguar_orbital","lince_cibernetico","malakor","mamut","minino_neon","noxaris", "oso","osopolar","pavonix","pezpayaso","pinguino","pulpo","puma_plasma","rubi", "seraphion","suricata","tiburon","tigre_glacial","tigre_singularidad","tortuga", "vaca","vexorion","zorro","zorroartico", } --// VARIANTES (id_Gold, id_Diamond, y malakor_Rainbow) local SIN_VARIANTES = { guardian_comunidad = true } local VARIANTES = { "Gold", "Diamond" } local VARIANTES_EXTRA = { malakor = { "Rainbow" } } local NOMBRES = {} -- todos los nombres seleccionables for _, id in ipairs(ANIMALES) do table.insert(NOMBRES, id) if not SIN_VARIANTES[id] then for _, v in ipairs(VARIANTES) do table.insert(NOMBRES, id .. "_" .. v) end for _, v in ipairs(VARIANTES_EXTRA[id] or {}) do table.insert(NOMBRES, id .. "_" .. v) end end end local nameSet = {} -- minúsculas -> nombre canónico for _, nm in ipairs(NOMBRES) do nameSet[string.lower(nm)] = nm end -- palabras clave extra por si algún modelo usa nombre para mostrar ("Escorpión gigante Oro") local EXTRA = { esfinge_mecanica = {"esfinge"}, guardian_comunidad = {"guardian"}, jaguar_orbital = {"jaguar"}, lince_cibernetico = {"lince"}, minino_neon = {"minino"}, puma_plasma = {"puma"}, osopolar = {"oso polar"}, pezpayaso = {"pez payaso"}, zorroartico = {"zorro artico", "artico"}, } local BAJA_PRIORIDAD = { zorro = true } local KEYS = {} for _, id in ipairs(ANIMALES) do local k = { id, (id:gsub("_", " ")) } for _, e in ipairs(EXTRA[id] or {}) do table.insert(k, e) end KEYS[id] = k end local ACENTOS = { {"á","a"},{"é","e"},{"í","i"},{"ó","o"},{"ú","u"},{"ü","u"},{"ñ","n"}, {"Á","a"},{"É","e"},{"Í","i"},{"Ó","o"},{"Ú","u"},{"Ü","u"},{"Ñ","n"}, } local function normalize(s) for _, p in ipairs(ACENTOS) do s = (s:gsub(p[1], p[2])) end s = string.lower(s) s = s:gsub("[_%-]", " ") s = s:gsub("%s+", " ") return s end -- devuelve el nombre seleccionable (ej: "ardilla_Gold") o nil si no es un animal de la lista local function matchAnimal(name) local exact = nameSet[string.lower(name)] if exact then return exact end local n = " " .. normalize(name) .. " " local best, bestScore for _, id in ipairs(ANIMALES) do for _, key in ipairs(KEYS[id]) do if n:find(" " .. key .. " ", 1, true) then local score = (BAJA_PRIORIDAD[id] and 0 or 100) + #key if not bestScore or score > bestScore then best, bestScore = id, score end end end end if not best then return nil end local variant if n:find("gold", 1, true) or n:find(" oro ", 1, true) then variant = "Gold" elseif n:find("diamond", 1, true) then variant = "Diamond" elseif n:find("rainbow", 1, true) or n:find("arcoiris", 1, true) then variant = "Rainbow" end if variant then local k = nameSet[string.lower(best .. "_" .. variant)] if k then return k end end return best end --// ESTADO local selected = {} -- [nombre] = true/false local present = {} -- [modelo] = nombre seleccionable local visited = setmetatable({}, {__mode = "k"}) local autoMode = true local walking = false local walkToken = 0 local baseSpeed = 16 local boostedHum = nil --// UTILIDADES local function new(class, props, parent) local i = Instance.new(class) for k, v in pairs(props) do i[k] = v end i.Parent = parent return i end local function getChar() local c = player.Character local h = c and c:FindFirstChildOfClass("Humanoid") local r = c and c:FindFirstChild("HumanoidRootPart") if h and r and h.Health > 0 then return c, h, r end end local function modelPos(m) local ok, p = pcall(function() return m:GetPivot().Position end) if ok then return p end end local function flatDist(a, b) return (Vector3.new(a.X, 0, a.Z) - Vector3.new(b.X, 0, b.Z)).Magnitude end local function findPrompt(model) for _, d in ipairs(model:GetDescendants()) do if d:IsA("ProximityPrompt") and d.Enabled then return d end end end --// GUI local gui = new("ScreenGui", { Name = "MenuAnimales", ResetOnSpawn = false, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, }, player:WaitForChild("PlayerGui")) local FULL_H = 420 local main = new("Frame", { Size = UDim2.new(0, 330, 0, FULL_H), Position = UDim2.new(0, 40, 0.5, -FULL_H / 2), BackgroundColor3 = Color3.fromRGB(28, 28, 34), BorderSizePixel = 0, ClipsDescendants = true, }, gui) new("UICorner", {CornerRadius = UDim.new(0, 8)}, main) local top = new("Frame", { Size = UDim2.new(1, 0, 0, 32), BackgroundColor3 = Color3.fromRGB(45, 45, 56), BorderSizePixel = 0, }, main) new("TextLabel", { Size = UDim2.new(1, -44, 1, 0), Position = UDim2.new(0, 10, 0, 0), BackgroundTransparency = 1, Text = "🐾 Menú de Animales", TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.SourceSansBold, TextSize = 18, TextXAlignment = Enum.TextXAlignment.Left, }, top) local minBtn = new("TextButton", { Size = UDim2.new(0, 32, 0, 32), Position = UDim2.new(1, -32, 0, 0), BackgroundTransparency = 1, Text = "–", TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.SourceSansBold, TextSize = 24, }, top) local body = new("Frame", { Size = UDim2.new(1, 0, 1, -32), Position = UDim2.new(0, 0, 0, 32), BackgroundTransparency = 1, }, main) -- Arrastrar do local dragging, dragStart, startPos top.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = main.Position input.Changed:Connect(function() if input.UserInputState == Enum.UserInputState.End then dragging = false end end) end end) UIS.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then local d = input.Position - dragStart main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y) end end) end -- Minimizar / abrir local minimized = false minBtn.MouseButton1Click:Connect(function() minimized = not minimized body.Visible = not minimized main.Size = UDim2.new(0, 330, 0, minimized and 32 or FULL_H) minBtn.Text = minimized and "+" or "–" end) UIS.InputBegan:Connect(function(input, gp) if not gp and input.KeyCode == TOGGLE_KEY then gui.Enabled = not gui.Enabled end end) -- Pestañas local tabBar = new("Frame", {Size = UDim2.new(1, 0, 0, 30), BackgroundTransparency = 1}, body) local function makeTab(text, xScale) return new("TextButton", { Size = UDim2.new(0.5, -6, 1, -4), Position = UDim2.new(xScale, xScale == 0 and 4 or 2, 0, 2), BackgroundColor3 = Color3.fromRGB(55, 55, 70), Text = text, TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.SourceSansBold, TextSize = 15, BorderSizePixel = 0, }, tabBar) end local tabDetect = makeTab("Detector", 0) local tabSelect = makeTab("Selección de animales", 0.5) local pageDetect = new("Frame", { Size = UDim2.new(1, 0, 1, -34), Position = UDim2.new(0, 0, 0, 34), BackgroundTransparency = 1, }, body) local pageSelect = new("Frame", { Size = UDim2.new(1, 0, 1, -34), Position = UDim2.new(0, 0, 0, 34), BackgroundTransparency = 1, Visible = false, }, body) local function showPage(p) pageDetect.Visible = (p == pageDetect) pageSelect.Visible = (p == pageSelect) tabDetect.BackgroundColor3 = p == pageDetect and Color3.fromRGB(80, 110, 200) or Color3.fromRGB(55, 55, 70) tabSelect.BackgroundColor3 = p == pageSelect and Color3.fromRGB(80, 110, 200) or Color3.fromRGB(55, 55, 70) end tabDetect.MouseButton1Click:Connect(function() showPage(pageDetect) end) tabSelect.MouseButton1Click:Connect(function() showPage(pageSelect) end) showPage(pageDetect) local function label(parent, y, h) return new("TextLabel", { Size = UDim2.new(1, -16, 0, h), Position = UDim2.new(0, 8, 0, y), BackgroundTransparency = 1, TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.SourceSans, TextSize = 16, TextXAlignment = Enum.TextXAlignment.Left, TextWrapped = true, Text = "", }, parent) end local function button(parent, text, x, y, w, h) return new("TextButton", { Size = UDim2.new(w, -6, 0, h), Position = UDim2.new(x, x == 0 and 8 or 2, 0, y), BackgroundColor3 = Color3.fromRGB(60, 60, 78), Text = text, TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.SourceSansBold, TextSize = 15, BorderSizePixel = 0, }, parent) end local function scroller(parent, y, bottomPad) local s = new("ScrollingFrame", { Size = UDim2.new(1, -16, 1, -y - bottomPad), Position = UDim2.new(0, 8, 0, y), BackgroundColor3 = Color3.fromRGB(20, 20, 26), BorderSizePixel = 0, ScrollBarThickness = 5, CanvasSize = UDim2.new(), AutomaticCanvasSize = Enum.AutomaticSize.Y, }, parent) new("UIListLayout", {Padding = UDim.new(0, 3), SortOrder = Enum.SortOrder.Name}, s) return s end --// PÁGINA DETECTOR local speedLabel = label(pageDetect, 4, 22) local statusLabel = label(pageDetect, 28, 22) statusLabel.TextSize = 15 statusLabel.Text = "Estado: esperando animales..." local stopBtn = button(pageDetect, "⛔ Detener", 0, 54, 0.5, 28) local autoBtn = button(pageDetect, "Auto-ir: ON", 0.5, 54, 0.5, 28) label(pageDetect, 88, 18).Text = "Animales detectados ahora:" local detectList = scroller(pageDetect, 108, 6) --// PÁGINA SELECCIÓN local allBtn = button(pageSelect, "Seleccionar todos", 0, 4, 0.5, 28) local noneBtn = button(pageSelect, "Quitar todos", 0.5, 4, 0.5, 28) local searchBox = new("TextBox", { Size = UDim2.new(1, -16, 0, 26), Position = UDim2.new(0, 8, 0, 36), BackgroundColor3 = Color3.fromRGB(40, 40, 52), TextColor3 = Color3.new(1, 1, 1), PlaceholderText = "Buscar (ej: gold, oso, rainbow)...", PlaceholderColor3 = Color3.fromRGB(150, 150, 160), Text = "", ClearTextOnFocus = false, Font = Enum.Font.SourceSans, TextSize = 16, BorderSizePixel = 0, }, pageSelect) local selectList = scroller(pageSelect, 66, 6) local function setStatus(t) statusLabel.Text = "Estado: " .. t end --// CAMINAR local function restoreSpeed() if boostedHum and boostedHum.Parent then boostedHum.WalkSpeed = baseSpeed end boostedHum = nil end local function stopWalking() walkToken += 1 if walking then walking = false restoreSpeed() end end -- camina (con pathfinding) hasta getPos(); true si llegó local function moveTo(token, getPos, stopDist, alive) local t0 = os.clock() while token == walkToken and alive() do if os.clock() - t0 > 90 then return false end local _, h, r = getChar() if not h then return false end local tp = getPos() if not tp then return false end if flatDist(r.Position, tp) <= stopDist then return true end h.WalkSpeed = baseSpeed * MULT local path = PathfindingService:CreatePath({AgentRadius = 2, AgentHeight = 5, AgentCanJump = true}) local ok = pcall(function() path:ComputeAsync(r.Position, tp) end) if ok and path.Status == Enum.PathStatus.Success then local wps = path:GetWaypoints() for i = 2, #wps do if token ~= walkToken or not alive() then break end local wp = wps[i] if wp.Action == Enum.PathWaypointAction.Jump then h.Jump = true end h:MoveTo(wp.Position) local t1 = os.clock() while token == walkToken and os.clock() - t1 < 2 do local np = getPos() if not np or flatDist(r.Position, np) <= stopDist then break end if flatDist(r.Position, wp.Position) <= 3 then break end task.wait(0.08) end local np = getPos() if not np or flatDist(r.Position, np) <= stopDist then break end if (np - tp).Magnitude > 8 then break end -- el destino se movió: recalcular end else h:MoveTo(tp) task.wait(0.3) end end return false end -- mantiene la tecla E durante HOLD_TIME segundos local function holdE(token, model) local VIM pcall(function() VIM = game:GetService("VirtualInputManager") end) local useVIM = false if VIM then useVIM = pcall(function() VIM:SendKeyEvent(true, Enum.KeyCode.E, false, game) end) end local prompt if not useVIM then -- plan B: mantener el ProximityPrompt del animal prompt = findPrompt(model) if prompt then pcall(function() prompt:InputHoldBegin() end) end end if not useVIM and not prompt then return false end local t0 = os.clock() while token == walkToken and os.clock() - t0 < HOLD_TIME do task.wait(0.05) end if useVIM then pcall(function() VIM:SendKeyEvent(false, Enum.KeyCode.E, false, game) end) elseif prompt then pcall(function() prompt:InputHoldEnd() end) end return true end local autoPick -- forward declaration local function walkTo(model, name) stopWalking() local token = walkToken local _, hum = getChar() if not hum then setStatus("no hay personaje") return end visited[model] = true walking = true baseSpeed = hum.WalkSpeed boostedHum = hum setStatus("caminando hacia " .. model.Name) task.spawn(function() -- 1) ir al animal local arrived = moveTo(token, function() return modelPos(model) end, STOP_DIST, function() return model.Parent ~= nil end) if token == walkToken and arrived then -- 2) quedarse quieto y mantener E local _, h, r = getChar() if h then h:MoveTo(r.Position) end setStatus("manteniendo E " .. HOLD_TIME .. "s en " .. model.Name) if not holdE(token, model) then setStatus("no pude simular la tecla E") end -- 3) volver a las coordenadas if token == walkToken then setStatus("volviendo a las coordenadas...") local ok = moveTo(token, function() return HOME_POS end, HOME_STOP, function() return true end) if token == walkToken then setStatus(ok and "listo, esperando animales..." or "no pude llegar a las coordenadas") end end elseif token == walkToken then setStatus((model.Parent and "no pude llegar a " or "desapareció: ") .. model.Name) end if token == walkToken then walking = false restoreSpeed() task.defer(function() if autoPick then autoPick() end end) end end) end autoPick = function() if not autoMode or walking then return end local _, _, r = getChar() if not r then return end local bestM, bestN, bestD for m, n in pairs(present) do if selected[n] and m.Parent and not visited[m] then local p = modelPos(m) if p then local d = (p - r.Position).Magnitude if not bestD or d < bestD then bestM, bestN, bestD = m, n, d end end end end if bestM then walkTo(bestM, bestN) end end --// REFRESCAR LISTAS local function refreshDetected() for _, c in ipairs(detectList:GetChildren()) do if c:IsA("Frame") then c:Destroy() end end local i = 0 for m, n in pairs(present) do i += 1 local row = new("Frame", { Name = string.format("%04d", i), Size = UDim2.new(1, -6, 0, 26), BackgroundColor3 = Color3.fromRGB(40, 40, 52), BorderSizePixel = 0, }, detectList) new("TextLabel", { Size = UDim2.new(1, -50, 1, 0), Position = UDim2.new(0, 8, 0, 0), BackgroundTransparency = 1, Text = (selected[n] and "★ " or "") .. m.Name, TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.SourceSans, TextSize = 16, TextXAlignment = Enum.TextXAlignment.Left, }, row) local go = new("TextButton", { Size = UDim2.new(0, 44, 1, -4), Position = UDim2.new(1, -48, 0, 2), BackgroundColor3 = Color3.fromRGB(70, 150, 90), Text = "Ir", TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.SourceSansBold, TextSize = 15, BorderSizePixel = 0, }, row) go.MouseButton1Click:Connect(function() if m.Parent then walkTo(m, n) end end) end end -- agrupa varios cambios seguidos en un solo refresco / un solo autoPick local refreshPending, pickPending = false, false local function requestRefresh() if refreshPending then return end refreshPending = true task.defer(function() refreshPending = false; refreshDetected() end) end local function requestPick() if pickPending then return end pickPending = true task.defer(function() pickPending = false; autoPick() end) end local selButtons = {} local function paintSel(name) local b = selButtons[name] if not b then return end b.BackgroundColor3 = selected[name] and Color3.fromRGB(70, 150, 90) or Color3.fromRGB(40, 40, 52) b.Text = (selected[name] and "✔ " or " ") .. name end for _, name in ipairs(NOMBRES) do selected[name] = false local b = new("TextButton", { Name = name, Size = UDim2.new(1, -6, 0, 26), BackgroundColor3 = Color3.fromRGB(40, 40, 52), TextColor3 = Color3.new(1, 1, 1), Font = Enum.Font.SourceSans, TextSize = 16, TextXAlignment = Enum.TextXAlignment.Left, BorderSizePixel = 0, Text = "", }, selectList) selButtons[name] = b paintSel(name) b.MouseButton1Click:Connect(function() selected[name] = not selected[name] paintSel(name) requestRefresh() requestPick() end) end -- buscador local function applyFilter() local q = string.lower(searchBox.Text) for name, b in pairs(selButtons) do b.Visible = (q == "") or (string.find(string.lower(name), q, 1, true) ~= nil) end end searchBox:GetPropertyChangedSignal("Text"):Connect(applyFilter) -- "todos / ninguno" afectan solo a lo que se ve (según el buscador) allBtn.MouseButton1Click:Connect(function() for name, b in pairs(selButtons) do if b.Visible then selected[name] = true paintSel(name) end end requestRefresh(); requestPick() end) noneBtn.MouseButton1Click:Connect(function() for name, b in pairs(selButtons) do if b.Visible then selected[name] = false paintSel(name) end end requestRefresh() end) stopBtn.MouseButton1Click:Connect(function() stopWalking() setStatus("detenido") end) autoBtn.MouseButton1Click:Connect(function() autoMode = not autoMode autoBtn.Text = "Auto-ir: " .. (autoMode and "ON" or "OFF") autoBtn.BackgroundColor3 = autoMode and Color3.fromRGB(60, 60, 78) or Color3.fromRGB(120, 50, 50) requestPick() end) --// DETECCIÓN en Workspace.Creatures task.spawn(function() local function findCreatures() for _, c in ipairs(workspace:GetChildren()) do if string.lower(c.Name) == "creatures" then return c end end end setStatus("buscando carpeta Creatures...") local creatures = findCreatures() while not creatures do task.wait(1) creatures = findCreatures() end setStatus("esperando animales...") local function onAdded(inst) local key = matchAnimal(inst.Name) if not key then return end present[inst] = key setStatus("detectado: " .. inst.Name) requestRefresh() requestPick() end creatures.ChildAdded:Connect(onAdded) creatures.ChildRemoved:Connect(function(inst) if present[inst] then present[inst] = nil requestRefresh() end end) for _, c in ipairs(creatures:GetChildren()) do onAdded(c) end end) player.CharacterAdded:Connect(function() stopWalking() end) --// Velocidad en vivo task.spawn(function() while gui.Parent do local _, h = getChar() if h then local base = walking and baseSpeed or h.WalkSpeed speedLabel.Text = string.format("Velocidad: %.1f → x%.1f = %.1f", base, MULT, base * MULT) end task.wait(0.25) end end)