local script

local money = game.Players.LocalPlayer:WaitForChild("leaderstats").Money

local ore = game.Workspace.ores.obsidian.purple

debounce = false

if not game.Players.LocalPlayer.Character:FindFirstChild("Firestoneaxe") then return end

script.Parent.MouseButton1Click:Connect(function()

if not debounce then

debounce = true

local animation = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.Animation)

animation:Play()

script.Parent.BackgroundColor3 = Color3.new(255, 0, 0)

game.Workspace.ores.obsidian.purple.Health.Value = game.Workspace.ores.obsidian.purple.Health.Value - 25

wait(0.75)

animation:Stop()

wait(0.25)

script.Parent.BackgroundColor3 = Color3.new(0, 0, 255)

debounce = false

if game.Workspace.ores.obsidian.purple.Health.Value <= 0 then

game.Workspace.ores.obsidian:FindFirstChild("purple"):Clone().Parent = script.Parent.Parent.Parent.Parent.Backpack

game.ReplicatedStorage:WaitForChild("ore_handler"):FireServer(money,ore)

script.Parent.Parent:Destroy()

if game.Players.LocalPlayer.PlayerGui:FindFirstChild("ScreenGui") then

game.Players.LocalPlayer.PlayerGui.SceenGui:FindFirstChild("mine button"):Destroy()

animation:Stop()

end

end

end

end)