1. -- Instances:
  2. local sautosfvarm = Instance.new("ScreenGui")
  3. local main = Instance.new("Frame")
  4. local TextLabel = Instance.new("TextLabel")
  5. local options = Instance.new("ScrollingFrame")
  6. local grassland = Instance.new("TextButton")
  7. local egypt = Instance.new("TextButton")
  8. local future = Instance.new("TextButton")
  9. local moon = Instance.new("TextButton")
  10. local overseer = Instance.new("TextButton")
  11. local lavaland = Instance.new("TextButton")
  12. local desert = Instance.new("TextButton")
  13. local iceland = Instance.new("TextButton")
  14. local mars = Instance.new("TextButton")
  15. local toggle = Instance.new("TextButton")
  16. local exit = Instance.new("TextButton")
  17. local coins = Instance.new("TextButton")
  18. --Properties:
  19. sautosfvarm.Name = "sautosfvarm"
  20. sautosfvarm.Parent = game.CoreGui
  21. sautosfvarm.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  22. main.Name = "main"
  23. main.Parent = sautosfvarm
  24. main.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  25. main.Position = UDim2.new(0.0611183383, 0, 0.373848975, 0)
  26. main.Size = UDim2.new(0, 225, 0, 288)
  27. TextLabel.Parent = main
  28. TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  29. TextLabel.Position = UDim2.new(0.0533333346, 0, 0.027777778, 0)
  30. TextLabel.Size = UDim2.new(0, 152, 0, 28)
  31. TextLabel.Font = Enum.Font.SourceSans
  32. TextLabel.Text = "my firsrt sautosfvarm"
  33. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
  34. TextLabel.TextSize = 14.000
  35. options.Name = "options"
  36. options.Parent = main
  37. options.Active = true
  38. options.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  39. options.Position = UDim2.new(0.0444444455, 0, 0.149305552, 0)
  40. options.Size = UDim2.new(0, 202, 0, 151)
  41. grassland.Name = "grassland"
  42. grassland.Parent = options
  43. grassland.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  44. grassland.Position = UDim2.new(0.0594059415, 0, 0.0206135698, 0)
  45. grassland.Size = UDim2.new(0, 163, 0, 24)
  46. grassland.Font = Enum.Font.SourceSans
  47. grassland.Text = "grassland"
  48. grassland.TextColor3 = Color3.fromRGB(0, 0, 0)
  49. grassland.TextSize = 14.000
  50. egypt.Name = "egypt"
  51. egypt.Parent = options
  52. egypt.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  53. egypt.Position = UDim2.new(0.0594059415, 0, 0.0779052451, 0)
  54. egypt.Size = UDim2.new(0, 163, 0, 24)
  55. egypt.Font = Enum.Font.SourceSans
  56. egypt.Text = "egypt"
  57. egypt.TextColor3 = Color3.fromRGB(0, 0, 0)
  58. egypt.TextSize = 14.000
  59. future.Name = "future"
  60. future.Parent = options
  61. future.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  62. future.Position = UDim2.new(0.0594059415, 0, 0.135196909, 0)
  63. future.Size = UDim2.new(0, 163, 0, 24)
  64. future.Font = Enum.Font.SourceSans
  65. future.Text = "future"
  66. future.TextColor3 = Color3.fromRGB(0, 0, 0)
  67. future.TextSize = 14.000
  68. moon.Name = "moon"
  69. moon.Parent = options
  70. moon.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  71. moon.Position = UDim2.new(0.0594059415, 0, 0.199433029, 0)
  72. moon.Size = UDim2.new(0, 163, 0, 24)
  73. moon.Font = Enum.Font.SourceSans
  74. moon.Text = "moon"
  75. moon.TextColor3 = Color3.fromRGB(0, 0, 0)
  76. moon.TextSize = 14.000
  77. overseer.Name = "overseer"
  78. overseer.Parent = options
  79. overseer.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  80. overseer.Position = UDim2.new(0.0594059415, 0, 0.263669133, 0)
  81. overseer.Size = UDim2.new(0, 163, 0, 24)
  82. overseer.Font = Enum.Font.SourceSans
  83. overseer.Text = "overseer"
  84. overseer.TextColor3 = Color3.fromRGB(0, 0, 0)
  85. overseer.TextSize = 14.000
  86. lavaland.Name = "lavaland"
  87. lavaland.Parent = options
  88. lavaland.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  89. lavaland.Position = UDim2.new(0.0594059415, 0, 0.331377476, 0)
  90. lavaland.Size = UDim2.new(0, 163, 0, 24)
  91. lavaland.Font = Enum.Font.SourceSans
  92. lavaland.Text = "lavaland"
  93. lavaland.TextColor3 = Color3.fromRGB(0, 0, 0)
  94. lavaland.TextSize = 14.000
  95. desert.Name = "desert"
  96. desert.Parent = options
  97. desert.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  98. desert.Position = UDim2.new(0.0594059415, 0, 0.397349715, 0)
  99. desert.Size = UDim2.new(0, 163, 0, 24)
  100. desert.Font = Enum.Font.SourceSans
  101. desert.Text = "desert"
  102. desert.TextColor3 = Color3.fromRGB(0, 0, 0)
  103. desert.TextSize = 14.000
  104. iceland.Name = "iceland"
  105. iceland.Parent = options
  106. iceland.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  107. iceland.Position = UDim2.new(0.0594059415, 0, 0.46158582, 0)
  108. iceland.Size = UDim2.new(0, 163, 0, 24)
  109. iceland.Font = Enum.Font.SourceSans
  110. iceland.Text = "iceland"
  111. iceland.TextColor3 = Color3.fromRGB(0, 0, 0)
  112. iceland.TextSize = 14.000
  113. mars.Name = "mars"
  114. mars.Parent = options
  115. mars.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  116. mars.Position = UDim2.new(0.0594059415, 0, 0.52408582, 0)
  117. mars.Size = UDim2.new(0, 163, 0, 24)
  118. mars.Font = Enum.Font.SourceSans
  119. mars.Text = "mars"
  120. mars.TextColor3 = Color3.fromRGB(0, 0, 0)
  121. mars.TextSize = 14.000
  122. toggle.Name = "toggle"
  123. toggle.Parent = main
  124. toggle.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  125. toggle.Position = UDim2.new(0.0444444455, 0, 0.839838326, 0)
  126. toggle.Size = UDim2.new(0, 202, 0, 30)
  127. toggle.Font = Enum.Font.SourceSans
  128. toggle.Text = "toggle sautosfvarm"
  129. toggle.TextColor3 = Color3.fromRGB(0, 0, 0)
  130. toggle.TextSize = 14.000
  131. exit.Name = "exit"
  132. exit.Parent = main
  133. exit.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  134. exit.Position = UDim2.new(0.822222233, 0, 0.027777778, 0)
  135. exit.Size = UDim2.new(0, 27, 0, 28)
  136. exit.Font = Enum.Font.SourceSans
  137. exit.Text = "X"
  138. exit.TextColor3 = Color3.fromRGB(0, 0, 0)
  139. exit.TextScaled = true
  140. exit.TextSize = 14.000
  141. exit.TextWrapped = true
  142. coins.Name = "coins"
  143. coins.Parent = main
  144. coins.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  145. coins.Position = UDim2.new(0.0444444455, 0, 0.704421639, 0)
  146. coins.Size = UDim2.new(0, 202, 0, 30)
  147. coins.Font = Enum.Font.SourceSans
  148. coins.Text = "farm coins"
  149. coins.TextColor3 = Color3.fromRGB(0, 0, 0)
  150. coins.TextSize = 14.000
  151. local lplr = game.Players.LocalPlayer
  152. local plr = lplr.Name
  153. local Toggle = false
  154. local farmOption = nil
  155. local enemieTarget = nil
  156. local farmZone = nil
  157. local attacking = false
  158. grassland.MouseButton1Click:Connect(function()
  159. farmOption = "Grassland"
  160. end)
  161. egypt.MouseButton1Click:Connect(function()
  162. farmOption = "Egypt"
  163. end)
  164. future.MouseButton1Click:Connect(function()
  165. farmOption = "Future"
  166. end)
  167. moon.MouseButton1Click:Connect(function()
  168. farmOption = "Moon"
  169. end)
  170. overseer.MouseButton1Click:Connect(function()
  171. farmOption = "Overseer"
  172. end)
  173. lavaland.MouseButton1Click:Connect(function()
  174. farmOption = "Lavaland"
  175. end)
  176. desert.MouseButton1Click:Connect(function()
  177. farmOption = "Desert"
  178. end)
  179. iceland.MouseButton1Click:Connect(function()
  180. farmOption = "Iceland"
  181. end)
  182. mars.MouseButton1Click:Connect(function()
  183. farmOption = "Mars"
  184. end)
  185. toggle.MouseButton1Click:Connect(function()
  186. Toggle = not Toggle
  187. end)
  188. coins.MouseButton1Click:Connect(function()
  189. farmZone = game.Workspace.newMap.Zones[farmOption]
  190. for i,v in pairs(farmZone.CoinStorage:GetChildren()) do
  191. lplr.Character.HumanoidRootPart.CFrame = v.Detector.CFrame
  192. wait(.8)
  193. end
  194. end)
  195. exit.MouseButton1Click:Connect(function()
  196. sautosfvarm:Destroy()
  197. end)
  198. local function checkHealth(npc)
  199. if npc.Humanoid.Health == 0 then
  200. attacking = false
  201. end
  202. end
  203. if game.Workspace[plr]:FindFirstChild("Basic Sword") then
  204. enemieTarget = "Warrior"
  205. farmOption = "Grassland"
  206. end
  207. --[[
  208. if lplr.Data.Backpack.Value == lplr.Data.Capacity.Value then
  209. lplr.Character.HumanoidRootPart.CFrame = CFrame.new(-73.8923492, 4.82500696, 138.237549, -0.38339889, -1.59785678e-08, -0.923582852, 4.37895444e-08, 1, -3.54786067e-08, 0.923582852, -5.40457314e-08, -0.38339889)
  210. end
  211. ]]
  212. while wait() do
  213. if Toggle == true then
  214. if attacking then
  215. return -- already attacking a npc
  216. else
  217. if farmOption ~= nil then
  218. farmZone = game.Workspace.newMap.Zones[farmOption]
  219. for i,v in pairs(farmZone.Enemies:GetChildren()) do
  220. if enemieTarget ~= nil then
  221. if v.Name == enemieTarget then
  222. attacking = true
  223. lplr.Character.HumanoidRootPart.CFrame = v.HumanoidRootPart.CFrame
  224. mouse1click(MOUSE_CLICK)
  225. repeat wait() checkHealth(v) until attacking == false
  226. end
  227. else
  228. attacking = true
  229. lplr.Character.HumanoidRootPart.CFrame = v.HumanoidRootPart.CFrame
  230. mouse1click(MOUSE_CLICK)
  231. repeat wait() checkHealth(v) mouse1click(MOUSE_CLICK) until attacking == false
  232. end
  233. end
  234. end
  235. end
  236. if attacking == false then
  237. if lplr.Data.Backpack.Value == lplr.Data.Capacity.Value then
  238. lplr.Character.HumanoidRootPart.CFrame = CFrame.new(-73.8923492, 4.82500696, 138.237549, -0.38339889, -1.59785678e-08, -0.923582852, 4.37895444e-08, 1, -3.54786067e-08, 0.923582852, -5.40457314e-08, -0.38339889)
  239. end
  240. end
  241. else
  242. end
  243. end