Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local aim = false
- Section:NewToggle("Aim Assist OP", "تقريب قوي", function(state)
- aim = state
- end)
- game:GetService("RunService").RenderStepped:Connect(function()
- if aim then
- local player = game.Players.LocalPlayer
- local camera = workspace.CurrentCamera
- local closest, dist = nil, math.huge
- for _,v in pairs(game.Players:GetPlayers()) do
- if v ~= player and v.Character and v.Character:FindFirstChild("Head") then
- local pos, visible = camera:WorldToViewportPoint(v.Character.Head.Position)
- if visible then
- local diff = (Vector2.new(pos.X,pos.Y) - game:GetService("UserInputService"):GetMouseLocation()).Magnitude
- if diff < dist then
- dist = diff
- closest = v
- end
- end
- end
- end
- if closest then
- camera.CFrame = camera.CFrame:Lerp(
- CFrame.new(camera.CFrame.Position, closest.Character.Head.Position),
- 0.15 -- قوي
- )
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment