Im trying to make the webhook send when the event is fired.
Code :
game.Lighting.ExploitBot.Event:connect(function(plr,cause)
game.SoundService.CaughtNoob:Play()
print(plr.Name.." noob exploiter")
local HttpServ = game:GetService('HttpService')
local url = "https://discord.com/api/webhooks/xxxxxxx"
local data =
{
["content"] = "",
["embeds"] = {{
["title"] = "someone was banned lol",
["description"] = "lool",
["type"] = "rich",
["color"] = tonumber(0xffffff),
["fields"] = {
{
["name"] = "Player",
["value"] = plr,
["inline"] = true
},
{
["name"] = "__Title__",
["value"] = cause,
["inline"] = true
}
}
}}
}
local newdata = HttpServ:JSONEncode(data)
HttpServ:PostAsync(url, newdata)
game.Lighting.SystemMessage:FireAllClients(plr.Name.." just got busted by the gorilla lord.... lol. You won't see them anytime soon ; )",Enum.Font.Arcade,Color3.new(1,0.5,0.5),true)
local baninfo = {cause,GetDate(),"Exploiting","System"}
if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
table.insert(baninfo,tostring(plr.Character.HumanoidRootPart.CFrame.p))
else
table.insert(baninfo,"-")
end
if plr.Character and plr.Character:FindFirstChild("_battle") then
table.insert(baninfo,plr.Character["_battle"].Value.Name)
else
table.insert(baninfo,"-")
end
game.Lighting.Assets.Despacito2:Clone().Parent = plr.PlayerGui
if plr.UserId ~= 76355774 and plr.UserId ~= 81898264 then
game:GetService("DataStoreService"):GetDataStore("UTMonsterMania"..plr.UserId):SetAsync("BanInfo",baninfo)
end
delay(10,function() if plr then plr:Kick("You have been banned for: "..baninfo[3]) end end)
end)
game.Lighting.InfinityGauntlet.OnServerEvent:Connect(function(plr,reason)
print("B A N")
if typeof(reason) == "string" then
print(reason)
game.Lighting.ExploitBot:Fire(plr,reason)
else
print("lol noob exploiter")
game.Lighting.ExploitBot:Fire(plr,"Attempt to ban themselves (nice)")
end
end)function GetDate(s)
print("timedato")
local get = os.date("*t",os.time())
local date = ""
for t,v in pairs(get) do
if t == "month" then
date = date..v.."/"
elseif t == "day" then
date = date..v.."/"
elseif t == "year" then
date = date..v
end
end
print("i will return: "..date)
return date
end
game.Lighting.Creator.Ban.OnServerEvent:Connect(function(plr,player,reason)
if plr.UserId == 252625705 or plr.UserId == 81898264 then
local name = game.Players:GetNameFromUserIdAsync(player)
local baninfo = {"Ban by console",GetDate(),reason,plr.Name} --Ban cause, Ban date, ban reason, banner, ban position, ban battle
if game.Players:FindFirstChild(name) and game.Players:FindFirstChild(name).Character and game.Players:FindFirstChild(name).Character:FindFirstChild("HumanoidRootPart") then
table.insert(baninfo,tostring(game.Players:FindFirstChild(name).Character.HumanoidRootPart.CFrame.p))
else
table.insert(baninfo,"-")
end
if game.Players:FindFirstChild(name) then
game.Lighting.Assets.Despacito2:Clone().Parent = game.Players:FindFirstChild(name).PlayerGui
if game.Players:FindFirstChild(name).Character and game.Players:FindFirstChild(name).Character:FindFirstChild("_battle") then
table.insert(baninfo,game.Players:FindFirstChild(name).Character["_battle"].Value.Name)
else
table.insert(baninfo,"-")
end
else
table.insert(baninfo,"-")
end
if player ~= 76355774 and player ~= 252625705 then
game:GetService("DataStoreService"):GetDataStore("UTMonsterMania"..player):SetAsync("BanInfo",baninfo)
end
game.Lighting.SystemMessage:FireAllClients(plr.Name.." banned "..name..".",Enum.Font.Arcade,Color3.new(1,0.5,0.5),true)
delay(10,function() if game.Players:FindFirstChild(name) then game.Players:FindFirstChild(name):Kick("You have been banned for: "..baninfo[3]) end end)
else
game.Lighting.ExploitBot:Fire(plr,"Attempt to ban someone, got a fool")
end
end)
game.Lighting.Creator.Unban.OnServerEvent:Connect(function(plr,player)
if plr.UserId == 76355774 or plr.UserId == 252625705 then
game:GetService("DataStoreService"):GetDataStore("UTMonsterMania"..player):RemoveAsync("BanInfo")
else
game.Lighting.ExploitBot:Fire(plr,"Attempt to unban someone, got a fool")
end
end)
game.Lighting.Work.OnServerEvent:Connect(function(plr)
game.Lighting.ExploitBot:Fire(plr,"Attempt to get into creator plate (deleting logging brick)")
end)
game.Lighting.AntiFly.OnServerEvent:Connect(function(plr,des)
local count = 0
function Count(c)
count = count + #c:GetChildren()
local b = c:GetChildren()
for i=1,#b do
Count(b[i])
end
end
Count(plr.Character)
if count ~= des then
game.Lighting.ExploitBot:Fire(plr,"Insufficent amount of childer in character model")
game.Lighting.Assets.Despacito2:Clone().Parent = plr.PlayerGui
plr.Character:Destroy()
print(plr.Name..": Expected count: "..count.." Got: "..des)
return
end
print(plr.Name..": Matched (server: "..count..", client "..des..")")
end)