Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Part0 = Instance.new("Part")
- SurfaceGui1 = Instance.new("SurfaceGui")
- Frame2 = Instance.new("Frame")
- TextLabel3 = Instance.new("TextLabel")
- TextLabel5 = Instance.new("TextLabel")
- TextLabel300 = Instance.new("TextLabel")
- TextLabel7 = Instance.new("TextLabel")
- TextButton8 = Instance.new("TextButton")
- Part0.Name = "IP"
- Part0.Parent = script
- Part0.CFrame = CFrame.new(0, 5.99999714, -32.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Position = Vector3.new(0, 5.999997138977051, -32.5)
- Part0.Size = Vector3.new(18, 12, 1)
- Part0.Anchored = true
- Part0.BackSurface = Enum.SurfaceType.Studs
- Part0.BottomSurface = Enum.SurfaceType.Studs
- Part0.FrontSurface = Enum.SurfaceType.Studs
- Part0.LeftSurface = Enum.SurfaceType.Studs
- Part0.RightSurface = Enum.SurfaceType.Studs
- SurfaceGui1.Parent = Part0
- SurfaceGui1.ClipsDescendants = true
- SurfaceGui1.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- SurfaceGui1.Adornee = Part0
- Frame2.Parent = SurfaceGui1
- Frame2.Size = UDim2.new(0, 900, 0, 600)
- Frame2.Active = true
- Frame2.BackgroundColor = BrickColor.new("Institutional white")
- Frame2.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame2.BorderColor = BrickColor.new("Institutional white")
- Frame2.BorderColor3 = Color3.new(1, 1, 1)
- Frame2.Draggable = true
- Frame2.Selectable = true
- TextLabel3.Name = "FrameLabel"
- TextLabel3.Parent = Frame2
- TextLabel3.Size = UDim2.new(0, 900, 0, 100)
- TextLabel3.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel3.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel3.BorderColor = BrickColor.new("Institutional white")
- TextLabel3.BorderColor3 = Color3.new(1, 1, 1)
- TextLabel3.Font = Enum.Font.SourceSansLight
- TextLabel3.FontSize = Enum.FontSize.Size48
- TextLabel3.Text = "IP Geolocation Converter"
- TextLabel3.TextColor = BrickColor.new("Really black")
- TextLabel3.TextColor3 = Color3.new(0, 0, 0)
- TextLabel3.TextScaled = true
- TextLabel3.TextSize = 38
- TextLabel3.TextWrap = true
- TextLabel3.TextWrapped = true
- Frame2.Selectable = false
- Frame2.Active = false
- Frame2.Draggable = false
- if Frame2.Draggable == false and Frame2.Active == false and Frame2.Selectable == false then
- print("Yes")
- else
- print("No")
- end
- TextLabel5.Name = "Credits"
- TextLabel5.Parent = Frame2
- TextLabel5.Position = UDim2.new(0, 650, 0, 550)
- TextLabel5.Size = UDim2.new(0, 250, 0, 50)
- TextLabel5.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel5.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel5.BorderColor = BrickColor.new("Institutional white")
- TextLabel5.BorderColor3 = Color3.new(1, 1, 1)
- TextLabel5.Font = Enum.Font.Unknown
- TextLabel5.FontSize = Enum.FontSize.Size48
- TextLabel5.Text = "Credits to: Kaiji#7888"
- TextLabel5.TextColor = BrickColor.new("Dark grey")
- TextLabel5.TextColor3 = Color3.new(0.407843, 0.411765, 0.411765)
- TextLabel5.TextScaled = true
- TextLabel5.TextSize = 38
- TextLabel5.TextWrap = true
- TextLabel5.TextWrapped = true
- TextLabel300.Name = "IpInserter"
- TextLabel300.Parent = Frame2
- TextLabel300.Position = UDim2.new(0, 300, 0, 125)
- TextLabel300.Size = UDim2.new(0, 300, 0, 75)
- TextLabel300.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel300.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel300.BorderColor = BrickColor.new("Really black")
- TextLabel300.BorderColor3 = Color3.new(0, 0, 0)
- TextLabel300.BorderSizePixel = 0
- TextLabel300.Font = Enum.Font.SourceSansLight
- TextLabel300.FontSize = Enum.FontSize.Size14
- TextLabel300.Text = "Click to generate random IP"
- TextLabel300.TextColor = BrickColor.new("Really black")
- TextLabel300.TextColor3 = Color3.new(0, 0, 0)
- TextLabel300.TextScaled = true
- TextLabel300.TextSize = 14
- TextLabel300.TextWrap = true
- TextLabel300.TextWrapped = true
- TextLabel7.Name = "ShowLoc"
- TextLabel7.Parent = Frame2
- TextLabel7.Position = UDim2.new(0, 175, 0, 250)
- TextLabel7.Size = UDim2.new(0, 550, 0, 125)
- TextLabel7.BackgroundColor = BrickColor.new("Institutional white")
- TextLabel7.BackgroundColor3 = Color3.new(1, 1, 1)
- TextLabel7.BorderColor = BrickColor.new("Institutional white")
- TextLabel7.BorderColor3 = Color3.new(1, 1, 1)
- TextLabel7.Font = Enum.Font.SourceSansLight
- TextLabel7.FontSize = Enum.FontSize.Size48
- TextLabel7.Text = "Location will show here..."
- TextLabel7.TextColor = BrickColor.new("Really black")
- TextLabel7.TextColor3 = Color3.new(0, 0, 0)
- TextLabel7.TextScaled = true
- TextLabel7.TextSize = 38
- TextLabel7.TextWrap = true
- TextLabel7.TextWrapped = true
- TextButton8.Name = "DecodeIP"
- TextButton8.Parent = Frame2
- TextButton8.Position = UDim2.new(0.36500001, 0, 0.701666653, 0)
- TextButton8.Size = UDim2.new(0, 250, 0, 100)
- TextButton8.BackgroundColor = BrickColor.new("Silver flip/flop")
- TextButton8.BackgroundColor3 = Color3.new(0.533333, 0.533333, 0.533333)
- TextButton8.Font = Enum.Font.SourceSansLight
- TextButton8.FontSize = Enum.FontSize.Size14
- TextButton8.Text = "Generate and get IP Geolocation"
- TextButton8.TextColor = BrickColor.new("Institutional white")
- TextButton8.TextColor3 = Color3.new(1, 1, 1)
- TextButton8.TextScaled = true
- TextButton8.TextSize = 14
- TextButton8.TextWrap = true
- TextButton8.TextWrapped = true
- local function IpAd()
- -- Function to generate a random number between min and max
- local function random(min, max)
- return math.random(min, max)
- end
- -- Function to generate a random IP address
- local function generateRandomIP()
- local ip = ""
- for i = 1, 4 do
- ip = ip .. random(0, 255)
- if i < 4 then
- ip = ip .. "."
- end
- end
- return ip
- end
- math.randomseed(os.time())
- TextLabel300.Text = generateRandomIP()
- local HttpService = game:GetService("HttpService")
- local Success, ErrorMessage = pcall(function()
- local Response = HttpService:GetAsync("http://ip-api.com/json/".. TextLabel300.Text, true)
- local Data = HttpService:JSONDecode(Response)
- local Country= Data.country
- local City = Data.city
- local CountryRegion = Data.region -- You can change "timezone" to "country" or "countryCode"
- if Data.status == "success" then
- TextLabel7.Text = Country..", ".. City.. " in ".. CountryRegion.. " region" --- This tells the location
- end
- if not TextLabel300.Text then
- TextLabel7.Text = "No Location"
- end
- end)
- end
- TextButton8.MouseButton1Up:Connect(IpAd)
- UICorner0 = Instance.new("UICorner")
- UICorner1 = Instance.new("UICorner")
- UIStroke0 = Instance.new("UIStroke")
- if Part0.Position ~= Vector3.new(0, 6, 22.5) then
- Part0.Position = Vector3.new(0, 6, 22.5)
- end
- TextLabel5.FontFace.Style = Enum.FontStyle.Italic
- TextLabel5.FontFace.Weight = Enum.FontWeight.Light
- UICorner0.Parent = TextLabel300
- UIStroke0.Parent = TextLabel300
- UIStroke0.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
- UICorner1.Parent = TextButton8
- SurfaceGui1.SizingMode = Enum.SurfaceGuiSizingMode.PixelsPerStud
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement