Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --No Fog
- NoFog.MouseButton1Down:connect(function()
- --Fog.BackgroundColor3 = Color3.new(0, 0, 0)
- NoFog.TextColor3 = Color3.new(1, 1, 1)
- game.Lighting.Changed:connect(function()
- game.Lighting.TimeOfDay = "12:00:00"
- game.Lighting.FogEnd = 9999
- game.Lighting.Brightness = 2
- end)
- end)
- --Golden Axe
- spawn(function()
- GAxe = false
- function GetAxe() --Gets your current axe thats equiped when called
- if game.Players.LocalPlayer.Character:FindFirstChild("Tool") then
- return game.Players.LocalPlayer.Character.Tool --returns the axe when found
- else
- return false --returns false when not equiped
- end
- end
- function GetDamage(Axe, TreeClass)-- Gets the right Damage of the axe and returns it if called to prevent killing yourself like gold axe
- 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" then return 2.5 elseif TreeClass == "CaveCrawler" then return 3.9 else return 1.65 end
- end
- end
- function GCut(TreePart) --Cuts the tree when called with the tree you want to cut
- if GetAxe() ~= false then --checks if you have a axe equiped
- Damage = GetDamage(GetAxe(), TreePart.Parent.TreeClass.Value) --gets the Damage
- Height = TreePart.CFrame:pointToObjectSpace(mouse.Hit.p).Y + TreePart.Size.Y/2 --Gets the Height
- local CutArguments = {
- sectionId = TreePart.ID.Value,
- faceVector = Vector3.new(0,0,-1),
- height = Height,
- hitPoints = Damage,
- cooldown = 0,
- cuttingClass = "Axe",
- tool = GetAxe()
- }
- for i=1, 50 do
- game.ReplicatedStorage.Interaction.RemoteProxy:FireServer(TreePart.Parent.CutEvent, CutArguments)
- end
- end
- end
- function CutTree(Tree) --Cuts the tree when called with the tree you want to cut
- 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
- TreeList = {} --Creates a table of the trees
- 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(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(TreeList, d)
- end
- end
- end
- end
- spawn(function() --used spawn so it wont interrupt any of the other things
- CutEnabled = false
- while wait(.5) do --Main loop to do the stuff
- if CutEnabled == true then
- if GetAxe() ~= false then --Checks if you have a axe equiped
- for a,b in pairs(TreeList) do
- if not b:FindFirstChild("RootCut") and b:FindFirstChild("CutEvent") then --Checks if the tree is already cut
- distance = (game.Players.LocalPlayer.Character.Head.Position - b.WoodSection.Position).magnitude --gets the distance between player and tree
- if distance < 225 then --if distance lower than 225 then it will cut the tree
- CutTree(b) --Calls the function with the tree to cut
- end
- else
- table.remove(TreeList, a)--if tree already cut then it gets removed from the list
- end
- end
- end
- end
- end
- end)
- mouse = game.Players.LocalPlayer:GetMouse() --Gets the Mouse
- mouse.Button1Down:connect(function()
- if GAxe == true and GetAxe() ~= false then
- Target = mouse.Target
- GCut(Target)
- end
- end)
- --Credits to Johiro, if you decide to skid atleast give credits
- end)
- GoldenAxe.MouseButton1Down:connect(function()
- if GAxe == true then
- GAxe = false
- GoldenAxe.TextColor3 = Color3.fromRGB(255, 255, 255)
- elseif GAxe == false then
- GAxe = true
- GoldenAxe.TextColor3 = Color3.fromRGB(85, 255, 127)
- --Credits to Johiro
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement