Canal do DISCORD: / discord
NÃO CLIQUE NESSE LINK!!!: / @epic_tgames
SCRIPT:
local url = "https://"
local http = game:GetService("HttpService")
local webhookService = require(script.Parent.WebhookService)
game.Players.PlayerAdded:Connect(function(player)
local data = { ['embeds'] = {{ ['title'] = "**Player Joined!**", ['description'] = player.Name .. " Has joined the game", ['color'] = 4972305, ['url'] = "https://www.roblox.com/users/".. player.UserId .. "/profile", ['fields'] = { { ['name'] = "Game name: ", ['value'] = "1v1 Bloxy", ['inline'] = true, }, { ['name'] = "User ID: ", ['value'] = player.UserId, ['inline'] = true } }} } }
local finaldata = http:JSONEncode(data) http:PostAsync(url, finaldata)
end)
game.Players.PlayerRemoving:Connect(function(player)
local data = { ['embeds'] = {{ ['title'] = "**Player Left!**", ['description'] = player.Name .. " Has left game", ['color'] = 14618897, ['url'] = "https://www.roblox.com/users/".. player.UserId .. "/profile" }} }
local finaldata = http:JSONEncode(data) http:PostAsync(url, finaldata)
end)
MODULE SCRIPT:
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
0:00 Intro
0:12 Discord
1:25 Roblox Studio
2:23 Testando
3:03 Se não deu certo
3:31 Outros vídeos