Advertisement
antraxo9000

Untitled

Apr 22nd, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. local getService = game.GetService
  2. local playersService = getService(game, "Players")
  3. local localPlayer = playersService.LocalPlayer
  4.  
  5. local httpGet = game.HttpGet or game.HttpGetAsync
  6.  
  7. local function decodeJson(json)
  8. local jsonTable = {}
  9. pcall(function ()
  10. jsonTable = getService(game, "HttpService"):JSONDecode(json)
  11. end)
  12. return jsonTable
  13. end;
  14.  
  15. local scriptDirectory = "N4U"
  16.  
  17. local function newAuthUser()
  18.  
  19. local NEW_CODE = tonumber(tostring(os.time(os.date("!*t"))):sub(0, tostring(os.time(os.date("!*t"))):len() - 3))
  20. local NEW_TOKEN = NEW_CODE + localPlayer.UserId;
  21.  
  22. local RETURN_BOOL, RETURN_STRING = ypcall(httpGet, game, "https://nebot.us/hash/sha256.php?code=asd")
  23. if not RETURN_BOOL or RETURN_STRING ~= "688787d8ff144c502c7f5cffaafe2cc588d86079f9de88304c26b0cb99ce91c6" then
  24. return false;
  25. end
  26.  
  27. local DIRECT_JSON = httpGet(game, "https://nebot.us/Whitelisting/"..scriptDirectory.."?getWhitelisted="..localPlayer.UserId)
  28. local SHA1_JSON = httpGet(game, "https://nebot.us/Whitelisting/sha12.php?sha="..NEW_TOKEN)
  29.  
  30. if (DIRECT_JSON == true) then return false end
  31.  
  32. local DIRECT_DECODED = decodeJson(DIRECT_JSON);
  33. if (DIRECT_DECODED == true) then return false end
  34. if (DIRECT_DECODED["verify"] == nil) then return false end;
  35. if (DIRECT_DECODED["verify"] ~= NEW_TOKEN*4) then return false end;
  36.  
  37.  
  38. if (SHA1_JSON == true) then return false end
  39.  
  40. local SHA1_DECODED = decodeJson(SHA1_JSON);
  41. if (SHA1_DECODED == true) then return false end
  42. if (SHA1_DECODED["recieved"] == nil) then return false end;
  43. if (SHA1_DECODED["recieved"] ~= tostring(NEW_TOKEN)) then return false end;
  44.  
  45. if (DIRECT_DECODED["token"] ~= SHA1_DECODED["return"]) then return false end
  46.  
  47. return true
  48. end
  49.  
  50.  
  51. if newAuthUser() then
  52. //source here
  53. else
  54. game:Shutdown()
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement