local Players = game:GetService("Players")
local Player = [Link]
local RunService = game:GetService("RunService")
local Closest
local isAlive = function()
if not [Link] then return false end
if not [Link]:FindFirstChild("HumanoidRootPart") then return false end
if not [Link]:FindFirstChild("Humanoid") then return false end
if [Link] <= 0 then return false end
return true
end
local function getClosest()
if not isAlive() then return end
local closest = nil;
local distance = [Link];
for i, v in pairs(Players:GetPlayers()) do
if v == Player then continue end
if [Link] == [Link] then continue end
if not [Link] then continue end
if not [Link]:FindFirstChildOfClass("Humanoid") then continue end
local d = ([Link] -
[Link]).Magnitude
if d < distance then
distance = d
closest = v
end
end
return closest
end
[Link]:Connect(function(deltaTime)
Closest = getClosest()
end)
local old; old = hookmetamethod(game, "__namecall", function(this, ...)
local args = {...}
local method = getnamecallmethod()
if not checkcaller() and method == "FireServer" and tostring(this) ==
"WeaponHit" then
if Closest then
args[2]["part"] = [Link]
args[2]["h"] = [Link]
end
end
return old(this, unpack(args))
end)
local to0 = {"ShotCooldown", "HeadshotCooldown", "MinSpread", "MaxSpread",
"TotalRecoilMax", "RecoilMin", "RecoilMax", "RecoilDecay"}
local toInf = {"CurrentAmmo", "AmmoCapacity", "HeadshotDamage"}
-- retarded gun mods (re-equip your weapon)
local old2; old2 = hookmetamethod(game, "__index", function(this, index)
if not checkcaller() and index == "Value" then
if [Link](toInf, tostring(this)) then
return [Link]
end
if [Link](to0, tostring(this)) then
return 0
end
end
return old2(this, index)
end)