
Key RequiredUniversal

local gunSettingsFolder = game:GetService("ReplicatedStorage").TREKModules.GunSettings
local newSettings = {
MaxDamage = 0, MinDamage = 0, AmmoCount = 0, HeadshotMultiplier = 0,
ReloadSpeed = 0,
firerate = 0,
spread = 0,
crouchSpread = 0,
Recoil = 0,
-- Bullet properties
Penetration = 0, -- Bullet penetration (Ineffective if the number of obstacles or players it can penetrate is too high)
Range = 0, -- Maximum bullet range
ShellsPerShot = 0, -- Number of projectiles fired per shot
teamkill = true, -- Whether to enable friendly fire (true = enabled, false = disabled)
Weight = -0,
Suppression = 0
}
for _, gunModule in ipairs(gunSettingsFolder:GetChildren()) do
if gunModule:IsA("ModuleScript") then
pcall(function()
local settings = require(gunModule)
print("Modifying: " .. gunModule.Name)
settings.MaxDamage = newSettings.MaxDamage
settings.MinDamage = newSettings.MinDamage
settings.AmmoCount = newSettings.AmmoCount
settings.HeadshotMultiplier = newSettings.HeadshotMultiplier
settings.ReloadSpeed = newSettings.ReloadSpeed
settings.firerate = newSettings.firerate
settings.spread = newSettings.spread
settings.crouchSpread = newSettings.crouchSpread
settings.Recoil = newSettings.Recoil
settings.Penetration = newSettings.Penetration
settings.Range = newSettings.Range
settings.ShellsPerShot = newSettings.ShellsPerShot
settings.teamkill = newSettings.teamkill
settings.Weight = newSettings.Weight
settings.Suppression = newSettings.Suppression
print(string.format(" > Friendly Fire: %s | Damage: %d-%d | Magazine Capacity: %d | Fire Rate: %d | Recoil: %d",
tostring(settings.teamkill), settings.MinDamage, settings.MaxDamage, settings.AmmoCount, settings.firerate, settings.Recoil))
print("------------------------------------------------------")
end)
end
end



all it did was that i couldn't use my gun
@Yukari Modify the firearms value
dosent work
cooking on this rn will work in like 10s
@ccjj hi, great script, but there is a problem, you actually have to press R every time you shoot because seem to me, whatever ammo count value i put in there, all gun only shoot 1 bullet then stop working, you have to press R to continue to shoot, which mean spam R and shoot at the same time will work, but it hurts my hand, also, the same thing also apply to melee too, which mean you can only swing once, then you cannot swing at all till you die. Any fix to this?
not working just breaks the gun system and puts the gun in my torso for some god forsaken reason