Created
May 14, 2024 13:09
-
-
Save aimbot6120/2176837c99ec7acabea8eb8bf3f1160d to your computer and use it in GitHub Desktop.
Using XGaming quest API in lua. Visit xgaming.club
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function callQuestGeneratorAPI() | |
local url = "https://authdev.xgaming.club/xquest/generate" | |
local data = | |
{ | |
goal = "", | |
key = "abcd1234", | |
fields = { | |
}, | |
n = 1, | |
story = "" | |
} | |
local jsonData = HttpService:JSONEncode(data) | |
print("Loaidng Quest") | |
local headers = { | |
["Content-Type"] = "application/json" | |
} | |
local response = HttpService:RequestAsync({ | |
Url = url, | |
Method = "POST", | |
Headers = headers, | |
Body = jsonData | |
}) | |
if response.Success then | |
local responseBody = HttpService:JSONDecode(response.Body) | |
print(responseBody) | |
return responseBody | |
else | |
warn("Failed to call API: " .. response.StatusCode .. " - " .. response.StatusMessage) | |
return nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment