prom8

Untitled

Dec 9th, 2019
87
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local HttpService = game:GetService("HttpService");
  2.  
  3. function SendMessage(Webhook, Message, Botname)
  4. if not string.find(Webhook, "https://discordapp.com/api/webhooks/") then
  5. return error("Send a valid URL");
  6. end
  7. local Name;
  8. local WakeUp = game:HttpGet("http://buritoman69.glitch.me");
  9. local API = "http://buritoman69.glitch.me/webhook";
  10. if (not Message or Message == "" or not Botname) then
  11. Name = "GameBot"
  12. return error("nil or empty message!")
  13. else
  14. Name = Botname;
  15. end
  16. local Body = {
  17. ['Key'] = tostring("applesaregood"),
  18. ['Message'] = tostring(Message),
  19. ['Name'] = Name,
  20. ['Webhook'] = Webhook
  21. }
  22. Body = HttpService:JSONEncode(Body);
  23. local Data = game:HttpPost(API, Body, false, "application/json")
  24. return Data or nil;
  25. end
  26.  
  27. SendMessage("WebHookHere", "MessageHere", "BotNameHere")
RAW Paste Data