Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game.PlaceId == 510411669 then
- print('Currently Playing "'..game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Name..'"')
- elseif game.PlaceId == 963149987 then
- game.StarterGui:SetCore("SendNotification", {
- Title = "In the tower";
- Text = "This autofarm only works in the main game!";
- Icon = "rbxassetid://1221422603";
- Duration = 5;
- })
- return
- else
- return
- end
- repeat wait() until game:FindFirstChild("Players") ~= nil
- repeat wait() until game.Players.LocalPlayer ~= nil
- local autofarm = false
- teleporting = false
- farmdebounce = false
- selling = false
- shielddebounce = false
- savedebounce = false
- locations = {
- entrance = Vector3.new(5857.58838, 156.500061, 4899.37354);
- chest = Vector3.new(12546.7705, 251.514069, -2359.01538);
- exit = Vector3.new(12527.498, 251.514069, -2350.37305);
- sell = Vector3.new(712.656, 227.960, -481.461);
- }
- function goto(pos)
- teleporting = true
- if not game.Workspace.HOLE:FindFirstChild("HoleTPEntrance") then
- repeat
- local prevPos = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(1304,96,-525)
- wait()
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = prevPos
- wait(1)
- until game.Workspace.HOLE:FindFirstChild("HoleTPEntrance")
- end
- if (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - pos).magnitude < 200 then
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(pos)
- wait(0.3)
- teleporting = false
- else
- local hole = game.Workspace.HOLE.HoleTPEntrance
- local oPos = hole.Position
- local oSize = hole.Size
- hole.Size = Vector3.new(1,1,1)
- hole.Transparency = 1
- hole.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
- repeat
- hole.Position = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
- wait()
- until (hole.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude < 10
- hole.Position = oPos
- hole.Size = oSize
- repeat wait() until (game.Players.LocalPlayer.Character.HumanoidRootPart.Position - Vector3.new(430,441,102)).magnitude < 10
- for i=1, 4 do
- game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = true
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(pos)
- wait(0.1)
- end
- wait(0.1)
- game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
- teleporting = false
- end
- end
- function sell()
- selling = true
- goto(locations.sell)
- wait()
- repeat wait() until teleporting == false
- wait(0.7)
- for i,v in pairs(game.Players.LocalPlayer.Inventory:GetChildren()) do
- if game.ReplicatedStorage.ItemInfo:FindFirstChild(tostring(v.Value)) then
- if game.ReplicatedStorage.ItemInfo:FindFirstChild(tostring(v.Value)).SellValue.Value >= 10000 then
- game.ReplicatedStorage.Events.SellShop:FireServer(v.Value, Workspace.Shops.Sellers, 1)
- end
- end
- end
- selling = false
- end
- function togglefarm(toggle)
- if autofarm == true and toggle == nil or autofarm == true and toggle == false then
- autofarm = false
- farmdebounce = false
- sell()
- return
- end
- local key = false
- local foundbigitems = false
- for i,v in pairs(game.Players.LocalPlayer.Inventory:GetChildren()) do
- if game.ReplicatedStorage.ItemInfo:FindFirstChild(tostring(v.Value)) then
- if game.ReplicatedStorage.ItemInfo:FindFirstChild(tostring(v.Value)).FullName.Value == "Hidden Key" then
- key = true
- end
- if game.ReplicatedStorage.ItemInfo:FindFirstChild(tostring(v.Value)).SellValue.Value >= 10000 then
- foundbigitems = true
- end
- end
- end
- if key == false then
- game.StarterGui:SetCore("SendNotification", {
- Title = "You need a key!";
- Text = "You need a hidden key to use this autofarm (Get it from the democan boss)";
- Icon = "rbxassetid://1221422603";
- Duration = 5;
- })
- return
- elseif foundbigitems == true then
- game.StarterGui:SetCore("SendNotification", {
- Title = "Items worth 10k+";
- Text = "Please sell or store any items you have worth 10k+ gold before using the autofarm (You can use the :sell command to sell items worth 10k+)";
- Icon = "rbxassetid://1221422603";
- Duration = 5;
- })
- return
- end
- if game.Workspace:FindFirstChild("GuttermouthChest") then
- game.Workspace.Guttermouth["GuttermouthRoom4"].ClaimRewards:InvokeServer()
- end
- wait(0.3)
- autofarm = true
- end
- game.Players.LocalPlayer.Chatted:Connect(function(msg)
- local lower = string.lower(msg)
- if string.find(lower, ":autofarm") or string.find(lower, "/e autofarm") then
- if string.sub(lower, #lower - 2, -1) == "off" then
- togglefarm(false)
- elseif string.sub(lower, #lower - 2, -1) == " on" then
- togglefarm()
- end
- end
- if lower == ":sell" or lower == "/e sell" or lower == "/e :sell" then
- sell()
- end
- end)
- game:GetService("RunService").Stepped:Connect(function()
- if autofarm == true and game.Workspace.Guttermouth.GuttermouthRoom4.Monsters:FindFirstChild("PhantomKnightNPC") and selling == false then
- for _,v in pairs(game.Workspace.Guttermouth.GuttermouthRoom4.Monsters.PhantomKnightNPC:GetChildren()) do
- if (v:IsA("Humanoid")) then
- v.Health = 0
- end
- end
- end
- if autofarm == true and farmdebounce == false then
- farmdebounce = true
- goto(locations.entrance)
- wait()
- repeat wait() until teleporting == false
- game.Workspace.CurrentCamera.CFrame = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, game.Workspace.Guttermouth["Door_GuttermouthPhantom (Hidden Key)"].DoorBrick.CFrame.p)
- wait(0.7)
- if autofarm == false then
- return
- end
- for i = 1,3 do
- game.Workspace.Guttermouth["Door_GuttermouthPhantom (Hidden Key)"].InteractEvent:FireServer()
- end
- repeat wait() until game.Workspace:FindFirstChild("GuttermouthChest")
- repeat wait() until game.Workspace.GuttermouthChest:FindFirstChild("HeaxgonPart")
- repeat wait() until game.Workspace.GuttermouthChest:FindFirstChild("InteractEvent")
- if autofarm == false then
- return
- end
- goto(locations.chest)
- wait()
- repeat wait() until teleporting == false
- game.Workspace.CurrentCamera.CFrame = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, game.Workspace.GuttermouthChest.HeaxgonPart.CFrame.p)
- wait(0.7)
- for i = 1,3 do
- game.Workspace.GuttermouthChest:FindFirstChild("InteractEvent"):Fire()
- end
- if autofarm == false then
- return
- end
- goto(locations.exit)
- wait()
- repeat wait() until teleporting == false
- game.Workspace.CurrentCamera.CFrame = CFrame.new(game.Workspace.CurrentCamera.CFrame.p, game.Workspace.Guttermouth.GuttermouthRoom4.GutterExit.PP.CFrame.p)
- wait(0.7)
- if autofarm == false then
- return
- end
- for i = 1,3 do
- game.Workspace.Guttermouth.GuttermouthRoom4.GutterExit.InteractEvent:FireServer()
- end
- wait(1)
- if autofarm == false then
- return
- end
- if game.Players.LocalPlayer.Inventory.S20.Value ~= 0 then
- sell()
- end
- farmdebounce = false
- end
- end)
- local shield = Instance.new("Part", game.Workspace)
- shield.Position = Vector3.new(431.08197, 356.23465, 102.730209)
- shield.Size = Vector3.new(15, 5, 12)
- shield.Transparency = 1
- shield.Anchored = true
- shield.CanCollide = false
- shield.Touched:Connect(function(part)
- if shielddebounce == false then
- shielddebounce = true
- local model = part:FindFirstAncestorWhichIsA("Model")
- if not game.Players:FindFirstChild(model.Name) and string.find(string.lower(model.Name), "npc") then
- for i,v in pairs(model:GetDescendants()) do
- if v:IsA("Humanoid") then
- v.Health = 0
- end
- end
- end
- shielddebounce = false
- end
- end)
- local save = Instance.new("Part", game.Workspace)
- save.Position = Vector3.new(431.08197, 356.23465, 102.730209)
- save.Size = Vector3.new(15, 5, 12)
- save.Transparency = 0
- save.Anchored = true
- save.CanCollide = false
- save.Touched:Connect(function(part)
- if savedebounce == false then
- savedebounce = true
- if part:FindFirstAncestor(game.Players.LocalPlayer.Name) then
- togglefarm(false)
- end
- wait(3)
- repeat wait() until selling == false
- togglefarm()
- savedebounce = false
- end
- end)
- local creditsdab = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local aidez = Instance.new("ImageLabel")
- local names = Instance.new("TextLabel")
- local scriptmadeby = Instance.new("TextLabel")
- creditsdab.Name = "creditsdab"
- creditsdab.Parent = game.CoreGui
- Frame.Parent = creditsdab
- Frame.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame.Position = UDim2.new(0.399554282, 0, 0.241054624, 0)
- Frame.Size = UDim2.new(0, 274, 0, 274)
- aidez.Name = "aidez"
- aidez.Parent = Frame
- aidez.BackgroundColor3 = Color3.new(1, 1, 1)
- aidez.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
- aidez.Position = UDim2.new(-0.000740621239, 0, 0.000178694725, 0)
- aidez.Size = UDim2.new(0, 274, 0, 274)
- aidez.Image = "rbxassetid://0&hash=9c3f6c00707d5ebde710fd2f3efd2b5e"
- names.Name = "names"
- names.Parent = Frame
- names.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
- names.BackgroundTransparency = 0.30000001192093
- names.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
- names.Position = UDim2.new(0, 0, 0.897810221, 0)
- names.Size = UDim2.new(0, 274, 0, 28)
- names.Font = Enum.Font.SourceSans
- names.Text = "Vortexturize | aidez moi | Aidez "
- names.TextColor3 = Color3.new(1, 1, 1)
- names.TextSize = 14
- scriptmadeby.Name = "scriptmadeby"
- scriptmadeby.Parent = Frame
- scriptmadeby.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647)
- scriptmadeby.BackgroundTransparency = 0.30000001192093
- scriptmadeby.BorderColor3 = Color3.new(0.117647, 0.117647, 0.117647)
- scriptmadeby.Position = UDim2.new(0, 0, -0.102189779, 0)
- scriptmadeby.Size = UDim2.new(0, 274, 0, 28)
- scriptmadeby.Font = Enum.Font.SourceSans
- scriptmadeby.Text = "Script made by"
- scriptmadeby.TextColor3 = Color3.new(1, 1, 1)
- scriptmadeby.TextSize = 14
- while wait(3) do
- creditsdab:Destroy()
- break
- end
- game.StarterGui:SetCore("SendNotification", {
- Title = "Usage:";
- Text = "Say :autofarm on to turn the farm on. Say :autofarm off to turn it off. (Do /e :autofarm for silent commands)";
- Icon = "rbxassetid://2541869220";
- Duration = 10;
- })
- local VirtualUser = game:GetService("VirtualUser")
- game.Players.LocalPlayer.Idled:Connect(function()
- VirtualUser:CaptureController()
- VirtualUser:ClickButton2(Vector2.new())
- end)
- -- say ":autofarm on" to turn the autofarm on
- -- say ":autofarm off" to turn the autofarm off
- -- say ":sell" to sell all your items worth 10k or more (doesn't include equipped items)
Add Comment
Please, Sign In to add comment