--- dc: znawz
local Players = game:GetService("Players")
local CoreGui = game:GetService("CoreGui")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local player = Players.LocalPlayer
local remotes = ReplicatedStorage:WaitForChild("Remotes")
local lootFolder = workspace:WaitForChild("ActiveLoot")
_G.MasterFarm = false
local ScreenGui = Instance.new("ScreenGui")
local MainFrame = Instance.new("Frame")
local Title = Instance.new("TextLabel")
local ToggleBtn = Instance.new("TextButton")
ScreenGui.Name = "NWKZ"
ScreenGui.Parent = CoreGui
ScreenGui.ResetOnSpawn = false
MainFrame.Name = "MainFrame"
MainFrame.Parent = ScreenGui
MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
MainFrame.BorderSizePixel = 0
MainFrame.Position = UDim2.new(0.1, 0, 0.4, 0)
MainFrame.Size = UDim2.new(0, 150, 0, 90)
MainFrame.Active = true
MainFrame.Draggable = true
Title.Parent = MainFrame
Title.Size = UDim2.new(1, 0, 0, 25)
Title.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
Title.BorderSizePixel = 0
Title.Text = "NWKZ"
Title.TextColor3 = Color3.fromRGB(255, 255, 255)
Title.Font = Enum.Font.GothamBold
Title.TextSize = 14
ToggleBtn.Parent = MainFrame
ToggleBtn.Position = UDim2.new(0.1, 0, 0.4, 0)
ToggleBtn.Size = UDim2.new(0.8, 0, 0, 40)
ToggleBtn.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
ToggleBtn.Text = "FARM: OFF"
ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleBtn.Font = Enum.Font.Gotham
ToggleBtn.TextSize = 11
ToggleBtn.BorderSizePixel = 0
local function GetMyPlot()
local island = player:GetAttribute("IslandName") or player:GetAttribute("CurrentIsland")
local plotName = player:GetAttribute("PlotName")
if island and plotName then
return workspace.Islands[island].Plots[plotName]
end
end
task.spawn(function()
while true do
if _G.MasterFarm then
local char = player.Character
local root = char and char:FindFirstChild("HumanoidRootPart")
if root then
for _, item in pairs(lootFolder:GetChildren()) do
if item:GetAttribute("PickupType") == "Interact" then
remotes.InteractRequest:FireServer(item.Name)
else
local p = item:IsA("Model") and (item.PrimaryPart or item:FindFirstChildWhichIsA("BasePart")) or item
if p and p:IsA("BasePart") then p.CFrame = root.CFrame end
end
end
end
end
task.wait(0.3)
end
end)
task.spawn(function()
local myPlot = GetMyPlot()
while true do
if _G.MasterFarm and myPlot then
if myPlot:GetAttribute("PlotBusy") ~= true then
remotes.SplitRequest:FireServer(1, true)
task.wait(3.5)
remotes.SellRequest:FireServer({Mode = "SellAll"})
end
end
task.wait(0.5)
end
end)
ToggleBtn.MouseButton1Click:Connect(function()
_G.MasterFarm = not _G.MasterFarm
ToggleBtn.Text = _G.MasterFarm and "FARM: ON" or "FARM: OFF"
ToggleBtn.BackgroundColor3 = _G.MasterFarm and Color3.fromRGB(50, 180, 50) or Color3.fromRGB(180, 50, 50)
end)OP autofarm just turn on equip ur tool and stay in the green zone
No comments yet. Be the first to comment!
1--- dc: znawz
2local Players = game:GetService("Players")
3local CoreGui = game:GetService("CoreGui")
4local ReplicatedStorage = game:GetService("ReplicatedStorage")
5local player = Players.LocalPlayer
6local remotes = ReplicatedStorage:WaitForChild("Remotes")
7local lootFolder = workspace:WaitForChild("ActiveLoot")
8
9_G.MasterFarm = false
10
11local ScreenGui = Instance.new("ScreenGui")
12local MainFrame = Instance.new("Frame")
13local Title = Instance.new("TextLabel")
14local ToggleBtn = Instance.new("TextButton")
15
16ScreenGui.Name = "NWKZ"
17ScreenGui.Parent = CoreGui
18ScreenGui.ResetOnSpawn = false
19
20MainFrame.Name = "MainFrame"
21MainFrame.Parent = ScreenGui
22MainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 25)
23MainFrame.BorderSizePixel = 0
24MainFrame.Position = UDim2.new(0.1, 0, 0.4, 0)
25MainFrame.Size = UDim2.new(0, 150, 0, 90)
26MainFrame.Active = true
27MainFrame.Draggable = true
28
29Title.Parent = MainFrame
30Title.Size = UDim2.new(1, 0, 0, 25)
31Title.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
32Title.BorderSizePixel = 0
33Title.Text = "NWKZ"
34Title.TextColor3 = Color3.fromRGB(255, 255, 255)
35Title.Font = Enum.Font.GothamBold
36Title.TextSize = 14
37
38ToggleBtn.Parent = MainFrame
39ToggleBtn.Position = UDim2.new(0.1, 0, 0.4, 0)
40ToggleBtn.Size = UDim2.new(0.8, 0, 0, 40)
41ToggleBtn.BackgroundColor3 = Color3.fromRGB(180, 50, 50)
42ToggleBtn.Text = "FARM: OFF"
43ToggleBtn.TextColor3 = Color3.fromRGB(255, 255, 255)
44ToggleBtn.Font = Enum.Font.Gotham
45ToggleBtn.TextSize = 11
46ToggleBtn.BorderSizePixel = 0
47
48local function GetMyPlot()
49 local island = player:GetAttribute("IslandName") or player:GetAttribute("CurrentIsland")
50 local plotName = player:GetAttribute("PlotName")
51 if island and plotName then
52 return workspace.Islands[island].Plots[plotName]
53 end
54end
55
56task.spawn(function()
57 while true do
58 if _G.MasterFarm then
59 local char = player.Character
60 local root = char and char:FindFirstChild("HumanoidRootPart")
61 if root then
62 for _, item in pairs(lootFolder:GetChildren()) do
63 if item:GetAttribute("PickupType") == "Interact" then
64 remotes.InteractRequest:FireServer(item.Name)
65 else
66 local p = item:IsA("Model") and (item.PrimaryPart or item:FindFirstChildWhichIsA("BasePart")) or item
67 if p and p:IsA("BasePart") then p.CFrame = root.CFrame end
68 end
69 end
70 end
71 end
72 task.wait(0.3)
73 end
74end)
75
76task.spawn(function()
77 local myPlot = GetMyPlot()
78 while true do
79 if _G.MasterFarm and myPlot then
80 if myPlot:GetAttribute("PlotBusy") ~= true then
81 remotes.SplitRequest:FireServer(1, true)
82 task.wait(3.5)
83 remotes.SellRequest:FireServer({Mode = "SellAll"})
84 end
85 end
86 task.wait(0.5)
87 end
88end)
89
90ToggleBtn.MouseButton1Click:Connect(function()
91 _G.MasterFarm = not _G.MasterFarm
92 ToggleBtn.Text = _G.MasterFarm and "FARM: ON" or "FARM: OFF"
93 ToggleBtn.BackgroundColor3 = _G.MasterFarm and Color3.fromRGB(50, 180, 50) or Color3.fromRGB(180, 50, 50)
94end)