Advertisement
2AreYouMental110

Stat Spyer

Mar 16th, 2023 (edited)
655
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.72 KB | None | 0 0
  1. --[[
  2. this script works if a player has stats in their folder, ex: game.Players.LocalPlayer.Data
  3.  
  4. useful for seeing which stats a player has, like in blox fruits if you wanna see a player's full bounty or see their level if you dont have good observation haki
  5.  
  6. click on the stat description to see what value type it is
  7. click on the stat to copy the path
  8.  
  9. this script doesnt support folders, so you may see alot of stats not in the right tab
  10. ]]
  11.  
  12. local tabs = {}
  13. local sections = {}
  14. local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/xHeptc/Kavo-UI-Library/main/source.lua"))()
  15. local Window = Library.CreateLib("Stat Spyer", "Sentinel")
  16. local mainwin = Window:NewTab("Main")
  17. local mainwinsec = mainwin:NewSection("Main")
  18. local otwwin = Window:NewTab("Other Stats")
  19. local otwwinsec = otwwin:NewSection("Other Stats (stats in player only)")
  20. local selectedplr
  21. local plrlist = {}
  22. local selplrlabel = mainwinsec:NewLabel("Selected Player: ")
  23. local gui
  24.  
  25. for i,v in pairs(game.CoreGui:GetChildren()) do
  26.     if string.find(v.Name,"1") or string.find(v.Name,"2") or string.find(v.Name,"3") or string.find(v.Name,"4") or string.find(v.Name,"5") or string.find(v.Name,"6") or string.find(v.Name,"7") or string.find(v.Name,"8") or string.find(v.Name,"9") and v:FindFirstChild("Main") and v.Main:FindFirstChild("MainHeader") and v.Main.MainHeader:FindFirstChild("title").Text == "Stat Spyer" then
  27.         gui = v
  28.     end
  29. end
  30.  
  31. function newtab(name,folder)
  32.     if tabs[name] then
  33.         local num = 0
  34.         repeat
  35.             wait()
  36.             tabs[name] = Window:NewTab(name)
  37.             sections[name] = tabs[name]:NewSection(name)
  38.             num += 1
  39.         until not tabs[name..tostring(num)]
  40.     else
  41.         tabs[name] = Window:NewTab(name)
  42.         sections[name] = tabs[name]:NewSection(name)
  43.     end
  44.     if tabs[name] and sections[name] and folder then
  45.         local madesection
  46.         for i,v in pairs(gui.Main.pages.Pages:GetChildren()) do
  47.             if #v:GetChildren() <= 2 then
  48.                 if v.sectionFrame.sectionHead.sectionName.Text == name then
  49.                     madesection = v.sectionFrame.sectionInners
  50.                 end
  51.             end
  52.         end
  53.         for i,v in pairs(folder:GetDescendants()) do
  54.             if string.find(v.ClassName,"Value") then
  55.                 local button = sections[name]:NewButton(v.Name.." "..tostring(v.Value), v.ClassName, function()
  56.                     setclipboard(v:GetFullName())
  57.                 end)
  58.                 local s = v.Changed:Connect(function()
  59.                     button:UpdateButton(v.Name.." "..tostring(v.Value))
  60.                 end)
  61.                 madesection:FindFirstChild(v.Name.." "..tostring(v.Value)).AncestryChanged:Connect(function()
  62.                     if v.Parent == nil then
  63.                         button = nil
  64.                         s:Disconnect()
  65.                     end
  66.                 end)
  67.             end
  68.         end
  69.     end
  70. end
  71.  
  72. local dropdown = mainwinsec:NewDropdown("Players", "players", {"Option 1", "Option 2", "Option 3"}, function(currentOption)
  73.     selectedplr = currentOption
  74.     selplrlabel:UpdateLabel("Selected Player: "..selectedplr)
  75. end)
  76.  
  77. mainwinsec:NewButton("Get Player Stats", "get player stat", function()
  78.     if gui:FindFirstChild("Main") and gui.Main:FindFirstChild("MainSide") and gui.Main.MainSide:FindFirstChild("tabFrames") and #gui.Main.MainSide.tabFrames:GetChildren() >= 2 then
  79.         for i,v in pairs(gui.Main.MainSide.tabFrames:GetChildren()) do
  80.             if v.Name ~= "MainTabButton" and v.Name ~= "Other StatsTabButton" and v.Name ~= "tabListing" then
  81.                 v:Destroy()
  82.             end
  83.         end
  84.     end
  85.     local madesection
  86.     for i,v in pairs(gui.Main.pages.Pages:GetChildren()) do
  87.         if #v:GetChildren() <= 2 then
  88.             if v.sectionFrame.sectionHead.sectionName.Text == "Other Stats (stats in player only)" then
  89.                 madesection = v.sectionFrame.sectionInners
  90.             end
  91.         end
  92.     end
  93.     for i,v in pairs(madesection:GetChildren()) do
  94.         if v.Name ~= "sectionElListing" then
  95.             v:Destroy()
  96.         end
  97.     end
  98.     for i,v in pairs(game.Players[selectedplr]:GetChildren()) do
  99.         if v.Name ~= "Backpack" and v.Name ~= "StarterGear" and v.Name ~= "PlayerGui" and v.Name ~= "PlayerScripts" then
  100.             if string.find(v.ClassName,"Value") and v.Name ~= "leaderstats" then
  101.                 local button = otwwinsec:NewButton(v.Name.." "..tostring(v.Value), v.ClassName, function()
  102.                     setclipboard(v:GetFullName())
  103.                 end)
  104.                 local s = v.Changed:Connect(function()
  105.                     button:UpdateButton(v.Name.." "..tostring(v.Value))
  106.                 end)
  107.                 madesection:FindFirstChild(v.Name.." "..tostring(v.Value)).AncestryChanged:Connect(function()
  108.                     if v.Parent == nil then
  109.                         button = nil
  110.                         s:Disconnect()
  111.                     end
  112.                 end)
  113.                 v.AncestryChanged:Connect(function()
  114.                     if v.Parent == nil then
  115.                         button = nil
  116.                         s:Disconnect()
  117.                     end
  118.                 end)
  119.             elseif #v:GetChildren() >= 1 or v.Name == "leaderstats" then
  120.                 newtab(v.Name,v)
  121.             end
  122.         end
  123.     end
  124. end)
  125.  
  126. for i,v in pairs(game.Players:GetPlayers()) do
  127.     local plr = v
  128.     plrlist[plr.Name] = plr.Name
  129.     dropdown:Refresh(plrlist)
  130. end
  131.  
  132. game.Players.PlayerAdded:Connect(function(plr)
  133.     plrlist[plr.Name] = plr.Name
  134.     dropdown:Refresh(plrlist)
  135. end)
  136.  
  137. game.Players.PlayerRemoving:Connect(function(plr)
  138.     plrlist[plr.Name] = nil
  139.     dropdown:Refresh(plrlist)
  140. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement