Advertisement
whileDo

roblox universal autoclicker UI V5

May 2nd, 2025
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.85 KB | Gaming | 0 0
  1. --Auto-Clicker Script for Roblox Features:
  2. --Creates movable GUI window
  3. --Adjustable click speed (random between min/max)
  4. --Position finder tool (shows X,Y coordinates)
  5. --Multi-position clicking sequence
  6. --Start/Stop controls
  7. --Cycles through specified click positions
  8. --Works while allowing real-time adjustments
  9.  
  10. local UserInputService = game:GetService("UserInputService")
  11. local RunService = game:GetService("RunService")
  12. local Players = game:GetService("Players")
  13. local player = Players.LocalPlayer
  14. local mouse = player:GetMouse()
  15.  
  16. local Clicking = false
  17. local ClickSpeed = {Min = 0.1, Max = 0.3}
  18. local ClickPositions = {}
  19. local CurrentPositionIndex = 1
  20.  
  21. local ScreenGui = Instance.new("ScreenGui")
  22. ScreenGui.Parent = game.CoreGui
  23.  
  24. local MainFrame = Instance.new("Frame")
  25. MainFrame.Size = UDim2.new(0, 300, 0, 400)
  26. MainFrame.Position = UDim2.new(0.5, -150, 0.5, -200)
  27. MainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  28. MainFrame.Active = true
  29. MainFrame.Draggable = true
  30. MainFrame.Parent = ScreenGui
  31.  
  32. local ScrollingFrame = Instance.new("ScrollingFrame")
  33. ScrollingFrame.Size = UDim2.new(1, 0, 1, 0)
  34. ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 800)
  35. ScrollingFrame.ScrollBarThickness = 5
  36. ScrollingFrame.Parent = MainFrame
  37.  
  38. -- Click Speed Section
  39. local SpeedSection = Instance.new("Frame")
  40. SpeedSection.Size = UDim2.new(0, 280, 0, 100)
  41. SpeedSection.Position = UDim2.new(0, 10, 0, 10)
  42. SpeedSection.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  43. SpeedSection.Parent = ScrollingFrame
  44.  
  45. local SpeedLabel = Instance.new("TextLabel")
  46. SpeedLabel.Size = UDim2.new(1, 0, 0, 30)
  47. SpeedLabel.Text = "Click Speed (seconds)"
  48. SpeedLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  49. SpeedLabel.Parent = SpeedSection
  50.  
  51. local MinSpeedBox = Instance.new("TextBox")
  52. MinSpeedBox.Size = UDim2.new(0, 120, 0, 30)
  53. MinSpeedBox.Position = UDim2.new(0, 10, 0, 40)
  54. MinSpeedBox.PlaceholderText = "Min (0.1)"
  55. MinSpeedBox.Text = "0.1"
  56. MinSpeedBox.Parent = SpeedSection
  57.  
  58. local MaxSpeedBox = Instance.new("TextBox")
  59. MaxSpeedBox.Size = UDim2.new(0, 120, 0, 30)
  60. MaxSpeedBox.Position = UDim2.new(0, 150, 0, 40)
  61. MaxSpeedBox.PlaceholderText = "Max (0.3)"
  62. MaxSpeedBox.Text = "0.3"
  63. MaxSpeedBox.Parent = SpeedSection
  64.  
  65. -- Position Finder Section
  66. local FinderSection = Instance.new("Frame")
  67. FinderSection.Size = UDim2.new(0, 280, 0, 100)
  68. FinderSection.Position = UDim2.new(0, 10, 0, 120)
  69. FinderSection.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  70. FinderSection.Parent = ScrollingFrame
  71.  
  72. local FinderLabel = Instance.new("TextLabel")
  73. FinderLabel.Size = UDim2.new(1, 0, 0, 30)
  74. FinderLabel.Text = "Position Finder"
  75. FinderLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  76. FinderLabel.Parent = FinderSection
  77.  
  78. local FindButton = Instance.new("TextButton")
  79. FindButton.Size = UDim2.new(0, 260, 0, 40)
  80. FindButton.Position = UDim2.new(0, 10, 0, 40)
  81. FindButton.Text = "Click to Find Position (Move Mouse)"
  82. FindButton.Parent = FinderSection
  83.  
  84. local PositionDisplay = Instance.new("TextLabel")
  85. PositionDisplay.Size = UDim2.new(1, 0, 0, 20)
  86. PositionDisplay.Position = UDim2.new(0, 0, 0, 85)
  87. PositionDisplay.Text = "X: 0, Y: 0"
  88. PositionDisplay.TextColor3 = Color3.fromRGB(255, 255, 255)
  89. PositionDisplay.Parent = FinderSection
  90.  
  91. -- Multi-Position Section
  92. local MultiPosSection = Instance.new("Frame")
  93. MultiPosSection.Size = UDim2.new(0, 280, 0, 200)
  94. MultiPosSection.Position = UDim2.new(0, 10, 0, 240)
  95. MultiPosSection.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  96. MultiPosSection.Parent = ScrollingFrame
  97.  
  98. local MultiPosLabel = Instance.new("TextLabel")
  99. MultiPosLabel.Size = UDim2.new(1, 0, 0, 30)
  100. MultiPosLabel.Text = "Multi-Position Clicking"
  101. MultiPosLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  102. MultiPosLabel.Parent = MultiPosSection
  103.  
  104. local PosInputBox = Instance.new("TextBox")
  105. PosInputBox.Size = UDim2.new(0, 260, 0, 100)
  106. PosInputBox.Position = UDim2.new(0, 10, 0, 40)
  107. PosInputBox.MultiLine = true
  108. PosInputBox.TextWrapped = true
  109. PosInputBox.PlaceholderText = "Enter positions (x0000 y0000 x0000 y0000...)"
  110. PosInputBox.Parent = MultiPosSection
  111.  
  112. local AddPosButton = Instance.new("TextButton")
  113. AddPosButton.Size = UDim2.new(0, 260, 0, 40)
  114. AddPosButton.Position = UDim2.new(0, 10, 0, 150)
  115. AddPosButton.Text = "Add Positions"
  116. AddPosButton.Parent = MultiPosSection
  117.  
  118. -- Control Section
  119. local ControlSection = Instance.new("Frame")
  120. ControlSection.Size = UDim2.new(0, 280, 0, 60)
  121. ControlSection.Position = UDim2.new(0, 10, 0, 450)
  122. ControlSection.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  123. ControlSection.Parent = ScrollingFrame
  124.  
  125. local StartButton = Instance.new("TextButton")
  126. StartButton.Size = UDim2.new(0, 120, 0, 40)
  127. StartButton.Position = UDim2.new(0, 10, 0, 10)
  128. StartButton.Text = "START"
  129. StartButton.TextColor3 = Color3.fromRGB(0, 255, 0)
  130. StartButton.Parent = ControlSection
  131.  
  132. local StopButton = Instance.new("TextButton")
  133. StopButton.Size = UDim2.new(0, 120, 0, 40)
  134. StopButton.Position = UDim2.new(0, 150, 0, 10)
  135. StopButton.Text = "STOP"
  136. StopButton.TextColor3 = Color3.fromRGB(255, 0, 0)
  137. StopButton.Parent = ControlSection
  138.  
  139. -- Functions
  140. FindButton.MouseButton1Click:Connect(function()
  141.     FindButton.Text = "Move mouse and click anywhere..."
  142.     local connection
  143.     connection = UserInputService.InputBegan:Connect(function(input, processed)
  144.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  145.             PositionDisplay.Text = string.format("X: %d, Y: %d", mouse.X, mouse.Y)
  146.             FindButton.Text = "Click to Find Position (Move Mouse)"
  147.             connection:Disconnect()
  148.         end
  149.     end)
  150. end)
  151.  
  152. AddPosButton.MouseButton1Click:Connect(function()
  153.     local text = PosInputBox.Text
  154.     local positions = {}
  155.     for num in text:gmatch("%d+") do
  156.         table.insert(positions, tonumber(num))
  157.     end
  158.    
  159.     ClickPositions = {}
  160.     for i = 1, #positions, 2 do
  161.         if positions[i+1] then
  162.             table.insert(ClickPositions, {X = positions[i], Y = positions[i+1]})
  163.         end
  164.     end
  165. end)
  166.  
  167. local function ClickAtPosition(x, y)
  168.     local oldPos = Vector2.new(mouse.X, mouse.Y)
  169.     mouse1click()
  170.     mousemoveabs(x, y)
  171.     mouse1click()
  172.     mousemoveabs(oldPos.X, oldPos.Y)
  173. end
  174.  
  175. StartButton.MouseButton1Click:Connect(function()
  176.     Clicking = true
  177.     ClickSpeed.Min = tonumber(MinSpeedBox.Text) or 0.1
  178.     ClickSpeed.Max = tonumber(MaxSpeedBox.Text) or 0.3
  179.    
  180.     spawn(function()
  181.         while Clicking do
  182.             if #ClickPositions > 0 then
  183.                 local pos = ClickPositions[CurrentPositionIndex]
  184.                 ClickAtPosition(pos.X, pos.Y)
  185.                 CurrentPositionIndex = CurrentPositionIndex % #ClickPositions + 1
  186.             else
  187.                 mouse1click()
  188.             end
  189.            
  190.             local delay = math.random() * (ClickSpeed.Max - ClickSpeed.Min) + ClickSpeed.Min
  191.             wait(delay)
  192.         end
  193.     end)
  194. end)
  195.  
  196. StopButton.MouseButton1Click:Connect(function()
  197.     Clicking = false
  198. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement