Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Gui to Lua
- -- Version: 3.2
- -- Instances:
- local ScreenGui = Instance.new("ScreenGui")
- local TextLocationLabel = Instance.new("TextLabel")
- --Properties:
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- TextLocationLabel.Name = "TextLocationLabel"
- TextLocationLabel.Parent = ScreenGui
- TextLocationLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLocationLabel.BackgroundTransparency = 1.000
- TextLocationLabel.Position = UDim2.new(0.0163090136, 0, 0.0674763843, 0)
- TextLocationLabel.Size = UDim2.new(0, 200, 0, 50)
- TextLocationLabel.Font = Enum.Font.SourceSans
- TextLocationLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLocationLabel.TextScaled = true
- TextLocationLabel.TextSize = 14.000
- TextLocationLabel.TextWrapped = true
- -- Scripts:
- local function LTUTQHA_fake_script() -- TextLocationLabel.Thedsf
- local script = Instance.new('Script', TextLocationLabel)
- while true do wait()
- game.Players.PlayerAdded:Connect(function()
- --Made by Collin201/rnelee/Big7Rich
- local TextLoc = script.Parent
- local HttpService = game:GetService("HttpService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local ServerUpdate = ReplicatedStorage.RemoteEvent
- local Success, ErrorMessage = pcall(function()
- local Response = HttpService:GetAsync("http://ip-api.com/json/", true)
- local Data = HttpService:JSONDecode(Response)
- local Country= Data.country
- local City = Data.city
- local CountryCode = Data.countryCode -- You can change "timezone" to "country" or "countryCode"
- if Data.status == "success" then
- script.Parent.Text = "Server Region: ".. City.. ", ".. Country --- This tells the location
- ServerUpdate:FireAllClients(Country)
- end
- end)
- if not Success then
- warn("There was an error retrieving server location")
- warn(ErrorMessage)
- end
- end)
- end
- end
- coroutine.wrap(LTUTQHA_fake_script)()
Add Comment
Please, Sign In to add comment