Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.DoFarm = true --if you would like the autofarm not to run for a little bit, set _G.DoFarm = false in another script
- local settings =
- {
- SellAll = { ["Gold Coin"] = true, ["Diamond"] = true }, --items you want to farm for money, in other words
- MaxItems = { ["Rokakaka"] = 25, ["Mysterious Arrow"] = 25, ["Holy Ribcage Corpse"] = 5 }, --the maximum number of these items you want; you can add more and the amounts
- Blacklist = { ["Rokakaka"] = false }, --put items you don't want in here, and set their value to true
- snipeDropped = true --want to steal items that players dropped? set to true
- }
- local items = loadstring(game:HttpGet "https://paste.jakedacatman.me/raw/_I4RU")()
- print "LIST OF ITEMS:"
- for i, _ in pairs(items) do
- print(i)
- end
- local lp = game.Players.LocalPlayer
- local plr = game.Workspace.Living[lp.Name]
- local items = game.Workspace.Item_Spawns.Items
- local ts = game:GetService "TweenService"
- local hrp = plr.HumanoidRootPart or plr:WaitForChild "HumanoidRootPart"
- local function getItemCount(name)
- local ct = 0
- for i, v in pairs(lp.Backpack:GetChildren()) do
- if v.Name == name then
- ct = ct + 1
- end
- end
- return ct
- end
- local function sellAllItems(name)
- plr.Humanoid:EquipTool(lp.Backpack[name])
- plr.RemoteEvent:FireServer("EndDialogue", { NPC = "Merchant", Option = "Option2", Dialogue = "Dialogue5" })
- end
- local function doTp(v)
- if _G.DoFarm then
- if plr:FindFirstChild "RemoteFunction" then --this is the main one for anticheat i believe, but the others may have a role (idk so better safe than sorry!)
- plr.RemoteFunction:Destroy()
- end
- if plr:FindFirstChild "BindableFunction" then
- plr.BindableFunction:Destroy()
- end
- if plr:FindFirstChild "BindableEvent" then
- plr.BindableEvent:Destroy()
- end
- local item = v.Parent
- local base = item and item:FindFirstChild "Base" or nil
- local name = item and item.Name or nil
- if base and base:IsA "BasePart" and not settings.Blacklist[name] then
- if getItemCount(name) < (settings.MaxItems[name] or math.huge) then
- local pos = hrp.CFrame
- local info = TweenInfo.new(2, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false)
- ts:Create(hrp, info, { CFrame = base.CFrame }):Play()
- wait(2)
- fireclickdetector(v, 1)
- wait(1)
- end
- end
- end
- end
- local detectors = {}
- local dropped = {}
- for i,v in pairs(items:GetDescendants()) do
- if v:IsA "ClickDetector" then
- table.insert(detectors, v)
- end
- end
- items.DescendantAdded:connect(function(v)
- if v:IsA "ClickDetector" then
- table.insert(detectors, v)
- end
- end)
- if settings.snipeDropped then
- for i,v in pairs(game.Workspace:GetChildren()) do
- if v.Name == "Item" and v:IsA "Model" then
- table.insert(dropped, v)
- end
- end
- end
- if settings.snipeDropped then
- game.Workspace.ChildAdded:connect(function(v)
- if v.Name == "Item" and v:IsA "Model" then
- table.insert(dropped, v)
- end
- end)
- end
- coroutine.wrap(function()
- while wait(1) do
- if _G.DoFarm then
- local pos = hrp.CFrame
- for i,v in pairs(detectors) do
- pcall(doTp, v)
- end
- hrp.CFrame = pos
- end
- end
- end)()
- if settings.snipeDropped then
- coroutine.wrap(function()
- while wait(1) do
- if _G.DoFarm then
- for i,v in pairs(dropped) do
- pcall(function()
- local pos = hrp.CFrame
- for i,v in pairs(dropped) do
- if v and v.Parent == game.Workspace then
- hrp.CFrame = v.Base.CFrame
- wait(.1)
- end
- end
- hrp.CFrame = pos
- end)
- end
- end
- end
- end)()
- end
- coroutine.wrap(function()
- while wait(5) do
- if _G.DoFarm then
- for i,v in pairs(lp.Backpack:GetChildren()) do
- if settings.SellAll[v.Name] then
- pcall(sellAllItems, v.Name)
- end
- end
- end
- end
- end)()
Advertisement
Add Comment
Please, Sign In to add comment