I have gotten a shovel script, but I don't know how to make it so that the player gets awarded currency every time he/she mines a block.
local Mouse = game.Players.LocalPlayer:GetMouse()
local tool = script.Parent
local Equipped = false
tool.Equipped:Connect(function()
Equipped = true
end)
tool.Unequipped:connect(function()
Equipped = false
end)
Mouse.Button1Down:Connect(function(player)
if Equipped then
local Target = Mouse.Target
Mouse.TargetFilter = game.Players.LocalPlayer.Character
if Target.Name == "Dirt" then
Target:Destroy()
end
end
end)

4 comments
I added .Value to player.leaderstats.Blocks and it worked! Thanks!
oh, i forgot about that, nice job
oh, i forgot about that, nice job
oh, i forgot about that, nice job