Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2.  
  3. local function wep()
  4. if not player.Character:FindFirstChildOfClass("Tool") then
  5. weapon = player.Backpack:FindFirstChildOfClass("Tool")
  6. player.Character.Humanoid:EquipTool(weapon)
  7. return weapon
  8. else
  9. weapon = player.Character:FindFirstChildOfClass("Tool")
  10. return weapon
  11. end
  12. end
  13.  
  14. while wait() do
  15. for _,v in ipairs(workspace.Enemies:GetDescendants()) do
  16. if v:IsA("Humanoid") then
  17. if v.Parent:FindFirstChild("HumanoidRootPart") then
  18. player.Character:MoveTo(v.Parent.HumanoidRootPart.Position)
  19. repeat
  20. game:GetService("ReplicatedStorage").Remotes.RemoteEvent:FireServer("DamageInvoke", v.Parent, "FireBall", true)
  21. wait()
  22. until v.Health <= 0
  23. end
  24. end
  25. end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement