local t={}local l=game:GetService("\072\116\116\112\083\101\114\118\105\099\101")function t.createMessage(N,t,q)local o={content=q}local g=l:JSONEncode(o)l:PostAsync(t,g)end function t.createEmbed(S,t,q,N,o,g)local w={content="",embeds={{image={url=g};title="\042\042"..(q.."\042\042");description=N;type="\114\105\099\104";color=tonumber(16777215);fields=o}}}local G=l:JSONEncode(w)l:PostAsync(t,G)end function t.createAuthorEmbed(S,t,q,N,o,g)local w={embeds={{author={name=q,icon_url=N};description=o,color=tonumber(16775930);fields=g}}}local G=l:JSONEncode(w)l:PostAsync(t,G)end return t


local webhookService = {}

local https = game:GetService("HttpService")



function webhookService:createMessage(url, message)
	local data = {
		["content"] = message
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end


function webhookService:createEmbed(url, title, message, fields, image)
	local data = {
		['content'] = "",
		['embeds'] = {{
			["image"] = {["url"] = image},
			['title'] = "**"..title.."**",
			['description'] = message,
			['type'] = "rich",
			["color"] = tonumber(0xffffff),
			['fields'] = fields

		},
		},
	}
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end


function webhookService:createAuthorEmbed(url, authorName, iconurl, description, fields)
	local data = {
		["embeds"] = {{
			["author"] = {
				["name"] = authorName,
				["icon_url"] = iconurl,
			},
			["description"] = description,
			["color"] = tonumber(0xFFFAFA),
			["fields"] = fields
			
			
		}},
	}
	
	local finalData = https:JSONEncode(data)
	https:PostAsync(url, finalData)
end






return webhookService

