TheHatBoys

random script i found

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