local game = game local players = game:GetService("Players") local localPlayer = players.LocalPlayer local character = localPlayer.Character local runService = game:GetService("RunService") local replicatedStorage = game:GetService("ReplicatedStorage") local cd = 0 runService.RenderStepped:Connect(function(delta) character = localPlayer.Character local weapon = nil local tool = character:FindFirstChildWhichIsA("Model") if tool and replicatedStorage.BaseLibrary.Weapons:FindFirstChild(tool.Name) then weapon = tool end if cd > 0.05 and weapon then for _,v in workspace.Entity:GetChildren() do if (character.HumanoidRootPart.CFrame.Position - v.Head.CFrame.Position).Magnitude < 50 and v:FindFirstChild("Zombie") and v.Zombie.Health > 0 and weapon then replicatedStorage.Library.RemotesManager.PrimaryFire:FireServer(tool:GetAttribute("StorageItemId"), weapon, {["ShotPoint"] = character.HumanoidRootPart.CFrame.Position, ["Direction"] = Vector3.new(-0.008111195638775826, -0.058035194873809814, 0.9982815980911255), ["AmmoData"] = {["MaxAmmo"] = 0, ["Ammo"] = 0}, ["TracerColor"] = Color3.new(1, 1, 1), ["ShotId"] = 3, ["HitInfoList"] = {[1] = {["Normal"] = Vector3.new(0.20057007670402527, 0.038305096328258514, -0.9789303541183472), ["Part"] = v.Head, ["Index"] = 0, ["Position"] = v.Head.CFrame.Position}, [2] = {["Normal"] = Vector3.new(0.5810704827308655, 0.7930880784988403, -0.18266992270946503), ["Part"] = v.Head, ["Index"] = 0, ["Position"] = v.Head.CFrame.Position}}, ["ShotOrigin"] = weapon.Handle.BulletOrigin, ["Victims"] = {[1] = {["Humanoid"] = v.Zombie, ["Object"] = v.Head, ["Index"] = 0}, [2] = {["Humanoid"] = v.Zombie, ["Object"] = v.Head, ["Index"] = 0}}, ["TargetPoints"] = {[1] = v.Head.CFrame.Position}}) end end cd = 0 end cd += delta end)