Advertisement
joshclark576

prison life killaura

Jan 9th, 2020
4,176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. local SelfRoot = game.Players.LocalPlayer.Character.HumanoidRootPart
  2. local SelfName = game.Players.LocalPlayer.Name
  3. local DamageRemote = game.ReplicatedStorage.meleeEvent
  4.  
  5. while wait() do
  6. for i,v in ipairs(game.Players:GetChildren()) do
  7. local Char = v.Character
  8. if Char then
  9. local Name = v.Name
  10. local Root = Char:WaitForChild("HumanoidRootPart")
  11.  
  12. local TargetRootPos = Root.Position
  13. local SelfRootPos = Root.Position
  14.  
  15. local Distance = math.abs((TargetRootPos - SelfRootPos).magnitude)
  16.  
  17. if Distance < 10 then
  18. if v.Name ~= SelfName then
  19. DamageRemote:FireServer(v)
  20. end
  21. end
  22. end
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement