Advertisement
oktosamurai

Stream Sniper Script

Apr 30th, 2020
14,799
1
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.63 KB | None | 1 0
  1. local StreamSnipe = Instance.new("ScreenGui")
  2. local Frame = Instance.new("Frame")
  3. local TextLabel = Instance.new("TextLabel")
  4. local TextLabel_2 = Instance.new("TextLabel")
  5. local UsernameBox = Instance.new("TextBox")
  6. local TextLabel_3 = Instance.new("TextLabel")
  7. local PlaceIdBox = Instance.new("TextBox")
  8. local StartButton = Instance.new("TextButton")
  9. local HttpService = game:GetService("HttpService")
  10.  
  11. StreamSnipe.Name = HttpService:GenerateGUID(false)
  12. StreamSnipe.Parent = game:GetService("CoreGui")
  13.  
  14. Frame.Parent = StreamSnipe
  15. Frame.Active = true
  16. Frame.BackgroundColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  17. Frame.BorderColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  18. Frame.Position = UDim2.new(0, 430, 0, 200)
  19. Frame.Size = UDim2.new(0, 400, 0, 260)
  20. Frame.Draggable = true
  21.  
  22. TextLabel.Parent = Frame
  23. TextLabel.Active = true
  24. TextLabel.BackgroundColor3 = Color3.new(1, 0.666667, 0)
  25. TextLabel.BorderColor3 = Color3.new(0.121569, 0.121569, 0.160784)
  26. TextLabel.Size = UDim2.new(0, 400, 0, 40)
  27. TextLabel.Font = Enum.Font.SourceSansLight
  28. TextLabel.Text = "Synapse X Stream Sniper"
  29. TextLabel.TextSize = 24
  30.  
  31. TextLabel_2.Parent = Frame
  32. TextLabel_2.Active = true
  33. TextLabel_2.BackgroundColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  34. TextLabel_2.BorderColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  35. TextLabel_2.Position = UDim2.new(0, 10, 0, 50)
  36. TextLabel_2.Size = UDim2.new(0, 380, 0, 20)
  37. TextLabel_2.Font = Enum.Font.SourceSansLight
  38. TextLabel_2.Text = "Username/UserId:"
  39. TextLabel_2.TextColor3 = Color3.new(1, 1, 1)
  40. TextLabel_2.TextSize = 16
  41.  
  42. UsernameBox.Name = "UsernameBox"
  43. UsernameBox.Parent = Frame
  44. UsernameBox.BackgroundColor3 = Color3.new(0.239216, 0.239216, 0.239216)
  45. UsernameBox.BorderColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  46. UsernameBox.Position = UDim2.new(0, 10, 0, 80)
  47. UsernameBox.Size = UDim2.new(0, 380, 0, 40)
  48. UsernameBox.Font = Enum.Font.SourceSansLight
  49. UsernameBox.PlaceholderColor3 = Color3.new(1, 1, 1)
  50. UsernameBox.PlaceholderText = "Enter Username Here"
  51. UsernameBox.Text = ""
  52. UsernameBox.TextColor3 = Color3.new(1, 1, 1)
  53. UsernameBox.TextSize = 18
  54.  
  55. TextLabel_3.Parent = Frame
  56. TextLabel_3.Active = true
  57. TextLabel_3.BackgroundColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  58. TextLabel_3.BorderColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  59. TextLabel_3.Position = UDim2.new(0, 10, 0, 130)
  60. TextLabel_3.Size = UDim2.new(0, 380, 0, 20)
  61. TextLabel_3.Font = Enum.Font.SourceSansLight
  62. TextLabel_3.Text = "Place Id:"
  63. TextLabel_3.TextColor3 = Color3.new(1, 1, 1)
  64. TextLabel_3.TextSize = 16
  65.  
  66. PlaceIdBox.Name = "PlaceIdBox"
  67. PlaceIdBox.Parent = Frame
  68. PlaceIdBox.BackgroundColor3 = Color3.new(0.239216, 0.239216, 0.239216)
  69. PlaceIdBox.BorderColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  70. PlaceIdBox.Position = UDim2.new(0, 10, 0, 160)
  71. PlaceIdBox.Size = UDim2.new(0, 380, 0, 40)
  72. PlaceIdBox.Font = Enum.Font.SourceSansLight
  73. PlaceIdBox.PlaceholderColor3 = Color3.new(1, 1, 1)
  74. PlaceIdBox.PlaceholderText = "Enter PlaceId Here"
  75. PlaceIdBox.Text = ""
  76. PlaceIdBox.TextColor3 = Color3.new(1, 1, 1)
  77. PlaceIdBox.TextSize = 18
  78.  
  79. StartButton.Name = "StartButton"
  80. StartButton.Parent = Frame
  81. StartButton.BackgroundColor3 = Color3.new(0.160784, 0.160784, 0.160784)
  82. StartButton.BorderColor3 = Color3.new(0.121569, 0.121569, 0.121569)
  83. StartButton.Position = UDim2.new(0, 10, 0, 210)
  84. StartButton.Size = UDim2.new(0, 380, 0, 40)
  85. StartButton.Font = Enum.Font.SourceSansLight
  86. StartButton.Text = "Start"
  87. StartButton.TextColor3 = Color3.new(1, 1, 1)
  88. StartButton.TextSize = 24
  89.  
  90. local Debounce = false
  91. local Kill = false
  92.  
  93. local function HttpGet(url)
  94.     return HttpService:JSONDecode(htgetf(url))
  95. end
  96.  
  97. local function Status(text, tout)
  98.     StartButton.Text = text
  99.     if tout then
  100.         spawn(function()
  101.             wait(tout)
  102.             StartButton.Text = "Start"
  103.         end)
  104.     end
  105. end
  106.  
  107. StartButton.MouseButton1Click:Connect(function()
  108.     if Debounce then
  109.         Kill = true
  110.         Debounce = false
  111.         return
  112.     end
  113.    
  114.     Debounce = true
  115.    
  116.     local PlaceId = PlaceIdBox.Text
  117.     Status("Stage 1...")
  118.    
  119.     local Suc, UserId = pcall(function()
  120.         if tonumber(UsernameBox.Text) then
  121.             return tonumber(UsernameBox.Text)
  122.         end
  123.        
  124.         return game:GetService("Players"):GetUserIdFromNameAsync(UsernameBox.Text)
  125.     end)
  126.    
  127.     if not Suc then
  128.         return Status("Username does not exist!", 3)
  129.     end
  130.    
  131.     Status("Stage 2..")
  132.    
  133.     local Thumbnail = HttpGet("https://www.roblox.com/headshot-thumbnail/json?userId=" .. UserId .. "&width=48&height=48").Url
  134.    
  135.     Status("Stage 3...")
  136.    
  137.     local Index = 0
  138.     while true do
  139.         local GameInstances = HttpGet("https://www.roblox.com/games/getgameinstancesjson?placeId=" .. PlaceId .. "&startindex=" .. Index)
  140.         for I,V in pairs(GameInstances.Collection) do
  141.             for I2,V2 in pairs(V.CurrentPlayers) do
  142.                 if V2.Id == UserId or V2.Thumbnail.Url == Thumbnail then
  143.                     Status("Complete!")
  144.                     game:GetService("TeleportService"):TeleportToPlaceInstance(tonumber(PlaceId), V.Guid)
  145.                     local FailCounter = 0
  146.                     game:GetService("Players").LocalPlayer.OnTeleport:Connect(function(State)
  147.                         if State == Enum.TeleportState.Failed then
  148.                             FailCounter = FailCounter + 1
  149.                             Status("Failed to teleport. (retry " .. tostring(FailCounter) .. ")")
  150.                             game:GetService("TeleportService"):TeleportToPlaceInstance(tonumber(PlaceId), V.Guid)
  151.                         end
  152.                     end)
  153.                     return
  154.                 end
  155.             end
  156.         end
  157.         Status("Stage 3 (" .. tostring(Index) .. "/" .. tostring(GameInstances.TotalCollectionSize) .. " servers scanned)...")
  158.         if Index > GameInstances.TotalCollectionSize then
  159.             return Status("Failed to get game! (VIP server?)", 3)
  160.         end
  161.         if Kill then
  162.             Kill = false
  163.             Debounce = false
  164.             Status("Cancelled.", 3)
  165.             return
  166.         end
  167.         Index = Index + 10
  168.     end
  169. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement