Lafyv23431

Untitled

Mar 24th, 2026
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. local aim = false
  2. local smoothness = 0.25 -- كل ما زاد = أقوى (0.1 ضعيف / 0.3 قوي)
  3.  
  4. Section4:NewToggle("AIM LOCK 🔥", "قوي جدًا", function(state)
  5. aim = state
  6. end)
  7.  
  8. game:GetService("RunService").RenderStepped:Connect(function()
  9. if not aim then return end
  10.  
  11. local player = game.Players.LocalPlayer
  12. local camera = workspace.CurrentCamera
  13. local mouse = game:GetService("UserInputService"):GetMouseLocation()
  14.  
  15. local closest = nil
  16. local shortest = math.huge
  17.  
  18. for _,v in pairs(game.Players:GetPlayers()) do
  19. if v ~= player and v.Character and v.Character:FindFirstChild("Head") then
  20. local head = v.Character.Head
  21. local pos, visible = camera:WorldToViewportPoint(head.Position)
  22.  
  23. if visible then
  24. local dist = (Vector2.new(pos.X, pos.Y) - mouse).Magnitude
  25.  
  26. if dist < shortest then
  27. shortest = dist
  28. closest = head
  29. end
  30. end
  31. end
  32. end
  33.  
  34. if closest then
  35. camera.CFrame = camera.CFrame:Lerp(
  36. CFrame.new(camera.CFrame.Position, closest.Position),
  37. smoothness
  38. )
  39. end
  40. end)
Advertisement
Add Comment
Please, Sign In to add comment