KirchohexSX

zzz

Jan 29th, 2026
167
1
Never
11
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.04 KB | None | 1 0
  1. -- Ultimate Roblox Username Scraper (Fixed: mobile dropdowns, custom drag, webhook)
  2. -- Output is a selectable, scrollable TextBox inside a ScrollingFrame.
  3. -- Dropdown overlays, start/stop/copy all work.
  4. -- Scrape Amount and Scrape Mode labels are always visible.
  5. -- Added webhook support: when an available username is found, it posts to the webhook URL (if provided).
  6.  
  7. local Players = game:GetService("Players")
  8. local HttpService = game:GetService("HttpService")
  9. local UserInputService = game:GetService("UserInputService")
  10. local player = Players.LocalPlayer
  11.  
  12. local function createUI()
  13. local screenGui = Instance.new("ScreenGui")
  14. screenGui.Name = "UltimateUsernameScraper"
  15. screenGui.Parent = player:WaitForChild("PlayerGui")
  16.  
  17. local frame = Instance.new("Frame")
  18. frame.Size = UDim2.new(0, 500, 0, 540)
  19. frame.Position = UDim2.new(0.5, -250, 0.5, -270)
  20. frame.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  21. frame.BorderSizePixel = 0
  22. frame.ZIndex = 1
  23. frame.Parent = screenGui
  24. -- Do NOT use Frame.Draggable (interferes with touch input on mobile).
  25. -- We'll implement custom dragging using the title bar.
  26.  
  27. local title = Instance.new("TextLabel")
  28. title.Text = "Ultimate Roblox Username Scraper"
  29. title.Font = Enum.Font.GothamBlack
  30. title.TextSize = 24
  31. title.Size = UDim2.new(1, 0, 0, 40)
  32. title.BackgroundTransparency = 1
  33. title.TextColor3 = Color3.fromRGB(220, 220, 220)
  34. title.ZIndex = 2
  35. title.Parent = frame
  36.  
  37. local digitLabel = Instance.new("TextLabel")
  38. digitLabel.Text = "Username Length:"
  39. digitLabel.Font = Enum.Font.Gotham
  40. digitLabel.TextSize = 18
  41. digitLabel.Position = UDim2.new(0, 20, 0, 48)
  42. digitLabel.Size = UDim2.new(0, 160, 0, 30)
  43. digitLabel.BackgroundTransparency = 1
  44. digitLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  45. digitLabel.ZIndex = 2
  46. digitLabel.Parent = frame
  47.  
  48. local digitDropdown = Instance.new("TextButton")
  49. digitDropdown.Size = UDim2.new(0, 140, 0, 30)
  50. digitDropdown.Position = UDim2.new(0, 180, 0, 48)
  51. digitDropdown.Text = "6"
  52. digitDropdown.Font = Enum.Font.Gotham
  53. digitDropdown.TextSize = 18
  54. digitDropdown.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
  55. digitDropdown.TextColor3 = Color3.fromRGB(0, 0, 0)
  56. digitDropdown.ZIndex = 2
  57. digitDropdown.Parent = frame
  58.  
  59. local digitDropdownMenu = Instance.new("Frame")
  60. digitDropdownMenu.Size = UDim2.new(0, 140, 0, 340)
  61. digitDropdownMenu.Position = UDim2.new(0, 180, 0, 78)
  62. digitDropdownMenu.BackgroundColor3 = Color3.fromRGB(220, 220, 220)
  63. digitDropdownMenu.Visible = false
  64. digitDropdownMenu.ZIndex = 10
  65. digitDropdownMenu.Parent = frame
  66.  
  67. local digitOptions = {}
  68. for i=4,20 do
  69. local btn = Instance.new("TextButton")
  70. btn.Size = UDim2.new(1, 0, 0, 17)
  71. btn.Position = UDim2.new(0, 0, 0, (i-4)*17)
  72. btn.Text = tostring(i)
  73. btn.Font = Enum.Font.Gotham
  74. btn.TextSize = 15
  75. btn.TextColor3 = Color3.fromRGB(0, 0, 0)
  76. btn.BackgroundColor3 = Color3.fromRGB(220, 220, 220)
  77. btn.ZIndex = 11
  78. btn.Parent = digitDropdownMenu
  79. digitOptions[i] = btn
  80. end
  81.  
  82. digitDropdown.MouseButton1Click:Connect(function()
  83. digitDropdownMenu.Visible = not digitDropdownMenu.Visible
  84. -- Ensure other menus are closed
  85. variantDropdownMenu.Visible = false
  86. amtTypeDropdownMenu.Visible = false
  87. end)
  88. for i, btn in pairs(digitOptions) do
  89. btn.MouseButton1Click:Connect(function()
  90. digitDropdown.Text = btn.Text
  91. digitDropdownMenu.Visible = false
  92. end)
  93. end
  94.  
  95. -- Variant label and dropdown
  96. local variantLabel = Instance.new("TextLabel")
  97. variantLabel.Text = "Variant:"
  98. variantLabel.Font = Enum.Font.Gotham
  99. variantLabel.TextSize = 18
  100. variantLabel.Position = UDim2.new(0, 20, 0, 88)
  101. variantLabel.Size = UDim2.new(0, 160, 0, 30)
  102. variantLabel.BackgroundTransparency = 1
  103. variantLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  104. variantLabel.ZIndex = 2
  105. variantLabel.Parent = frame
  106.  
  107. local variantDropdown = Instance.new("TextButton")
  108. variantDropdown.Size = UDim2.new(0, 140, 0, 30)
  109. variantDropdown.Position = UDim2.new(0, 180, 0, 88)
  110. variantDropdown.Text = "Random"
  111. variantDropdown.Font = Enum.Font.Gotham
  112. variantDropdown.TextSize = 18
  113. variantDropdown.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
  114. variantDropdown.TextColor3 = Color3.fromRGB(0, 0, 0)
  115. variantDropdown.ZIndex = 2
  116. variantDropdown.Parent = frame
  117.  
  118. local variantDropdownMenu = Instance.new("Frame")
  119. variantDropdownMenu.Size = UDim2.new(0, 140, 0, 51)
  120. variantDropdownMenu.Position = UDim2.new(0, 180, 0, 118)
  121. variantDropdownMenu.BackgroundColor3 = Color3.fromRGB(220, 220, 220)
  122. variantDropdownMenu.Visible = false
  123. variantDropdownMenu.ZIndex = 10
  124. variantDropdownMenu.Parent = frame
  125.  
  126. local variants = {"Random", "Double Digit", "Repeating Numbers"}
  127. local variantButtons = {}
  128. for i, v in ipairs(variants) do
  129. local btn = Instance.new("TextButton")
  130. btn.Size = UDim2.new(1, 0, 0, 17)
  131. btn.Position = UDim2.new(0, 0, 0, (i-1)*17)
  132. btn.Text = v
  133. btn.Font = Enum.Font.Gotham
  134. btn.TextSize = 15
  135. btn.TextColor3 = Color3.fromRGB(0, 0, 0)
  136. btn.BackgroundColor3 = Color3.fromRGB(220, 220, 220)
  137. btn.ZIndex = 11
  138. btn.Parent = variantDropdownMenu
  139. variantButtons[v] = btn
  140. end
  141.  
  142. variantDropdown.MouseButton1Click:Connect(function()
  143. variantDropdownMenu.Visible = not variantDropdownMenu.Visible
  144. -- Ensure other menus are closed
  145. digitDropdownMenu.Visible = false
  146. amtTypeDropdownMenu.Visible = false
  147. end)
  148. for v, btn in pairs(variantButtons) do
  149. btn.MouseButton1Click:Connect(function()
  150. variantDropdown.Text = btn.Text
  151. variantDropdownMenu.Visible = false
  152. end)
  153. end
  154.  
  155. -- Scrape Mode label and dropdown (always visible)
  156. local scrapeModeLabel = Instance.new("TextLabel")
  157. scrapeModeLabel.Text = "Scrape Mode:"
  158. scrapeModeLabel.Font = Enum.Font.Gotham
  159. scrapeModeLabel.TextSize = 18
  160. scrapeModeLabel.Position = UDim2.new(0, 20, 0, 128)
  161. scrapeModeLabel.Size = UDim2.new(0, 160, 0, 30)
  162. scrapeModeLabel.BackgroundTransparency = 1
  163. scrapeModeLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  164. scrapeModeLabel.ZIndex = 2
  165. scrapeModeLabel.Parent = frame
  166.  
  167. local amtTypeDropdown = Instance.new("TextButton")
  168. amtTypeDropdown.Size = UDim2.new(0, 140, 0, 30)
  169. amtTypeDropdown.Position = UDim2.new(0, 180, 0, 128)
  170. amtTypeDropdown.Text = "Set Amount"
  171. amtTypeDropdown.Font = Enum.Font.Gotham
  172. amtTypeDropdown.TextSize = 18
  173. amtTypeDropdown.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
  174. amtTypeDropdown.TextColor3 = Color3.fromRGB(0, 0, 0)
  175. amtTypeDropdown.ZIndex = 2
  176. amtTypeDropdown.Parent = frame
  177.  
  178. local amtTypeDropdownMenu = Instance.new("Frame")
  179. amtTypeDropdownMenu.Size = UDim2.new(0, 140, 0, 34)
  180. amtTypeDropdownMenu.Position = UDim2.new(0, 180, 0, 158)
  181. amtTypeDropdownMenu.BackgroundColor3 = Color3.fromRGB(220, 220, 220)
  182. amtTypeDropdownMenu.Visible = false
  183. amtTypeDropdownMenu.ZIndex = 10
  184. amtTypeDropdownMenu.Parent = frame
  185.  
  186. local amtTypes = {"Set Amount", "Until Stopped"}
  187. local amtTypeButtons = {}
  188. for i, v in ipairs(amtTypes) do
  189. local btn = Instance.new("TextButton")
  190. btn.Size = UDim2.new(1, 0, 0, 17)
  191. btn.Position = UDim2.new(0, 0, 0, (i-1)*17)
  192. btn.Text = v
  193. btn.Font = Enum.Font.Gotham
  194. btn.TextSize = 15
  195. btn.TextColor3 = Color3.fromRGB(0, 0, 0)
  196. btn.BackgroundColor3 = Color3.fromRGB(220, 220, 220)
  197. btn.ZIndex = 11
  198. btn.Parent = amtTypeDropdownMenu
  199. amtTypeButtons[v] = btn
  200. end
  201.  
  202. amtTypeDropdown.MouseButton1Click:Connect(function()
  203. amtTypeDropdownMenu.Visible = not amtTypeDropdownMenu.Visible
  204. -- Ensure other menus are closed
  205. digitDropdownMenu.Visible = false
  206. variantDropdownMenu.Visible = false
  207. end)
  208. for v, btn in pairs(amtTypeButtons) do
  209. btn.MouseButton1Click:Connect(function()
  210. amtTypeDropdown.Text = btn.Text
  211. amtTypeDropdownMenu.Visible = false
  212. end)
  213. end
  214.  
  215. -- Scrape Amount label and box (always visible, hide box only for "Until Stopped")
  216. local scrapeAmountLabel = Instance.new("TextLabel")
  217. scrapeAmountLabel.Text = "Scrape Amount:"
  218. scrapeAmountLabel.Font = Enum.Font.Gotham
  219. scrapeAmountLabel.TextSize = 18
  220. scrapeAmountLabel.Position = UDim2.new(0, 20, 0, 168)
  221. scrapeAmountLabel.Size = UDim2.new(0, 160, 0, 30)
  222. scrapeAmountLabel.BackgroundTransparency = 1
  223. scrapeAmountLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  224. scrapeAmountLabel.ZIndex = 2
  225. scrapeAmountLabel.Parent = frame
  226.  
  227. local amtBox = Instance.new("TextBox")
  228. amtBox.Size = UDim2.new(0, 140, 0, 30)
  229. amtBox.Position = UDim2.new(0, 180, 0, 168)
  230. amtBox.Font = Enum.Font.Gotham
  231. amtBox.Text = "25"
  232. amtBox.TextSize = 18
  233. amtBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  234. amtBox.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
  235. amtBox.ZIndex = 2
  236. amtBox.Parent = frame
  237.  
  238. -- New: Webhook label and box (optional)
  239. local webhookLabel = Instance.new("TextLabel")
  240. webhookLabel.Text = "Webhook URL (optional):"
  241. webhookLabel.Font = Enum.Font.Gotham
  242. webhookLabel.TextSize = 16
  243. webhookLabel.Position = UDim2.new(0, 20, 0, 208)
  244. webhookLabel.Size = UDim2.new(0, 160, 0, 26)
  245. webhookLabel.BackgroundTransparency = 1
  246. webhookLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  247. webhookLabel.ZIndex = 2
  248. webhookLabel.Parent = frame
  249.  
  250. local webhookBox = Instance.new("TextBox")
  251. webhookBox.Size = UDim2.new(0, 300, 0, 26)
  252. webhookBox.Position = UDim2.new(0, 180, 0, 208)
  253. webhookBox.Font = Enum.Font.Gotham
  254. webhookBox.Text = "" -- put your webhook URL here if you want
  255. webhookBox.TextSize = 16
  256. webhookBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  257. webhookBox.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
  258. webhookBox.ZIndex = 2
  259. webhookBox.ClearTextOnFocus = false
  260. webhookBox.Parent = frame
  261.  
  262. local speedLabel = Instance.new("TextLabel")
  263. speedLabel.Text = "Speed (sec/request):"
  264. speedLabel.Font = Enum.Font.Gotham
  265. speedLabel.TextSize = 18
  266. speedLabel.Position = UDim2.new(0, 20, 0, 248)
  267. speedLabel.Size = UDim2.new(0, 180, 0, 30)
  268. speedLabel.BackgroundTransparency = 1
  269. speedLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  270. speedLabel.ZIndex = 2
  271. speedLabel.Parent = frame
  272.  
  273. local speedBox = Instance.new("TextBox")
  274. speedBox.Size = UDim2.new(0, 60, 0, 30)
  275. speedBox.Position = UDim2.new(0, 200, 0, 248)
  276. speedBox.Font = Enum.Font.Gotham
  277. speedBox.Text = "0.5"
  278. speedBox.TextSize = 18
  279. speedBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  280. speedBox.BackgroundColor3 = Color3.fromRGB(230, 230, 230)
  281. speedBox.ZIndex = 2
  282. speedBox.Parent = frame
  283.  
  284. local startBtn = Instance.new("TextButton")
  285. startBtn.Size = UDim2.new(0, 160, 0, 36)
  286. startBtn.Position = UDim2.new(0, 20, 0, 294)
  287. startBtn.Text = "Start Scraping"
  288. startBtn.Font = Enum.Font.GothamBold
  289. startBtn.TextSize = 20
  290. startBtn.BackgroundColor3 = Color3.fromRGB(60, 180, 75)
  291. startBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  292. startBtn.ZIndex = 2
  293. startBtn.Parent = frame
  294.  
  295. local stopBtn = Instance.new("TextButton")
  296. stopBtn.Size = UDim2.new(0, 120, 0, 36)
  297. stopBtn.Position = UDim2.new(0, 200, 0, 294)
  298. stopBtn.Text = "Stop"
  299. stopBtn.Font = Enum.Font.GothamBold
  300. stopBtn.TextSize = 20
  301. stopBtn.BackgroundColor3 = Color3.fromRGB(180, 60, 60)
  302. stopBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  303. stopBtn.ZIndex = 2
  304. stopBtn.Parent = frame
  305. stopBtn.Visible = false
  306.  
  307. local statusLabel = Instance.new("TextLabel")
  308. statusLabel.Text = "Status: Idle"
  309. statusLabel.Font = Enum.Font.Gotham
  310. statusLabel.TextSize = 16
  311. statusLabel.Position = UDim2.new(0, 20, 0, 337)
  312. statusLabel.Size = UDim2.new(0, 460, 0, 22)
  313. statusLabel.BackgroundTransparency = 1
  314. statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  315. statusLabel.ZIndex = 2
  316. statusLabel.Parent = frame
  317.  
  318. local outLabel = Instance.new("TextLabel")
  319. outLabel.Text = "Potentially Available Usernames:"
  320. outLabel.Font = Enum.Font.Gotham
  321. outLabel.TextSize = 18
  322. outLabel.Position = UDim2.new(0, 20, 0, 362)
  323. outLabel.Size = UDim2.new(0, 260, 0, 26)
  324. outLabel.BackgroundTransparency = 1
  325. outLabel.TextColor3 = Color3.fromRGB(200, 200, 200)
  326. outLabel.ZIndex = 2
  327. outLabel.Parent = frame
  328.  
  329. -- Scrollable & copyable output (TextBox inside ScrollingFrame)
  330. local outputScroll = Instance.new("ScrollingFrame")
  331. outputScroll.Size = UDim2.new(0, 460, 0, 150)
  332. outputScroll.Position = UDim2.new(0, 20, 0, 392)
  333. outputScroll.BackgroundColor3 = Color3.fromRGB(240, 240, 240)
  334. outputScroll.BorderSizePixel = 0
  335. outputScroll.CanvasSize = UDim2.new(0,0,0,150)
  336. outputScroll.ScrollBarThickness = 10
  337. outputScroll.ZIndex = 2
  338. outputScroll.Parent = frame
  339. outputScroll.AutomaticCanvasSize = Enum.AutomaticSize.Y
  340. outputScroll.ClipsDescendants = true
  341.  
  342. local outputBox = Instance.new("TextBox")
  343. outputBox.Size = UDim2.new(1, -12, 0, 0)
  344. outputBox.Position = UDim2.new(0, 4, 0, 0)
  345. outputBox.BackgroundTransparency = 1
  346. outputBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  347. outputBox.Font = Enum.Font.Code
  348. outputBox.TextSize = 22
  349. outputBox.TextXAlignment = Enum.TextXAlignment.Left
  350. outputBox.TextYAlignment = Enum.TextYAlignment.Top
  351. outputBox.TextWrapped = false
  352. outputBox.Text = ""
  353. outputBox.ZIndex = 2
  354. outputBox.MultiLine = true
  355. outputBox.TextEditable = true -- Allows selection & copy!
  356. outputBox.ClearTextOnFocus = false
  357. outputBox.AutomaticSize = Enum.AutomaticSize.Y
  358. outputBox.Parent = outputScroll
  359.  
  360. local copyBtn = Instance.new("TextButton")
  361. copyBtn.Size = UDim2.new(0, 120, 0, 32)
  362. copyBtn.Position = UDim2.new(0, 360, 0, 362)
  363. copyBtn.Text = "Copy"
  364. copyBtn.Font = Enum.Font.GothamBold
  365. copyBtn.TextSize = 17
  366. copyBtn.BackgroundColor3 = Color3.fromRGB(70, 130, 180)
  367. copyBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
  368. copyBtn.ZIndex = 2
  369. copyBtn.Parent = frame
  370.  
  371. -- Helper to close menus when clicking/touching outside the frame
  372. local function pointIsInsideGui(gui, point)
  373. local pos = gui.AbsolutePosition
  374. local size = gui.AbsoluteSize
  375. return point.X >= pos.X and point.X <= pos.X + size.X and point.Y >= pos.Y and point.Y <= pos.Y + size.Y
  376. end
  377.  
  378. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  379. -- Only run on primary touch/mouse button (avoid keyboard)
  380. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  381. local p = input.Position
  382. -- If clicked/touched outside the frame, close menus
  383. if not pointIsInsideGui(frame, p) then
  384. digitDropdownMenu.Visible = false
  385. variantDropdownMenu.Visible = false
  386. amtTypeDropdownMenu.Visible = false
  387. end
  388. end
  389. end)
  390.  
  391. -- Keep the labels visible and hide/show amtBox when mode changes
  392. amtTypeDropdown:GetPropertyChangedSignal("Text"):Connect(function()
  393. if amtTypeDropdown.Text == "Set Amount" then
  394. amtBox.Visible = true
  395. else
  396. amtBox.Visible = false
  397. end
  398. -- Labels always visible
  399. scrapeModeLabel.Visible = true
  400. scrapeAmountLabel.Visible = true
  401. end)
  402.  
  403. -- Custom drag on title only (so child buttons still receive input on mobile)
  404. local dragging = false
  405. local dragInput, dragStart, startPos
  406.  
  407. title.InputBegan:Connect(function(input)
  408. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  409. dragging = true
  410. dragStart = input.Position
  411. startPos = frame.Position
  412.  
  413. -- Track when this input ends (touch/mouse up)
  414. input.Changed:Connect(function()
  415. if input.UserInputState == Enum.UserInputState.End then
  416. dragging = false
  417. end
  418. end)
  419. end
  420. end)
  421.  
  422. UserInputService.InputChanged:Connect(function(input)
  423. if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
  424. local delta = input.Position - dragStart
  425. local newX = startPos.X.Offset + delta.X
  426. local newY = startPos.Y.Offset + delta.Y
  427. frame.Position = UDim2.new(0, newX, 0, newY)
  428. end
  429. end)
  430.  
  431. return {
  432. digitDropdown = digitDropdown,
  433. variantDropdown = variantDropdown,
  434. amtTypeDropdown = amtTypeDropdown,
  435. amtBox = amtBox,
  436. speedBox = speedBox,
  437. startBtn = startBtn,
  438. stopBtn = stopBtn,
  439. outputBox = outputBox,
  440. copyBtn = copyBtn,
  441. statusLabel = statusLabel,
  442. webhookBox = webhookBox,
  443. }
  444. end
  445.  
  446. local function isUsernameTaken(username)
  447. local success = pcall(function()
  448. return Players:GetUserIdFromNameAsync(username)
  449. end)
  450. -- pcall returns true if the call succeeded (username taken), false if error (username not found)
  451. return success
  452. end
  453.  
  454. local function randomVariant(length)
  455. local s = ""
  456. for i = 1, length do
  457. s = s .. tostring(math.random(0,9))
  458. end
  459. return s
  460. end
  461.  
  462. local function doubleDigitVariant(length)
  463. -- Build a string and ensure length is respected
  464. local digits = {}
  465. local doublePos = math.random(1, math.max(1, length-1))
  466. local i = 1
  467. while #digits < length do
  468. if i == doublePos and #digits <= length-2 then
  469. local d = tostring(math.random(0,9))
  470. table.insert(digits, d)
  471. table.insert(digits, d)
  472. else
  473. table.insert(digits, tostring(math.random(0,9)))
  474. end
  475. i = i + 1
  476. end
  477. return table.concat(digits, ""):sub(1, length)
  478. end
  479.  
  480. local function repeatingNumbersVariant(length)
  481. local s = ""
  482. local repeatDigitsCount = math.random(2, math.min(4, length))
  483. local repeatDigit = tostring(math.random(0,9))
  484. local repeatPositions = {}
  485. while #repeatPositions < repeatDigitsCount do
  486. local pos = math.random(1, length)
  487. if not repeatPositions[pos] then
  488. repeatPositions[pos] = true
  489. -- Keep a count by using table length method indirectly
  490. end
  491. -- count filled positions
  492. local filled = 0
  493. for _, v in pairs(repeatPositions) do
  494. if v then filled = filled + 1 end
  495. end
  496. if filled >= repeatDigitsCount then break end
  497. end
  498. for i=1, length do
  499. if repeatPositions[i] then
  500. s = s .. repeatDigit
  501. else
  502. s = s .. tostring(math.random(0,9))
  503. end
  504. end
  505. return s
  506. end
  507.  
  508. local function getUsernameGenerator(variant)
  509. if variant == "Double Digit" then return doubleDigitVariant end
  510. if variant == "Repeating Numbers" then return repeatingNumbersVariant end
  511. return randomVariant
  512. end
  513.  
  514. local running = false
  515.  
  516. local function scrapeUsernames(settings)
  517. running = true
  518. local digitCount = settings.digitCount
  519. local variant = settings.variant
  520. local mode = settings.mode
  521. local amount = settings.amount
  522. local speed = settings.speed
  523. local outputBox = settings.outputBox
  524. local statusLabel = settings.statusLabel
  525. local webhookBox = settings.webhookBox
  526. local maxResults = 300
  527. local availableUsernames = {}
  528. local tried = {}
  529. local generator = getUsernameGenerator(variant)
  530. local checked = 0
  531.  
  532. local function updateOutput()
  533. outputBox.Text = table.concat(availableUsernames, "\n")
  534. end
  535.  
  536. local function sendWebhook(username)
  537. local url = webhookBox and webhookBox.Text or ""
  538. if not url or url == "" then return end
  539. -- Prepare a simple JSON payload
  540. local payload = {
  541. username = username,
  542. foundAt = os.time(),
  543. source = "UltimateUsernameScraper",
  544. player = player and player.Name or "unknown"
  545. }
  546. local ok, err = pcall(function()
  547. local json = HttpService:JSONEncode(payload)
  548. -- Default to application/json
  549. HttpService:PostAsync(url, json, Enum.HttpContentType.ApplicationJson)
  550. end)
  551. if not ok then
  552. -- Do not interrupt scraping for webhook failures; optionally log to status
  553. -- statusLabel.Text = "Webhook error: "..tostring(err)
  554. end
  555. end
  556.  
  557. local function tryUsername()
  558. local username
  559. repeat
  560. username = generator(digitCount)
  561. until not tried[username]
  562. tried[username] = true
  563.  
  564. statusLabel.Text = string.format("Checking %d: %s", checked+1, username)
  565. if not isUsernameTaken(username) then
  566. table.insert(availableUsernames, username)
  567. if #availableUsernames > maxResults then
  568. table.remove(availableUsernames, 1)
  569. end
  570. updateOutput()
  571. -- Send webhook in a separate thread (non-blocking)
  572. spawn(function()
  573. sendWebhook(username)
  574. end)
  575. end
  576. checked = checked + 1
  577. end
  578.  
  579. if mode == "Set Amount" then
  580. for i=1,amount do
  581. if not running then break end
  582. tryUsername()
  583. wait(speed)
  584. end
  585. statusLabel.Text = string.format("Done! Checked %d usernames.", checked)
  586. running = false
  587. else
  588. while running do
  589. tryUsername()
  590. wait(speed)
  591. end
  592. statusLabel.Text = "Stopped."
  593. end
  594. end
  595.  
  596. local ui = createUI()
  597.  
  598. ui.startBtn.MouseButton1Click:Connect(function()
  599. if running then return end
  600. local digitCount = tonumber(ui.digitDropdown.Text) or 6
  601. digitCount = math.clamp(digitCount, 4, 20)
  602. local variant = ui.variantDropdown.Text
  603. local mode = ui.amtTypeDropdown.Text
  604. local amount = tonumber(ui.amtBox.Text) or 25
  605. if mode == "Set Amount" then amount = math.clamp(amount, 1, 1000) end
  606. local speed = tonumber(ui.speedBox.Text) or 0.5
  607. speed = math.clamp(speed, 0.1, 2.0)
  608.  
  609. ui.statusLabel.Text = "Starting scraper..."
  610. ui.startBtn.Visible = false
  611. ui.stopBtn.Visible = true
  612. spawn(function()
  613. scrapeUsernames({
  614. digitCount = digitCount,
  615. variant = variant,
  616. mode = mode,
  617. amount = amount,
  618. speed = speed,
  619. outputBox = ui.outputBox,
  620. statusLabel = ui.statusLabel,
  621. webhookBox = ui.webhookBox,
  622. })
  623. end)
  624. end)
  625.  
  626. ui.stopBtn.MouseButton1Click:Connect(function()
  627. running = false
  628. ui.startBtn.Visible = true
  629. ui.stopBtn.Visible = false
  630. ui.statusLabel.Text = "Status: Idle"
  631. end)
  632.  
  633. ui.copyBtn.MouseButton1Click:Connect(function()
  634. ui.outputBox:CaptureFocus()
  635. ui.outputBox.SelectionStart = 1
  636. ui.outputBox.CursorPosition = #ui.outputBox.Text + 1
  637. -- User can now Ctrl+A, Ctrl+C, or right-click > copy!
  638. end)
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment