SHARE
TWEET

Untitled

AOBoy Jul 23rd, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local module = {}
  2.  
  3. module.PasteAPI = "https://pastebin.com/api/api_post.php"
  4. module.UserKeyAPI = "https://pastebin.com/api/api_login.php"
  5. module.APIDevKey = "9adc8b3aeea9801958a08bc4a1c8056b"
  6. module.APIUsername = "hidden"
  7. module.APIUserPassword = "X2vU]n(dnaAHmNkK"
  8. module.APIUserKeyField = {
  9.     api_dev_key = module.APIDevKey,
  10.     api_user_name = module.APIUsername,
  11.     api_user_password = module.APIUserPassword
  12. }
  13.  
  14. module.PasteKeyField = {
  15.     api_dev_key = module.APIDevKey,
  16.     api_paste_code = "",
  17.     api_paste_private = 0,
  18.     api_paste_expire_date = "10M",
  19.     api_paste_format = "lua",
  20.     api_user_key = "",
  21.     api_option = "paste"
  22. }
  23.  
  24. module.FormatField = function(Field)
  25.     local FormattedField = ""
  26.    
  27.     for i, v in pairs(Field) do
  28.         FormattedField = FormattedField .. string.rep("&", #FormattedField/#FormattedField) .. game.HttpService:UrlEncode(i) .. "=" .. game.HttpService:UrlEncode(v)
  29.     end
  30.    
  31.     return FormattedField
  32. end
  33.  
  34. module.GetAPIUserKey = function()
  35.     if(module.APIUserKey == nil) then
  36.         module.APIUserKey = game.HttpService:PostAsync(module.UserKeyAPI, module.FormatField(module.APIUserKeyField), Enum.HttpContentType.ApplicationUrlEncoded)
  37.     end
  38.    
  39.     return module.APIUserKey
  40. end
  41.  
  42. module.CreatePaste = function(Message)
  43.     module.PasteKeyField.api_paste_code = Message
  44.     module.PasteKeyField.api_user_key = module.GetAPIUserKey()
  45.    
  46.     return game.HttpService:PostAsync(module.PasteAPI, module.FormatField(module.PasteKeyField), Enum.HttpContentType.ApplicationUrlEncoded)
  47. end
  48.  
  49. return module
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top