Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Credits to Johiro
- --If you decide to skid something then atleast give credits
- local function GetDamage(Axe, TreeClass)
- if Axe.ToolTip == "Basic Hatchet" then return 0.2
- elseif Axe.ToolTip == "Plain Axe" then return 0.55
- elseif Axe.ToolTip == "Steel Axe" then return 0.93
- elseif Axe.ToolTip == "Hardened Axe" then return 1.45
- elseif Axe.ToolTip == "Silver Axe" then return 1.6
- elseif Axe.ToolTip == "Rukiryaxe" then return 1.68
- elseif Axe.ToolTip == "Beta Axe of Bosses" then return 1.45
- elseif Axe.ToolTip == "Alpha Axe of Testing" then return 1.5
- elseif Axe.ToolTip == "Fire Axe" then
- if TreeClass ~= "Volcano" then return 0.6 else return 6.35 end
- elseif Axe.ToolTip == "End Times Axe" then
- if TreeClass ~= "LoneCave" then return 1.58 else return 10000000 end
- elseif Axe.ToolTip == "Candy Cane Axe" then return 0
- elseif Axe.ToolTip == "Johiro" then return 1.8
- elseif Axe.ToolTip == "Beesaxe" then return 1.4
- elseif Axe.ToolTip == "CHICKEN AXE" then return 0.9
- elseif Axe.ToolTip == "Amber Axe" then return 3.39
- elseif Axe.ToolTip == "The Many Axe" then return 10.2
- elseif Axe.ToolTip == "Gingerbread Axe" then
- if TreeClass == "Walnut" then return 8.5
- elseif TreeClass == "Koa" then return 11 else return 1.2 end
- elseif Axe.ToolTip == "Bird Axe" then
- if TreeClass ~= "Volcano" and TreeClass ~= "CaveCrawler" then return 0.5 else return 0.4 end
- end
- end
- _G.TreeList = {}
- for a,b in pairs(workspace:GetChildren()) do
- if b.name == "TreeRegion" then
- b.ChildAdded:Connect(function(NewTree)--Creates functions that Adds new trees to the list
- table.insert(_G.TreeList, NewTree)
- end)
- for c,d in pairs(b:GetChildren()) do-- Adds the trees when first time starting the script
- if d.Name == "Model" then
- table.insert(_G.TreeList, d)
- end
- end
- end
- end
- local function CutTree(Tree)
- if GetAxe() ~= false then --checks if you have a axe equiped
- Damage = GetDamage(GetAxe(), Tree.TreeClass.Value) --gets the Damage
- local CutArguments = {
- sectionId = 1,
- faceVector = Vector3.new(0,0,-1),
- height = 0.5,
- hitPoints = Damage,
- cooldown = 0,
- cuttingClass = "Axe",
- tool = GetAxe()
- }
- for i=1, 50 do
- game.ReplicatedStorage.Interaction.RemoteProxy:FireServer(Tree.CutEvent, CutArguments)
- end
- end
- end
- spawn(function()
- CutEnabled = false
- while wait(.5) do
- if CutEnabled == true then
- if GetAxe() ~= false then
- for a,b in pairs(_G.TreeList) do
- if not b:FindFirstChild("RootCut") and b:FindFirstChild("CutEvent") then
- distance = (game.Players.LocalPlayer.Character.Head.Position - b.WoodSection.Position).magnitude
- if distance < 225 then
- CutTree(b)
- end
- else
- table.remove(_G.TreeList, a)
- end
- end
- end
- end
- end
- end)
- OffT.MouseButton1Click:connect(function()
- if CutEnabled == true then
- CutEnabled = false
- elseif CutEnabled == false then
- CutEnabled = true
- end
- end)
- OnT.MouseButton1Click:connect(function()
- if CutEnabled == true then
- CutEnabled = false
- elseif CutEnabled == false then
- CutEnabled = true
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment