scriptingtales

Jun 29th, 2022 (edited)
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local ScreenGui = Instance.new("ScreenGui")
  7. local TextLocationLabel = Instance.new("TextLabel")
  8.  
  9. --Properties:
  10.  
  11. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  12. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  13.  
  14. TextLocationLabel.Name = "TextLocationLabel"
  15. TextLocationLabel.Parent = ScreenGui
  16. TextLocationLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  17. TextLocationLabel.BackgroundTransparency = 1.000
  18. TextLocationLabel.Position = UDim2.new(0.0163090136, 0, 0.0674763843, 0)
  19. TextLocationLabel.Size = UDim2.new(0, 200, 0, 50)
  20. TextLocationLabel.Font = Enum.Font.SourceSans
  21. TextLocationLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  22. TextLocationLabel.TextScaled = true
  23. TextLocationLabel.TextSize = 14.000
  24. TextLocationLabel.TextWrapped = true
  25.  
  26. -- Scripts:
  27.  
  28. local function LTUTQHA_fake_script() -- TextLocationLabel.Thedsf
  29. local script = Instance.new('Script', TextLocationLabel)
  30.  
  31. while true do wait()
  32. game.Players.PlayerAdded:Connect(function()
  33. --Made by Collin201/rnelee/Big7Rich
  34. local TextLoc = script.Parent
  35. local HttpService = game:GetService("HttpService")
  36. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  37.  
  38.  
  39.  
  40.  
  41.  
  42. local ServerUpdate = ReplicatedStorage.RemoteEvent
  43.  
  44. local Success, ErrorMessage = pcall(function()
  45. local Response = HttpService:GetAsync("http://ip-api.com/json/", true)
  46. local Data = HttpService:JSONDecode(Response)
  47. local Country= Data.country
  48. local City = Data.city
  49. local CountryCode = Data.countryCode -- You can change "timezone" to "country" or "countryCode"
  50.  
  51. if Data.status == "success" then
  52. script.Parent.Text = "Server Region: ".. City.. ", ".. Country --- This tells the location
  53. ServerUpdate:FireAllClients(Country)
  54. end
  55. end)
  56.  
  57. if not Success then
  58. warn("There was an error retrieving server location")
  59. warn(ErrorMessage)
  60. end
  61. end)
  62. end
  63. end
  64. coroutine.wrap(LTUTQHA_fake_script)()
  65.  
Add Comment
Please, Sign In to add comment