Advertisement
XDGato

Auto Farm pet

Dec 1st, 2019
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. _G.on = false
  2. _G.maxhp = 500
  3. _G.wait = .3
  4.  
  5. --don't touch below unless ur sure what ur doing
  6.  
  7. local lp = game:GetService"Players".LocalPlayer
  8. local uis = game:GetService"UserInputService"
  9.  
  10. local a = 1
  11. local id = 100
  12.  
  13. game:GetService"StarterGui":SetCore("SendNotification", {
  14. Title = "Farm",
  15. Text = "By Ryyb"
  16. })
  17. wait(1)
  18. game:GetService"StarterGui":SetCore("SendNotification", {
  19. Title = "Farm",
  20. Text = "F5 to toggle"
  21. })
  22.  
  23. uis.InputBegan:Connect(function(input,gP)
  24. if gP then return end
  25.  
  26. if input.KeyCode == Enum.KeyCode.F5 then
  27. _G.on = not _G.on
  28. game:GetService"StarterGui":SetCore("SendNotification", {
  29. Title = "Farm by Ryyb",
  30. Text = tostring(_G.on)
  31. })
  32. end
  33. end)
  34.  
  35. local function farm(v)
  36. if not v or not v:FindFirstChild"POS" then return end
  37.  
  38. lp.Character:FindFirstChild"HumanoidRootPart".CFrame = v.POS.CFrame+Vector3.new(0,-7.5,0)
  39. workspace.__THINGS.__REMOTES["join coin"]:InvokeServer({{v.Name,"idec87c80ee53c4750a05e7bff55246dce"},{false,false}})
  40. workspace.__THINGS.__REMOTES["change pet target"]:FireServer({{"idec87c80ee53c4750a05e7bff55246dce","Coin",v.Name},{false,false,false}})
  41. workspace.__THINGS.__REMOTES["farm coin"]:FireServer({{v.Name,"idec87c80ee53c4750a05e7bff55246dce"},{false,false}})
  42. workspace.__THINGS.__REMOTES["take drop"]:FireServer({{"id"..id,"id"..a},{false,false}})
  43. end
  44.  
  45. game:GetService"RunService".RenderStepped:Connect(function()
  46. if not _G.on then return end
  47. if not lp.Character or not lp.Character:FindFirstChildOfClass"Humanoid" then return end
  48.  
  49. lp.Character:FindFirstChildOfClass"Humanoid":ChangeState(11)
  50.  
  51. a = a + 1
  52. id = id + 1
  53.  
  54. if a >= 10 then
  55. a = 1
  56. end
  57. if id >= 200 then
  58. id = 100
  59. end
  60.  
  61. for _,v in pairs(workspace.__THINGS.Coins:GetChildren()) do
  62. if v:FindFirstChild"POS" and v:FindFirstChild"Settings" and v.Settings.Health.Value > 0 and v.Settings.Health.Value < _G.maxhp then
  63. repeat wait(_G.wait) farm(v) until not v or not _G.on or not lp.Character
  64. end
  65. end
  66. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement