Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.print = true
- target = {}
- local HitPoints={
- ['GoldAxe']= 50;
- ['BasicHatchet']= 0.2;
- ['Axe1']= 0.55;
- ['Axe2']= 0.93;
- ['AxeAlphaTesters']= 1.5;
- ['Rukiryaxe']= 1.68;
- ['Axe3']= 1.45;
- ['AxeBetaTesters']= 1.45;
- ['FireAxe']= 0.6;
- ['SilverAxe']= 1.6;
- ['EndTimesAxe']= 10000000;
- ['AxeChicken']= 0.1;
- ['CandyCaneAxe']= 0;
- }
- local dropoff = {
- CFrame.new(330, -0.296, 85.791), -- dropoff 1
- CFrame.new(315, -0.296, 85.791), -- dropoff 2
- }
- local TreeNames = {}
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Generic" then
- l.Name = "Generic"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Elm" then
- l.Name = "Elm"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Walnut" then
- l.Name = "Walnut"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Cherry" then
- l.Name = "Cherry"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "SnowGlow" then
- l.Name = "SnowGlow"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Oak" then
- l.Name = "Oak"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Birch" then
- l.Name = "Birch"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Koa" then
- l.Name = "Koa"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Cherry" then
- l.Name = "Fir"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Pine" then
- l.Name = "Pine"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Volcano" then
- l.Name = "Volcano"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "GreenSwampy" then
- l.Name = "GreenSwampy"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "CaveCrawler" then
- l.Name = "CaveCrawler"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Palm" then
- l.Name = "Palm"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Gold" then
- l.Name = "Gold"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "Frost" then
- l.Name = "Frost"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- for i, l in pairs(game:GetService("Workspace"):GetChildren()) do
- if l.Name == "TreeRegion" then
- if l ~= nil then
- for i, b in pairs(l:GetChildren()) do
- if b:IsA("Model") then
- if b:FindFirstChild("TreeClass") ~= nil and b.TreeClass.Value == "LoneCave" then
- l.Name = "LoneCave"
- table.insert(TreeNames, l.Name)
- end
- end
- end
- end
- end
- end
- --Name Changer Ended
- -- Get Generic
- for i, v in pairs(workspace:GetChildren()) do
- if v:IsA("Model") then
- table.insert(target, v)
- end
- end
- --Ended
- local bp = game.Players.LocalPlayer.Backpack
- local localplayer = game.Players.LocalPlayer
- local workspaceaxe = workspace[localplayer.Name]
- local plr = game:GetService("Players").LocalPlayer
- local on = false
- plr.Chatted:Connect(function(Msg)
- if Msg:lower() == "e" then
- on = not on
- end
- end)
- while true do
- wait()
- while true do
- wait()
- if on == true then
- wait()
- if not workspaceaxe:FindFirstChild("Tool") then
- workspace:FindFirstChild(plr.Name).Humanoid:EquipTool(game.Players.LocalPlayer.Backpack.Tool)
- elseif workspaceaxe:FindFirstChild("Tool") then
- local choosen = math.random(#target)
- if _G.print == true then
- if target[choosen]:FindFirstChild("Model") and target[choosen].Model:FindFirstChild("TreeClass") then
- print("--------------------")
- print("Found A Model")
- print('Name = ',target[choosen].Model.TreeClass.Value)
- print("--------------------")
- elseif not target[choosen]:FindFirstChild("Model") then
- print("Model Lost, Finding A New Model")
- end
- end
- if target[choosen]:FindFirstChild("Model") then
- if not target[choosen].Model:FindFirstChild("WoodSection") then
- if _G.print == true then
- print("No Wood Section, Skipping Tree!!")
- break
- end
- end
- end
- if target[choosen] then
- if target[choosen]:FindFirstChild("Model") then
- if target[choosen].Model:FindFirstChild("WoodSection") then
- wait(.5)
- --Ended
- --Cut Targeted Tree
- local A_1 = target[choosen].Model:FindFirstChild("CutEvent")
- local A_2 =
- {
- ["tool"] = workspace:FindFirstChild(plr.Name):FindFirstChild("Tool"),
- ["faceVector"] = Vector3.new(-1, 0, 0),
- ["height"] = .3,
- ["sectionId"] = 1,
- ["hitPoints"] = HitPoints[workspace:FindFirstChild(plr.Name).Tool.ToolName.Value],
- ["cooldown"] = 0,
- ["cuttingClass"] = "Axe"
- }
- if target[choosen]:FindFirstChild("Model") then
- while true do
- if workspace[localplayer.Name]:FindFirstChild("Tool") then
- end
- wait()
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = target[choosen].Model:FindFirstChild("WoodSection").CFrame + Vector3.new(0, 0, -1)
- game:GetService("ReplicatedStorage").Interaction.RemoteProxy:FireServer(A_1, A_2)
- if not target[choosen]:FindFirstChild("Model") then
- print("No Wood Section, Skipping")
- break
- end
- if game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y < -100 then
- print("Player Glitched Or The Tree Is Under The Map, Skipped The Tree")
- break
- end
- if target[choosen].Model:FindFirstChild("RootCut") then
- break
- end
- wait()
- end
- end
- end
- wait()
- target[choosen].Model:Destroy()
- --Ended
- wait()
- --Ended
- --Sell Wood
- for _, Log in pairs(workspace.LogModels:GetChildren()) do
- if Log.Name:sub(1, 6) == "Loose_" and Log:findFirstChild("Owner") then
- if Log.Owner.Value == game.Players.LocalPlayer then
- for i,v in pairs(Log:GetChildren()) do
- if v.Name=="WoodSection" then
- spawn(function()
- for i = 1, 5 do
- wait()
- local choosen = math.random(#dropoff)
- v.CFrame=dropoff[choosen]
- end
- end)
- end
- end
- spawn(function()
- for i = 1, 100 do
- wait()
- game.ReplicatedStorage.Interaction.ClientIsDragging:FireServer(Log)
- end
- end)
- end
- end
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement