Advertisement
JustAPlayer

Untitled

Dec 6th, 2022
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. --// Services \\--
  2. local CoreGui = game:GetService("CoreGui")
  3. local Players = game:GetService("Players")
  4. local VirtualInputManager = game:GetService("VirtualInputManager")
  5.  
  6. --// Variables \\--
  7. local Player = Players.LocalPlayer
  8. local Enabled = false
  9. local Mouse = Player:GetMouse()
  10. local X, Y = 0, 0
  11. local LastC = Color3.new(1, 0, 0)
  12. local LastU = tick()
  13.  
  14. --// Exploit Fix \\--
  15. if not pcall(function() return syn.protect_gui end) then
  16. syn = {}
  17. syn.protect_gui = function(A_1)
  18. A_1.Parent = CoreGui
  19. end
  20. end
  21.  
  22. --// UI Library \\--
  23. local Library = loadstring(game:HttpGetAsync('https://pastebin.com/raw/edJT9EGX'))()
  24. local Window = Library:CreateWindow("AutoClicker by Ezpi")
  25. Enabled_1 = Window:AddColor({
  26. text = 'Status:',
  27. flag = "Ezpi_1",
  28. color = Color3.new(1, 0, 0),
  29. callback = function(A_1)
  30. -- "Enabled" Color
  31. local NewColor = Color3.new(0, 1, 0)
  32. if Enabled == false then
  33. NewColor = Color3.new(1, 0, 0)
  34. end
  35. if NewColor ~= Last or A_1 ~= NewColor then
  36. Last = NewColor
  37. Enabled_1:SetColor(NewColor)
  38. end
  39. end
  40. })
  41. Window:AddBind({
  42. text = 'Toggle',
  43. callback = function()
  44. -- Toggle
  45. Enabled = not Enabled
  46. -- "Enabled" Color
  47. local NewColor = Color3.new(0, 1, 0)
  48. if Enabled == false then
  49. NewColor = Color3.new(1, 0, 0)
  50. end
  51. if NewColor ~= Last then
  52. Last = NewColor
  53. Enabled_1:SetColor(NewColor)
  54. end
  55. -- Click Position
  56. if Enabled then
  57. -- Update Mouse Pos
  58. X, Y = Mouse.X, Mouse.Y + 10
  59. -- Update Box
  60. Box_1:SetValue()
  61. else
  62. X, Y = 0, 0
  63. Box_1:SetValue()
  64. end
  65. -- AutoClick
  66. while Enabled do
  67. VirtualInputManager:SendMouseButtonEvent(X, Y, 0, true, game, 1)
  68. VirtualInputManager:SendMouseButtonEvent(X, Y, 0, false, game, 1)
  69. wait(Library.flags.Interval)
  70. end
  71. end
  72. })
  73. Window:AddSlider({
  74. text = 'Interval',
  75. min = 0.01,
  76. max = 2,
  77. value = 1,
  78. float = 0.01
  79. })
  80. Box_1 = Window:AddBox({
  81. text = "AutoClick Position:",
  82. value = "X: " .. X .. ", Y: " .. Y,
  83. callback = function()
  84. if tick()-LastU > 0.1 then
  85. LastU = tick()
  86. Box_1:SetValue("X: " .. X .. ", Y: " .. Y)
  87. end
  88. end
  89. })
  90. Library:Init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement