TargetPart = nil
FOV = 500
function get_victim()
TargetPart = nil
Dist = FOV
for Stuff, CatsAreCute in pairs(game:GetService("Players"):GetPlayers()) do
if CatsAreCute ~= game:GetService("Players").LocalPlayer and CatsAreCute.Character and CatsAreCute.Character:FindFirstChild("Humanoid") and CatsAreCute.Character.Humanoid.Health > 0 then
if CatsAreCute.Team ~= game:GetService("Players").LocalPlayer.Team then
Head = CatsAreCute.Character:FindFirstChild("Head")
if Head then
Cats, Visible = workspace.CurrentCamera:WorldToViewportPoint(Head.Position)
if Visible then
Mag = (Vector2.new(Cats.X, Cats.Y) - game:GetService("UserInputService"):GetMouseLocation()).Magnitude
if Mag < Dist then
Dist = Mag
TargetPart = Head
end
end
end
end
end
end
end
game:GetService("RunService").Heartbeat:Connect(get_victim)
OldHook = hookmetamethod(game, "__namecall", function(self, ...)
Args = {...}
if not checkcaller() and getnamecallmethod() == "Raycast" and TargetPart then
Args[2] = (TargetPart.Position - Args[1]).Unit * 1000
return OldHook(self, unpack(Args))
end
return OldHook(self, ...)
end)
Comments
Doesnt work