-- [[ Rscripts Risk Notice ]] -- This script is not verified by rscripts.net. Deal with caution. -- -- Stay safe: -- • Never log in on unofficial Roblox sites or lookalike domains. -- • Real Roblox links use roblox.com (check the .com ending). -- • Treat fake Roblox login / "claim reward" pages as phishing. -- [[ End Rscripts Risk Notice ]] local p1 = game:GetService("Players") local r1 = game:GetService("ReplicatedStorage") local w1 = game:GetService("Workspace") local lp = p1.LocalPlayer local cam = w1.CurrentCamera local cfg = { sm = true, TargetPart = "Head", FOV = 180 } local t1 = {} task.spawn(function() while true do local targets = {} for _, player in ipairs(p1:GetPlayers()) do if player ~= lp then local char = player.Character if char then local humanoid = char:FindFirstChildOfClass("Humanoid") local targetPart = char:FindFirstChild(cfg.TargetPart) if humanoid and humanoid.Health > 0 and targetPart then table.insert(targets, targetPart) end end end end t1 = targets task.wait(0.5) end end) local function getClosestTarget() if not cfg.sm then return nil, nil end local currentCamera = w1.CurrentCamera or cam if not currentCamera then return nil, nil end local closestDist = cfg.FOV local closestPos = nil local closestPart = nil local viewportSize = currentCamera.ViewportSize local screenCenter = Vector2.new(viewportSize.X / 2, viewportSize.Y / 2) for _, part in ipairs(t1) do if part and part.Parent then local screenPos, onScreen = currentCamera:WorldToViewportPoint(part.Position) if onScreen then local dist = (Vector2.new(screenPos.X, screenPos.Y) - screenCenter).Magnitude if dist < closestDist then closestDist = dist closestPos = part.Position closestPart = part end end end end return closestPos, closestPart end local weaponRayFilter = require(r1:WaitForChild("XXSpin"):WaitForChild("WeaponRayFilter")) local oc oc = hookfunction(weaponRayFilter.cast, function(origin, direction, range, raycastParams) local closestPos, closestPart = getClosestTarget() if closestPos and closestPart and origin then local aimVector = closestPos - origin if aimVector.Magnitude > 0.01 then direction = aimVector.Unit end end return oc(origin, direction, range, raycastParams) end)