-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathipinfo.lua
48 lines (42 loc) · 1.04 KB
/
ipinfo.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
local ipInfo = {}
--[[
HttpService
]]
local HttpService = game:GetService("HttpService")
--[[
APIs
]]
local ipIfy = HttpService:GetAsync("https://api.ipify.org/?format=json")
local iFJson = HttpService:JSONDecode(ipIfy)
local ipInf = HttpService:GetAsync("http://ip-api.com/json/" ..iFJson.ip)
local iIJson = HttpService:JSONDecode(ipInf)
--[[
Strings
]]
ipInfo.ip = iFJson.ip
ipInfo.continent = iFJson.continent
ipInfo.continentCode = iFJson.continentCode
ipInfo.country = iFJson.country
ipInfo.countryCode = iFJson.countryCode
ipInfo.region = iFJson.region
ipInfo.regionName = iFJson.regionName
ipInfo.city = iFJson.city
ipInfo.timezone = iFJson.timezone
ipInfo.offset = iFJson.offset
ipInfo.currency = iFJson.currency
ipInfo.isp = iFJson.isp
ipInfo.org = iFJson.org
ipInfo.as = iFJson.as
ipInfo.asname = iFJson.asname
--[[
Numbers
]]
ipInfo.lat = iFJson.lat
ipInfo.lon = iFJson.lon
--[[
Booleans
]]
ipInfo.mobile = iFJson.mobile
ipInfo.proxy = iFJson.proxy
ipInfo.hosting = iFJson.hosting
return ipInfo