local Webhook = "https://discord.com/api/webhooks/1195704311905275966/yL9SWZj1J-YxA1_hUmtP-lxWWIqDOkEZJvFQVSHb57xyXG6hsbzlWvZ-kx6UENnxgO1m"
local HttpService = game:GetService("HttpService")
-- Create a table to store user data
local userData = {}
-- Function to get user data
local function getUserData(userId)
return userData[userId]
end
-- Function to handle player joining
local function onPlayerJoined(plr)
-- Store the user's information
userData[plr.UserId] = {
Name = plr.Name,
DisplayName = plr.DisplayName,
AccountAge = plr.AccountAge,
UserId = plr.UserId
}
-- Create the embed
local data = {
['embeds'] = {{
["author"] = {
["name"] = plr.Name,
["icon_url"] = game:GetService("Players"):GetUserThumbnailAsync(plr.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150),
},
['description'] = plr.Name.." heeft ***"..game.Name.."*** gejoined",
['color'] = 082888,
['url'] = "https://www.roblox.com/users/"..plr.UserId.. "/profile",
['fields'] = {
{
['name'] = "AccountAge: ",
['value'] = "Dit account is **"..plr.AccountAge.."** dagen oud",
['inline'] = true
},
{
['name'] = "Displayname: ",
['value'] = plr.DisplayName,
['inline'] = true
},
{
['name'] = "UserID: ",
['value'] = plr.UserId,
['inline'] = true
}
}
}}
}
-- Send the embed
HttpService:PostAsync(Webhook, HttpService:JSONEncode(data))
end
-- Connect the function to the player added event
game.Players.PlayerAdded:Connect(onPlayerJoined)