Tahatahaqeq

Untitled

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