SuggestionManager Script - (ServerScriptStorage)
local HttpService = game:GetService("HttpService")
local WebhookURL = "https:/wlSrdTP6FvqGPcwE7QZuidoaHoef3nV0iz_-HZkc6-H6U7b0En" --<<--WEBHOOK URL HERE
local function postToDiscord(Message)
local Data = {
["content"] = Message
}
Data = HttpService:JSONEncode(Data)
HttpService:PostAsync(WebhookURL, Data)
end
game.ReplicatedStorage.Suggest.OnServerEvent:Connect(function(Player, Suggestion)
postToDiscord("Suggestion from " .. Player.Name .. ": " .. Suggestion)
end)
SuggestionScript - (StarterGui)
local Player = game.Players.LocalPlayer
local ToggleButton = script.Parent.ToggleButton
local SuggestionFrame = script.Parent.SuggestionFrame
local SuggestionBox = SuggestionFrame.SuggestionBox
local SubmitButton = SuggestionFrame.SubmitButton
ToggleButton.MouseButton1Click:Connect(function()
if SuggestionFrame.Visible == true then
SuggestionFrame.Visible = false
else
SuggestionFrame.Visible = true
end
end)
SubmitButton.MouseButton1Click:Connect(function()
local Suggestion = SuggestionBox.Text
game.ReplicatedStorage.Suggest:FireServer(Suggestion)
end)
The Map for the GUI is
StarterGUI
|_
SuggestionGUI
|_
SuggestionScript
Suggestion Frame _
|_
SubmitButton
SuggestionBox

3 comments
Boy remove that webhook url from the script
You can add debounce in the SubmitButton.MouseButton1Click part https://developer.roblox.com/en-us/articles/Debounce
I'll take a look, and oops. Thanks.