MaxproGlitcher

Code auto Cliker New Béta avec setting 1/2

May 4th, 2024
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. --Already Running--
  2. if getgenv()["Already Running"] then return else getgenv()["Already Running"] = true end
  3. --Services--
  4. local UIS = game:GetService("UserInputService")
  5. local VIM = game:GetService("VirtualInputManager")
  6. local Players = game:GetService("Players")
  7. local RunService = game:GetService("RunService")
  8. --Vars--
  9. local LocalPlayer = Players.LocalPlayer
  10. local Camera = workspace.CurrentCamera
  11. local flags = {Auto_Clicking = false, Mouse_Locked = false}
  12. local TaskWait = task.wait
  13. --Get Keybind--
  14. local getKeycode = function(bind)
  15. return (pcall(function() return Enum.KeyCode[bind] end) and Enum.KeyCode[bind] or bind)
  16. end
  17. --Draw--
  18. local Draw = function(obj, props)
  19. local NewObj = Drawing.new(obj)
  20.  
  21. for i, v in next, props do
  22. NewObj[i] = v
  23. end
  24.  
  25. return NewObj
  26. end
  27. --Create GUI--
  28. local Text = Draw("Text", {
  29. Size = 18,
  30. Outline = true,
  31. OutlineColor = Color3.fromRGB(255, 255, 255),
  32. Color = Color3.fromRGB(0, 0, 0),
  33. Text = "Auto Clicking : FALSE\nMouse Locked : FALSE",
  34. Visible = true,
  35. })
  36. --Key Bind--
  37. UIS.InputBegan:Connect(function(inputObj, GPE)
  38. if (not GPE) then
  39. if (inputObj.KeyCode == getKeycode(Settings["Auto Click Keybind"])) then
  40. flags.Auto_Clicking = not flags.Auto_Clicking
  41. end
  42.  
  43. if (inputObj.KeyCode == getKeycode(Settings["Lock Mouse Position Keybind"])) then
  44. local Mouse = UIS:GetMouseLocation()
  45. flags.Mouse_Locked_Position = Vector2.new(Mouse.X, Mouse.Y)
  46. flags.Mouse_Locked = not flags.Mouse_Locked
  47. end
  48.  
  49. Text.Text = ("Auto Clicking : %s\nMouse Locked : %s"):format(tostring(flags.Auto_Clicking):upper(), tostring(flags.Mouse_Locked):upper())
  50. end
  51. end)
  52. --Auto Click--
  53. while (true) do
  54. Text.Visible = Settings.GUI
  55. Text.Position = Vector2.new(Camera.ViewportSize.X - 133, Camera.ViewportSize.Y - 48)
  56.  
  57. if (flags.Auto_Clicking) then
  58. for i = 1, 2 do
  59. if (flags.Mouse_Locked) then
  60. VIM:SendMouseButtonEvent(flags.Mouse_Locked_Position.X, flags.Mouse_Locked_Position.Y, Settings["Right Click"] and 1 or 0, i == 1, nil, 0)
  61. else
  62. local Mouse = UIS:GetMouseLocation()
  63. VIM:SendMouseButtonEvent(Mouse.X, Mouse.Y, Settings["Right Click"] and 1 or 0, i == 1, nil, 0)
  64. end
  65. end
  66. end
  67.  
  68. if (Settings.Delay <= 0) then
  69. RunService.RenderStepped:Wait()
  70. else
  71. TaskWait(Settings.Delay)
  72. end
  73. end
Add Comment
Please, Sign In to add comment