Advertisement
LeviTheOtaku

fencing kill aura

Oct 27th, 2019
1,603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. while true do
  2. wait()
  3. function FindNearest(position)
  4. local lowest = math.huge
  5. local NearestPlayer = nil
  6. for i,v in pairs(game.Players:GetPlayers()) do
  7. if v.Name ~= game.Players.LocalPlayer.Name then
  8. if v and v.Character then
  9. if v.Character.Humanoid.Health ~= 0 then
  10. local distance = v:DistanceFromCharacter(position)
  11. if distance < lowest then
  12. lowest = distance
  13. NearestPlayer = v
  14. end
  15. end
  16. end
  17. end
  18. end
  19. return NearestPlayer
  20. end
  21.  
  22. game.Players.LocalPlayer.Character.Foil.Handle.Anchored = false
  23. game.Players.LocalPlayer.Character.Foil.Handle.Position = (FindNearest(game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Character.HumanoidRootPart.Position)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement