Paulo87

Stream Sniper

Dec 11th, 2023
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.69 KB | None | 0 0
  1. repeat
  2. wait()
  3. until game:IsLoaded()
  4. local h = game:GetService("HttpService")
  5. local RequestFunction
  6. if syn and syn.request then
  7. RequestFunction = syn.request
  8. elseif request then
  9. RequestFunction = request
  10. elseif http and http.request then
  11. RequestFunction = http.request
  12. elseif http_request then
  13. RequestFunction = http_request
  14. end
  15.  
  16. if not game.CoreGui:FindFirstChild("StreamSniper") then
  17. local screenGui = Instance.new("ScreenGui", game.CoreGui)
  18. screenGui.Name = "StreamSniper"
  19. screenGui.IgnoreGuiInset = true
  20.  
  21. local TBox1 = Instance.new("TextBox", screenGui)
  22. TBox1.Size = UDim2.new(0.1, 0, 0.1, 0)
  23. TBox1.Position = UDim2.new(0.8, 0, 0.3, 0)
  24. TBox1.Text = ""
  25. TBox1.PlaceholderColor3 = Color3.new(1, 1, 0)
  26. TBox1.TextColor3 = Color3.new(1, 1, 0)
  27. TBox1.BackgroundColor3 = Color3.new(0, 0, 0)
  28. TBox1.BorderColor3 = Color3.new(0, 0, 0)
  29.  
  30. local TBox2 = Instance.new("TextBox", screenGui)
  31. TBox2.Size = UDim2.new(0.1, 0, 0.1, 0)
  32. TBox2.Position = UDim2.new(0.9, 0, 0.3, 0)
  33. TBox2.Text = ""
  34. TBox2.PlaceholderColor3 = Color3.new(1, 1, 0)
  35. TBox2.TextColor3 = Color3.new(1, 1, 0)
  36. TBox2.BackgroundColor3 = Color3.new(0, 0, 0)
  37. TBox2.BorderColor3 = Color3.new(0, 0, 0)
  38.  
  39. local TBox3 = Instance.new("TextBox", screenGui)
  40. TBox3.Size = UDim2.new(0.2, 0, 0.1, 0)
  41. TBox3.Position = UDim2.new(0.8, 0, 0.2, 0)
  42. TBox3.Text = ""
  43. TBox3.PlaceholderColor3 = Color3.new(1, 1, 0)
  44. TBox3.TextColor3 = Color3.new(1, 1, 0)
  45. TBox3.BackgroundColor3 = Color3.new(0, 0, 0)
  46. TBox3.BorderColor3 = Color3.new(0, 0, 0)
  47.  
  48. TBox1.TextScaled = true
  49. TBox2.TextScaled = true
  50. TBox3.TextScaled = true
  51. TBox1.PlaceholderText = "PlaceId"
  52. TBox2.PlaceholderText = "Player Name/ID"
  53. TBox3.PlaceholderText = "Mode"
  54.  
  55. local TButton = Instance.new("TextButton", screenGui)
  56. TButton.Size = UDim2.new(0.2, 0, 0.1, 0)
  57. TButton.Position = UDim2.new(0.8, 0, 0.4, 0)
  58. TButton.Text = "Snipe"
  59. TButton.TextScaled = true
  60. TButton.TextColor3 = Color3.new(1, 1, 0)
  61. TButton.BackgroundColor3 = Color3.new(0, 0, 0)
  62. TButton.BorderColor3 = Color3.new(0, 0, 0)
  63.  
  64. if _G.cursor == nil then
  65. _G.cursor =
  66. RequestFunction(
  67. {["Url"] = "https://raw.githubusercontent.com/LeymansGuz/playerTokens/main/cursor.txt", ["Method"] = "GET"}
  68. )
  69. _G.cursor = h:JSONDecode(_G.cursor.Body)
  70. end
  71.  
  72. function runScript(placeId, user, mode)
  73. spawn(
  74. function()
  75. local timecount = tick()
  76.  
  77. if _G.available == nil then
  78. _G.available = true
  79. end
  80.  
  81. function round(num)
  82. return tostring(math.floor(num * 100 + 0.5) / 100)
  83. end
  84.  
  85. function checktokens(tokens)
  86. local payload = {
  87. Url = "https://thumbnails.roblox.com/v1/batch",
  88. Headers = {
  89. ["Content-Type"] = "application/json"
  90. },
  91. Method = "POST",
  92. Body = {}
  93. }
  94.  
  95. for i, v in pairs(tokens) do
  96. table.insert(
  97. payload.Body,
  98. {
  99. requestId = "0:" .. v[3] .. ":AvatarHeadshot:150x150:png:regular",
  100. type = "AvatarHeadShot",
  101. targetId = 0,
  102. token = v[3],
  103. format = "png",
  104. size = "150x150"
  105. }
  106. )
  107. end
  108. payload.Body = h:JSONEncode(payload.Body)
  109. local result = RequestFunction(payload)
  110. local s, data = pcall(h.JSONDecode, h, result.Body)
  111. return data.data
  112. end
  113.  
  114. function json()
  115. found = false
  116. if #_G.token >= 1 then
  117. if #_G.token > 100 then
  118. tab = {}
  119. for i = 1, 100 do
  120. table.insert(tab, _G.token[i])
  121. table.insert(_G.playertoken, _G.token[i])
  122. table.remove(_G.token, i)
  123. end
  124. leymans = checktokens(tab)
  125. if leymans then
  126. for i, v in pairs(leymans) do
  127. if v.imageUrl == _G.image then
  128. id = string.sub(v.requestId, 3, #v.requestId - 35)
  129. for a, b in pairs(_G.playertoken) do
  130. if b[3] == id then
  131. if not found then
  132. found = true
  133. _G.available = true
  134. if _G.mode == "TP" or _G.mode == "TPLog" then
  135. if _G.mode == "TPLog" then
  136. end
  137. TButton.Text = "Teleporting to: " .. _G.plrname
  138. game:GetService("TeleportService"):TeleportToPlaceInstance(
  139. b[1],
  140. b[2]
  141. )
  142. elseif _G.mode == "Log" then
  143. return
  144. end
  145. end
  146. return
  147. end
  148. end
  149. end
  150. end
  151. end
  152. elseif #_G.token <= 100 then
  153. tab2 = {}
  154. for i, v in pairs(_G.token) do
  155. table.insert(tab2, _G.token[i])
  156. table.insert(_G.playertoken, _G.token[i])
  157. table.remove(_G.token, i)
  158. end
  159. video = checktokens(tab2)
  160. if video then
  161. for i, v in pairs(video) do
  162. if v.imageUrl == _G.image then
  163. id = string.sub(v.requestId, 3, #v.requestId - 35)
  164. for a, b in pairs(_G.playertoken) do
  165. if b[3] == id then
  166. if not found then
  167. found = true
  168. _G.available = true
  169. if _G.mode == "TP" or _G.mode == "TPLog" then
  170. if _G.mode == "TPLog" then
  171. end
  172. TButton.Text = "Teleporting to: " .. _G.plrname
  173. game:GetService("TeleportService"):TeleportToPlaceInstance(
  174. b[1],
  175. b[2]
  176. )
  177. elseif _G.mode == "Log" then
  178. return
  179. end
  180. end
  181. end
  182. end
  183. end
  184. end
  185. end
  186. wait(1.5)
  187. TButton.Text = game.Players:GetNameFromUserIdAsync(_G.plr) .. " not found"
  188. end
  189. end
  190. end
  191.  
  192. function json2()
  193. repeat
  194. spawn(
  195. function()
  196. json()
  197. end
  198. )
  199. local ti = tick()
  200. repeat
  201. game.RunService.RenderStepped:Wait()
  202. until tick() - ti > 0.015
  203. until #_G.token == 0
  204. _G.available = true
  205. end
  206.  
  207. function playertoken(gameid, target)
  208. _G.token = {}
  209. _G.playertoken = {}
  210. _G.logged = false
  211. id, b, found, ended, page, cursor, link, tokencount =
  212. nil,
  213. false,
  214. false,
  215. false,
  216. nil,
  217. nil,
  218. nil,
  219. nil
  220. local suc, err =
  221. pcall(
  222. function()
  223. if _G.cursor[tostring(gameid)] and _G.available then
  224. _G.available = false
  225. if tonumber(target) then
  226. _G.plrname = game.Players:GetNameFromUserIdAsync(tonumber(target))
  227. else
  228. _G.plrname = target
  229. target = game.Players:GetUserIdFromNameAsync(target)
  230. end
  231.  
  232. _G.plr = target
  233.  
  234. _G.mode = mode
  235. local url =
  236. RequestFunction(
  237. {
  238. ["Url"] = "https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=" ..
  239. target .. "&format=Png&size=150x150&isCircular=false",
  240. ["Method"] = "GET"
  241. }
  242. )
  243. _G.image = h:JSONDecode(url.Body).data[1].imageUrl
  244.  
  245. if string.sub(_G.image, 10, 10) ~= "r" then
  246. TButton.Text = "Broken pfp"
  247. return
  248. end
  249. TButton.Text = "Searching: " .. gameid
  250. a = {}
  251.  
  252. for i = 1, #_G.cursor[tostring(gameid)] + 1 do
  253. if i > 1 then
  254. a[i] = _G.cursor[tostring(gameid)][i - 1]
  255. else
  256. a[i] = ""
  257. end
  258. end
  259.  
  260. for i, v in ipairs(a) do
  261. spawn(
  262. function()
  263. if waittime then
  264. wait(1 / 3.2)
  265. waittime = false
  266. end
  267. a[i] =
  268. RequestFunction(
  269. {
  270. ["Url"] = "https://games.roblox.com/v1/games/" ..
  271. gameid ..
  272. "/servers/0?excludeFullGames=false&limit=100&cursor=" ..
  273. a[i],
  274. ["Method"] = "GET"
  275. }
  276. )
  277. a[i] = h:JSONDecode(a[i].Body).data
  278. if a[i] then
  279. if not a[i][100] then
  280. b = true
  281. num = i
  282. end
  283. end
  284. end
  285. )
  286. if b then
  287. b = false
  288. waittime = false
  289. break
  290. end
  291. wait(1 / 3.2)
  292. end
  293. if num == nil then
  294. num = #a
  295. end
  296.  
  297. function check(c)
  298. for i = 1, c do
  299. if type(a[i]) == "table" then
  300. else
  301. return false
  302. end
  303. end
  304. return true
  305. end
  306.  
  307. repeat
  308. game:GetService("RunService").RenderStepped:Wait()
  309. until check(num)
  310.  
  311. for i, v in pairs(a) do
  312. if i <= num then
  313. for i2, v2 in pairs(v) do
  314. for i3, v3 in pairs(v2.playerTokens) do
  315. table.insert(_G.token, {gameid, v2.id, v3})
  316. end
  317. end
  318. end
  319. end
  320.  
  321. TButton.Text = "Sending JSON..."
  322. json2()
  323. elseif not _G.cursor[tostring(gameid)] and _G.available then
  324. _G.available = false
  325. if tonumber(target) then
  326. _G.plrname = game.Players:GetNameFromUserIdAsync(tonumber(target))
  327. else
  328. _G.plrname = target
  329. target = game.Players:GetUserIdFromNameAsync(target)
  330. end
  331.  
  332. _G.plr = target
  333.  
  334. _G.mode = mode
  335.  
  336. local url =
  337. RequestFunction(
  338. {
  339. ["Url"] = "https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=" ..
  340. target .. "&format=Png&size=150x150&isCircular=false",
  341. ["Method"] = "GET"
  342. }
  343. )
  344. _G.image = h:JSONDecode(url.Body).data[1].imageUrl
  345. if string.sub(_G.image, 10, 10) ~= "r" then
  346. TButton.Text = "Broken pfp"
  347. return
  348. end
  349.  
  350. TButton.Text = "Searching: " .. gameid
  351. function s(g)
  352. link =
  353. "https://games.roblox.com/v1/games/" ..
  354. g .. "/servers/0?excludeFullGames=false&limit=100"
  355. if cursor then
  356. link = link .. "&cursor=" .. cursor
  357. page = game:HttpGet(link)
  358. page = h:JSONDecode(page)
  359. cursor = page.nextPageCursor
  360. page = page.data
  361. else
  362. page = game:HttpGet(link)
  363. page = h:JSONDecode(page)
  364. cursor = page.nextPageCursor
  365. page = page.data
  366. end
  367. end
  368.  
  369. local tokencount = 0
  370.  
  371. function t()
  372. for i, v in pairs(page) do
  373. for i2, v2 in pairs(v["playerTokens"]) do
  374. tokencount = tokencount + 1
  375. table.insert(_G.token, {gameid, v.id, v2})
  376. end
  377. end
  378. end
  379.  
  380. repeat
  381. s(gameid)
  382. t()
  383. until cursor == nil
  384.  
  385. if tokencount == 0 then
  386. TButton.Text = "The game has no players"
  387. _G.available = true
  388. return
  389. end
  390.  
  391. TButton.Text = "Sending JSON..."
  392. json2()
  393. elseif not _G.available then
  394. TButton.Text = "Reached Http Request Limit"
  395. end
  396. end
  397. )
  398. if not suc then
  399. _G.available = true
  400. end
  401. end
  402.  
  403. playertoken(placeId, user)
  404. end
  405. )
  406. end
  407.  
  408. game:GetService("UserInputService").InputBegan:Connect(
  409. function(a, b)
  410. if not b then
  411. local keycode = a.KeyCode
  412. if keycode == Enum.KeyCode.RightShift then
  413. game.CoreGui.StreamSniper.Enabled = not game.CoreGui.StreamSniper.Enabled
  414. end
  415. end
  416. end
  417. )
  418.  
  419. TButton.MouseButton1Click:Connect(
  420. function()
  421. local t1 = TBox1.Text
  422. local t2 = TBox2.Text
  423. local t3 = TBox3.Text
  424. if string.len(t1) < 3 or string.len(t2) < 3 or not (t3 == "TP" or t3 == "Log" or t3 == "TPLog") then
  425. TButton.Text = "Invalid information"
  426. spawn(
  427. function()
  428. wait(2)
  429. TButton.Text = "Snipe"
  430. end
  431. )
  432. return
  433. end
  434. runScript(t1, t2, t3)
  435. end
  436. )
  437. else
  438. game.CoreGui.StreamSniper.TextButton.Text = "Already Executed"
  439. end
Add Comment
Please, Sign In to add comment