Advertisement
scriptingtales

AimerThingerRoblox

Jun 3rd, 2023 (edited)
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. local dwCamera = workspace.CurrentCamera
  2. local dwRunService = game:GetService("RunService")
  3. local dwUIS = game:GetService("UserInputService")
  4. local dwEntities = game:GetService("Players")
  5. local dwLocalPlayer = dwEntities.LocalPlayer
  6. local dwMouse = dwLocalPlayer:GetMouse()
  7.  
  8. local settings = {
  9. Aimbot = true,
  10. Aiming = false,
  11. Aimbot_AimPart = "Head",
  12. Aimbot_TeamCheck = true,
  13. Aimbot_Draw_FOV = true,
  14. Aimbot_FOV_Radius = 200,
  15. Aimbot_FOV_Color = Color3.fromRGB(255,255,255)
  16. }
  17.  
  18.  
  19.  
  20. dwUIS.InputBegan:Connect(function(i)
  21. if i.UserInputType == Enum.UserInputType.MouseButton2 then
  22. settings.Aiming = true
  23. end
  24. end)
  25.  
  26. dwUIS.InputEnded:Connect(function(i)
  27. if i.UserInputType == Enum.UserInputType.MouseButton2 then
  28. settings.Aiming = false
  29. end
  30. end)
  31.  
  32. dwRunService.RenderStepped:Connect(function()
  33.  
  34. local dist = math.huge
  35. local closest_char = nil
  36.  
  37. if settings.Aiming then
  38.  
  39. for i,v in next, dwEntities:GetChildren() do
  40.  
  41. if v ~= dwLocalPlayer and
  42. v.Character and
  43. v.Character:FindFirstChild("HumanoidRootPart") and
  44. v.Character:FindFirstChild("Humanoid") and
  45. v.Character:FindFirstChild("Humanoid").Health > 0 then
  46.  
  47. if settings.Aimbot_TeamCheck == true and
  48. v.Team ~= dwLocalPlayer.Team or
  49. settings.Aimbot_TeamCheck == false then
  50.  
  51. local char = v.Character
  52. local char_part_pos, is_onscreen = dwCamera:WorldToViewportPoint(char[settings.Aimbot_AimPart].Position)
  53.  
  54. if is_onscreen then
  55.  
  56. local mag = (Vector2.new(dwMouse.X, dwMouse.Y) - Vector2.new(char_part_pos.X, char_part_pos.Y)).Magnitude
  57.  
  58. if mag < dist and mag < settings.Aimbot_FOV_Radius then
  59.  
  60. dist = mag
  61. closest_char = char
  62.  
  63. end
  64. end
  65. end
  66. end
  67. end
  68.  
  69. if closest_char ~= nil and
  70. closest_char:FindFirstChild("HumanoidRootPart") and
  71. closest_char:FindFirstChild("Humanoid") and
  72. closest_char:FindFirstChild("Humanoid").Health > 0 then
  73.  
  74. dwCamera.CFrame = CFrame.new(dwCamera.CFrame.Position, closest_char[settings.Aimbot_AimPart].Position)
  75. end
  76. end
  77. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement