Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game.Players.LocalPlayer
- local function wep()
- if not player.Character:FindFirstChildOfClass("Tool") then
- weapon = player.Backpack:FindFirstChildOfClass("Tool")
- player.Character.Humanoid:EquipTool(weapon)
- return weapon
- else
- weapon = player.Character:FindFirstChildOfClass("Tool")
- return weapon
- end
- end
- while wait() do
- for _,v in ipairs(workspace.Enemies:GetDescendants()) do
- if v:IsA("Humanoid") then
- if v.Parent:FindFirstChild("HumanoidRootPart") then
- player.Character:MoveTo(v.Parent.HumanoidRootPart.Position)
- repeat
- game:GetService("ReplicatedStorage").Remotes.RemoteEvent:FireServer("DamageInvoke", v.Parent, "FireBall", true)
- wait()
- until v.Health <= 0
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement