Advertisement
scriptingtales

Roblox Player List and Server Info

Apr 10th, 2024 (edited)
788
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.28 KB | None | 0 0
  1. Part0 = Instance.new("Part")
  2. SurfaceGui1 = Instance.new("SurfaceGui")
  3. TextLabel2 = Instance.new("TextLabel")
  4. ScrollingFrame3 = Instance.new("ScrollingFrame")
  5. UIListLayout4 = Instance.new("UIListLayout")
  6. TextLabel5 = Instance.new("TextLabel")
  7. ImageLabel6 = Instance.new("ImageLabel")
  8. TextLabel7 = Instance.new("TextLabel")
  9. TextLabel8 = Instance.new("TextLabel")
  10. TextLabel9 = Instance.new("TextLabel")
  11. Frame10 = Instance.new("Frame")
  12. TextLabel11 = Instance.new("TextLabel")
  13. CreditsLabel = Instance.new("TextLabel")
  14.  
  15.  
  16. Part0.Name = "LocInfo"
  17. Part0.Parent = script
  18. Part0.CFrame = CFrame.new(-9.5, 13, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  19. Part0.Position = Vector3.new(0, 13, 25)
  20. Part0.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  21. Part0.Size = Vector3.new(35, 26, 0.10000000149011612)
  22. Part0.Anchored = true
  23. Part0.BottomSurface = Enum.SurfaceType.Smooth
  24. Part0.BrickColor = BrickColor.new("Really black")
  25. Part0.TopSurface = Enum.SurfaceType.Smooth
  26. Part0.brickColor = BrickColor.new("Really black")
  27. SurfaceGui1.Name = "Info"
  28. SurfaceGui1.Parent = Part0
  29. SurfaceGui1.ClipsDescendants = true
  30. SurfaceGui1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  31. SurfaceGui1.MaxDistance = 1000
  32. TextLabel2.Name = "Players"
  33. TextLabel2.Parent = SurfaceGui1
  34. TextLabel2.Position = UDim2.new(0, 25, 0, 20)
  35. TextLabel2.Size = UDim2.new(0, 672, 0, 83)
  36. TextLabel2.BackgroundColor = BrickColor.new("Institutional white")
  37. TextLabel2.BackgroundColor3 = Color3.new(1, 1, 1)
  38. TextLabel2.BackgroundTransparency = 1
  39. TextLabel2.BorderColor = BrickColor.new("Really black")
  40. TextLabel2.BorderColor3 = Color3.new(0, 0, 0)
  41. TextLabel2.BorderSizePixel = 0
  42. TextLabel2.Font = Enum.Font.GothamBold
  43. TextLabel2.FontSize = Enum.FontSize.Size14
  44. TextLabel2.Text = "Players"
  45. TextLabel2.TextColor = BrickColor.new("Institutional white")
  46. TextLabel2.TextColor3 = Color3.new(1, 1, 1)
  47. TextLabel2.TextScaled = true
  48. TextLabel2.TextSize = 14
  49. TextLabel2.TextWrap = true
  50. TextLabel2.TextWrapped = true
  51. ScrollingFrame3.Name = "MainFrame"
  52. ScrollingFrame3.Parent = SurfaceGui1
  53. ScrollingFrame3.Position = UDim2.new(0, 0, 0, 125)
  54. ScrollingFrame3.Size = UDim2.new(0, 725, 0, 1300)
  55. ScrollingFrame3.Active = true
  56. ScrollingFrame3.BackgroundColor = BrickColor.new("Earth green")
  57. ScrollingFrame3.BackgroundColor3 = Color3.new(0.215686, 0.215686, 0.215686)
  58. ScrollingFrame3.BorderColor = BrickColor.new("Really black")
  59. ScrollingFrame3.BorderColor3 = Color3.new(0, 0, 0)
  60. ScrollingFrame3.BorderSizePixel = 0
  61. UIListLayout4.Parent = ScrollingFrame3
  62. UIListLayout4.HorizontalAlignment = Enum.HorizontalAlignment.Right
  63. UIListLayout4.SortOrder = Enum.SortOrder.LayoutOrder
  64. UIListLayout4.Padding = UDim.new(0, 25)
  65. TextLabel5.Name = "MAINLB"
  66. TextLabel5.Position = UDim2.new(0.206896558, 0, 0, 0)
  67. TextLabel5.Size = UDim2.new(0, 575, 0, 150)
  68. TextLabel5.BackgroundColor = BrickColor.new("Really black")
  69. TextLabel5.BackgroundColor3 = Color3.new(0, 0, 0)
  70. TextLabel5.BackgroundTransparency = 0.5
  71. TextLabel5.BorderColor = BrickColor.new("Crimson")
  72. TextLabel5.BorderColor3 = Color3.new(0.666667, 0, 0)
  73. TextLabel5.BorderSizePixel = 0
  74. TextLabel5.Font = Enum.Font.GothamBold
  75. TextLabel5.FontSize = Enum.FontSize.Size18
  76. TextLabel5.Text = "Player1"
  77. TextLabel5.TextColor = BrickColor.new("Institutional white")
  78. TextLabel5.TextColor3 = Color3.new(1, 1, 1)
  79. TextLabel5.TextScaled = true
  80. TextLabel5.TextSize = 15
  81. TextLabel5.TextStrokeColor3 = Color3.new(1, 1, 1)
  82. TextLabel5.TextWrap = true
  83. TextLabel5.TextWrapped = true
  84. TextLabel5.TextYAlignment = Enum.TextYAlignment.Top
  85. ImageLabel6.Name = "Headshot"
  86. ImageLabel6.Parent = TextLabel5
  87. ImageLabel6.Position = UDim2.new(0, -150, 0, 0)
  88. ImageLabel6.Size = UDim2.new(0, 150, 0, 150)
  89. ImageLabel6.BackgroundColor = BrickColor.new("Institutional white")
  90. ImageLabel6.BackgroundColor3 = Color3.new(1, 1, 1)
  91. ImageLabel6.BorderColor = BrickColor.new("Really black")
  92. ImageLabel6.BorderColor3 = Color3.new(0, 0, 0)
  93. ImageLabel6.BorderSizePixel = 0
  94. ImageLabel6.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
  95. TextLabel7.Name = "Country"
  96. TextLabel7.Parent = TextLabel5
  97. TextLabel7.Position = UDim2.new(0.0142667573, 0, 0.690058112, 0)
  98. TextLabel7.Size = UDim2.new(0.546202123, 0, 0.304063827, 0)
  99. TextLabel7.BackgroundColor = BrickColor.new("Really black")
  100. TextLabel7.BackgroundColor3 = Color3.new(0, 0, 0)
  101. TextLabel7.BackgroundTransparency = 1
  102. TextLabel7.BorderColor = BrickColor.new("Crimson")
  103. TextLabel7.BorderColor3 = Color3.new(0.666667, 0, 0)
  104. TextLabel7.BorderSizePixel = 0
  105. TextLabel7.Font = Enum.Font.GothamBold
  106. TextLabel7.FontSize = Enum.FontSize.Size14
  107. TextLabel7.Text = "[KR] Krakozhia"
  108. TextLabel7.TextColor = BrickColor.new("Institutional white")
  109. TextLabel7.TextColor3 = Color3.new(1, 1, 1)
  110. TextLabel7.TextScaled = true
  111. TextLabel7.TextSize = 14
  112. TextLabel7.TextStrokeColor3 = Color3.new(1, 1, 1)
  113. TextLabel7.TextWrap = true
  114. TextLabel7.TextWrapped = true
  115. TextLabel8.Name = "Ping"
  116. TextLabel8.Parent = TextLabel5
  117. TextLabel8.Position = UDim2.new(0.560468912, 0, 0.690058172, 0)
  118. TextLabel8.Size = UDim2.new(0.426111728, 0, 0.304063857, 0)
  119. TextLabel8.BackgroundColor = BrickColor.new("Really black")
  120. TextLabel8.BackgroundColor3 = Color3.new(0, 0, 0)
  121. TextLabel8.BackgroundTransparency = 1
  122. TextLabel8.BorderColor = BrickColor.new("Crimson")
  123. TextLabel8.BorderColor3 = Color3.new(0.666667, 0, 0)
  124. TextLabel8.BorderSizePixel = 0
  125. TextLabel8.Font = Enum.Font.GothamBold
  126. TextLabel8.FontSize = Enum.FontSize.Size14
  127. TextLabel8.Text = "NaN ms"
  128. TextLabel8.TextColor = BrickColor.new("Institutional white")
  129. TextLabel8.TextColor3 = Color3.new(1, 1, 1)
  130. TextLabel8.TextScaled = true
  131. TextLabel8.TextSize = 14
  132. TextLabel8.TextStrokeColor3 = Color3.new(1, 1, 1)
  133. TextLabel8.TextWrap = true
  134. TextLabel8.TextWrapped = true
  135. TextLabel9.Name = "ServerInfo"
  136. TextLabel9.Parent = SurfaceGui1
  137. TextLabel9.Position = UDim2.new(0, 725, 0, 0)
  138. TextLabel9.Size = UDim2.new(0, 1025, 0, 125)
  139. TextLabel9.BackgroundColor = BrickColor.new("Institutional white")
  140. TextLabel9.BackgroundColor3 = Color3.new(1, 1, 1)
  141. TextLabel9.BackgroundTransparency = 1
  142. TextLabel9.BorderColor = BrickColor.new("Really black")
  143. TextLabel9.BorderColor3 = Color3.new(0, 0, 0)
  144. TextLabel9.BorderSizePixel = 0
  145. TextLabel9.Font = Enum.Font.GothamBold
  146. TextLabel9.FontSize = Enum.FontSize.Size14
  147. TextLabel9.Text = "Server Info"
  148. TextLabel9.TextColor = BrickColor.new("Institutional white")
  149. TextLabel9.TextColor3 = Color3.new(1, 1, 1)
  150. TextLabel9.TextScaled = true
  151. TextLabel9.TextSize = 14
  152. TextLabel9.TextWrap = true
  153. TextLabel9.TextWrapped = true
  154. Frame10.Name = "InfoGDisplayer"
  155. Frame10.Parent = SurfaceGui1
  156. Frame10.Position = UDim2.new(0, 725, 0, 125)
  157. Frame10.Size = UDim2.new(0, 1025, 0, 1175)
  158. Frame10.BackgroundColor = BrickColor.new("Medium brown")
  159. Frame10.BackgroundColor3 = Color3.new(0.235294, 0.235294, 0.235294)
  160. Frame10.BorderColor = BrickColor.new("Really black")
  161. Frame10.BorderColor3 = Color3.new(0, 0, 0)
  162. Frame10.BorderSizePixel = 0
  163. TextLabel11.Name = "ServerLocation"
  164. TextLabel11.Parent = Frame10
  165. TextLabel11.Position = UDim2.new(0, 0, 0, 0)
  166. TextLabel11.Size = UDim2.new(0, 1025, 0, 1175)
  167. TextLabel11.BackgroundColor = BrickColor.new("Institutional white")
  168. TextLabel11.BackgroundColor3 = Color3.new(1, 1, 1)
  169. TextLabel11.BackgroundTransparency = 1
  170. TextLabel11.BorderColor = BrickColor.new("Really black")
  171. TextLabel11.BorderColor3 = Color3.new(0, 0, 0)
  172. TextLabel11.BorderSizePixel = 0
  173. TextLabel11.Font = Enum.Font.SourceSans
  174. TextLabel11.FontSize = Enum.FontSize.Size60
  175. TextLabel11.Text = ""
  176. TextLabel11.TextColor = BrickColor.new("Institutional white")
  177. TextLabel11.TextColor3 = Color3.new(1, 1, 1)
  178. TextLabel11.TextSize = 60
  179. TextLabel11.TextWrap = true
  180. TextLabel11.TextWrapped = true
  181. TextLabel11.TextXAlignment = Enum.TextXAlignment.Left
  182. CreditsLabel.Name = "Credits"
  183. CreditsLabel.Position = UDim2.new(0, 625, 0, 1100)
  184. CreditsLabel.Parent = Frame10
  185. CreditsLabel.Size = UDim2.new(0, 400, 0, 75)
  186. CreditsLabel.BackgroundTransparency = 1
  187. CreditsLabel.Font = Enum.Font.GothamMedium
  188. CreditsLabel.Text = "Credits to Kaiji#7888"
  189. CreditsLabel.TextColor3 = Color3.fromRGB(122, 122, 122)
  190. CreditsLabel.TextScaled = true
  191. CreditsLabel.FontFace.Style = Enum.FontStyle.Italic
  192.  
  193. SurfaceGui1.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
  194.  
  195.  
  196.  
  197. local HttpDoServicio = game:GetService("HttpService")
  198.  
  199.  
  200.  
  201. local success, result = pcall(function()
  202.     return HttpDoServicio:GetAsync("http://country.io/names.json")
  203. end)
  204.  
  205. if success and result then
  206.     Countries = HttpDoServicio:JSONDecode(result)
  207. end
  208.  
  209.  
  210. local url = "http://ip-api.com/json/"
  211.  
  212.  
  213. local getasyncinfo = HttpDoServicio:GetAsync(url)
  214. local decodedinfo = HttpDoServicio:JSONDecode(getasyncinfo)
  215.  
  216.  
  217.  
  218.  
  219. TextLabel11.Text = "Server Details".."\n\n"
  220.     .."Location: "..decodedinfo["country"].."\n"
  221.     .."Country Code: "..decodedinfo["countryCode"].."\n"
  222.     .."Region: "..decodedinfo["region"].."\n"
  223.     .."Region Name: "..decodedinfo["regionName"].."\n"
  224.     .."Timezone: "..decodedinfo["timezone"].."\n\n"
  225.     .."City: "..decodedinfo["city"].."\n"
  226.     .."Zip Code: "..decodedinfo["zip"].."\n\n"
  227.     .."Latitude: "..decodedinfo["lat"].."\n"
  228.     .."Longitude: "..decodedinfo["lon"].."\n\n"
  229.     .."ISP: "..decodedinfo["isp"].."\n"
  230.     .."Autonomous System: "..decodedinfo["as"].."\n"
  231.     .."Query: "..decodedinfo["query"].."\n"
  232.  
  233.  
  234.  
  235.  
  236. while true do
  237.     for i,plr:Player in ipairs(game.Players:GetChildren()) do
  238.         local LocalizationService = game:GetService("LocalizationService")
  239.         local Players = game:GetService("Players")
  240.        
  241.         local clone = TextLabel5:Clone()
  242.         clone.Name = 'CloneTemplate'
  243.         clone.Parent = ScrollingFrame3
  244.         task.wait()
  245.         clone.LayoutOrder = i
  246.         clone.Visible = true
  247.         clone.Text = plr.Name
  248.  
  249.         local success, code = pcall(LocalizationService.GetCountryRegionForPlayerAsync, LocalizationService, plr)
  250.         if success and code then
  251.             clone.Country.Text = "["..code.."] "..tostring(Countries[code])
  252.         end
  253.         function roundNumber(num, numDecimalPlaces)
  254.             return tonumber(string.format("%." .. (numDecimalPlaces or 0) .. "f", num))
  255.         end
  256.         clone.Ping.Text = roundNumber((plr:GetNetworkPing()*1000),1) .." ms"
  257.  
  258.         local thumbType = Enum.ThumbnailType.HeadShot
  259.         local thumbSize = Enum.ThumbnailSize.Size420x420
  260.         local content, isReady = Players:GetUserThumbnailAsync(plr.UserId, thumbType, thumbSize)
  261.         clone.Headshot.Image = content
  262.  
  263.     end
  264.     task.wait(5)
  265.     for _,v in ipairs(ScrollingFrame3:GetChildren()) do
  266.         if v:IsA("TextLabel") and v.Name == "CloneTemplate" then
  267.             v:Destroy()
  268.         end
  269.     end
  270. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement