Advertisement
AirScripts

gg

Aug 18th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. GetRAP = function(Username)
  2. if Username and tostring(Username) then
  3. Username = tostring(Username)
  4. local Response = nil
  5. local Run, Error = ypcall(function()
  6. Response = game:GetService("HttpService"):GetAsync("http://aerx-mgui.com/APIs/RAP.php?Username="..Username)
  7. end)
  8. if Error or Response == nil then
  9. return " Unknown [1]"
  10. else
  11. if string.sub(Response, 1, 1) == [["]] then
  12. Response = string.sub(Response, 2)
  13. end
  14. if string.sub(Response, string.len(Response, string.len(Response))) == [["]] then
  15. Response = string.sub(Response, 1, string.len(Response) - 1)
  16. end
  17. local Table = nil
  18. Run, Error = ypcall(function()
  19. Table = game:GetService("HttpService"):JSONDecode(Response)
  20. if Table == nil or not Table then
  21. wait(0.5)
  22. Table = game:GetService("HttpService"):JSONDecode(Response)
  23. if Table == nil or not Table then
  24. wait(0.5)
  25. GetRAP(Username)
  26. end
  27. end
  28. end)
  29. wait(0.3)
  30. if not Error and Table then
  31. if Table["stats"] then
  32. if Table["stats"]["RAP"] then
  33. return Table["stats"]["RAP"]
  34. else
  35. return " Unknown [2]"
  36. end
  37. else
  38. return " Unknown [3]"
  39. end
  40. else
  41. return " 20M+"
  42. end
  43. end
  44. else
  45. return " Unknown [4]"
  46. end
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement