0% found this document useful (0 votes)
4K views2 pages

Flag Wars! SILENT AIM & GUN MODS

This script modifies player weapons in Roblox to provide advantages to the local player. It checks if the local player is alive, finds the closest enemy player, and modifies weapon attributes like cooldowns, spread, damage, and ammo to be more powerful or infinite. It also aims the weapon at the closest enemy player on firing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4K views2 pages

Flag Wars! SILENT AIM & GUN MODS

This script modifies player weapons in Roblox to provide advantages to the local player. It checks if the local player is alive, finds the closest enemy player, and modifies weapon attributes like cooldowns, spread, damage, and ammo to be more powerful or infinite. It also aims the weapon at the closest enemy player on firing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
  • Lua Script Analysis

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)

You might also like