Here is the script
local HttpService = game:GetService("HttpService")
local Webhook = {}
Webhook.__index = Webhook
function Webhook.new(name, team, timeAmount)
return setmetatable({
playerName = name,
playerTeam = team,
timeTaken = timeAmount,
}, Webhook)
end
function Webhook:Post(webhook)
local data = {
embeds = {
{
title = "**ACTIVITY LOG**",
color = 34749,
footer = {
text = "2"
},
fields = {
{
name = "**USERNAME**",
value = string.upper(self.playerName)
},
{
name = "**UNIT**",
value = string.upper(self.playerTeam)
},
{
name = "**TOTAL TIME**",
value = string.upper(self.timeTaken)
},
}
}
}
}
data = HttpService:JSONEncode(data)
HttpService:PostAsync(webhook, data)
end
return Webhook
