Advertisement
LossX

AIMBOT FE SCRIPT

Jul 19th, 2023
5,462
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 1
  1. -- just hover over a character and right click --
  2.  
  3. local Camera = workspace.CurrentCamera
  4. local Players = game:GetService("Players")
  5. local RunService = game:GetService("RunService")
  6. local UserInputService = game:GetService("UserInputService")
  7. local TweenService = game:GetService("TweenService")
  8. local LocalPlayer = Players.LocalPlayer
  9. local Holding = false
  10.  
  11. _G.AimbotEnabled = true
  12. _G.TeamCheck = false -- If set to true then the script would only lock your aim at enemy team members.
  13. _G.AimPart = "Head" -- Where the aimbot script would lock at.
  14. _G.Sensitivity = 0 -- How many seconds it takes for the aimbot script to officially lock onto the target's aimpart.
  15.  
  16. _G.CircleSides = 64 -- How many sides the FOV circle would have.
  17. _G.CircleColor = Color3.fromRGB(255, 255, 255) -- (RGB) Color that the FOV circle would appear as.
  18. _G.CircleTransparency = 0.7 -- Transparency of the circle.
  19. _G.CircleRadius = 80 -- The radius of the circle / FOV.
  20. _G.CircleFilled = false -- Determines whether or not the circle is filled.
  21. _G.CircleVisible = true -- Determines whether or not the circle is visible.
  22. _G.CircleThickness = 0 -- The thickness of the circle.
  23.  
  24. local FOVCircle = Drawing.new("Circle")
  25. FOVCircle.Position = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y / 2)
  26. FOVCircle.Radius = _G.CircleRadius
  27. FOVCircle.Filled = _G.CircleFilled
  28. FOVCircle.Color = _G.CircleColor
  29. FOVCircle.Visible = _G.CircleVisible
  30. FOVCircle.Radius = _G.CircleRadius
  31. FOVCircle.Transparency = _G.CircleTransparency
  32. FOVCircle.NumSides = _G.CircleSides
  33. FOVCircle.Thickness = _G.CircleThickness
  34.  
  35. local function GetClosestPlayer()
  36. local MaximumDistance = _G.CircleRadius
  37. local Target = nil
  38.  
  39. for _, v in next, Players:GetPlayers() do
  40. if v.Name ~= LocalPlayer.Name then
  41. if _G.TeamCheck == true then
  42. if v.Team ~= LocalPlayer.Team then
  43. if v.Character ~= nil then
  44. if v.Character:FindFirstChild("HumanoidRootPart") ~= nil then
  45. if v.Character:FindFirstChild("Humanoid") ~= nil and v.Character:FindFirstChild("Humanoid").Health ~= 0 then
  46. local ScreenPoint = Camera:WorldToScreenPoint(v.Character:WaitForChild("HumanoidRootPart", math.huge).Position)
  47. local VectorDistance = (Vector2.new(UserInputService:GetMouseLocation().X, UserInputService:GetMouseLocation().Y) - Vector2.new(ScreenPoint.X, ScreenPoint.Y)).Magnitude
  48.  
  49. if VectorDistance < MaximumDistance then
  50. Target = v
  51. end
  52. end
  53. end
  54. end
  55. end
  56. else
  57. if v.Character ~= nil then
  58. if v.Character:FindFirstChild("HumanoidRootPart") ~= nil then
  59. if v.Character:FindFirstChild("Humanoid") ~= nil and v.Character:FindFirstChild("Humanoid").Health ~= 0 then
  60. local ScreenPoint = Camera:WorldToScreenPoint(v.Character:WaitForChild("HumanoidRootPart", math.huge).Position)
  61. local VectorDistance = (Vector2.new(UserInputService:GetMouseLocation().X, UserInputService:GetMouseLocation().Y) - Vector2.new(ScreenPoint.X, ScreenPoint.Y)).Magnitude
  62.  
  63. if VectorDistance < MaximumDistance then
  64. Target = v
  65. end
  66. end
  67. end
  68. end
  69. end
  70. end
  71. end
  72.  
  73. return Target
  74. end
  75.  
  76. UserInputService.InputBegan:Connect(function(Input)
  77. if Input.UserInputType == Enum.UserInputType.MouseButton2 then
  78. Holding = true
  79. end
  80. end)
  81.  
  82. UserInputService.InputEnded:Connect(function(Input)
  83. if Input.UserInputType == Enum.UserInputType.MouseButton2 then
  84. Holding = false
  85. end
  86. end)
  87.  
  88. RunService.RenderStepped:Connect(function()
  89. FOVCircle.Position = Vector2.new(UserInputService:GetMouseLocation().X, UserInputService:GetMouseLocation().Y)
  90. FOVCircle.Radius = _G.CircleRadius
  91. FOVCircle.Filled = _G.CircleFilled
  92. FOVCircle.Color = _G.CircleColor
  93. FOVCircle.Visible = _G.CircleVisible
  94. FOVCircle.Radius = _G.CircleRadius
  95. FOVCircle.Transparency = _G.CircleTransparency
  96. FOVCircle.NumSides = _G.CircleSides
  97. FOVCircle.Thickness = _G.CircleThickness
  98.  
  99. if Holding == true and _G.AimbotEnabled == true then
  100. TweenService:Create(Camera, TweenInfo.new(_G.Sensitivity, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {CFrame = CFrame.new(Camera.CFrame.Position, GetClosestPlayer().Character[_G.AimPart].Position)}):Play()
  101. end
  102. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement