RoScripter

Suggestion GUI ServerScript

Jul 14th, 2020
4,485
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. local HttpService = game:GetService("HttpService")
  2. local WebhookURL = "" --<<--WEBHOOK URL HERE
  3.  
  4. local function postToDiscord(Message)
  5.     local Data = {
  6.         ["content"] = Message
  7.     }
  8.     Data = HttpService:JSONEncode(Data)
  9.     HttpService:PostAsync(WebhookURL, Data)
  10. end
  11.  
  12. game.ReplicatedStorage.Suggest.OnServerEvent:Connect(function(Player, Suggestion)
  13.     postToDiscord("Suggestion from " .. Player.Name .. ": " .. Suggestion)
  14. end)
Add Comment
Please, Sign In to add comment