So I’m trying to have a Discord webhook post whenever an exploit is detected. I am using a webhook proxy, so it won’t be an issue.
server script:
game.ReplicatedStorage.RandomWebhook.OnServerEvent:Connect(function(reverted, exploitdifference, target, player, webhook)
local httpService = game:GetService("HttpService")
if debounce == false then
debounce = true
wait()
httpService:PostAsync(webhook,
httpService:JSONEncode({
content = "An exploit has been detected! "..player.."has attempted to change their "..target.." by "..exploitdifference.."; "..reverted
})
)
debounce = false
end
end)
local script variables:
local webhook = "https://hooks.hyra.io/api/webhooks/XXXXXXX"
local target = "unknown"
local exploitdifference = "unknown"
local reverted = "unknown"
local player = game.Players.LocalPlayer.Name
local script triggering remote:
reverted = "we were able to revert their "..target.." to their original amount, no harm done!"
game.ReplicatedStorage.RandomWebhook:FireServer(reverted, exploitdifference, target, player, webhook)
Is your output telling you what line is trying to use the Roblox resources? A discord webhook using Hyra’s proxy shouldn’t even be calling the Roblox API.
Correct me if I am wrong, but Hyra doesn’t change or encrypt your webhook’s URL and by putting your Webhook’s URL in a Local Script you are risking it getting compromised as players with malicious intents (exploiters) can easily get their hands on your entire local script.
reverted = "we were able to revert their "..target.." to their original amount, no harm done!"
game.ReplicatedStorage.RandomWebhook:FireServer(reverted, exploitdifference, target, webhook)
And your ServerScript to this:
game.ReplicatedStorage.RandomWebhook.OnServerEvent:Connect(function(player, reverted, exploitdifference, target, webhook)
local httpService = game:GetService("HttpService")
if debounce == false then
debounce = true
wait()
httpService:PostAsync(webhook,
httpService:JSONEncode({
content = "An exploit has been detected! "..player.Name.."has attempted to change their "..target.." by "..exploitdifference.."; "..reverted
})
)
debounce = false
end
end)