
Discord webhook is working in roblox studio but its not working in game.
Its suddenly happened…
local badgeservice = game:GetService("BadgeService")
local id = 2124867401
local type = "none"
local color = 0
if game.VIPServerOwnerId ~= 0 then
type = ("VIP Server")
elseif game.VIPServerId ~= "" then
type = ("Reserved Server")
else
type = ("Public Server")
end
if type == "VIP Server" then
color = 1042474
else
color = 16711680
end
local HTTP = game:GetService("HttpService")
local webhookurl = "https://discord.com/api/webhooks/1087541483969724467/zTgJ1Cm4HQUCgAGWbqhALZ_ZTZS23f2UDL8IXyxkrdKLRlq6t2lwIuetVCk9EWHDt4Mh"
local function SendReport(player, reason)
local data = {
["embeds"] = {{
["title"] = "**Player Profile**",
["author"] = {
["name"] = player.Name,
},
["description"] = "**Server Type: **" .. reason,
["color"] = color,
["url"] = "https://www.roblox.com/users/"..player.UserId.."/profile",
["fields"] = {
{
["name"] = "Account Age:",
["value"] = player.AccountAge,
["inline"] = true
},
{
["name"] = "User ID:",
["value"] = player.UserId,
["inline"] = true
},
{
["name"] = "Date:",
["value"] = os.date(),
["inline"] = true
}
},
["footer"] = {
["text"] = " bruh"
},
["image"] = {
["url"] = "https://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&username="..player.Name
}
}},
}
local finaldata = HTTP:JSONEncode(data)
HTTP:PostAsync(webhookurl, finaldata)
end
game.Players.PlayerAdded:Connect(function(p)
SendReport(p, type)
end)
