Advertisement
2AreYouMental110

synapse x stream sniper fixed for krnl

Apr 7th, 2023
3,446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.13 KB | None | 0 0
  1. -- made by Acrillis
  2. -- fixed by Zv_yz#0847
  3. -- fixed again by 2AreYouMental110
  4.  
  5. -- Old Version: https://raw.githubusercontent.com/Acrillis/SynapseX/master/Synapse%20Scripts/StreamSniper.lua
  6. local Screenguini = Instance.new("ScreenGui")
  7. local Frame = Instance.new("Frame")
  8. local TextLabel = Instance.new("TextLabel")
  9. local TextLabel_2 = Instance.new("TextLabel")
  10. local UsernameBox = Instance.new("TextBox")
  11. local TextLabel_3 = Instance.new("TextLabel")
  12. local PlaceIdBox = Instance.new("TextBox")
  13. local StartButton = Instance.new("TextButton")
  14. local TextLabel_4 = Instance.new("TextLabel")
  15. local UsernameLabel = Instance.new("TextLabel")
  16. local TextLabel_5 = Instance.new("TextLabel")
  17. local UserIdLabel = Instance.new("TextLabel")
  18. local GamerPicture = Instance.new("ImageLabel")
  19.  
  20. local HttpService = game:GetService("HttpService")
  21. local Players = game:GetService("Players")
  22. local TeleportService = game:GetService("TeleportService")
  23.  
  24. Screenguini.Name = HttpService:GenerateGUID(false)
  25. Screenguini.Parent = game:GetService("CoreGui")
  26.  
  27. Frame.Parent = Screenguini
  28. Frame.Active = true
  29. Frame.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  30. Frame.BorderColor3 = Color3.fromRGB(31, 31, 31)
  31. Frame.Draggable = true
  32. Frame.Size = UDim2.new(0, 400, 0, 260)
  33.  
  34. TextLabel.Parent = Frame
  35. TextLabel.Active = true
  36. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 170, 0)
  37. TextLabel.BorderColor3 = Color3.fromRGB(31, 31, 40)
  38. TextLabel.Size = UDim2.new(0, 400, 0, 40)
  39. TextLabel.Font = Enum.Font.SourceSansLight
  40. TextLabel.Text = "Synapse X Stream Sniper (FIXED FOR KRNL)"
  41. TextLabel.TextSize = 24.000
  42.  
  43. TextLabel_2.Parent = Frame
  44. TextLabel_2.Active = true
  45. TextLabel_2.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  46. TextLabel_2.BorderColor3 = Color3.fromRGB(31, 31, 31)
  47. TextLabel_2.Position = UDim2.new(0, 10, 0, 49)
  48. TextLabel_2.Size = UDim2.new(0, 150, 0, 20)
  49. TextLabel_2.Font = Enum.Font.SourceSansLight
  50. TextLabel_2.Text = "Username/UserId:"
  51. TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
  52. TextLabel_2.TextSize = 16.000
  53.  
  54. UsernameBox.Name = "UsernameBox"
  55. UsernameBox.Parent = Frame
  56. UsernameBox.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
  57. UsernameBox.BorderColor3 = Color3.fromRGB(31, 31, 31)
  58. UsernameBox.Position = UDim2.new(0, 10, 0, 80)
  59. UsernameBox.Size = UDim2.new(0, 150, 0, 35)
  60. UsernameBox.Font = Enum.Font.SourceSansLight
  61. UsernameBox.PlaceholderColor3 = Color3.fromRGB(255, 255, 255)
  62. UsernameBox.PlaceholderText = "Enter Username Here"
  63. UsernameBox.Text = ""
  64. UsernameBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  65. UsernameBox.TextSize = 18.000
  66.  
  67. TextLabel_3.Parent = Frame
  68. TextLabel_3.Active = true
  69. TextLabel_3.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  70. TextLabel_3.BorderColor3 = Color3.fromRGB(31, 31, 31)
  71. TextLabel_3.Position = UDim2.new(0, 10, 0, 130)
  72. TextLabel_3.Size = UDim2.new(0, 150, 0, 20)
  73. TextLabel_3.Font = Enum.Font.SourceSansLight
  74. TextLabel_3.Text = "Place Id:"
  75. TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
  76. TextLabel_3.TextSize = 16.000
  77.  
  78. PlaceIdBox.Name = "PlaceIdBox"
  79. PlaceIdBox.Parent = Frame
  80. PlaceIdBox.BackgroundColor3 = Color3.fromRGB(61, 61, 61)
  81. PlaceIdBox.BorderColor3 = Color3.fromRGB(31, 31, 31)
  82. PlaceIdBox.Position = UDim2.new(0, 10, 0, 157)
  83. PlaceIdBox.Size = UDim2.new(0, 150, 0, 35)
  84. PlaceIdBox.Font = Enum.Font.SourceSansLight
  85. PlaceIdBox.PlaceholderColor3 = Color3.fromRGB(255, 255, 255)
  86. PlaceIdBox.PlaceholderText = "Enter PlaceId Here"
  87. PlaceIdBox.Text = ""
  88. PlaceIdBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  89. PlaceIdBox.TextSize = 18.000
  90.  
  91. StartButton.Name = "StartButton"
  92. StartButton.Parent = Frame
  93. StartButton.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  94. StartButton.BorderColor3 = Color3.fromRGB(31, 31, 31)
  95. StartButton.Position = UDim2.new(0, 10, 0, 210)
  96. StartButton.Size = UDim2.new(0, 380, 0, 40)
  97. StartButton.Font = Enum.Font.SourceSansLight
  98. StartButton.Text = "Start"
  99. StartButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  100. StartButton.TextSize = 24.000
  101.  
  102. TextLabel_4.Parent = Frame
  103. TextLabel_4.Active = true
  104. TextLabel_4.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  105. TextLabel_4.BackgroundTransparency = 1.000
  106. TextLabel_4.BorderColor3 = Color3.fromRGB(31, 31, 31)
  107. TextLabel_4.Position = UDim2.new(0, 200, 0, 49)
  108. TextLabel_4.Size = UDim2.new(0, 0, 0, 20)
  109. TextLabel_4.AutomaticSize = Enum.AutomaticSize.X
  110. TextLabel_4.Font = Enum.Font.SourceSansBold
  111. TextLabel_4.Text = "Username:"
  112. TextLabel_4.TextColor3 = Color3.fromRGB(255, 255, 255)
  113. TextLabel_4.TextSize = 16.000
  114. TextLabel_4.TextWrapped = true
  115. TextLabel_4.TextXAlignment = Enum.TextXAlignment.Left
  116.  
  117. UsernameLabel.Name = "UsernameLabel"
  118. UsernameLabel.Parent = TextLabel_4
  119. UsernameLabel.Active = true
  120. UsernameLabel.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  121. UsernameLabel.BackgroundTransparency = 1.000
  122. UsernameLabel.BorderColor3 = Color3.fromRGB(31, 31, 31)
  123. UsernameLabel.Position = UDim2.new(0.5, 0, 0, 0)
  124. UsernameLabel.Size = UDim2.new(0, 150, 0, 20)
  125. UsernameLabel.Font = Enum.Font.SourceSansLight
  126. UsernameLabel.Text = ""
  127. UsernameLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  128. UsernameLabel.TextSize = 16.000
  129. UsernameLabel.TextXAlignment = Enum.TextXAlignment.Left
  130.  
  131. TextLabel_5.Parent = Frame
  132. TextLabel_5.Active = true
  133. TextLabel_5.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  134. TextLabel_5.BackgroundTransparency = 1.000
  135. TextLabel_5.BorderColor3 = Color3.fromRGB(31, 31, 31)
  136. TextLabel_5.Position = UDim2.new(0, 200, 0, 69)
  137. TextLabel_5.Size = UDim2.new(0, 0, 0, 20)
  138. TextLabel_5.AutomaticSize = Enum.AutomaticSize.X
  139. TextLabel_5.Font = Enum.Font.SourceSansBold
  140. TextLabel_5.Text = "UserId:"
  141. TextLabel_5.TextColor3 = Color3.fromRGB(255, 255, 255)
  142. TextLabel_5.TextSize = 16.000
  143. TextLabel_5.TextWrapped = true
  144. TextLabel_5.TextXAlignment = Enum.TextXAlignment.Left
  145.  
  146. UserIdLabel.Name = "UserIdLabel"
  147. UserIdLabel.Parent = TextLabel_5
  148. UserIdLabel.Active = true
  149. UserIdLabel.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  150. UserIdLabel.BackgroundTransparency = 1.000
  151. UserIdLabel.BorderColor3 = Color3.fromRGB(31, 31, 31)
  152. UserIdLabel.Position = UDim2.new(0.5, 0, 0, 0)
  153. UserIdLabel.Size = UDim2.new(0, 150, 0, 20)
  154. UserIdLabel.Font = Enum.Font.SourceSansLight
  155. UserIdLabel.Text = ""
  156. UserIdLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  157. UserIdLabel.TextSize = 16.000
  158. UserIdLabel.TextXAlignment = Enum.TextXAlignment.Left
  159.  
  160. GamerPicture.Name = "GamerPicture"
  161. GamerPicture.Parent = Frame
  162. GamerPicture.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  163. GamerPicture.Position = UDim2.new(0, 200, 0, 95)
  164. GamerPicture.Size = UDim2.new(0, 97, 0, 97)
  165. GamerPicture.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
  166.  
  167. if shared.STREAM_SNIPER then
  168.    shared.STREAM_SNIPER:Destroy()
  169. end
  170. shared.STREAM_SNIPER = Screenguini
  171.  
  172. local searching = false
  173. local confirm = false
  174.  
  175. local function HttpGet(url)
  176. return pcall(HttpService.JSONDecode, HttpService, game:HttpGet(url))
  177. end
  178.  
  179. local function Status(text, tout)
  180. StartButton.Text = text
  181.  
  182.    if tout then
  183.        task.delay(tout, function()
  184.            if StartButton.Text == text then
  185.                searching = false
  186.                StartButton.Text = "Start"    
  187.            end
  188.        end)
  189.    end
  190. end
  191.  
  192. local function getServers(id, cursor)
  193.    local fullurl = "https://games.roblox.com/v1/games/".. id .."/servers/Public?limit=100"
  194.    if cursor then
  195.        fullurl = "&cursor=".. cursor
  196.    end
  197.  
  198.    return HttpGet(fullurl)
  199. end
  200.  
  201. local function fetchThumbs(tokens)
  202.    local payload = {
  203.        Url = "https://thumbnails.roblox.com/v1/batch",
  204.        Headers = {
  205.            ["Content-Type"] = "application/json"
  206.        },
  207.        Method = "POST",
  208.  
  209.        Body = {}
  210.    }
  211.  
  212.    for _, token in ipairs(tokens) do
  213.        table.insert(payload.Body, {
  214.            requestId = "0:".. token ..":AvatarHeadshot:150x150:png:regular",
  215.            type = "AvatarHeadShot",
  216.            targetId = 0,
  217.            token = token,
  218.            format = "png",
  219.            size = "150x150"
  220.        })
  221.    end
  222.  
  223.    payload.Body = HttpService:JSONEncode(payload.Body)
  224.    local result = request(payload)
  225.    local s, data = pcall(HttpService.JSONDecode, HttpService, result.Body)
  226.    return s, data and data.data or data
  227. end
  228.  
  229. local function teleport(placeId, guid)
  230.    TeleportService:TeleportToPlaceInstance(placeId, guid)
  231. end
  232.  
  233.  
  234. local threads = 30
  235.  
  236. StartButton.MouseButton1Click:Connect(function()
  237.    if confirm then
  238.        confirm = false
  239.        searching = false
  240.        Status("Cancelled")
  241.        return
  242.    end
  243.  
  244.    if searching then
  245.        confirm = true
  246.        local old = StartButton.Text
  247.        Status("Click again to confirm.")
  248.        task.delay(5, function()
  249.            if "Click again to confirm." == StartButton.Text then
  250.                confirm = false
  251.                StartButton.Text = old
  252.            end
  253.        end)
  254.        return
  255.    end
  256.  
  257.    searching = true
  258.  
  259.    -- User ID
  260.    Status("Getting user id...")
  261.  
  262.    local s, Username, UserId = pcall(function() -- TODO FIX: fix for only numbers players
  263.        local userId = tonumber(UsernameBox.Text) or Players:GetUserIdFromNameAsync(UsernameBox.Text)
  264.        local username = Players:GetNameFromUserIdAsync(userId)
  265.  
  266. return username, userId
  267. end)
  268.  
  269. if not s then
  270. return Status("Username or UserId does not exist!", 3)
  271. end
  272.  
  273.    local s, thumbUrl = pcall(Players.GetUserThumbnailAsync, Players, UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size150x150)
  274.  
  275.    UsernameLabel.Text = Username
  276.    UserIdLabel.Text = UserId
  277.    GamerPicture.Image = s and thumbUrl or ""
  278.  
  279.    Status("Getting user's thumbnail...")
  280.    local s, response = HttpGet("https://thumbnails.roblox.com/v1/users/avatar-headshot?userIds=" .. UserId .. "&format=Png&size=150x150&isCircular=false")
  281.    --local s, response = HttpGet("https://www.roblox.com/headshot-thumbnail/json?userId=" .. UserId .. "&width=150&height=150")
  282.    local thumbnail = s and response['data'][1].imageUrl
  283.  
  284.    Status("Searching for (".. UserId ..")")
  285.    
  286.    -- Place ID
  287.    Status("Getting place id...")
  288.    
  289.    local placeId = tonumber(PlaceIdBox.Text)
  290.  
  291.    if PlaceIdBox.Text:gsub("%s", "") == "" then
  292.        placeId = game.PlaceId
  293.  
  294.    elseif not placeId then
  295.        Status("Invalid place id", 3)
  296.        return
  297.    end
  298.    
  299.    Status("Searching...")
  300.    local cursor = nil
  301.    local searched = 0
  302.    local maxSearchs = 0
  303.    local players = 0
  304.    -- Server search
  305.    while searching do
  306.        if not Screenguini or not Screenguini.Parent then
  307.            break
  308.        end
  309.        local s, result = getServers(placeId, cursor)
  310.  
  311.        if s then
  312.            local servers = result.data
  313.            cursor = result.nextPageCursor
  314.            
  315.            if StartButton.Text:match("Searching") then
  316.                maxSearchs = maxSearchs + #servers
  317.                Status(searched .."/".. maxSearchs .." servers scanned, players found: ".. players)
  318.            end
  319.  
  320.            -- Search all servers
  321.            for index, server in ipairs(servers) do
  322.                local function fetchServer()
  323.                    local s, thumbs = fetchThumbs(server.playerTokens)
  324.                    if s then
  325.                        players = players + #thumbs
  326.                        for _, playerThumb in ipairs(thumbs) do
  327.                            if playerThumb.imageUrl then
  328.                                if playerThumb.imageUrl == thumbnail then
  329.                                    searching = false
  330.                                    Status("Found player, teleporting...")
  331.  
  332.                                    teleport(placeId, server.id)
  333.                                    local try = 0
  334.                                    Player.OnTeleport:Connect(function(teleportState)
  335.                                        if teleportState == Enum.TeleportState.Failed then
  336.                                            try = try + 1
  337.                                            Status("Teleport failed, try #".. try)
  338.                                            teleport(placeId, server.id)
  339.                                        end
  340.                                    end)
  341.                                end
  342.                            else
  343.                                Status("token failed, id:", playerThumb.requestId, playerThumb.state, playerThumb.errorMessage)
  344.                                --print("token failed, id:", playerThumb.requestId, playerThumb.state, playerThumb.errorMessage)
  345.                            end
  346.                        end
  347.                    else
  348.                        Status("token failed", s, thumb)
  349.                        --print("token failed", s, thumbs)
  350.                    end
  351.                end
  352.                searched = searched + 1
  353.                if index % threads ~= 0 then
  354.                    task.spawn(fetchServer)
  355.                    task.wait()
  356.  
  357.                else
  358.                    fetchServer()
  359.                end
  360.  
  361.                if searching then
  362.                    Status(searched .."/".. maxSearchs .." servers scanned, players found: ".. players)
  363.                end
  364.            end
  365.            
  366.            -- Player not found
  367.            if not cursor then
  368.                break
  369.            end
  370.        else
  371.            return Status("Failed to find servers", 3)
  372.        end
  373.  
  374.        task.wait()
  375.    end
  376.    
  377.    if searching then
  378.        Status("Failed to find ".. Username ..", maybe in a vip server", 3)
  379.    end
  380. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement