local Settings = {
AmmoPatterns = {
"ammo", "rack", "ammunition", "ammomodel",
"shell", "apfsds", "heat", "hesh", "aphe", "apcr"
},
Scale = 20,
MaxSize = 35,
Material = Enum.Material.ForceField,
Transparency = 1,
}
local function ExpandHitbox(part)
if part:FindFirstChild("Applied_V14") then return end
local success, err = pcall(function()
local sizeX = math.min(part.Size.X * Settings.Scale, Settings.MaxSize)
local sizeY = math.min(part.Size.Y * Settings.Scale, Settings.MaxSize)
local sizeZ = math.min(part.Size.Z * Settings.Scale, Settings.MaxSize)
local FinalSize = Vector3.new(sizeX, sizeY, sizeZ)
part.Size = FinalSize
part.Material = Settings.Material
part.Transparency = Settings.Transparency
part.CanCollide = false
part.CastShadow = false
local tag = Instance.new("BoolValue", part)
tag.Name = "Applied_V14"
part:GetPropertyChangedSignal("Size"):Connect(function()
if part.Size ~= FinalSize then
part.Size = FinalSize
end
end)
end)
end
local function GlobalScan(folder)
for _, item in pairs(folder:GetDescendants()) do
if item:IsA("BasePart") then
local name = item.Name:lower()
for _, pattern in pairs(Settings.AmmoPatterns) do
if string.find(name, pattern) then
ExpandHitbox(item)
break
end
end
end
end
end
workspace.DescendantAdded:Connect(function(obj)
if obj:IsA("BasePart") then
local name = obj.Name:lower()
for _, pattern in pairs(Settings.AmmoPatterns) do
if string.find(name, pattern) then
task.wait(0.2)
ExpandHitbox(obj)
break
end
end
end
end)
GlobalScan(workspace)
warn(">> MTC V14.0 LOADED")
Comments
This is my first script guys hope yall like this