-- Click Detection --


local clickDetector = workspace.GoldGrabber.ClickDetector

function onMouseClick(player)
	
	local leaderstats = player.leaderstats
	local goldStat = leaderstats and leaderstats:FindFirstChild("Gold")
	if goldStat then
		goldStat.Value += 1
	end
end

clickDetector.MouseClick:Connect(onMouseClick)
