SyntaxIsHere

Untitled

Jun 29th, 2018
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.89 KB | None | 0 0
  1. -- Objects
  2.  
  3. local ScreenGui = Instance.new("ScreenGui")
  4. local Frame = Instance.new("Frame")
  5. local Frame_2 = Instance.new("Frame")
  6. local TextButton = Instance.new("TextButton")
  7. local TextButton_2 = Instance.new("TextButton")
  8. local TextButton_3 = Instance.new("TextLabel")
  9. local TextButton_4 = Instance.new("TextLabel")
  10. local backpack = Instance.new("TextBox")
  11. local toolname = Instance.new("TextBox")
  12.  
  13. -- Properties
  14.  
  15. ScreenGui.Parent = game.CoreGui
  16.  
  17. Frame.Parent = ScreenGui
  18. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  19. Frame.BorderSizePixel = 0
  20. Frame.Position = UDim2.new(0.32480818, 0, 0.365612656, 0)
  21. Frame.Size = UDim2.new(0, 356, 0, 274)
  22. Frame.Active = true
  23. Frame.Draggable = true
  24.  
  25. Frame_2.Parent = Frame
  26. Frame_2.BackgroundColor3 = Color3.new(0.184314, 0.470588, 1)
  27. Frame_2.BorderSizePixel = 0
  28. Frame_2.Size = UDim2.new(0, 356, 0, 12)
  29.  
  30. TextButton.Parent = Frame
  31. TextButton.BackgroundColor3 = Color3.new(0.184314, 0.470588, 1)
  32. TextButton.BorderSizePixel = 0
  33. TextButton.Position = UDim2.new(0.219101131, 0, 0.110486895, 0)
  34. TextButton.Size = UDim2.new(0, 200, 0, 42)
  35. TextButton.Font = Enum.Font.SourceSansLight
  36. TextButton.FontSize = Enum.FontSize.Size28
  37. TextButton.Text = "Enable auto farm"
  38. TextButton.TextColor3 = Color3.new(1, 1, 1)
  39. TextButton.TextSize = 30
  40.  
  41. TextButton_2.Parent = Frame
  42. TextButton_2.BackgroundColor3 = Color3.new(0.184314, 0.470588, 1)
  43. TextButton_2.BorderSizePixel = 0
  44. TextButton_2.Position = UDim2.new(0.219101131, 0, 0.332724392, 0)
  45. TextButton_2.Size = UDim2.new(0, 200, 0, 42)
  46. TextButton_2.Font = Enum.Font.SourceSansLight
  47. TextButton_2.FontSize = Enum.FontSize.Size28
  48. TextButton_2.Text = "Disable auto farm"
  49. TextButton_2.TextColor3 = Color3.new(1, 1, 1)
  50. TextButton_2.TextSize = 30
  51.  
  52. TextButton_3.Parent = Frame
  53. TextButton_3.BackgroundTransparency = 1
  54. TextButton_3.Position = UDim2.new(0.219101131, 0, 0.865231323, 0)
  55. TextButton_3.Size = UDim2.new(0, 200, 0, 42)
  56. TextButton_3.Font = Enum.Font.SourceSansLight
  57. TextButton_3.FontSize = Enum.FontSize.Size28
  58. TextButton_3.Text = "Made By Iallwaysgetafk"
  59. TextButton_3.TextColor3 = Color3.new(0, 0, 10)
  60. TextButton_3.TextSize = 25
  61.  
  62. backpack.Parent = Frame
  63. backpack.BackgroundColor3 = Color3.new(0.184314, 0.470588, 1)
  64. backpack.BorderSizePixel = 0
  65. backpack.Position = UDim2.new(0.219101131, 0, 0.532724392, 0)
  66. backpack.Size = UDim2.new(0, 200, 0, 42)
  67. backpack.Font = Enum.Font.SourceSansLight
  68. backpack.FontSize = Enum.FontSize.Size28
  69. backpack.Text = "Backpack size"
  70. backpack.TextColor3 = Color3.new(1, 1, 1)
  71. backpack.TextSize = 30
  72.  
  73. toolname.Parent = Frame
  74. toolname.BackgroundColor3 = Color3.new(0.184314, 0.470588, 1)
  75. toolname.BorderSizePixel = 0
  76. toolname.Position = UDim2.new(0.219101131, 0, 0.732724392, 0)
  77. toolname.Size = UDim2.new(0, 200, 0, 42)
  78. toolname.Font = Enum.Font.SourceSansLight
  79. toolname.FontSize = Enum.FontSize.Size28
  80. toolname.Text = "Tool name here"
  81. toolname.TextColor3 = Color3.new(1, 1, 1)
  82. toolname.TextSize = 30
  83.  
  84.  
  85. --~~Functions~~--
  86. local Event = game:GetService("ReplicatedStorage").Farm
  87. local Event = game:GetService("ReplicatedStorage").Farm
  88. local player = game.Players.LocalPlayer
  89. local sell = CFrame.new(Vector3.new(-65, 24, 118))
  90. local enabled = false
  91. TextButton.MouseButton1Down:connect(function()
  92. if enabled == false then
  93. enabled = true
  94. local Tool = tostring(toolname.Text)
  95. local backpacksize = tonumber(backpack.Text)
  96. if player.bagAmount.Value < backpacksize then
  97. for i, v in next, game:GetService("Workspace").Grass:GetChildren() do
  98. for i,y in pairs(v:GetChildren()) do
  99. if y.Name == "Grass" then
  100. if enabled == true then
  101. if player.bagAmount.Value >= backpacksize then
  102. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = sell
  103. wait(3)
  104. end
  105. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = y.CFrame
  106. wait()
  107. Event:FireServer(y, Tool)
  108. end
  109. end
  110. end
  111. end
  112. wait()
  113. end
  114. end
  115. end)
  116. TextButton_2.MouseButton1Down:connect(function()
  117. enabled = false
  118. print("Disabled")
  119. end)
Add Comment
Please, Sign In to add comment