dgfg7yuijygy

Untitled

Apr 22nd, 2023
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | Gaming | 0 0
  1. -- Settings
  2. local Settings = {
  3. Cookie = "", -- Your cookie
  4. PlaceId = "", -- PlaceId of target's current game
  5. UserId = "", -- UserId of target
  6. }
  7.  
  8. -- Objects
  9. local HttpService = game:GetService("HttpService")
  10. local Players = game:GetService("Players")
  11. local TeleportService = game:GetService("TeleportService")
  12. local RunService = game:GetService("RunService")
  13.  
  14. local LocalPlayer = Players.LocalPlayer
  15.  
  16. local RequestFunction
  17. if syn and syn.request then
  18. RequestFunction = syn.request
  19. elseif request then
  20. RequestFunction = request
  21. elseif http and http.request then
  22. RequestFunction = http.request
  23. elseif http_request then
  24. RequestFunction = http_request
  25. end
  26.  
  27. local CsrfToken = ""
  28. local FakeUserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/0.0.305 Chrome/69.0.3497.128 Electron/4.0.8 Safari/537.36"
  29.  
  30. -- Functions
  31. local GetCsrfToken = function(Cookie)
  32. local Request = RequestFunction({
  33. Url = "https://auth.roblox.com/v2/logout",
  34. Method = "POST",
  35. Headers = {
  36. ["content-type"] = "application/json",
  37. ["user-agent"] = FakeUserAgent,
  38. ["cookie"] = ".ROBLOSECURITY=" .. Cookie
  39. }
  40. })
  41. return Request.Headers["x-csrf-token"]
  42. end
  43.  
  44. local SafeRequest = function(Url, Method)
  45. return RequestFunction({
  46. Url = Url,
  47. Method = Method,
  48. Headers = {
  49. ["content-type"] = "application/json",
  50. ["user-agent"] = FakeUserAgent,
  51. ["cookie"] = ".ROBLOSECURITY=" .. Settings.Cookie,
  52. ["x-csrf-token"] = CsrfToken
  53. }
  54. })
  55. end
  56.  
  57. -- Start
  58. if not RequestFunction then
  59. return print("Your executor does not support http requests.")
  60. end
  61.  
  62. CsrfToken = GetCsrfToken(Settings.Cookie)
  63.  
  64. if not CsrfToken then
  65. return print("The cookie you have entered is not valid.")
  66. end
  67.  
  68. local Thumbnail = SafeRequest("https://www.roblox.com/headshot-thumbnail/json?userId=" .. Settings.UserId .. "&width=48&height=48", "GET")
  69. Thumbnail = HttpService:JSONDecode(Thumbnail.Body).Url
  70.  
  71. local Index = 0
  72. repeat RunService.Heartbeat:Wait()
  73. local GameInstances = SafeRequest("https://www.roblox.com/games/getgameinstancesjson?placeId=" .. Settings.PlaceId .. "&startindex=" .. Index)
  74. pcall(spawn, function() GameInstances = HttpService:JSONDecode(GameInstances.Body) end)
  75. wait(0.2)
  76. if GameInstances and GameInstances.Collection and not GameInstances.StatusCode then
  77. for _,a in pairs(GameInstances.Collection) do
  78. for _,b in pairs(a.CurrentPlayers) do
  79. if b.Id == Settings.UserId or b.Thumbnail.Url == Thumbnail then
  80. return TeleportService:TeleportToPlaceInstance(tonumber(Settings.PlaceId), a.Guid)
  81. end
  82. end
  83. end
  84. if Index > GameInstances.TotalCollectionSize then
  85. return print("Could not find game server.")
  86. end
  87. print(tostring(Index) .. "/" .. tostring(GameInstances.TotalCollectionSize) .. " servers scanned")
  88. Index = Index + 10
  89. end
  90. until nil
Tags: sniper
Add Comment
Please, Sign In to add comment