Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 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 Convert(time)
  34. local seconds = 0
  35. local period = time:match("%.")
  36. local times = 0
  37. for w in time:gmatch("-*%d+") do
  38. times = times + 1
  39. if period then
  40. if times == 1 then
  41. seconds = seconds + tonumber(w)*60
  42. elseif times == 2 then
  43. seconds = seconds + tonumber(w)
  44. else
  45. seconds = seconds + tonumber(w)*(1/1000)
  46. end
  47. else
  48. if times == 1 then
  49. seconds = seconds + tonumber(w)*3600
  50. elseif times == 2 then
  51. seconds = seconds + tonumber(w)*60
  52. else
  53. seconds = seconds+tonumber(w)
  54. end
  55. end
  56. end
  57. return seconds
  58. end
  59.  
  60. local function getrecords(styleid,assetid)
  61. rc("GetHighscores",assetid,1,styleid)
  62. while getups(func).ListItems == listitems do rs:Wait() end
  63. listitems = getups(func).ListItems
  64. for i,v in next, listitems do
  65. if Convert(listitems[1].Children[4].Text) < 3 then
  66. print(listitems[1].Children[3].Text)
  67. end
  68. end
  69. end
  70.  
  71. local function startup(assetid)
  72. rc("GetHighscores",assetid,1,1)
  73. while not func do
  74. for i,v in next, possiblefuncs do
  75. if #getups(v).ListItems~=0 then
  76. func = v
  77. break
  78. end
  79. end
  80. rs:Wait()
  81. end
  82. listitems = getups(func).ListItems
  83. local localtime = os.date("*t")
  84. _G.copy = "As of "..localtime.month.."/"..localtime.day.."/"..localtime.year.."\n"
  85. end
  86.  
  87. local start = 1
  88. for i,v in next, {select(start, unpack(maps))} do
  89. if i==1 then
  90. startup(v.AssetId)
  91. end
  92. print('Map Number: '..i.." - Map Name: "..v.DisplayName)
  93. _G.copy = _G.copy.."\n"..v.DisplayName
  94. for i=1,7 do
  95. getrecords(i,v.AssetId)
  96. end
  97. end
  98. warn'Done!'
  99. syn.write_clipboard(_G.copy)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement