Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players, UIS, RunService = game:GetService('Players'), game:GetService('UserInputService'), game:GetService('RunService')
- local LocalPlayer = Players.LocalPlayer
- local PlayerGui = LocalPlayer:WaitForChild('PlayerGui')
- local C = {
- PANEL = Color3.fromRGB(15, 15, 20),
- ACCENT = Color3.fromRGB(200, 80, 255),
- TEXT = Color3.fromRGB(240, 240, 255),
- GREEN = Color3.fromRGB(50, 230, 90),
- YELLOW = Color3.fromRGB(255, 210, 40),
- RED = Color3.fromRGB(255, 60, 60),
- MUTED = Color3.fromRGB(120, 120, 140),
- WHITE = Color3.new(1, 1, 1),
- }
- local petDB, dbReady, lastHoveredPet = {}, false, ""
- local function unescape(s)
- return (s:gsub('\\"','"'):gsub('\\/','/'):gsub('\\n','\n'):gsub('\\\\','\\'))
- end
- local function getBestValue(obj, prefix)
- local np = tonumber(obj:match('"'..prefix..'value %- nopotion"%s*:%s*(%-?[%d%.]+)')) or tonumber(obj:match('"'..prefix..'value"%s*:%s*(%-?[%d%.]+)')) or 0
- local r = tonumber(obj:match('"'..prefix..'value %- ride"%s*:%s*(%-?[%d%.]+)')) or 0
- local f = tonumber(obj:match('"'..prefix..'value %- fly"%s*:%s*(%-?[%d%.]+)')) or 0
- local fr = tonumber(obj:match('"'..prefix..'value %- fly\\u0026ride"%s*:%s*(%-?[%d%.]+)')) or tonumber(obj:match('"'..prefix..'value"%s*:%s*(%-?[%d%.]+)')) or 0
- return { np = np, r = r, f = f, fr = fr }
- end
- local function smartFill(p)
- if not p then return end
- if p.np == 0 and p.fr > 0 then p.np = p.fr end
- if p.fr == 0 and p.np > 0 then p.fr = p.np end
- if p.np > 0 and p.fr > 0 then
- if p.r == 0 then p.r = math.floor((p.np + (p.fr - p.np) * 0.45) * 100) / 100 end
- if p.f == 0 then p.f = math.floor((p.np + (p.fr - p.np) * 0.55) * 100) / 100 end
- end
- end
- -- Cargar datos de Elvebredd
- local reqFn = (syn and syn.request) or (http and http.request) or request
- if reqFn then
- task.spawn(function()
- local res = reqFn({Url = "https://elvebredd.com/adopt-me-calculator", Method = "GET"})
- if res and res.Body then
- for obj in unescape(res.Body):gmatch("{(.-)}") do
- local petName, status = obj:match('"[nN]ame"%s*:%s*"(.-)"'), obj:match('"[sS]tatus"%s*:%s*"(.-)"')
- if petName and status == "Ready" then
- petName = petName:lower()
- petDB[petName] = {
- name = petName,
- r = getBestValue(obj, "r"),
- n = getBestValue(obj, "n"),
- m = getBestValue(obj, "m")
- }
- smartFill(petDB[petName].r)
- smartFill(petDB[petName].n)
- smartFill(petDB[petName].m)
- end
- end
- dbReady = true
- end
- end)
- end
- local function parsePetVariant(rawName)
- local name, variant = rawName:lower(), "r"
- if name:find("mega neon") or name:find("mfr") or name:match("%smr%s") or name:match("^mr%s") or name:match("%smf%s") or name:match("^mf%s") then
- variant = "m"
- name = name:gsub("mega neon%s*", ""):gsub("mfr%s*", ""):gsub("mr%s*", ""):gsub("mf%s*", "")
- elseif name:find("neon") or name:find("nfr") or name:match("%snr%s") or name:match("^nr%s") or name:match("%snf%s") or name:match("^nf%s") then
- variant = "n"
- name = name:gsub("neon%s*", ""):gsub("nfr%s*", ""):gsub("nr%s*", ""):gsub("nf%s*", "")
- end
- return name:gsub("^%s+", ""):gsub("%s+$", ""), variant
- end
- local function lookupPet(raw)
- local cName, cVar = parsePetVariant(raw)
- if petDB[cName] then return petDB[cName], cVar end
- local best, bestLen = nil, 0
- for k, v in pairs(petDB) do
- if cName:find(k) and #k > bestLen then
- bestLen = #k
- best = v
- end
- end
- return best, cVar
- end
- -- Limpieza de GUI anterior
- pcall(function()
- local containers = {game.CoreGui, PlayerGui}
- if gethui then table.insert(containers, gethui()) end
- for _, c in ipairs(containers) do
- for _, v in ipairs(c:GetChildren()) do
- if v:IsA("ScreenGui") and v.Name:find("TradeChecker") then v:Destroy() end
- end
- end
- end)
- -- ScreenGui Principal
- local screen = Instance.new('ScreenGui')
- screen.Name = 'ENI_TradeChecker'
- screen.ResetOnSpawn = false
- screen.Parent = game.CoreGui
- -- Panel Principal (compacto)
- local frame = Instance.new('Frame', screen)
- frame.Size = UDim2.new(0, 310, 0, 105)
- frame.Position = UDim2.new(1, -330, 0.5, -50)
- frame.BackgroundColor3 = C.PANEL
- frame.BorderSizePixel = 0
- Instance.new('UICorner', frame).CornerRadius = UDim.new(0, 8)
- local uiStroke = Instance.new('UIStroke', frame)
- uiStroke.Color = C.ACCENT
- uiStroke.Thickness = 2
- -- Título (Sirve para arrastrar)
- local title = Instance.new('TextLabel', frame)
- title.Size = UDim2.new(1, -30, 0, 30)
- title.Position = UDim2.new(0, 0, 0, 0)
- title.BackgroundTransparency = 1
- title.Text = "✨ ENI | Pet Value Inspector"
- title.TextColor3 = C.WHITE
- title.Font = Enum.Font.GothamBold
- title.TextSize = 13
- -- Botón Cerrar (X)
- local closeBtn = Instance.new('TextButton', frame)
- closeBtn.Size = UDim2.new(0, 30, 0, 30)
- closeBtn.Position = UDim2.new(1, -30, 0, 0)
- closeBtn.BackgroundTransparency = 1
- closeBtn.Text = "✕"
- closeBtn.TextColor3 = C.WHITE
- closeBtn.Font = Enum.Font.GothamBold
- closeBtn.TextSize = 14
- -- Botón Flotante Redondo
- local openBtn = Instance.new('TextButton', screen)
- openBtn.Size = UDim2.new(0, 50, 0, 50)
- openBtn.Position = UDim2.new(1, -70, 0.5, -25)
- openBtn.BackgroundColor3 = C.PANEL
- openBtn.Text = "✨"
- openBtn.TextSize = 22
- openBtn.Visible = false
- Instance.new('UICorner', openBtn).CornerRadius = UDim.new(1, 0)
- local openStroke = Instance.new('UIStroke', openBtn)
- openStroke.Color = C.ACCENT
- openStroke.Thickness = 2
- -- Sistema Arrastrable (Draggable)
- local function makeDraggable(guiObj, handle)
- handle = handle or guiObj
- local dragging, dragStart, startPos
- handle.InputBegan:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = true
- dragStart = input.Position
- startPos = guiObj.Position
- end
- end)
- UIS.InputChanged:Connect(function(input)
- if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
- local delta = input.Position - dragStart
- guiObj.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
- end
- end)
- UIS.InputEnded:Connect(function(input)
- if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
- dragging = false
- end
- end)
- end
- makeDraggable(frame, title)
- makeDraggable(openBtn, openBtn)
- -- Eventos del GUI (Cerrar / Abrir)
- closeBtn.MouseButton1Click:Connect(function()
- frame.Visible = false
- openBtn.Visible = true
- end)
- openBtn.MouseButton1Click:Connect(function()
- frame.Visible = true
- openBtn.Visible = false
- end)
- -- Contenido del Panel
- local container = Instance.new('Frame', frame)
- container.Size = UDim2.new(1, -20, 0, 60)
- container.Position = UDim2.new(0, 10, 0, 35)
- container.BackgroundTransparency = 1
- local uiList = Instance.new('UIListLayout', container)
- uiList.SortOrder = Enum.SortOrder.LayoutOrder
- uiList.Padding = UDim.new(0, 6)
- -- Filas
- local petRow = Instance.new('Frame', container)
- petRow.Size = UDim2.new(1, 0, 0, 24)
- petRow.BackgroundTransparency = 1
- local dot = Instance.new('Frame', petRow)
- dot.Size = UDim2.new(0, 8, 0, 8)
- dot.Position = UDim2.new(0, 4, 0.5, -4)
- dot.BackgroundColor3 = C.YELLOW
- Instance.new('UICorner', dot).CornerRadius = UDim.new(1, 0)
- local petL = Instance.new('TextLabel', petRow)
- petL.Size = UDim2.new(1, -20, 1, 0)
- petL.Position = UDim2.new(0, 20, 0, 0)
- petL.BackgroundTransparency = 1
- petL.Text = "Cargando base de datos..."
- petL.TextColor3 = C.TEXT
- petL.TextXAlignment = Enum.TextXAlignment.Left
- petL.Font = Enum.Font.GothamMedium
- petL.TextSize = 13
- petL.RichText = true
- local valRow = Instance.new('Frame', container)
- valRow.Size = UDim2.new(1, 0, 0, 24)
- valRow.BackgroundTransparency = 1
- local valL = Instance.new('TextLabel', valRow)
- valL.Size = UDim2.new(1, 0, 1, 0)
- valL.BackgroundTransparency = 1
- valL.Text = ""
- valL.TextColor3 = C.MUTED
- valL.TextXAlignment = Enum.TextXAlignment.Left
- valL.Font = Enum.Font.Gotham
- valL.TextSize = 13
- valL.RichText = true
- -- Detección de pociones pasadas por encima
- local function getHoveredPotionsFallback()
- local mouse = UIS:GetMouseLocation()
- local mx, my = mouse.X, mouse.Y
- local isFly, isRide, foundSlot = false, false, false
- for _, appName in ipairs({"TradeApp", "InventoryApp"}) do
- local app = PlayerGui:FindFirstChild(appName)
- if app then
- for _, child in ipairs(app:GetDescendants()) do
- if child:IsA("ImageLabel") and (child.Name:lower() == "flyable" or child.Name:lower() == "rideable") then
- local slot = child.Parent
- local isHovered, depth = false, 0
- while slot and slot:IsA("GuiObject") and depth < 8 do
- local px, py = slot.AbsolutePosition.X, slot.AbsolutePosition.Y
- local pw, ph = slot.AbsoluteSize.X, slot.AbsoluteSize.Y
- if pw < 180 and ph < 180 then
- if (mx >= px and mx <= px + pw and my >= py and my <= py + ph) or
- (mx >= px and mx <= px + pw and (my - 36) >= py and (my - 36) <= py + ph) then
- isHovered = true
- break
- end
- end
- slot = slot.Parent
- depth = depth + 1
- end
- if isHovered then
- foundSlot = true
- if child.Visible and child.ImageTransparency < 0.9 and child.Image ~= "" then
- if child.Name:lower() == "flyable" then isFly = true end
- if child.Name:lower() == "rideable" then isRide = true end
- end
- end
- end
- end
- end
- if foundSlot then break end
- end
- return isFly, isRide, not foundSlot
- end
- -- Bucle de lectura de Pet inspeccionada
- RunService.RenderStepped:Connect(function()
- if not dbReady or not frame.Visible then return end
- local tooltip = nil
- for _, appName in ipairs({'TradeApp', 'InventoryApp'}) do
- local app = PlayerGui:FindFirstChild(appName)
- if app then
- for _, c in ipairs(app:GetChildren()) do
- if c.Name == 'Tooltip' and c.Visible and c.AbsolutePosition.X > -4000 then
- tooltip = c
- break
- end
- end
- end
- if tooltip then break end
- end
- if tooltip then
- local variant, bestMatch, rawText = "r", "", ""
- local headerLbl = tooltip:FindFirstChild('Header', true)
- if headerLbl then rawText = headerLbl.Text end
- for _, lbl in ipairs(tooltip:GetDescendants()) do
- if lbl:IsA("TextLabel") and lbl.Visible then
- local t = lbl.Text:lower()
- if t:find("mega neon") or t:find("mfr") then variant = "m"
- elseif (t:find("neon") or t:find("nfr")) and variant ~= "m" then variant = "n" end
- local data, v = lookupPet(lbl.Text)
- if data then
- bestMatch = data.name
- if v == "m" then variant = "m" elseif v == "n" and variant ~= "m" then variant = "n" end
- end
- end
- end
- if bestMatch == "" and rawText ~= "" then
- local data, v = lookupPet(rawText)
- if data then
- bestMatch = data.name
- if v == "m" then variant = "m" elseif v == "n" and variant ~= "m" then variant = "n" end
- end
- end
- if bestMatch ~= "" then
- local isFly, isRide, fallback = getHoveredPotionsFallback()
- local currentState = bestMatch .. variant .. tostring(isFly) .. tostring(isRide) .. tostring(fallback)
- if currentState ~= lastHoveredPet then
- lastHoveredPet = currentState
- petL.Text = '🐾 ' .. bestMatch
- local data = petDB[bestMatch:lower()]
- if not data then return end
- local p = data[variant] or data.r
- local pre = variant == "n" and "Neon " or (variant == "m" and "Mega " or "")
- local preShort = variant == "n" and "N" or (variant == "m" and "M" or "")
- if p.np == p.fr and p.np > 0 then
- valL.Text = string.format('<font color="#3CDD64">💎 Değer: %s</font>', tostring(p.np))
- elseif not fallback then
- local val = p.np
- local lbl = pre
- if isFly and isRide then val = p.fr; lbl = lbl.."Fly Ride"
- elseif isFly then val = p.f; lbl = lbl.."Fly"
- elseif isRide then val = p.r; lbl = lbl.."Ride"
- else lbl = lbl:gsub("%s*$", "") end
- valL.Text = string.format('<font color="#C084FC">💎 %s Değeri: %s</font>', lbl == "" and "Normal" or lbl, tostring(val))
- else
- valL.Text = string.format(
- '<font color="#888">%sNP:%s</font> | <font color="#3CDD64">%sR:%s</font> | <font color="#4DA6FF">%sF:%s</font> | <font color="#C084FC">%sFR:%s</font>',
- preShort, tostring(p.np), preShort, tostring(p.r), preShort, tostring(p.f), preShort, tostring(p.fr)
- )
- end
- dot.BackgroundColor3 = C.GREEN
- end
- else
- if lastHoveredPet ~= "NOTFOUND" then
- lastHoveredPet = "NOTFOUND"
- valL.Text = '<font color="#888">Bulunamadı</font>'
- dot.BackgroundColor3 = C.RED
- end
- end
- else
- lastHoveredPet = ""
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment