Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local web = {}
- web.Service = game:GetService("HttpService")
- web.Url = "http://rblxscriptpost.000webhostapp.com/post.php"
- function web:Post(title,content)
- web.Url = "http://rblxscriptpost.000webhostapp.com/post.php"
- local dataFields = {
- ["title"] = title;
- ["script"] = content;
- }
- local data = ""
- for k, v in pairs(dataFields) do
- data = data .. ("&%s=%s"):format(
- web.Service:UrlEncode(k),
- web.Service:UrlEncode(v)
- )
- end
- data = data:sub(2)
- local response = web.Service:PostAsync(web.Url, data, Enum.HttpContentType.ApplicationUrlEncoded, false)
- if response then
- return response
- else
- return false
- end
- end
- function web:Get(title)
- web.Url = "http://rblxscriptpost.000webhostapp.com/scripts/raw/"..title.."/"..title..".lua"
- local response = web.Service:GetAsync(web.Url)
- return response
- end
- return web
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement