Tahatahaqeq

Untitled

Jul 25th, 2026
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.57 KB | None | 0 0
  1. local Players, UIS, RunService = game:GetService('Players'), game:GetService('UserInputService'), game:GetService('RunService')
  2. local LocalPlayer = Players.LocalPlayer
  3. local PlayerGui = LocalPlayer:WaitForChild('PlayerGui')
  4. local Camera = workspace.CurrentCamera
  5.  
  6. local C = {
  7. PANEL = Color3.fromRGB(15, 15, 20),
  8. ACCENT = Color3.fromRGB(200, 80, 255),
  9. TEXT = Color3.fromRGB(240, 240, 255),
  10. GREEN = Color3.fromRGB(50, 230, 90),
  11. YELLOW = Color3.fromRGB(255, 210, 40),
  12. RED = Color3.fromRGB(255, 60, 60),
  13. MUTED = Color3.fromRGB(120, 120, 140),
  14. WHITE = Color3.new(1, 1, 1),
  15. }
  16.  
  17. local petDB, dbReady, lastHoveredPet = {}, false, ""
  18.  
  19. local function unescape(s)
  20. return (s:gsub('\\"','"'):gsub('\\/','/'):gsub('\\n','\n'):gsub('\\\\','\\'))
  21. end
  22.  
  23. local function getBestValue(obj, prefix)
  24. local np = tonumber(obj:match('"'..prefix..'value %- nopotion"%s*:%s*(%-?[%d%.]+)')) or tonumber(obj:match('"'..prefix..'value"%s*:%s*(%-?[%d%.]+)')) or 0
  25. local r = tonumber(obj:match('"'..prefix..'value %- ride"%s*:%s*(%-?[%d%.]+)')) or 0
  26. local f = tonumber(obj:match('"'..prefix..'value %- fly"%s*:%s*(%-?[%d%.]+)')) or 0
  27. local fr = tonumber(obj:match('"'..prefix..'value %- fly\\u0026ride"%s*:%s*(%-?[%d%.]+)')) or tonumber(obj:match('"'..prefix..'value"%s*:%s*(%-?[%d%.]+)')) or 0
  28. return { np = np, r = r, f = f, fr = fr }
  29. end
  30.  
  31. local function smartFill(p)
  32. if not p then return end
  33. if p.np == 0 and p.fr > 0 then p.np = p.fr end
  34. if p.fr == 0 and p.np > 0 then p.fr = p.np end
  35. if p.np > 0 and p.fr > 0 then
  36. if p.r == 0 then p.r = math.floor((p.np + (p.fr - p.np) * 0.45) * 100) / 100 end
  37. if p.f == 0 then p.f = math.floor((p.np + (p.fr - p.np) * 0.55) * 100) / 100 end
  38. end
  39. end
  40.  
  41. -- Cargar base de datos
  42. local reqFn = (syn and syn.request) or (http and http.request) or request
  43. if reqFn then
  44. task.spawn(function()
  45. local res = reqFn({Url = "https://elvebredd.com/adopt-me-calculator", Method = "GET"})
  46. if res and res.Body then
  47. for obj in unescape(res.Body):gmatch("{(.-)}") do
  48. local petName, status = obj:match('"[nN]ame"%s*:%s*"(.-)"'), obj:match('"[sS]tatus"%s*:%s*"(.-)"')
  49. if petName and status == "Ready" then
  50. petName = petName:lower()
  51. petDB[petName] = {
  52. name = petName,
  53. r = getBestValue(obj, "r"),
  54. n = getBestValue(obj, "n"),
  55. m = getBestValue(obj, "m")
  56. }
  57. smartFill(petDB[petName].r); smartFill(petDB[petName].n); smartFill(petDB[petName].m)
  58. end
  59. end
  60. dbReady = true
  61. end
  62. end)
  63. end
  64.  
  65. local function parsePetVariant(rawName)
  66. local name, variant = rawName:lower(), "r"
  67. 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
  68. variant = "m"
  69. name = name:gsub("mega neon%s*", ""):gsub("mfr%s*", ""):gsub("mr%s*", ""):gsub("mf%s*", "")
  70. 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
  71. variant = "n"
  72. name = name:gsub("neon%s*", ""):gsub("nfr%s*", ""):gsub("nr%s*", ""):gsub("nf%s*", "")
  73. end
  74. return name:gsub("^%s+", ""):gsub("%s+$", ""), variant
  75. end
  76.  
  77. local function lookupPet(raw)
  78. local cName, cVar = parsePetVariant(raw)
  79. if petDB[cName] then return petDB[cName], cVar end
  80. local best, bestLen = nil, 0
  81. for k, v in pairs(petDB) do
  82. if cName:find(k) and #k > bestLen then bestLen = #k; best = v end
  83. end
  84. return best, cVar
  85. end
  86.  
  87. -- Limpieza de GUI anterior
  88. pcall(function()
  89. local containers = {game.CoreGui, PlayerGui}
  90. if gethui then table.insert(containers, gethui()) end
  91. for _, c in ipairs(containers) do
  92. for _, v in ipairs(c:GetChildren()) do
  93. if v:IsA("ScreenGui") and v.Name:find("TradeChecker") then v:Destroy() end
  94. end
  95. end
  96. end)
  97.  
  98. -- Interface Grafica
  99. local screen = Instance.new('ScreenGui', game.CoreGui)
  100. screen.Name = 'ENI_TradeChecker'
  101. screen.ResetOnSpawn = false
  102.  
  103. local frame = Instance.new('Frame', screen)
  104. frame.Size = UDim2.new(0, 310, 0, 140)
  105. frame.Position = UDim2.new(1, -330, 0.5, -70)
  106. frame.BackgroundColor3 = C.PANEL
  107. frame.BorderSizePixel = 0
  108.  
  109. Instance.new('UICorner', frame).CornerRadius = UDim.new(0, 8)
  110. local uiStroke = Instance.new('UIStroke', frame)
  111. uiStroke.Color, uiStroke.Thickness = C.ACCENT, 2
  112.  
  113. local title = Instance.new('TextLabel', frame)
  114. title.Size = UDim2.new(1, -30, 0, 28)
  115. title.BackgroundTransparency = 1
  116. title.Text = "✨ ENI | Live Trade & Inspector"
  117. title.TextColor3, title.Font, title.TextSize = C.WHITE, Enum.Font.GothamBold, 13
  118.  
  119. local closeBtn = Instance.new('TextButton', frame)
  120. closeBtn.Size, closeBtn.Position, closeBtn.BackgroundTransparency = UDim2.new(0, 30, 0, 28), UDim2.new(1, -30, 0, 0), 1
  121. closeBtn.Text, closeBtn.TextColor3, closeBtn.Font, closeBtn.TextSize = "✕", C.WHITE, Enum.Font.GothamBold, 14
  122.  
  123. local openBtn = Instance.new('TextButton', screen)
  124. openBtn.Size, openBtn.Position = UDim2.new(0, 48, 0, 48), UDim2.new(1, -65, 0.5, -24)
  125. openBtn.BackgroundColor3, openBtn.Text, openBtn.TextSize, openBtn.Visible = C.PANEL, "✨", 22, false
  126. Instance.new('UICorner', openBtn).CornerRadius = UDim.new(1, 0)
  127. local openStroke = Instance.new('UIStroke', openBtn)
  128. openStroke.Color, openStroke.Thickness = C.ACCENT, 2
  129.  
  130. -- Arrastrar GUI
  131. local function makeDraggable(guiObj, handle)
  132. handle = handle or guiObj
  133. local dragging, dragStart, startPos
  134. handle.InputBegan:Connect(function(input)
  135. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  136. dragging = true; dragStart = input.Position; startPos = guiObj.Position
  137. end
  138. end)
  139. UIS.InputChanged:Connect(function(input)
  140. if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  141. local delta = input.Position - dragStart
  142. guiObj.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  143. end
  144. end)
  145. UIS.InputEnded:Connect(function(input)
  146. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end
  147. end)
  148. end
  149. makeDraggable(frame, title); makeDraggable(openBtn, openBtn)
  150.  
  151. closeBtn.MouseButton1Click:Connect(function() frame.Visible = false; openBtn.Visible = true end)
  152. openBtn.MouseButton1Click:Connect(function() frame.Visible = true; openBtn.Visible = false end)
  153.  
  154. -- Componentes de Texto
  155. local container = Instance.new('Frame', frame)
  156. container.Size, container.Position, container.BackgroundTransparency = UDim2.new(1, -20, 0, 100), UDim2.new(0, 10, 0, 32), 1
  157. local uiList = Instance.new('UIListLayout', container)
  158. uiList.SortOrder, uiList.Padding = Enum.SortOrder.LayoutOrder, UDim.new(0, 4)
  159.  
  160. local function createLabel(fontSize, color, font)
  161. local l = Instance.new('TextLabel', container)
  162. l.Size, l.BackgroundTransparency = UDim2.new(1, 0, 0, 20), 1
  163. l.TextColor3, l.Font, l.TextSize, l.RichText, l.TextXAlignment = color, font or Enum.Font.Gotham, fontSize, true, Enum.TextXAlignment.Left
  164. return l
  165. end
  166.  
  167. local petL = createLabel(12, C.TEXT, Enum.Font.GothamMedium)
  168. petL.Text = "Cargando base de datos..."
  169. local valL = createLabel(12, C.MUTED)
  170. local tradeL = createLabel(12, C.TEXT, Enum.Font.GothamMedium)
  171. tradeL.Text = "Takas: <font color=\"#888\">Fuera de intercambio</font>"
  172. local winL = createLabel(13, C.WHITE, Enum.Font.GothamBold)
  173.  
  174. -- Inspector de Pociones en Hover
  175. local function getHoveredPotionsFallback()
  176. local mouse = UIS:GetMouseLocation()
  177. local mx, my, isFly, isRide, foundSlot = mouse.X, mouse.Y, false, false, false
  178. for _, appName in ipairs({"TradeApp", "InventoryApp"}) do
  179. local app = PlayerGui:FindFirstChild(appName)
  180. if app then
  181. for _, child in ipairs(app:GetDescendants()) do
  182. if child:IsA("ImageLabel") and (child.Name:lower() == "flyable" or child.Name:lower() == "rideable") then
  183. local slot, isHovered, depth = child.Parent, false, 0
  184. while slot and slot:IsA("GuiObject") and depth < 8 do
  185. local px, py, pw, ph = slot.AbsolutePosition.X, slot.AbsolutePosition.Y, slot.AbsoluteSize.X, slot.AbsoluteSize.Y
  186. if pw < 180 and ph < 180 and ((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
  187. isHovered = true; break
  188. end
  189. slot, depth = slot.Parent, depth + 1
  190. end
  191. if isHovered then
  192. foundSlot = true
  193. if child.Visible and child.ImageTransparency < 0.9 and child.Image ~= "" then
  194. if child.Name:lower() == "flyable" then isFly = true end
  195. if child.Name:lower() == "rideable" then isRide = true end
  196. end
  197. end
  198. end
  199. end
  200. end
  201. if foundSlot then break end
  202. end
  203. return isFly, isRide, not foundSlot
  204. end
  205.  
  206. -- Inspector en tiempo real
  207. RunService.RenderStepped:Connect(function()
  208. if not dbReady or not frame.Visible then return end
  209.  
  210. local tooltip = nil
  211. for _, appName in ipairs({'TradeApp', 'InventoryApp'}) do
  212. local app = PlayerGui:FindFirstChild(appName)
  213. if app then
  214. for _, c in ipairs(app:GetChildren()) do
  215. if c.Name == 'Tooltip' and c.Visible and c.AbsolutePosition.X > -4000 then tooltip = c; break end
  216. end
  217. end
  218. if tooltip then break end
  219. end
  220.  
  221. if tooltip then
  222. local variant, bestMatch, rawText = "r", "", ""
  223. local headerLbl = tooltip:FindFirstChild('Header', true)
  224. if headerLbl then rawText = headerLbl.Text end
  225.  
  226. for _, lbl in ipairs(tooltip:GetDescendants()) do
  227. if lbl:IsA("TextLabel") and lbl.Visible then
  228. local t = lbl.Text:lower()
  229. if t:find("mega neon") or t:find("mfr") then variant = "m"
  230. elseif (t:find("neon") or t:find("nfr")) and variant ~= "m" then variant = "n" end
  231. local data, v = lookupPet(lbl.Text)
  232. if data then
  233. bestMatch = data.name
  234. if v == "m" then variant = "m" elseif v == "n" and variant ~= "m" then variant = "n" end
  235. end
  236. end
  237. end
  238.  
  239. if bestMatch == "" and rawText ~= "" then
  240. local data, v = lookupPet(rawText)
  241. if data then bestMatch = data.name; if v == "m" then variant = "m" elseif v == "n" and variant ~= "m" then variant = "n" end end
  242. end
  243.  
  244. if bestMatch ~= "" then
  245. local isFly, isRide, fallback = getHoveredPotionsFallback()
  246. local currentState = bestMatch .. variant .. tostring(isFly) .. tostring(isRide) .. tostring(fallback)
  247. if currentState ~= lastHoveredPet then
  248. lastHoveredPet = currentState
  249. petL.Text = '🐾 ' .. bestMatch:upper()
  250.  
  251. local data = petDB[bestMatch:lower()]
  252. if not data then return end
  253. local p = data[variant] or data.r
  254. local pre = variant == "n" and "Neon " or (variant == "m" and "Mega " or "")
  255.  
  256. if p.np == p.fr and p.np > 0 then
  257. valL.Text = string.format('<font color="#3CDD64">💎 Valor: %s</font>', tostring(p.np))
  258. elseif not fallback then
  259. local val, lbl = p.np, pre
  260. if isFly and isRide then val = p.fr; lbl = lbl.."Fly Ride"
  261. elseif isFly then val = p.f; lbl = lbl.."Fly"
  262. elseif isRide then val = p.r; lbl = lbl.."Ride"
  263. else lbl = lbl:gsub("%s*$", "") end
  264. valL.Text = string.format('<font color="#C084FC">💎 %s: %s</font>', lbl == "" and "Normal" or lbl, tostring(val))
  265. else
  266. valL.Text = string.format('<font color="#888">NP:%s</font> | <font color="#3CDD64">R:%s</font> | <font color="#4DA6FF">F:%s</font> | <font color="#C084FC">FR:%s</font>',
  267. tostring(p.np), tostring(p.r), tostring(p.f), tostring(p.fr))
  268. end
  269. end
  270. end
  271. else
  272. lastHoveredPet = ""
  273. end
  274. end)
  275.  
  276. -- Calculador del TRADE en Vivo (Win / Lose / Fair)
  277. task.spawn(function()
  278. while task.wait(0.4) do
  279. if dbReady and frame.Visible then
  280. local TradeApp = PlayerGui:FindFirstChild('TradeApp')
  281. if not TradeApp or not TradeApp.Visible then
  282. tradeL.Text = 'Takas: <font color="#888">No estás en Trade</font>'
  283. winL.Text = ""
  284. else
  285. local myTotal, theirTotal, midX = 0, 0, Camera.ViewportSize.X / 2
  286. local scanned, anyFound = {}, false
  287.  
  288. for _, v in ipairs(TradeApp:GetDescendants()) do
  289. if v:IsA("TextLabel") and v.Text ~= "" and v.Parent.Name ~= "Tooltip" and v.Name ~= "Header" and v.Visible and v.TextTransparency < 1 and not scanned[v] then
  290. scanned[v] = true
  291. local data, variant = lookupPet(v.Text)
  292. if data then
  293. anyFound = true
  294. for _, desc in ipairs(v.Parent:GetDescendants()) do
  295. if desc:IsA("UIGradient") then
  296. variant = #desc.Color.Keypoints > 3 and "m" or "n"
  297. break
  298. end
  299. end
  300. local p = data[variant] or data.r
  301. local isFly, isRide, slot = false, false, v
  302. while slot and slot:IsA("GuiObject") and slot.AbsoluteSize.X < 180 do slot = slot.Parent end
  303. if slot then
  304. for _, child in ipairs(slot:GetDescendants()) do
  305. if child:IsA("ImageLabel") and child.Visible and child.ImageTransparency < 0.9 and child.Image ~= "" then
  306. if child.Name:lower() == "flyable" then isFly = true end
  307. if child.Name:lower() == "rideable" then isRide = true end
  308. end
  309. end
  310. end
  311.  
  312. local val = (isFly and isRide and p.fr) or (isFly and p.f) or (isRide and p.r) or p.np
  313. if val then
  314. if v.AbsolutePosition.X < midX then
  315. myTotal = myTotal + val
  316. else
  317. theirTotal = theirTotal + val
  318. end
  319. end
  320. end
  321. end
  322. end
  323.  
  324. if not anyFound then
  325. tradeL.Text = 'Trade: <font color="#FFD700">Esperando mascotas...</font>'
  326. winL.Text = ""
  327. else
  328. myTotal = math.floor(myTotal * 100) / 100
  329. theirTotal = math.floor(theirTotal * 100) / 100
  330. tradeL.Text = string.format('Tú: <font color="#3CDD64">%s</font> | Rival: <font color="#FFD700">%s</font>', tostring(myTotal), tostring(theirTotal))
  331.  
  332. local diff = math.floor((theirTotal - myTotal) * 100) / 100
  333. if diff > 0.1 then
  334. winL.Text = string.format('Resultado: <font color="#3CDD64">WIN (+%s)</font>', tostring(diff))
  335. elseif diff < -0.1 then
  336. winL.Text = string.format('Resultado: <font color="#FF5050">LOSE (%s)</font>', tostring(diff))
  337. else
  338. winL.Text = 'Resultado: <font color="#FFD700">FAIR (Justo)</font>'
  339. end
  340. end
  341. end
  342. end
  343. end
  344. end)
  345.  
Advertisement
Add Comment
Please, Sign In to add comment