Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. local rs = game:GetService("RunService").RenderStepped
  2. local getups = debug.getupvalues
  3. local maps
  4. local rc
  5. local possiblefuncs = {}
  6. local func
  7. local listitems
  8.  
  9. _G.copy = ""
  10. local stylenames = {
  11. [1] = "Autohop",
  12. [2] = "Scroll",
  13. [3] = "Sideways",
  14. [4] = "Half-Sideways",
  15. [5] = "W-Only",
  16. [6] = "A-Only",
  17. [7] = "Backwards"
  18. }
  19.  
  20. for i,v in next, getgc() do
  21. if type(v)=='function' then
  22. local ups = getups(v)
  23. if ups.Maps and type(ups.Maps)=='table' then
  24. maps = ups.Maps
  25. elseif ups.RemoteCall and type(ups.RemoteCall)=='function' then
  26. rc = ups.RemoteCall
  27. elseif ups.ListItems and type(ups.ListItems)=='table' then
  28. table.insert(possiblefuncs,v)
  29. end
  30. end
  31. end
  32.  
  33. local function getrecords(styleid,assetid)
  34. rc("GetHighscores",assetid,1,styleid)
  35. while getups(func).ListItems == listitems do rs:Wait() end
  36. listitems = getups(func).ListItems
  37. if listitems[1] then
  38. _G.copy = _G.copy.."\n\t"..stylenames[styleid].." - Player: "..listitems[1].Children[3].Text.."; Time: "..listitems[1].Children[4].Text.."; Date: "..listitems[1].Children[5].Text
  39. else
  40. _G.copy = _G.copy.."\n\t"..stylenames[styleid].." - Player: N/A; Time: N/A; Date: N/A;"
  41. end
  42. end
  43.  
  44. local function startup(assetid)
  45. rc("GetHighscores",assetid,1,1)
  46. while not func do
  47. for i,v in next, possiblefuncs do
  48. if #getups(v).ListItems~=0 then
  49. func = v
  50. break
  51. end
  52. end
  53. rs:Wait()
  54. end
  55. listitems = getups(func).ListItems
  56. local localtime = os.date("*t")
  57. _G.copy = "As of "..localtime.month.."/"..localtime.day.."/"..localtime.year.."\n"
  58. end
  59.  
  60. local start = 1
  61. for i,v in next, {select(start, unpack(maps))} do
  62. if i==1 then
  63. startup(v.AssetId)
  64. end
  65. print('Map Number: '..i.." - Map Name: "..v.DisplayName)
  66. _G.copy = _G.copy.."\n"..v.DisplayName
  67. for i=1,7 do
  68. getrecords(i,v.AssetId)
  69. end
  70. end
  71. warn'Done!'
  72. syn.write_clipboard(_G.copy)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement