sonmol

kill all

Dec 1st, 2020
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. --Equip a gun first!
  2.  
  3. local lplr = game.Players.LocalPlayer
  4.  
  5. _G.killing = true
  6.  
  7.  
  8. while _G.killing == true do
  9. local muzzle = nil
  10. pcall(function()
  11. muzzle = lplr.Character:FindFirstChildOfClass("Tool").Muzzle
  12. end)
  13. wait(.1)
  14.  
  15. for i, plr in pairs(game.Players:GetPlayers()) do
  16. pcall(function()
  17. if muzzle and lplr.Character and lplr.Character.Head and plr.Name ~= lplr.Name and plr.Team ~= lplr.Team and plr.Character and plr.Character.Humanoid and plr.Character.Humanoid.Health >0 then
  18. local btable = {}
  19. local distance = (lplr.Character.Head.CFrame.p - plr.Character.Head.CFrame.p).magnitude
  20.  
  21. table.insert(btable, {
  22. Hit = plr.Character.Head,
  23. Distance = distance,
  24. Cframe = CFrame.new(plr.Character.Head.CFrame.p, muzzle.Position) * CFrame.new(0, 0, -distance / 2),
  25. RayObject = Ray
  26. })
  27. game:GetService("ReplicatedStorage").ShootEvent:FireServer(btable, muzzle.Parent)
  28. end
  29. end)
  30. end
  31. end
Add Comment
Please, Sign In to add comment