Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local aim = false
- local smoothness = 0.25 -- كل ما زاد = أقوى (0.1 ضعيف / 0.3 قوي)
- Section4:NewToggle("AIM LOCK 🔥", "قوي جدًا", function(state)
- aim = state
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- if not aim then return end
- local player = game.Players.LocalPlayer
- local camera = workspace.CurrentCamera
- local mouse = game:GetService("UserInputService"):GetMouseLocation()
- local closest = nil
- local shortest = math.huge
- for _,v in pairs(game.Players:GetPlayers()) do
- if v ~= player and v.Character and v.Character:FindFirstChild("Head") then
- local head = v.Character.Head
- local pos, visible = camera:WorldToViewportPoint(head.Position)
- if visible then
- local dist = (Vector2.new(pos.X, pos.Y) - mouse).Magnitude
- if dist < shortest then
- shortest = dist
- closest = head
- end
- end
- end
- end
- if closest then
- camera.CFrame = camera.CFrame:Lerp(
- CFrame.new(camera.CFrame.Position, closest.Position),
- smoothness
- )
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment