Advertisement
KrystekYY

Untitled

Aug 5th, 2021
1,229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 38.86 KB | None | 0 0
  1. -- init
  2. local library = loadstring(game:HttpGet("https://raw.githubusercontent.com/GreenDeno/Venyx-UI-Library/main/source.lua"))()
  3. local venyx = library.new("Booga Booga Scirpt By KrystekYT", 5013109572)
  4.  
  5. -- themes
  6. local themes = {
  7. Background = Color3.fromRGB(24, 24, 24),
  8. Glow = Color3.fromRGB(0, 0, 0),
  9. Accent = Color3.fromRGB(10, 10, 10),
  10. LightContrast = Color3.fromRGB(20, 20, 20),
  11. DarkContrast = Color3.fromRGB(14, 14, 14),  
  12. TextColor = Color3.fromRGB(255, 255, 255)
  13. }
  14.  
  15. -- first page
  16. local page = venyx:addPage("Main", 5012544693)
  17. local section1 = page:addSection("Farming")
  18. local section2 = page:addSection("Misc")
  19. local section3 = page:addSection("Break Aura Gods")
  20. local sectionset = page:addSection("Settings")
  21.  
  22. --page1
  23.  
  24. section1:addButton("Start Auto Farming", function()
  25.     print("AutoFarm Started")
  26.     loadstring(game:HttpGet("https://raw.githubusercontent.com/LgameNGL/BoogaAutoFarm/main/tptoskyisland.lua"))()
  27.     wait(1)
  28.     game:GetService("ReplicatedStorage").Events.EquipTool:FireServer(2)
  29.     wait(1)
  30.     local nTree = 1
  31.     local Closest
  32.     local ClosestMag
  33.     local destination = Vector3.new()
  34.     local player = game.Players.LocalPlayer.Character.HumanoidRootPart
  35.     local Player1 = game.Players.LocalPlayer
  36.     local human = game.Players.LocalPlayer.Character.Humanoid
  37.     local Body = game.Players.LocalPlayer.Character.HumanoidRootPart
  38.     local data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  39.     local rep = game:service'ReplicatedStorage';
  40.     local eat = game.ReplicatedStorage.Events.UseBagItem;
  41.     local playerGui = Player1:WaitForChild("PlayerGui")
  42.     _G.tree = false
  43.     _G.ping = 1000 -- How high your ping has to be to stop.
  44.     local amt = 1
  45.     _G.Farming = true
  46.     _G.Pickup = true
  47.  
  48.     -- thanks to char for this
  49.     local eatFirst = 'Apple'; -- this is what it will look to eat first
  50.     local foodMatch = {'cooked', 'berry', 'apple', 'pear', 'coconut', 'fruit'}
  51.     -- local destination = Vector3.new(-545.23620605469, 312.95153808594, -1190.4654541016)
  52.     --local destination = game.Workspace.here.Position
  53.     --local destination2 = game.Workspace.XD.Position
  54.  
  55.  
  56.  
  57.     local tweenService = game:GetService("TweenService")
  58.     local mainGui = playerGui:WaitForChild("MainGui")
  59.     local secondaryGui = playerGui:WaitForChild("SecondaryGui")
  60.     local spawnGui = playerGui:WaitForChild("SpawnGui")
  61.     local maxPrompts = 3
  62.     local noteSerials = 1
  63.     local debris = game:GetService("Debris")
  64.  
  65.  
  66.     local createnotif = function(text,color,duration,delayTime)
  67.         wait(delayTime or 0)
  68.         duration = duration or 1
  69.         local fade = 2
  70.         local howmanyprompts = #mainGui.Subordinates.Prompts.Feed:GetChildren()-2
  71.         if howmanyprompts >= maxPrompts then
  72.             local bottomNote,noteHiearchy = nil,math.huge
  73.             for _,v in next,mainGui.Subordinates.Prompts.Feed:GetChildren() do
  74.                 if v:IsA("TextLabel") then
  75.                     if v.LayoutOrder<noteHiearchy then
  76.                         bottomNote,noteHiearchy = v,v.LayoutOrder
  77.                     end
  78.                 end
  79.             end
  80.             if bottomNote then
  81.                 bottomNote:Destroy()
  82.             end
  83.         end
  84.  
  85.         local notification = mainGui.Subordinates.Prompts.Templates.TextLabel:Clone()
  86.         notification.Text = text
  87.         notification.TextColor3 = color or Color3.fromRGB(255,255,255)
  88.         notification.LayoutOrder = noteSerials
  89.         noteSerials = noteSerials+1
  90.  
  91.  
  92.         notification.Parent = mainGui.Subordinates.Prompts.Feed
  93.         notification.Visible = true
  94.         debris:AddItem(notification,duration+fade)
  95.  
  96.         local tweenInfo = TweenInfo.new(fade,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,duration or 1)
  97.         local goals = {
  98.             BackgroundTransparency = 1,
  99.             TextTransparency = 1,
  100.             TextStrokeTransparency = 1,
  101.         }
  102.         local tween = tweenService:Create(notification,tweenInfo,goals)
  103.         tween:Play()
  104.  
  105.     end
  106.  
  107.  
  108.     local pathservice = game:GetService("PathfindingService")
  109.     wait()
  110.  
  111.  
  112.  
  113.     _G.data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  114.     local itemData = require(game.ReplicatedStorage.Modules.ItemData)
  115.     local Player1 = game.Players.LocalPlayer
  116.  
  117.     rep.Events.UpdateData.OnClientEvent:connect(function(newData)  
  118.         _G.data  = newData
  119.     end);
  120.  
  121.     -- for i,v in pairs(itemData["Apple Tree"].multiPickup) do
  122.     --     print(itemData[v].load)
  123.     --     end
  124.  
  125.     getSpace = function()
  126.         for i = 1, amt do
  127.             for _, v in pairs(workspace.Deployables:GetChildren()) do
  128.                 if v.Name == "Campfire" then
  129.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Leaves")
  130.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Leaves")
  131.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Leaves")
  132.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Log")
  133.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Log")
  134.                 end
  135.             end
  136.         end
  137.     end
  138.  
  139.     Applebruh = function()
  140.     local data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  141.         for i,v in pairs(data.inventory) do
  142.             if v.name == "Apple" then
  143.                 if v.quantity >= 200 then
  144.             --  print("More than 200 apples")
  145.                     return true
  146.                 elseif v.quantity < 200 then
  147.                 --  print("Less than 200 apples")
  148.                     return false
  149.                 end
  150.             end
  151.         end
  152.     end
  153.  
  154.     local CalculateLoad = function()
  155.         local data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  156.         local playerLoad = 0
  157.         local maxLoad
  158.         if data.armor.bag and data.armor.bag ~= "none" then
  159.             maxLoad = itemData[data.armor.bag].maxLoad
  160.         else
  161.             maxLoad = 50
  162.         end
  163.         for _,v in next, data.inventory do
  164.             if v.quantity and itemData[v.name] then
  165.                 playerLoad = playerLoad+(v.quantity*(itemData[v.name].load or 1))
  166.             end
  167.         end
  168.         return playerLoad,maxLoad
  169.     end
  170.  
  171.  
  172.     CanBearLoad = function(itemName)
  173.         local xd = 1;
  174.         local anticipatedLoad = 5
  175.         local playerLoad,maxLoad = CalculateLoad()
  176.         if (playerLoad+anticipatedLoad)<=maxLoad or anticipatedLoad == 0 then
  177.             return true
  178.         else
  179.             return false
  180.         end
  181.     end
  182.  
  183.     function getFood()
  184.         for i,v in next, _G.data.inventory do
  185.             local name,quan = v.name,v.quantity;
  186.             if eatFirst and eatFirst:lower() == name:lower() then
  187.                 return name
  188.             end
  189.             for _,match in next,foodMatch do
  190.                 if name:lower():find(match) then
  191.                     return name;
  192.                 end
  193.             end
  194.         end
  195.     end
  196.     local Pickup = function(Character)
  197.         local Objects;
  198.         local myPos = Character.HumanoidRootPart.Position
  199.         local Objects = {}
  200.         for i,v in pairs(workspace:GetChildren()) do
  201.             if v:FindFirstChild("Pickup") ~= nil and v.ClassName == "Part" and v.Name == "Essence" or v.Name == "Gold Bar" or v.Name == "Raw Gold" or v.Name == "Crystal Chunk" then
  202.                 local Pos = v.Position
  203.                 local Distance = (myPos - Pos).magnitude
  204.                 if Distance < 40 then
  205.                     table.insert(Objects, v)
  206.                 end
  207.             elseif v:FindFirstChild("Pickup") ~= nil and v:FindFirstChild("Part") ~= nil and v.Part.ClassName == "Part" and v.Name == "Essence" or v.Name == "Gold Bar" or v.Name == "Raw Gold" or v.Name == "Crystal Chunk" then
  208.                 local Pos = v.Part.Position
  209.                 local Distance = (myPos - Pos).magnitude
  210.                 if Distance < 40 then
  211.                     table.insert(Objects, v)
  212.                 end
  213.             elseif v:FindFirstChild("Pickup") ~= nil and v.ClassName == "UnionOperation" and v.Name == "Essence" or v.Name == "Gold Bar" or v.Name == "Raw Gold" or v.Name == "Crystal Chunk" then
  214.                 local Pos = v.Position
  215.                 local Distance = (myPos - Pos).magnitude
  216.                 if Distance < 40 then
  217.                     table.insert(Objects, v)
  218.                 end
  219.             end
  220.         end
  221.         for i,v in pairs(Objects) do
  222.     if _G.Pickup then
  223.             for i=1,1 do
  224.                     v.Position = myPos
  225.                     game:GetService("ReplicatedStorage").Events.Pickup:FireServer(v)
  226.                     end
  227.             end
  228.         end
  229.     end
  230.     local function getPath(TargetPoint)
  231.         local path = pathservice:CreatePath()
  232.         path:ComputeAsync(Body.Position, TargetPoint)
  233.         return path
  234.     end
  235.  
  236.     local function walkTo(TargetPoint, path)
  237.         local distance
  238.         -- createDots(TargetPoint)
  239.         for _, waypoint in pairs(path:GetWaypoints()) do
  240.     --// Added detection to see if player is frozen by anti-cheat. This should stop you from getting kicked now.
  241.             if Body.Part.Anchored == true then  -- anti cheat anchors this part when you're frozen
  242.                 warn("Frozen By Anti-Cheat Stopping") -- Skips iteration of loop.
  243.             else  -- if it's not anchored or if it's nil or something then we wanna keep tp
  244.                 Body.CFrame = CFrame.new(waypoint.Position)
  245.                 wait(0.3)
  246.             end
  247.         end
  248.     end
  249.  
  250.     local getClosestTree = function(number)
  251.         for i,v in pairs(game.Workspace.Resources:GetChildren()) do
  252.             local tmp
  253.             local Found = false
  254.             local distance = 300
  255.             local partpos
  256.             if v.Name == "Sun Tree" or v.Name == "Sun Shrub" and v.Parent ~= "Contents" then
  257.                 if v.Name == "Sun Shrub" then partpos = "Stump" elseif v.Name == "Sun Tree" then partpos = "Reference" end
  258.                 if (v:FindFirstChild(partpos).Position - Body.Position).magnitude < 300 then
  259.                     if Closest then
  260.                         tmp = (player.Position - v[partpos].Position).magnitude
  261.                         if tmp < ClosestMag then
  262.                             Closest = v
  263.                             ClosestMag = tmp
  264.                         end
  265.                     else
  266.                         Closest = v
  267.                         ClosestMag = (player.Position - v[partpos].Position).magnitude
  268.                     end
  269.                 end
  270.             end
  271.         end
  272.         if Closest then
  273.             if Closest.Name == "Sun Tree" then
  274.                 Closest.Name = "Sun Tree" .. tostring(number)
  275.                 destination = Closest.Reference.Position - Vector3.new(-5,0,-5)
  276.                 print(Closest)
  277.             elseif Closest.Name == "Sun Shrub" then
  278.                 Closest.Name = "Sun Shrub"..tostring(number)
  279.                 destination = Closest:WaitForChild("Stump").Position - Vector3.new(-5,0,-5)
  280.                 print(Closest)
  281.             end
  282.         else
  283.             return
  284.         end
  285.     end
  286.  
  287.     local brokenTree = function(number)
  288.         for i,v in pairs(game.Workspace.Resources:GetChildren()) do
  289.             if  v.Name == "Sun Tree" .. tostring(number) or v.Name == "Sun Shrub" .. tostring(number) then
  290.                 if  "Sun Tree" .. tostring(number) == v.Name or "Sun Shrub"..tostring(number) == v.Name then
  291.                     return true
  292.                 elseif v.Name ~= "Sun Tree".. tostring(number)  or v.Name ~= "Sun Shrub"..tostring(number) then
  293.                     return false
  294.                 end
  295.             end
  296.         end
  297.     end
  298.  
  299.  
  300.  
  301.     local function checkdistance(d)
  302.         if (Body.Position - d).magnitude < 5 then
  303.             return true
  304.         elseif (Body.Position - d).magnitude > 5 then
  305.             return false
  306.         end
  307.     end
  308.  
  309.     local AncientTree = function()
  310.         if game.Workspace.Resources:FindFirstChild("Ancient Tree") then
  311.             return true
  312.         elseif not game.Workspace.Resources:FindFirstChild("Ancient Tree") then
  313.             return false
  314.         end
  315.     end
  316.  
  317.  
  318.  
  319.     local StopCrash = coroutine.create(function()
  320.         local sentText = false
  321.         while true do
  322.             local pingObject = stats():WaitForChild('PerformanceStats'):WaitForChild('Ping') -- get ping ez
  323.             local ping = pingObject:GetValue();
  324.             wait()
  325.             if ping >= _G.ping then
  326.                 if not sentText then
  327.                     createnotif("Ping has spiked, stopping scripts", Color3.fromRGB(170, 0, 0), 1,0)
  328.                     --print("Ping above" .. " " .. _G.ping .. " " .. "Stopping all scripts")
  329.                     sentText = true
  330.                 end
  331.                 _G.Pickup = false
  332.             elseif ping  < _G.ping then
  333.                 if sentText then
  334.                     --print("Ping is back to normal. Re-running scripts.")
  335.                     sentText = false
  336.                 end
  337.                 _G.Pickup = true
  338.             end
  339.         end
  340.     end)
  341.  
  342.     coroutine.resume(StopCrash)
  343.  
  344.     local antilag2 = true
  345.  
  346.     local function startFarm()
  347.     local data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  348.         if _G.Farming then
  349.     while _G.tree do
  350.     if _G.Farming then
  351.             if _G.data.stats.food < 50 then
  352.                         --print("eating")
  353.                 eat:FireServer(getFood());
  354.             end
  355.             local func = coroutine.create(function()
  356.                 if antilag2 then
  357.                     wait(0.5)
  358.                     antilag2 = false
  359.                 elseif not antilag2 then
  360.                     wait(0.5)
  361.                     antilag2 = true
  362.                 end
  363.             end)
  364.             coroutine.resume(func)
  365.     if antilag2 then
  366.             if not CanBearLoad("Apple Tree") then
  367.                     if not Applebruh() then
  368.                         getSpace()
  369.                     end
  370.                 end
  371.         if _G.Pickup then
  372.                             for _, v in pairs(workspace:GetChildren()) do
  373.                                 if v.Name == "Apple Tree" and (Player1.Character.Head.Position - v.PrimaryPart.Position).magnitude < 40 then
  374.                                     if CanBearLoad("Apple Tree") then
  375.                                         game.ReplicatedStorage.Events.Pickup:FireServer(v)
  376.                                     end
  377.                                 end
  378.                             end
  379.                             for _, v in pairs(workspace.Deployables:GetChildren()) do
  380.                                 if v.Name == "Plant Box" and (Player1.Character.Head.Position - v.PrimaryPart.Position).magnitude < 40 then
  381.                                     if CanBearLoad("Apple Tree") then
  382.                                         game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Apple")
  383.                                     end
  384.                                 end
  385.                             end
  386.                         end
  387.             end
  388.             if AncientTree() then
  389.                 _G.tree = false
  390.             end
  391.             wait()
  392.             if not brokenTree(nTree) then
  393.                 nTree = nTree + 1
  394.                 Closest = nil
  395.                 getClosestTree(nTree)
  396.             end
  397.             local path = getPath(destination)
  398.             if not checkdistance(destination) then
  399.                 walkTo(destination, path)
  400.             end
  401.             if Closest then
  402.                 if Closest.Name == "Sun Tree"..tostring(nTree) then
  403.                     game.ReplicatedStorage.Events.SwingTool:FireServer({Closest:WaitForChild("Reference")})
  404.                 elseif Closest.Name == "Sun Shrub"..tostring(nTree) then
  405.                     game.ReplicatedStorage.Events.SwingTool:FireServer({Closest:WaitForChild("Stump")})
  406.                 else
  407.                     print("no reference or stump")
  408.                 end
  409.             end
  410.                 end
  411.                 end
  412.             end
  413.     end
  414.  
  415.     --game.Workspace.Resources.ChildAdded:connect(function(child)
  416.     --  if child.Name == "Sun Tree" then
  417.  
  418.     --  end
  419.     --end)
  420.  
  421.  
  422.  
  423.  
  424.  
  425.     local AutoPickup = coroutine.create(function()
  426.         while true do
  427.             wait(0.001)
  428.             Pickup(game.Players.LocalPlayer.Character)
  429.         end
  430.     end)
  431.  
  432.     coroutine.resume(AutoPickup)
  433.  
  434.     local hitancientfast = coroutine.create(function()
  435.         while true do
  436.             wait()
  437.             if AncientTree() then
  438.                 game.ReplicatedStorage.Events.SwingTool:FireServer({game:GetService("Workspace").Resources["Ancient Tree"].Reference, game:GetService("Workspace").Resources["Ancient Tree"].Trunk})
  439.             end
  440.         end
  441.     end)
  442.     coroutine.resume(hitancientfast)
  443.  
  444.     local antilag = true
  445.  
  446.     createnotif("Auto farm Loaded and Started", Color3.fromRGB(0, 255, 0), 5,0)
  447.  
  448.     while true do
  449.         wait() 
  450.     if _G.Farming then
  451.         if _G.data.stats.food < 50 then
  452.             eat:FireServer(getFood());
  453.         end
  454.     local func = coroutine.create(function()
  455.             if antilag then
  456.                 wait(0.5)
  457.                 antilag = false
  458.             elseif not antilag then
  459.                 wait(0.5)
  460.                 antilag = true
  461.             end
  462.         end)
  463.     coroutine.resume(func)
  464.             if antilag then
  465.                 if not CanBearLoad("Apple Tree") then
  466.                     if not Applebruh() then
  467.                         getSpace()
  468.                     end
  469.                 end
  470.                 if _G.Pickup then
  471.                     for _, v in pairs(workspace:GetChildren()) do
  472.                         if v.Name == "Apple Tree" and (Player1.Character.Head.Position - v.PrimaryPart.Position).magnitude < 40 then
  473.                             if CanBearLoad("Apple Tree") then
  474.                                 game.ReplicatedStorage.Events.Pickup:FireServer(v)
  475.                             end
  476.                         end
  477.                     end
  478.                     for _, v in pairs(workspace.Deployables:GetChildren()) do
  479.                         if v.Name == "Plant Box" and (Player1.Character.Head.Position - v.PrimaryPart.Position).magnitude < 40 then
  480.                             if CanBearLoad("Apple Tree") then
  481.                                 game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Apple")
  482.                             end
  483.                         end
  484.                     end
  485.                 end
  486.             end
  487.         if AncientTree() then
  488.             destination1 = Vector3.new(-545.23620605469, 312.95153808594, -1190.4654541016)
  489.             _G.tree = false
  490.             local path = getPath(destination1)
  491.             if not checkdistance(destination1) then
  492.                 walkTo(destination1, path)
  493.             end
  494.         elseif not AncientTree() then
  495.             _G.tree = true
  496.         end
  497.         startFarm()
  498.     end
  499.     end
  500.     end)
  501.  
  502. section1:addButton("Stop Auto Farming", function()
  503.     print("AutoFarm Stopped")
  504.     local nTree = 1
  505.     local Closest
  506.     local ClosestMag
  507.     local destination = Vector3.new()
  508.     local player = game.Players.LocalPlayer.Character.HumanoidRootPart
  509.     local Player1 = game.Players.LocalPlayer
  510.     local human = game.Players.LocalPlayer.Character.Humanoid
  511.     local Body = game.Players.LocalPlayer.Character.HumanoidRootPart
  512.     local data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  513.     local rep = game:service'ReplicatedStorage';
  514.     local eat = game.ReplicatedStorage.Events.UseBagItem;
  515.     local playerGui = Player1:WaitForChild("PlayerGui")
  516.     _G.tree = false
  517.     _G.ping = 1000 -- How high your ping has to be to stop.
  518.     local amt = 1
  519.     _G.Farming = false
  520.     _G.Pickup = false
  521.  
  522.     -- thanks to char for this
  523.     local eatFirst = 'Apple'; -- this is what it will look to eat first
  524.     local foodMatch = {'cooked', 'berry', 'apple', 'pear', 'coconut', 'fruit'}
  525.     -- local destination = Vector3.new(-545.23620605469, 312.95153808594, -1190.4654541016)
  526.     --local destination = game.Workspace.here.Position
  527.     --local destination2 = game.Workspace.XD.Position
  528.  
  529.  
  530.  
  531.     local tweenService = game:GetService("TweenService")
  532.     local mainGui = playerGui:WaitForChild("MainGui")
  533.     local secondaryGui = playerGui:WaitForChild("SecondaryGui")
  534.     local spawnGui = playerGui:WaitForChild("SpawnGui")
  535.     local maxPrompts = 3
  536.     local noteSerials = 1
  537.     local debris = game:GetService("Debris")
  538.  
  539.  
  540.     local createnotif = function(text,color,duration,delayTime)
  541.         wait(delayTime or 0)
  542.         duration = duration or 1
  543.         local fade = 2
  544.         local howmanyprompts = #mainGui.Subordinates.Prompts.Feed:GetChildren()-2
  545.         if howmanyprompts >= maxPrompts then
  546.             local bottomNote,noteHiearchy = nil,math.huge
  547.             for _,v in next,mainGui.Subordinates.Prompts.Feed:GetChildren() do
  548.                 if v:IsA("TextLabel") then
  549.                     if v.LayoutOrder<noteHiearchy then
  550.                         bottomNote,noteHiearchy = v,v.LayoutOrder
  551.                     end
  552.                 end
  553.             end
  554.             if bottomNote then
  555.                 bottomNote:Destroy()
  556.             end
  557.         end
  558.  
  559.         local notification = mainGui.Subordinates.Prompts.Templates.TextLabel:Clone()
  560.         notification.Text = text
  561.         notification.TextColor3 = color or Color3.fromRGB(255,255,255)
  562.         notification.LayoutOrder = noteSerials
  563.         noteSerials = noteSerials+1
  564.  
  565.  
  566.         notification.Parent = mainGui.Subordinates.Prompts.Feed
  567.         notification.Visible = true
  568.         debris:AddItem(notification,duration+fade)
  569.  
  570.         local tweenInfo = TweenInfo.new(fade,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,duration or 1)
  571.         local goals = {
  572.             BackgroundTransparency = 1,
  573.             TextTransparency = 1,
  574.             TextStrokeTransparency = 1,
  575.         }
  576.         local tween = tweenService:Create(notification,tweenInfo,goals)
  577.         tween:Play()
  578.  
  579.     end
  580.  
  581.  
  582.     local pathservice = game:GetService("PathfindingService")
  583.     wait()
  584.  
  585.  
  586.  
  587.     _G.data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  588.     local itemData = require(game.ReplicatedStorage.Modules.ItemData)
  589.     local Player1 = game.Players.LocalPlayer
  590.  
  591.     rep.Events.UpdateData.OnClientEvent:connect(function(newData)  
  592.         _G.data  = newData
  593.     end);
  594.  
  595.     -- for i,v in pairs(itemData["Apple Tree"].multiPickup) do
  596.     --     print(itemData[v].load)
  597.     --     end
  598.  
  599.     getSpace = function()
  600.         for i = 1, amt do
  601.             for _, v in pairs(workspace.Deployables:GetChildren()) do
  602.                 if v.Name == "Campfire" then
  603.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Leaves")
  604.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Leaves")
  605.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Leaves")
  606.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Log")
  607.                     game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Log")
  608.                 end
  609.             end
  610.         end
  611.     end
  612.  
  613.     Applebruh = function()
  614.     local data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  615.         for i,v in pairs(data.inventory) do
  616.             if v.name == "Apple" then
  617.                 if v.quantity >= 200 then
  618.             --  print("More than 200 apples")
  619.                     return true
  620.                 elseif v.quantity < 200 then
  621.                 --  print("Less than 200 apples")
  622.                     return false
  623.                 end
  624.             end
  625.         end
  626.     end
  627.  
  628.     local CalculateLoad = function()
  629.         local data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  630.         local playerLoad = 0
  631.         local maxLoad
  632.         if data.armor.bag and data.armor.bag ~= "none" then
  633.             maxLoad = itemData[data.armor.bag].maxLoad
  634.         else
  635.             maxLoad = 50
  636.         end
  637.         for _,v in next, data.inventory do
  638.             if v.quantity and itemData[v.name] then
  639.                 playerLoad = playerLoad+(v.quantity*(itemData[v.name].load or 1))
  640.             end
  641.         end
  642.         return playerLoad,maxLoad
  643.     end
  644.  
  645.  
  646.     CanBearLoad = function(itemName)
  647.         local xd = 1;
  648.         local anticipatedLoad = 5
  649.         local playerLoad,maxLoad = CalculateLoad()
  650.         if (playerLoad+anticipatedLoad)<=maxLoad or anticipatedLoad == 0 then
  651.             return true
  652.         else
  653.             return false
  654.         end
  655.     end
  656.  
  657.     function getFood()
  658.         for i,v in next, _G.data.inventory do
  659.             local name,quan = v.name,v.quantity;
  660.             if eatFirst and eatFirst:lower() == name:lower() then
  661.                 return name
  662.             end
  663.             for _,match in next,foodMatch do
  664.                 if name:lower():find(match) then
  665.                     return name;
  666.                 end
  667.             end
  668.         end
  669.     end
  670.     local Pickup = function(Character)
  671.         local Objects;
  672.         local myPos = Character.HumanoidRootPart.Position
  673.         local Objects = {}
  674.         for i,v in pairs(workspace:GetChildren()) do
  675.             if v:FindFirstChild("Pickup") ~= nil and v.ClassName == "Part" and v.Name == "Essence" then
  676.                 local Pos = v.Position
  677.                 local Distance = (myPos - Pos).magnitude
  678.                 if Distance < 40 then
  679.                     table.insert(Objects, v)
  680.                 end
  681.             elseif v:FindFirstChild("Pickup") ~= nil and v:FindFirstChild("Part") ~= nil and v.Part.ClassName == "Part" and v.Name == "Essence" then
  682.                 local Pos = v.Part.Position
  683.                 local Distance = (myPos - Pos).magnitude
  684.                 if Distance < 40 then
  685.                     table.insert(Objects, v)
  686.                 end
  687.             elseif v:FindFirstChild("Pickup") ~= nil and v.ClassName == "UnionOperation" and v.Name == "Essence" then
  688.                 local Pos = v.Position
  689.                 local Distance = (myPos - Pos).magnitude
  690.                 if Distance < 40 then
  691.                     table.insert(Objects, v)
  692.                 end
  693.             end
  694.         end
  695.         for i,v in pairs(Objects) do
  696.     if _G.Pickup then
  697.             for i=1,1 do
  698.                     v.Position = myPos
  699.                     game:GetService("ReplicatedStorage").Events.Pickup:FireServer(v)
  700.                     end
  701.             end
  702.         end
  703.     end
  704.     local function getPath(TargetPoint)
  705.         local path = pathservice:CreatePath()
  706.         path:ComputeAsync(Body.Position, TargetPoint)
  707.         return path
  708.     end
  709.  
  710.     local function walkTo(TargetPoint, path)
  711.         local distance
  712.         -- createDots(TargetPoint)
  713.         for _, waypoint in pairs(path:GetWaypoints()) do
  714.     --// Added detection to see if player is frozen by anti-cheat. This should stop you from getting kicked now.
  715.             if Body.Part.Anchored == true then  -- anti cheat anchors this part when you're frozen
  716.                 warn("Frozen By Anti-Cheat Stopping") -- Skips iteration of loop.
  717.             else  -- if it's not anchored or if it's nil or something then we wanna keep tp
  718.                 Body.CFrame = CFrame.new(waypoint.Position)
  719.                 wait(0.3)
  720.             end
  721.         end
  722.     end
  723.  
  724.     local getClosestTree = function(number)
  725.         for i,v in pairs(game.Workspace.Resources:GetChildren()) do
  726.             local tmp
  727.             local Found = false
  728.             local distance = 300
  729.             local partpos
  730.             if v.Name == "Sun Tree" or v.Name == "Sun Shrub" and v.Parent ~= "Contents" then
  731.                 if v.Name == "Sun Shrub" then partpos = "Stump" elseif v.Name == "Sun Tree" then partpos = "Reference" end
  732.                 if (v:FindFirstChild(partpos).Position - Body.Position).magnitude < 300 then
  733.                     if Closest then
  734.                         tmp = (player.Position - v[partpos].Position).magnitude
  735.                         if tmp < ClosestMag then
  736.                             Closest = v
  737.                             ClosestMag = tmp
  738.                         end
  739.                     else
  740.                         Closest = v
  741.                         ClosestMag = (player.Position - v[partpos].Position).magnitude
  742.                     end
  743.                 end
  744.             end
  745.         end
  746.         if Closest then
  747.             if Closest.Name == "Sun Tree" then
  748.                 Closest.Name = "Sun Tree" .. tostring(number)
  749.                 destination = Closest.Reference.Position - Vector3.new(-5,0,-5)
  750.                 print(Closest)
  751.             elseif Closest.Name == "Sun Shrub" then
  752.                 Closest.Name = "Sun Shrub"..tostring(number)
  753.                 destination = Closest:WaitForChild("Stump").Position - Vector3.new(-5,0,-5)
  754.                 print(Closest)
  755.             end
  756.         else
  757.             return
  758.         end
  759.     end
  760.  
  761.     local brokenTree = function(number)
  762.         for i,v in pairs(game.Workspace.Resources:GetChildren()) do
  763.             if  v.Name == "Sun Tree" .. tostring(number) or v.Name == "Sun Shrub" .. tostring(number) then
  764.                 if  "Sun Tree" .. tostring(number) == v.Name or "Sun Shrub"..tostring(number) == v.Name then
  765.                     return true
  766.                 elseif v.Name ~= "Sun Tree".. tostring(number)  or v.Name ~= "Sun Shrub"..tostring(number) then
  767.                     return false
  768.                 end
  769.             end
  770.         end
  771.     end
  772.  
  773.  
  774.  
  775.     local function checkdistance(d)
  776.         if (Body.Position - d).magnitude < 5 then
  777.             return true
  778.         elseif (Body.Position - d).magnitude > 5 then
  779.             return false
  780.         end
  781.     end
  782.  
  783.     local AncientTree = function()
  784.         if game.Workspace.Resources:FindFirstChild("Ancient Tree") then
  785.             return true
  786.         elseif not game.Workspace.Resources:FindFirstChild("Ancient Tree") then
  787.             return false
  788.         end
  789.     end
  790.  
  791.  
  792.  
  793.     local StopCrash = coroutine.create(function()
  794.         local sentText = false
  795.         while true do
  796.             local pingObject = stats():WaitForChild('PerformanceStats'):WaitForChild('Ping') -- get ping ez
  797.             local ping = pingObject:GetValue();
  798.             wait()
  799.             if ping >= _G.ping then
  800.                 if not sentText then
  801.                     createnotif("Ping has spiked, stopping scripts", Color3.fromRGB(170, 0, 0), 1,0)
  802.                     --print("Ping above" .. " " .. _G.ping .. " " .. "Stopping all scripts")
  803.                     sentText = true
  804.                 end
  805.                 _G.Pickup = false
  806.             elseif ping  < _G.ping then
  807.                 if sentText then
  808.                     --print("Ping is back to normal. Re-running scripts.")
  809.                     sentText = false
  810.                 end
  811.                 _G.Pickup = true
  812.             end
  813.         end
  814.     end)
  815.  
  816.     coroutine.resume(StopCrash)
  817.  
  818.     local antilag2 = true
  819.  
  820.     local function startFarm()
  821.     local data = game.ReplicatedStorage.Events.RequestData:InvokeServer()
  822.         if _G.Farming then
  823.     while _G.tree do
  824.     if _G.Farming then
  825.             if _G.data.stats.food < 50 then
  826.                         --print("eating")
  827.                 eat:FireServer(getFood());
  828.             end
  829.             local func = coroutine.create(function()
  830.                 if antilag2 then
  831.                     wait(0.5)
  832.                     antilag2 = false
  833.                 elseif not antilag2 then
  834.                     wait(0.5)
  835.                     antilag2 = true
  836.                 end
  837.             end)
  838.             coroutine.resume(func)
  839.     if antilag2 then
  840.             if not CanBearLoad("Apple Tree") then
  841.                     if not Applebruh() then
  842.                         getSpace()
  843.                     end
  844.                 end
  845.         if _G.Pickup then
  846.                             for _, v in pairs(workspace:GetChildren()) do
  847.                                 if v.Name == "Apple Tree" and (Player1.Character.Head.Position - v.PrimaryPart.Position).magnitude < 40 then
  848.                                     if CanBearLoad("Apple Tree") then
  849.                                         game.ReplicatedStorage.Events.Pickup:FireServer(v)
  850.                                     end
  851.                                 end
  852.                             end
  853.                             for _, v in pairs(workspace.Deployables:GetChildren()) do
  854.                                 if v.Name == "Plant Box" and (Player1.Character.Head.Position - v.PrimaryPart.Position).magnitude < 40 then
  855.                                     if CanBearLoad("Apple Tree") then
  856.                                         game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Apple")
  857.                                     end
  858.                                 end
  859.                             end
  860.                         end
  861.             end
  862.             if AncientTree() then
  863.                 _G.tree = false
  864.             end
  865.             wait()
  866.             if not brokenTree(nTree) then
  867.                 nTree = nTree + 1
  868.                 Closest = nil
  869.                 getClosestTree(nTree)
  870.             end
  871.             local path = getPath(destination)
  872.             if not checkdistance(destination) then
  873.                 walkTo(destination, path)
  874.             end
  875.             if Closest then
  876.                 if Closest.Name == "Sun Tree"..tostring(nTree) then
  877.                     game.ReplicatedStorage.Events.SwingTool:FireServer({Closest:WaitForChild("Reference")})
  878.                 elseif Closest.Name == "Sun Shrub"..tostring(nTree) then
  879.                     game.ReplicatedStorage.Events.SwingTool:FireServer({Closest:WaitForChild("Stump")})
  880.                 else
  881.                     print("no reference or stump")
  882.                 end
  883.             end
  884.                 end
  885.                 end
  886.             end
  887.     end
  888.  
  889.     --game.Workspace.Resources.ChildAdded:connect(function(child)
  890.     --  if child.Name == "Sun Tree" then
  891.  
  892.     --  end
  893.     --end)
  894.  
  895.  
  896.  
  897.  
  898.  
  899.     local AutoPickup = coroutine.create(function()
  900.         while true do
  901.             wait(0.001)
  902.             Pickup(game.Players.LocalPlayer.Character)
  903.         end
  904.     end)
  905.  
  906.     coroutine.resume(AutoPickup)
  907.  
  908.     local hitancientfast = coroutine.create(function()
  909.         while true do
  910.             wait()
  911.             if AncientTree() then
  912.                 game.ReplicatedStorage.Events.SwingTool:FireServer({game:GetService("Workspace").Resources["Ancient Tree"].Reference, game:GetService("Workspace").Resources["Ancient Tree"].Trunk})
  913.             end
  914.         end
  915.     end)
  916.     coroutine.resume(hitancientfast)
  917.  
  918.     local antilag = true
  919.  
  920.     createnotif("Stopping AutoFarm", Color3.fromRGB(0, 255, 0), 5,0)
  921.  
  922.     while true do
  923.         wait() 
  924.     if _G.Farming then
  925.         if _G.data.stats.food < 50 then
  926.             eat:FireServer(getFood());
  927.         end
  928.     local func = coroutine.create(function()
  929.             if antilag then
  930.                 wait(0.5)
  931.                 antilag = false
  932.             elseif not antilag then
  933.                 wait(0.5)
  934.                 antilag = true
  935.             end
  936.         end)
  937.     coroutine.resume(func)
  938.             if antilag then
  939.                 if not CanBearLoad("Apple Tree") then
  940.                     if not Applebruh() then
  941.                         getSpace()
  942.                     end
  943.                 end
  944.                 if _G.Pickup then
  945.                     for _, v in pairs(workspace:GetChildren()) do
  946.                         if v.Name == "Apple Tree" and (Player1.Character.Head.Position - v.PrimaryPart.Position).magnitude < 40 then
  947.                             if CanBearLoad("Apple Tree") then
  948.                                 game.ReplicatedStorage.Events.Pickup:FireServer(v)
  949.                             end
  950.                         end
  951.                     end
  952.                     for _, v in pairs(workspace.Deployables:GetChildren()) do
  953.                         if v.Name == "Plant Box" and (Player1.Character.Head.Position - v.PrimaryPart.Position).magnitude < 40 then
  954.                             if CanBearLoad("Apple Tree") then
  955.                                 game.ReplicatedStorage.Events.InteractStructure:FireServer(v, "Apple")
  956.                             end
  957.                         end
  958.                     end
  959.                 end
  960.             end
  961.         if AncientTree() then
  962.             destination1 = Vector3.new(-545.23620605469, 312.95153808594, -1190.4654541016)
  963.             _G.tree = false
  964.             local path = getPath(destination1)
  965.             if not checkdistance(destination1) then
  966.                 walkTo(destination1, path)
  967.             end
  968.         elseif not AncientTree() then
  969.             _G.tree = true
  970.         end
  971.         startFarm()
  972.     end
  973.     end
  974.     end)
  975.  
  976. --page2
  977. section2:addButton("Teleport To Big Island", function()
  978.     local Player = game:GetService("Players").LocalPlayer
  979.     Player.Character.HumanoidRootPart.CFrame = game:GetService("Workspace").QueenPortal.CFrame
  980.     game:GetService("Workspace").CrystalBridge.Transparency = 0
  981.     game:GetService("Workspace").CrystalBridge.CanCollide = true
  982. end)
  983.  
  984.  
  985. section2:addButton("Button", function()
  986.     print("Just Button Now")
  987. end)
  988.  
  989. --page3
  990.  
  991. section3:addToggle("Lonely God", nil, function(a1)
  992. shared.toggle31 = a1
  993. end)
  994. game:GetService("RunService").RenderStepped:connect(function()
  995. if shared.toggle31 then
  996.     local ohTable1 = {
  997.         [1] = workspace.Resources["Lonely God"].Totem
  998.     }
  999.     game:GetService("ReplicatedStorage").Events.SwingTool:FireServer(ohTable1)
  1000.     end
  1001. end)
  1002.  
  1003. section3:addToggle("Old God", nil, function(a2)
  1004. shared.toggle32 = a2
  1005. end)
  1006. game:GetService("RunService").RenderStepped:connect(function()
  1007. if shared.toggle32 then
  1008.     local ohTable1 = {
  1009.         [1] = workspace.Resources["Old God"].Totem
  1010.     }
  1011.     game:GetService("ReplicatedStorage").Events.SwingTool:FireServer(ohTable1)
  1012.     end
  1013. end)
  1014.  
  1015. section3:addToggle("Miserable God", nil, function(a3)
  1016. shared.toggle33 = a3
  1017. end)
  1018. game:GetService("RunService").RenderStepped:connect(function()
  1019. if shared.toggle33 then
  1020.     local ohTable1 = {
  1021.         [1] = workspace.Resources["Miserable God"].Totem
  1022.     }
  1023.     game:GetService("ReplicatedStorage").Events.SwingTool:FireServer(ohTable1)
  1024.     end
  1025. end)
  1026.  
  1027. section3:addToggle("Wealthy God", nil, function(a4)
  1028. shared.toggle34 = a4
  1029. end)
  1030. game:GetService("RunService").RenderStepped:connect(function()
  1031. if shared.toggle34 then
  1032.     local ohTable1 = {
  1033.         [1] = workspace.Resources["Wealthy God"].Totem
  1034.     }
  1035.     game:GetService("ReplicatedStorage").Events.SwingTool:FireServer(ohTable1)
  1036.     end
  1037. end)
  1038.  
  1039. --page settings
  1040. sectionset:addKeybind("Toggle Keybind Menu", Enum.KeyCode.L, function()
  1041. print("Activated Keybind")
  1042. venyx:toggle()
  1043. end, function()
  1044. print("Changed Keybind")
  1045. end)
  1046.  
  1047. -- second page
  1048. local theme = venyx:addPage("Theme", 5012544693)
  1049. local colors = theme:addSection("Colors")
  1050.  
  1051. for theme, color in pairs(themes) do -- all in one theme changer, i know, im cool
  1052. colors:addColorPicker(theme, color, function(color3)
  1053. venyx:setTheme(theme, color3)
  1054. end)
  1055. end
  1056.  
  1057. -- load
  1058. venyx:SelectPage(venyx.pages[1], true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement