Professional Documents
Culture Documents
return false
end
while true do
wait()
pcall(function()
for i,v in pairs(game.Players:GetPlayers()) do
if v.Team ~= game.Players.LocalPlayer.Team and v.Character and
v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health > 0 and
PLR_VISIBLE(v) == true then
local WeaponName =
game.Players.LocalPlayer.Character.EquippedTool.Value
if game.ReplicatedStorage.Weapons[WeaponName]:FindFirstChild("Chamber")
and (game.Players.LocalPlayer.Character.HumanoidRootPart.Position -
v.Character.HumanoidRootPart.Position).magnitude > 10 then
return
end
game.ReplicatedStorage.Events.HitPart:FireServer(unpack({
[1] = v.Character.Head,
[2] = v.Character.Head.Position,
[3] = WeaponName,
[4] = 100,
[5] = game.Players.LocalPlayer.Character.Gun,
[6] = nil,
[7] = nil,
[8] = 1,
[9] = nil,
[10] = false,
[11] = Vector3.new(),
[12] = math.rad(1,100000),
[13] = Vector3.new()
}))
getsenv(game.Players.LocalPlayer.PlayerGui:WaitForChild("Client")).firebullet()
wait(game.ReplicatedStorage.Weapons[WeaponName].FireRate.Value)
end
end
end)
end