PG_MCVN

Free Farm One Piece Rose

Mar 2nd, 2020
768
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. _G.farm = false
  2. _G.tenmob = "Bandit"
  3.  
  4. local plr = game:service("Players").LocalPlayer
  5.  
  6. function questbandit()
  7. if game:GetService("Players").LocalPlayer.PlayerGui.GameUI.Quest.QuestFrame.AbsolutePosition.X == -960 then
  8. local string_1 = "GiveQuest"
  9. local string_2 = "A group of bandits suddenly swarmed into the village. Can you get rid of a couple?"
  10. local Target = game:GetService("ReplicatedStorage").Remotes.Player.QuestRemote
  11. Target:FireServer(string_1, string_2)
  12. print("Give Quest")
  13. end
  14. end
  15.  
  16. function attack()
  17. local string_1 = "Combat";
  18. local number_1 = 2;
  19. local Target = game:GetService("ReplicatedStorage").Remotes.Melee.Combat;
  20. Target:FireServer(string_1, number_1);
  21. end
  22.  
  23. while _G.farm do
  24. wait()
  25. for i,v in pairs(game:GetService("Workspace").FightableNPCS:GetChildren()) do
  26. if v.Name == _G.tenmob then
  27. if v.Humanoid.Health > 1 then
  28. repeat wait()
  29. local plr = game:service"Players".LocalPlayer
  30. local tween_s = game:service"TweenService"
  31. local info = TweenInfo.new((plr.Character.HumanoidRootPart.Position - v.HumanoidRootPart.Position).Magnitude/80,Enum.EasingStyle.Quad)
  32. local tic_k = tick()
  33. local params = {...}
  34. local cframe = CFrame.new(v.HumanoidRootPart.Position + Vector3.new(0, -1, 0), v.HumanoidRootPart.Position)
  35. local tween,err = pcall(function()
  36. local tween = tween_s:Create(plr.Character["HumanoidRootPart"],info,{CFrame = cframe})
  37. tween:Play()
  38. attack()
  39. questbandit()
  40. end)
  41. if not tween then return err end
  42. until v.Humanoid.Health == 0 or _G.farm == false
  43. end
  44. end
  45. end
  46. end
Add Comment
Please, Sign In to add comment